aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/Mips
diff options
context:
space:
mode:
authorAkira Hatanaka <ahatanaka@mips.com>2011-12-07 23:21:19 +0000
committerAkira Hatanaka <ahatanaka@mips.com>2011-12-07 23:21:19 +0000
commitda86fa14f0d1e8bfaede9d98fd66b64dcc3c9bc2 (patch)
treea0baab472243d46d2e7755cc17039f6ad544324a /lib/Target/Mips
parent0a18cdc372a4ca1bd685071d99016ad57ba9d77e (diff)
downloadexternal_llvm-da86fa14f0d1e8bfaede9d98fd66b64dcc3c9bc2.zip
external_llvm-da86fa14f0d1e8bfaede9d98fd66b64dcc3c9bc2.tar.gz
external_llvm-da86fa14f0d1e8bfaede9d98fd66b64dcc3c9bc2.tar.bz2
32 to 64-bit anyext pattern.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146097 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Mips')
-rw-r--r--lib/Target/Mips/Mips64InstrInfo.td4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Target/Mips/Mips64InstrInfo.td b/lib/Target/Mips/Mips64InstrInfo.td
index 91c9102..301905b 100644
--- a/lib/Target/Mips/Mips64InstrInfo.td
+++ b/lib/Target/Mips/Mips64InstrInfo.td
@@ -225,6 +225,9 @@ def DINS : InsBase<7, "dins", CPU64Regs>;
def DSLL64_32 : FR<0x3c, 0x00, (outs CPU64Regs:$rd), (ins CPURegs:$rt),
"dsll32\t$rd, $rt, 0", [], IIAlu>;
+def SLL64_32 : FR<0x0, 0x00, (outs CPU64Regs:$rd), (ins CPURegs:$rt),
+ "sll\t$rd, $rt, 0", [], IIAlu>;
+
//===----------------------------------------------------------------------===//
// Arbitrary patterns that map to one or more instructions
//===----------------------------------------------------------------------===//
@@ -300,4 +303,5 @@ def : Pat<(i32 (trunc CPU64Regs:$src)),
(SLL (EXTRACT_SUBREG CPU64Regs:$src, sub_32), 0)>, Requires<[IsN64]>;
// 32-to-64-bit extension
+def : Pat<(i64 (anyext CPURegs:$src)), (SLL64_32 CPURegs:$src)>;
def : Pat<(i64 (zext CPURegs:$src)), (DSRL32 (DSLL64_32 CPURegs:$src), 0)>;