mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-16 16:48:02 +00:00
fix a bug where we unswitched the wrong way
llvm-svn: 26225
This commit is contained in:
parent
2f3056286a
commit
57142c7e12
@ -197,9 +197,9 @@ static bool IsTrivialUnswitchCondition(Loop *L, Value *Cond,
|
||||
// side-effects. If so, determine the value of Cond that causes it to do
|
||||
// this.
|
||||
if ((LoopExitBB = isTrivialLoopExitBlock(L, BI->getSuccessor(0)))) {
|
||||
if (Val) *Val = ConstantBool::True;
|
||||
} else if ((LoopExitBB = isTrivialLoopExitBlock(L, BI->getSuccessor(1)))) {
|
||||
if (Val) *Val = ConstantBool::False;
|
||||
} else if ((LoopExitBB = isTrivialLoopExitBlock(L, BI->getSuccessor(1)))) {
|
||||
if (Val) *Val = ConstantBool::True;
|
||||
}
|
||||
} else if (SwitchInst *SI = dyn_cast<SwitchInst>(HeaderTerm)) {
|
||||
// If this isn't a switch on Cond, we can't handle it.
|
||||
|
Loading…
x
Reference in New Issue
Block a user