From: Evan Cheng Date: Sun, 5 Feb 2012 19:55:04 +0000 (+0000) Subject: DefinesPredicate should only look for def operands. Patch by Ludwig Meier. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=dc7c716a1cfc27a12f3bbfa44bd80904ee782779;p=oota-llvm.git 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 --- diff --git a/lib/Target/ARM/ARMBaseInstrInfo.cpp b/lib/Target/ARM/ARMBaseInstrInfo.cpp index a72c9b9a2e6..7f40ffd65be 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; }