diff options
| author | Chris Lattner <sabre@nondot.org> | 2005-12-05 02:34:05 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2005-12-05 02:34:05 +0000 |
| commit | f3322af5c6170b0649416d359ee22e7ea2e90531 (patch) | |
| tree | e6d3902df6e0ff4ae093c778891b483bf20d3cee /llvm/lib/Target | |
| parent | d49489f01e7eb1353f01d3af3edb6b5d91801a57 (diff) | |
| download | bcm5719-llvm-f3322af5c6170b0649416d359ee22e7ea2e90531.tar.gz bcm5719-llvm-f3322af5c6170b0649416d359ee22e7ea2e90531.zip | |
Add some explicit type casts so that tblgen knows the type of the shift
amount, which is not necessarily the same as the type being shifted.
llvm-svn: 24594
Diffstat (limited to 'llvm/lib/Target')
| -rw-r--r-- | llvm/lib/Target/PowerPC/PPCInstrInfo.td | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCInstrInfo.td b/llvm/lib/Target/PowerPC/PPCInstrInfo.td index ba8609611c9..504c3cc82e5 100644 --- a/llvm/lib/Target/PowerPC/PPCInstrInfo.td +++ b/llvm/lib/Target/PowerPC/PPCInstrInfo.td @@ -467,7 +467,7 @@ def STVX : XForm_8<31, 231, (ops VRRC:$rS, GPRC:$rA, GPRC:$rB), } def SRAWI : XForm_10<31, 824, (ops GPRC:$rA, GPRC:$rS, u5imm:$SH), "srawi $rA, $rS, $SH", IntShift, - [(set GPRC:$rA, (sra GPRC:$rS, imm:$SH))]>; + [(set GPRC:$rA, (sra GPRC:$rS, (i32 imm:$SH)))]>; def CNTLZW : XForm_11<31, 26, (ops GPRC:$rA, GPRC:$rS), "cntlzw $rA, $rS", IntGeneral, [(set GPRC:$rA, (ctlz GPRC:$rS))]>; @@ -875,14 +875,14 @@ def : Pat<(trunc G8RC:$in), (OR8To4 G8RC:$in, G8RC:$in)>; // SHL -def : Pat<(shl GPRC:$in, imm:$imm), +def : Pat<(shl GPRC:$in, (i32 imm:$imm)), (RLWINM GPRC:$in, imm:$imm, 0, (SHL32 imm:$imm))>; -def : Pat<(shl G8RC:$in, imm:$imm), +def : Pat<(shl G8RC:$in, (i64 imm:$imm)), (RLDICR G8RC:$in, imm:$imm, (SHL64 imm:$imm))>; // SRL -def : Pat<(srl GPRC:$in, imm:$imm), +def : Pat<(srl GPRC:$in, (i32 imm:$imm)), (RLWINM GPRC:$in, (SRL32 imm:$imm), imm:$imm, 31)>; -def : Pat<(srl G8RC:$in, imm:$imm), +def : Pat<(srl G8RC:$in, (i64 imm:$imm)), (RLDICL G8RC:$in, (SRL64 imm:$imm), imm:$imm)>; // Hi and Lo for Darwin Global Addresses. |

