[llvm-commits] CVS: llvm/lib/Target/PowerPC/PowerPCInstrInfo.td
Chris Lattner
lattner at cs.uiuc.edu
Wed Sep 28 11:11:02 PDT 2005
Changes in directory llvm/lib/Target/PowerPC:
PowerPCInstrInfo.td updated: 1.104 -> 1.105
---
Log message:
add support for missed eqv tests
---
Diffs of the changes: (+9 -0)
PowerPCInstrInfo.td | 9 +++++++++
1 files changed, 9 insertions(+)
Index: llvm/lib/Target/PowerPC/PowerPCInstrInfo.td
diff -u llvm/lib/Target/PowerPC/PowerPCInstrInfo.td:1.104 llvm/lib/Target/PowerPC/PowerPCInstrInfo.td:1.105
--- llvm/lib/Target/PowerPC/PowerPCInstrInfo.td:1.104 Wed Sep 28 12:13:15 2005
+++ llvm/lib/Target/PowerPC/PowerPCInstrInfo.td Wed Sep 28 13:10:51 2005
@@ -766,10 +766,18 @@
def : Pat<(i32 imm:$imm),
(ORI (LIS (HI16 imm:$imm)), (LO16 imm:$imm))>;
+
// Implement the 'not' operation with the NOR instruction.
def NOT : Pat<(not GPRC:$in),
(NOR GPRC:$in, GPRC:$in)>;
+// EQV patterns
+def EQV1 : Pat<(xor (not GPRC:$in1), GPRC:$in2),
+ (EQV GPRC:$in1, GPRC:$in2)>;
+// FIXME: This should be autogenerated from the above due to xor commutativity.
+def EQV2 : Pat<(xor GPRC:$in1, (not GPRC:$in2)),
+ (EQV GPRC:$in1, GPRC:$in2)>;
+
// or by an arbitrary immediate.
def : Pat<(or GPRC:$in, imm:$imm),
(ORIS (ORI GPRC:$in, (LO16 imm:$imm)), (HI16 imm:$imm))>;
@@ -778,6 +786,7 @@
(XORIS (XORI GPRC:$in, (LO16 imm:$imm)), (HI16 imm:$imm))>;
+
// Same as above, but using a temporary. FIXME: implement temporaries :)
/*
def : Pattern<(xor GPRC:$in, imm:$imm),
More information about the llvm-commits
mailing list