Move exit check where it really belongs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105541 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jim Grosbach 2010-06-07 19:12:21 +00:00
parent 4d52c6d622
commit 41a628237c

View File

@ -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;