aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNate Begeman <natebegeman@mac.com>2006-03-17 22:41:37 +0000
committerNate Begeman <natebegeman@mac.com>2006-03-17 22:41:37 +0000
commit79691bc1f3434f08f2014ecaa31c7213b71b0b34 (patch)
tree9ae1715839dbc4c47af589834646187631ecda70
parentab001cfeaf8c3c6499a508427dbdc0774c87a3ab (diff)
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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26835 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/PowerPC/PPCInstrInfo.td4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Target/PowerPC/PPCInstrInfo.td b/lib/Target/PowerPC/PPCInstrInfo.td
index 9e85444fdd..d30c7f4f4f 100644
--- a/lib/Target/PowerPC/PPCInstrInfo.td
+++ b/lib/Target/PowerPC/PPCInstrInfo.td
@@ -334,7 +334,7 @@ def MULLI : DForm_2< 7, (ops GPRC:$rD, GPRC:$rA, s16imm:$imm),
[(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<(or GPRC:$in, imm:$imm),
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.