diff options
| author | Evan Cheng <evan.cheng@apple.com> | 2007-05-29 18:42:18 +0000 |
|---|---|---|
| committer | Evan Cheng <evan.cheng@apple.com> | 2007-05-29 18:42:18 +0000 |
| commit | 2d91a4fd6ad6e57ce5566c5b9344d6eb417c273c (patch) | |
| tree | 04338d091a82b07534632d310400c3309252d0c1 /llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp | |
| parent | 5983bdbb2cbe1954b4ec7da53937d3d00be58c94 (diff) | |
| download | bcm5719-llvm-2d91a4fd6ad6e57ce5566c5b9344d6eb417c273c.tar.gz bcm5719-llvm-2d91a4fd6ad6e57ce5566c5b9344d6eb417c273c.zip | |
Add missing const qualifiers.
llvm-svn: 37342
Diffstat (limited to 'llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp')
| -rw-r--r-- | llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp b/llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp index 7977555b0ed..f9d760b874b 100644 --- a/llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp +++ b/llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp @@ -245,8 +245,9 @@ ARMLoadStoreOpt::MergeLDR_STR(MachineBasicBlock &MBB, unsigned SIndex, /// getInstrPredicate - If instruction is predicated, returns its predicate /// condition, otherwise returns AL. static ARMCC::CondCodes getInstrPredicate(MachineInstr *MI) { - MachineOperand *PredMO = MI->findFirstPredOperand(); - return PredMO ? (ARMCC::CondCodes)PredMO->getImmedValue() : ARMCC::AL; + int PIdx = MI->findFirstPredOperandIdx(); + return PIdx == -1 ? ARMCC::AL + : (ARMCC::CondCodes)MI->getOperand(PIdx).getImmedValue(); } static inline bool isMatchingDecrement(MachineInstr *MI, unsigned Base, |

