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

Nate Begeman natebegeman at mac.com
Fri Mar 17 14:41:49 PST 2006



Changes in directory llvm/lib/Target/PowerPC:

PPCInstrInfo.td updated: 1.186 -> 1.187
---
Log message:

Fix subfic to match subc by default instead of sub so that it is correctly
cost-modeled as producing a flag.  This fixes the test I just added for neg


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

 PPCInstrInfo.td |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


Index: llvm/lib/Target/PowerPC/PPCInstrInfo.td
diff -u llvm/lib/Target/PowerPC/PPCInstrInfo.td:1.186 llvm/lib/Target/PowerPC/PPCInstrInfo.td:1.187
--- llvm/lib/Target/PowerPC/PPCInstrInfo.td:1.186	Thu Mar 16 19:40:33 2006
+++ llvm/lib/Target/PowerPC/PPCInstrInfo.td	Fri Mar 17 16:41:37 2006
@@ -334,7 +334,7 @@
                      [(set GPRC:$rD, (mul GPRC:$rA, immSExt16:$imm))]>;
 def SUBFIC : DForm_2< 8, (ops GPRC:$rD, GPRC:$rA, s16imm:$imm),
                      "subfic $rD, $rA, $imm", IntGeneral,
-                     [(set GPRC:$rD, (sub immSExt16:$imm, GPRC:$rA))]>;
+                     [(set GPRC:$rD, (subc immSExt16:$imm, GPRC:$rA))]>;
 def LI  : DForm_2_r0<14, (ops GPRC:$rD, symbolLo:$imm),
                      "li $rD, $imm", IntGeneral,
                      [(set GPRC:$rD, immSExt16:$imm)]>;
@@ -1058,7 +1058,7 @@
 def : Pat<(xor GPRC:$in, imm:$imm),
           (XORIS (XORI GPRC:$in, (LO16 imm:$imm)), (HI16 imm:$imm))>;
 // SUBFIC
-def : Pat<(subc immSExt16:$imm, GPRC:$in),
+def : Pat<(sub  immSExt16:$imm, GPRC:$in),
           (SUBFIC GPRC:$in, imm:$imm)>;
 
 // Return void support.






More information about the llvm-commits mailing list