mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-02 00:37:09 +00:00
Do not filter loop if candidate branch is in loop header.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37792 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
2c02c0ff30
commit
6c631988c7
@ -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
Block a user