1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00

Do not filter loop if candidate branch is in loop header.

llvm-svn: 37792
This commit is contained in:
Devang Patel 2007-06-29 01:39:53 +00:00
parent a328677ae1
commit 8292a2ee90

View File

@ -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