DefinesPredicate should only look for def operands. Patch by Ludwig Meier.

llvm-svn: 149846
This commit is contained in:
Evan Cheng 2012-02-05 19:55:04 +00:00
parent bbd1156b95
commit 613d6d3b43
1 changed files with 1 additions and 1 deletions

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