diff options
Diffstat (limited to 'lib/Target/ARM/ARMInstrInfo.h')
-rw-r--r-- | lib/Target/ARM/ARMInstrInfo.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Target/ARM/ARMInstrInfo.h b/lib/Target/ARM/ARMInstrInfo.h index 0b27bfbcdc..da22521b83 100644 --- a/lib/Target/ARM/ARMInstrInfo.h +++ b/lib/Target/ARM/ARMInstrInfo.h @@ -217,6 +217,12 @@ public: // Predication support. virtual bool isPredicated(const MachineInstr *MI) const; + ARMCC::CondCodes getPredicate(const MachineInstr *MI) const { + int PIdx = MI->findFirstPredOperandIdx(); + return PIdx != -1 ? (ARMCC::CondCodes)MI->getOperand(PIdx).getImm() + : ARMCC::AL; + } + virtual bool PredicateInstruction(MachineInstr *MI, const SmallVectorImpl<MachineOperand> &Pred) const; |