mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-13 09:33:50 +00:00
Fix Regression/Transforms/LoopUnswitch/2006-02-22-UnswitchCrash.ll, which
caused SPASS to fail building last night. We can't trivially unswitch a loop if the exit block has phi nodes in it, because we don't know which predecessor to use. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26320 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
116ae7c067
commit
f8bf116f80
@ -325,7 +325,9 @@ static bool IsTrivialUnswitchCondition(Loop *L, Value *Cond, Constant **Val = 0,
|
||||
}
|
||||
}
|
||||
|
||||
if (!LoopExitBB)
|
||||
// If we didn't find a single unique LoopExit block, or if the loop exit block
|
||||
// contains phi nodes, this isn't trivial.
|
||||
if (!LoopExitBB || isa<PHINode>(LoopExitBB->begin()))
|
||||
return false; // Can't handle this.
|
||||
|
||||
if (LoopExit) *LoopExit = LoopExitBB;
|
||||
|
Loading…
x
Reference in New Issue
Block a user