From dc7c716a1cfc27a12f3bbfa44bd80904ee782779 Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Sun, 5 Feb 2012 19:55:04 +0000 Subject: DefinesPredicate should only look for def operands. Patch by Ludwig Meier. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149846 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/ARM/ARMBaseInstrInfo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Target/ARM/ARMBaseInstrInfo.cpp b/lib/Target/ARM/ARMBaseInstrInfo.cpp index a72c9b9..7f40ffd 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; } -- cgit v1.1