summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMatheus Almeida <matheus.almeida@imgtec.com>2014-04-30 15:23:04 +0000
committerMatheus Almeida <matheus.almeida@imgtec.com>2014-04-30 15:23:04 +0000
commit6c71a5f6e4a44cb47d9385d49ffd70d322b467e6 (patch)
tree3c6a5e92678b7f812f7a2e83f5c412ce4aca54d6 /lib
parentfbe7448e5dabca17ee5407cba925cec465f5c04d (diff)
downloadllvm-6c71a5f6e4a44cb47d9385d49ffd70d322b467e6.tar.gz
llvm-6c71a5f6e4a44cb47d9385d49ffd70d322b467e6.tar.bz2
llvm-6c71a5f6e4a44cb47d9385d49ffd70d322b467e6.tar.xz
[mips] Add instruction alias (sll and srl).
Summary: The pattern sll/srl $rd, $rt, $rs is found in handwritten assembly which is just a shorthand version of sllv/srlv $rd, $rt, $rs. Reviewers: dsanders Reviewed By: dsanders Differential Revision: http://reviews.llvm.org/D3483 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207657 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Target/Mips/MipsInstrInfo.td4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Target/Mips/MipsInstrInfo.td b/lib/Target/Mips/MipsInstrInfo.td
index 3910040228..fdac180047 100644
--- a/lib/Target/Mips/MipsInstrInfo.td
+++ b/lib/Target/Mips/MipsInstrInfo.td
@@ -1246,6 +1246,8 @@ def : InstAlias<"tgeu $rs, $rt", (TGEU GPR32Opnd:$rs, GPR32Opnd:$rt, 0), 1>;
def : InstAlias<"tlt $rs, $rt", (TLT GPR32Opnd:$rs, GPR32Opnd:$rt, 0), 1>;
def : InstAlias<"tltu $rs, $rt", (TLTU GPR32Opnd:$rs, GPR32Opnd:$rt, 0), 1>;
def : InstAlias<"tne $rs, $rt", (TNE GPR32Opnd:$rs, GPR32Opnd:$rt, 0), 1>;
+def : InstAlias<"sll $rd, $rt, $rs",
+ (SLLV GPR32Opnd:$rd, GPR32Opnd:$rt, GPR32Opnd:$rs), 0>;
def : InstAlias<"sub, $rd, $rs, $imm",
(ADDi GPR32Opnd:$rd, GPR32Opnd:$rs, InvertedImOperand:$imm)>;
def : InstAlias<"sub $rs, $imm",
@@ -1256,6 +1258,8 @@ def : InstAlias<"subu, $rd, $rs, $imm",
def : InstAlias<"subu $rs, $imm",
(ADDiu GPR32Opnd:$rs, GPR32Opnd:$rs, InvertedImOperand:$imm),
0>;
+def : InstAlias<"srl $rd, $rt, $rs",
+ (SRLV GPR32Opnd:$rd, GPR32Opnd:$rt, GPR32Opnd:$rs), 0>;
//===----------------------------------------------------------------------===//
// Assembler Pseudo Instructions
//===----------------------------------------------------------------------===//