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
This commit is contained in:
Evan Cheng 2012-02-05 19:55:04 +00:00
parent bc384a1feb
commit dc7c716a1c

View File

@ -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;
}