summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target
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
commit312ac02491cbf197c3c7e96f103e1d07f9449238 (patch)
treee2055940feb930b7a9c2519a89a8471701e7d31c /llvm/lib/Target
parent7b061a42b125737137feae387bba372bc43f8c09 (diff)
downloadbcm5719-llvm-312ac02491cbf197c3c7e96f103e1d07f9449238.tar.gz
bcm5719-llvm-312ac02491cbf197c3c7e96f103e1d07f9449238.zip
[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 llvm-svn: 207657
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r--llvm/lib/Target/Mips/MipsInstrInfo.td4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Target/Mips/MipsInstrInfo.td b/llvm/lib/Target/Mips/MipsInstrInfo.td
index 39100402285..fdac1800473 100644
--- a/llvm/lib/Target/Mips/MipsInstrInfo.td
+++ b/llvm/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
//===----------------------------------------------------------------------===//
OpenPOWER on IntegriCloud