diff options
| author | Nate Begeman <natebegeman@mac.com> | 2006-03-17 22:41:37 +0000 |
|---|---|---|
| committer | Nate Begeman <natebegeman@mac.com> | 2006-03-17 22:41:37 +0000 |
| commit | 21f87d0e4c59770dec713a45d8510501ae174ee7 (patch) | |
| tree | 6b4901464359ef9cbcb4e5182bd76d6ac863e40c /llvm/lib/Target | |
| parent | 41767dd1420fb82e9a502ee02db2c2f872e42ff7 (diff) | |
| download | bcm5719-llvm-21f87d0e4c59770dec713a45d8510501ae174ee7.tar.gz bcm5719-llvm-21f87d0e4c59770dec713a45d8510501ae174ee7.zip | |
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
llvm-svn: 26835
Diffstat (limited to 'llvm/lib/Target')
| -rw-r--r-- | llvm/lib/Target/PowerPC/PPCInstrInfo.td | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCInstrInfo.td b/llvm/lib/Target/PowerPC/PPCInstrInfo.td index 9e85444fdd3..d30c7f4f4f1 100644 --- a/llvm/lib/Target/PowerPC/PPCInstrInfo.td +++ b/llvm/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. |

