mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-05-20 20:38:48 +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.
|
// loop.
|
||||||
for (Loop::block_iterator I = L->block_begin(), E = L->block_end();
|
for (Loop::block_iterator I = L->block_begin(), E = L->block_end();
|
||||||
I != E; ++I) {
|
I != E; ++I) {
|
||||||
if (*I == L->getHeader())
|
|
||||||
continue;
|
|
||||||
TerminatorInst *TI = (*I)->getTerminator();
|
TerminatorInst *TI = (*I)->getTerminator();
|
||||||
if (BranchInst *BI = dyn_cast<BranchInst>(TI)) {
|
if (BranchInst *BI = dyn_cast<BranchInst>(TI)) {
|
||||||
// If this isn't branching on an invariant condition, we can't unswitch
|
// If this isn't branching on an invariant condition, we can't unswitch
|
||||||
|
Loading…
x
Reference in New Issue
Block a user