diff options
author | Evan Cheng <evan.cheng@apple.com> | 2012-02-05 19:55:04 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2012-02-05 19:55:04 +0000 |
commit | dc7c716a1cfc27a12f3bbfa44bd80904ee782779 (patch) | |
tree | a5994e0c797f9c212b06ea9d252cca594f777403 | |
parent | bc384a1feb08141691ef994a7d11a506e89c5a62 (diff) | |
download | external_llvm-dc7c716a1cfc27a12f3bbfa44bd80904ee782779.zip external_llvm-dc7c716a1cfc27a12f3bbfa44bd80904ee782779.tar.gz external_llvm-dc7c716a1cfc27a12f3bbfa44bd80904ee782779.tar.bz2 |
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
-rw-r--r-- | lib/Target/ARM/ARMBaseInstrInfo.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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; } |