mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-29 16:12:44 +00:00
Move exit check where it really belongs.
llvm-svn: 105541
This commit is contained in:
parent
65954b2eb4
commit
88b785aa23
@ -515,13 +515,13 @@ bool IfConverter::ValidDiamond(BBInfo &TrueBBI, BBInfo &FalseBBI,
|
||||
MachineBasicBlock::iterator TI = TrueBBI.BB->begin();
|
||||
MachineBasicBlock::iterator FI = FalseBBI.BB->begin();
|
||||
while (1) {
|
||||
if (TI == TrueBBI.BB->end() || FI == FalseBBI.BB->end())
|
||||
break;
|
||||
// Skip dbg_value instructions
|
||||
if (TI->isDebugValue())
|
||||
++TI;
|
||||
if (FI->isDebugValue())
|
||||
++FI;
|
||||
if (TI == TrueBBI.BB->end() || FI == FalseBBI.BB->end())
|
||||
break;
|
||||
|
||||
if (!TI->isIdenticalTo(FI))
|
||||
break;
|
||||
@ -533,13 +533,13 @@ bool IfConverter::ValidDiamond(BBInfo &TrueBBI, BBInfo &FalseBBI,
|
||||
TI = firstNonBranchInst(TrueBBI.BB, TII);
|
||||
FI = firstNonBranchInst(FalseBBI.BB, TII);
|
||||
while (1) {
|
||||
if (TI == TrueBBI.BB->begin() || FI == FalseBBI.BB->begin())
|
||||
break;
|
||||
// Skip dbg_value instructions
|
||||
if (TI->isDebugValue())
|
||||
--TI;
|
||||
if (FI->isDebugValue())
|
||||
--FI;
|
||||
if (TI == TrueBBI.BB->begin() || FI == FalseBBI.BB->begin())
|
||||
break;
|
||||
|
||||
if (!TI->isIdenticalTo(FI))
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user