[llvm-commits] CVS: llvm/lib/Target/PowerPC/PowerPCInstrInfo.td

Chris Lattner lattner at cs.uiuc.edu
Fri Sep 23 17:42:09 PDT 2005



Changes in directory llvm/lib/Target/PowerPC:

PowerPCInstrInfo.td updated: 1.101 -> 1.102
---
Log message:

Teach the dag isel generator how to construct arbitrary immediates.  The
generated isel now tries li then lis, then lis+ori.



---
Diffs of the changes:  (+6 -1)

 PowerPCInstrInfo.td |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletion(-)


Index: llvm/lib/Target/PowerPC/PowerPCInstrInfo.td
diff -u llvm/lib/Target/PowerPC/PowerPCInstrInfo.td:1.101 llvm/lib/Target/PowerPC/PowerPCInstrInfo.td:1.102
--- llvm/lib/Target/PowerPC/PowerPCInstrInfo.td:1.101	Thu Sep 15 16:44:00 2005
+++ llvm/lib/Target/PowerPC/PowerPCInstrInfo.td	Fri Sep 23 19:41:58 2005
@@ -774,7 +774,12 @@
 def : Pat<(xor GPRC:$in, imm:$imm),
           (XORIS (XORI GPRC:$in, (LO16 imm:$imm)), (HI16 imm:$imm))>;
 
-// Same as above, but using a temporary.
+// Arbitrary immediate support.
+def : Pat<(i32 imm:$imm),
+          (ORI (LIS (HI16 imm:$imm)), (LO16 imm:$imm))>;
+
+
+// Same as above, but using a temporary. FIXME: implement temporaries :)
 /*
 def : Pattern<(xor GPRC:$in, imm:$imm),
               [(set GPRC:$tmp, (XORI GPRC:$in, (LO16 imm:$imm))),






More information about the llvm-commits mailing list