summaryrefslogtreecommitdiff
path: root/lib/Target/ARM/ARMInstrFormats.td
diff options
context:
space:
mode:
authorTim Northover <tnorthover@apple.com>2013-08-22 09:57:11 +0000
committerTim Northover <tnorthover@apple.com>2013-08-22 09:57:11 +0000
commitf7ab3a84b3e1b5a647ae9456a5edb99d86b35329 (patch)
treedef91cf5a4a3ba94fb757beb78a53ae046dfe738 /lib/Target/ARM/ARMInstrFormats.td
parentbccc6f89b7a15abda5593a30c101ae85d1dc3b77 (diff)
downloadllvm-f7ab3a84b3e1b5a647ae9456a5edb99d86b35329.tar.gz
llvm-f7ab3a84b3e1b5a647ae9456a5edb99d86b35329.tar.bz2
llvm-f7ab3a84b3e1b5a647ae9456a5edb99d86b35329.tar.xz
ARM: use TableGen patterns to select CMOV operations.
Back in the mists of time (2008), it seems TableGen couldn't handle the patterns necessary to match ARM's CMOV node that we convert select operations to, so we wrote a lot of fairly hairy C++ to do it for us. TableGen can deal with it now: there were a few minor differences to CodeGen (see tests), but nothing obviously worse that I could see, so we should probably address anything that *does* come up in a localised manner. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188995 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/ARMInstrFormats.td')
-rw-r--r--lib/Target/ARM/ARMInstrFormats.td10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/Target/ARM/ARMInstrFormats.td b/lib/Target/ARM/ARMInstrFormats.td
index 1349476d7c..6d4de3dd99 100644
--- a/lib/Target/ARM/ARMInstrFormats.td
+++ b/lib/Target/ARM/ARMInstrFormats.td
@@ -155,6 +155,16 @@ def pred : PredicateOperand<OtherVT, (ops i32imm, i32imm),
let DecoderMethod = "DecodePredicateOperand";
}
+// Selectable predicate operand for CMOV instructions. We can't use a normal
+// predicate because the default values interfere with instruction selection. In
+// all other respects it is identical though: pseudo-instruction expansion
+// relies on the MachineOperands being compatible.
+def cmovpred : Operand<i32>, PredicateOp,
+ ComplexPattern<i32, 2, "SelectCMOVPred"> {
+ let MIOperandInfo = (ops i32imm, i32imm);
+ let PrintMethod = "printPredicateOperand";
+}
+
// Conditional code result for instructions whose 's' bit is set, e.g. subs.
def CCOutOperand : AsmOperandClass { let Name = "CCOut"; }
def cc_out : OptionalDefOperand<OtherVT, (ops CCR), (ops (i32 zero_reg))> {