summaryrefslogtreecommitdiff
path: root/test/CodeGen/Mips
diff options
context:
space:
mode:
authorAkira Hatanaka <ahatanaka@mips.com>2011-09-30 03:18:46 +0000
committerAkira Hatanaka <ahatanaka@mips.com>2011-09-30 03:18:46 +0000
commit25a7d94e81317a5f562631906692c4761dcd2395 (patch)
tree97ff0adca3368d8688e6509eb43e0eaed79efc5c /test/CodeGen/Mips
parentf549ab78533cfb7a22a88216f20d69edfcee3cc9 (diff)
downloadllvm-25a7d94e81317a5f562631906692c4761dcd2395.tar.gz
llvm-25a7d94e81317a5f562631906692c4761dcd2395.tar.bz2
llvm-25a7d94e81317a5f562631906692c4761dcd2395.tar.xz
Mips64 shift instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140841 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/Mips')
-rw-r--r--test/CodeGen/Mips/mips64shift.ll64
1 files changed, 64 insertions, 0 deletions
diff --git a/test/CodeGen/Mips/mips64shift.ll b/test/CodeGen/Mips/mips64shift.ll
new file mode 100644
index 0000000000..31e56c82a7
--- /dev/null
+++ b/test/CodeGen/Mips/mips64shift.ll
@@ -0,0 +1,64 @@
+; RUN: llc -march=mips64el -mcpu=mips64r1 < %s | FileCheck %s
+
+define i64 @f0(i64 %a0, i64 %a1) nounwind readnone {
+entry:
+; CHECK: dsllv
+ %shl = shl i64 %a0, %a1
+ ret i64 %shl
+}
+
+define i64 @f1(i64 %a0, i64 %a1) nounwind readnone {
+entry:
+; CHECK: dsrav
+ %shr = ashr i64 %a0, %a1
+ ret i64 %shr
+}
+
+define i64 @f2(i64 %a0, i64 %a1) nounwind readnone {
+entry:
+; CHECK: dsrlv
+ %shr = lshr i64 %a0, %a1
+ ret i64 %shr
+}
+
+define i64 @f3(i64 %a0) nounwind readnone {
+entry:
+; CHECK: dsll
+ %shl = shl i64 %a0, 10
+ ret i64 %shl
+}
+
+define i64 @f4(i64 %a0) nounwind readnone {
+entry:
+; CHECK: dsra
+ %shr = ashr i64 %a0, 10
+ ret i64 %shr
+}
+
+define i64 @f5(i64 %a0) nounwind readnone {
+entry:
+; CHECK: dsrl
+ %shr = lshr i64 %a0, 10
+ ret i64 %shr
+}
+
+define i64 @f6(i64 %a0) nounwind readnone {
+entry:
+; CHECK: dsll32
+ %shl = shl i64 %a0, 40
+ ret i64 %shl
+}
+
+define i64 @f7(i64 %a0) nounwind readnone {
+entry:
+; CHECK: dsra32
+ %shr = ashr i64 %a0, 40
+ ret i64 %shr
+}
+
+define i64 @f8(i64 %a0) nounwind readnone {
+entry:
+; CHECK: dsrl32
+ %shr = lshr i64 %a0, 40
+ ret i64 %shr
+}