From 2d91a4fd6ad6e57ce5566c5b9344d6eb417c273c Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Tue, 29 May 2007 18:42:18 +0000 Subject: Add missing const qualifiers. llvm-svn: 37342 --- llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp') 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, -- cgit v1.2.3