aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Target/ARM/ARMBaseInstrInfo.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Target/ARM/ARMBaseInstrInfo.cpp b/lib/Target/ARM/ARMBaseInstrInfo.cpp
index 05870b800c..80c914342c 100644
--- a/lib/Target/ARM/ARMBaseInstrInfo.cpp
+++ b/lib/Target/ARM/ARMBaseInstrInfo.cpp
@@ -1373,7 +1373,7 @@ AnalyzeCompare(const MachineInstr *MI, unsigned &SrcReg, int &CmpValue) const {
CmpValue = MI->getOperand(1).getImm();
return true;
case ARM::TSTri: {
- if (MI->getParent()->begin() == MachineBasicBlock::const_iterator(MI))
+ if (&*MI->getParent()->begin() == MI)
return false;
const MachineInstr *AND = llvm::prior(MI);
if (AND->getOpcode() != ARM::ANDri)
@@ -1385,6 +1385,7 @@ AnalyzeCompare(const MachineInstr *MI, unsigned &SrcReg, int &CmpValue) const {
return true;
}
}
+ break;
}
return false;