diff options
-rw-r--r-- | lib/Target/ARM/ARMBaseInstrInfo.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Target/ARM/ARMBaseInstrInfo.cpp b/lib/Target/ARM/ARMBaseInstrInfo.cpp index a72c9b9a2e..7f40ffd65b 100644 --- a/lib/Target/ARM/ARMBaseInstrInfo.cpp +++ b/lib/Target/ARM/ARMBaseInstrInfo.cpp @@ -513,7 +513,7 @@ bool ARMBaseInstrInfo::DefinesPredicate(MachineInstr *MI, bool Found = false; for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) { const MachineOperand &MO = MI->getOperand(i); - if (MO.isReg() && MO.getReg() == ARM::CPSR) { + if (MO.isReg() && MO.isDef() && MO.getReg() == ARM::CPSR) { Pred.push_back(MO); Found = true; } |