forked from OSchip/llvm-project
Do not filter loop if candidate branch is in loop header.
llvm-svn: 37792
This commit is contained in:
parent
d880f90c2b
commit
9feb7f5846
|
@ -166,8 +166,6 @@ bool LoopUnswitch::runOnLoop(Loop *L, LPPassManager &LPM_Ref) {
|
|||
// loop.
|
||||
for (Loop::block_iterator I = L->block_begin(), E = L->block_end();
|
||||
I != E; ++I) {
|
||||
if (*I == L->getHeader())
|
||||
continue;
|
||||
TerminatorInst *TI = (*I)->getTerminator();
|
||||
if (BranchInst *BI = dyn_cast<BranchInst>(TI)) {
|
||||
// If this isn't branching on an invariant condition, we can't unswitch
|
||||
|
|
Loading…
Reference in New Issue