summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2012-02-05 19:55:04 +0000
committerEvan Cheng <evan.cheng@apple.com>2012-02-05 19:55:04 +0000
commit613d6d3b4395eae143aed9f1546a85b767d5d4c0 (patch)
tree36b15d99acd7e45bb45a0d684bf3807666ffdc62
parentbbd1156b95ad5625dcc495ec2b76a90874475d3d (diff)
downloadbcm5719-llvm-613d6d3b4395eae143aed9f1546a85b767d5d4c0.tar.gz
bcm5719-llvm-613d6d3b4395eae143aed9f1546a85b767d5d4c0.zip
DefinesPredicate should only look for def operands. Patch by Ludwig Meier.
llvm-svn: 149846
-rw-r--r--llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp b/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp
index a72c9b9a2e6..7f40ffd65be 100644
--- a/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp
+++ b/llvm/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;
}
OpenPOWER on IntegriCloud