mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-27 15:29:51 +00:00
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:
parent
4d52c6d622
commit
41a628237c
@ -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…
Reference in New Issue
Block a user