Changes in directory llvm/lib/Target/PowerPC:

PPCInstr64Bit.td updated: 1.6 -> 1.7
---
Log message:

Instead of li/xoris use li/oris.  Note that this doesn't work if bit 15 is
set, so disable the pattern in that case.


---
Diffs of the changes:  (+5 -5)

 PPCInstr64Bit.td |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)


Index: llvm/lib/Target/PowerPC/PPCInstr64Bit.td
diff -u llvm/lib/Target/PowerPC/PPCInstr64Bit.td:1.6 
llvm/lib/Target/PowerPC/PPCInstr64Bit.td:1.7
--- llvm/lib/Target/PowerPC/PPCInstr64Bit.td:1.6        Tue Jun 20 17:34:10 2006
+++ llvm/lib/Target/PowerPC/PPCInstr64Bit.td    Tue Jun 20 17:38:59 2006
@@ -227,12 +227,12 @@
 def : Pat<(i64 sext_0x0000_0000_FFFF_FFFF_i16:$imm),
           (ORI8 (LIS8 (HI16 imm:$imm)), (LO16 imm:$imm))>;
 
-// zext(0x0000_0000_FFFF_FFFF, i16) -> xoris (li lo16(imm)), imm>>16
-def zext_0x0000_0000_FFFF_FFFF_i16 : PatLeaf<(imm), [{
-  return (N->getValue() & 0xFFFFFFFF00000000ULL) == 0;
+// zext(0x0000_0000_FFFF_7FFF, i16) -> oris (li lo16(imm)), imm>>16
+def zext_0x0000_0000_FFFF_7FFF_i16 : PatLeaf<(imm), [{
+  return (N->getValue() & 0xFFFFFFFF00008000ULL) == 0;
 }]>;
-def : Pat<(i64 zext_0x0000_0000_FFFF_FFFF_i16:$imm),
-          (XORIS8 (LI8 (LO16 imm:$imm)), (HI16 imm:$imm))>;
+def : Pat<(i64 zext_0x0000_0000_FFFF_7FFF_i16:$imm),
+          (ORIS8 (LI8 (LO16 imm:$imm)), (HI16 imm:$imm))>;
 
 
 



_______________________________________________
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

Reply via email to