aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen/Mips
diff options
context:
space:
mode:
authorAkira Hatanaka <ahatanaka@mips.com>2011-09-29 20:37:56 +0000
committerAkira Hatanaka <ahatanaka@mips.com>2011-09-29 20:37:56 +0000
commitc0be26909fa47f3200601c384156f43301f0c5c2 (patch)
tree898715232f95a253a18e04d6748e0a084e42a50f /test/CodeGen/Mips
parentbb5a7442e362776621112dc9453e546a55878e79 (diff)
downloadexternal_llvm-c0be26909fa47f3200601c384156f43301f0c5c2.zip
external_llvm-c0be26909fa47f3200601c384156f43301f0c5c2.tar.gz
external_llvm-c0be26909fa47f3200601c384156f43301f0c5c2.tar.bz2
Mips64 arithmetic and logical instructions with two source registers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140806 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/Mips')
-rw-r--r--test/CodeGen/Mips/mips64instrs.ll36
1 files changed, 36 insertions, 0 deletions
diff --git a/test/CodeGen/Mips/mips64instrs.ll b/test/CodeGen/Mips/mips64instrs.ll
new file mode 100644
index 0000000..1adf137
--- /dev/null
+++ b/test/CodeGen/Mips/mips64instrs.ll
@@ -0,0 +1,36 @@
+; RUN: llc -march=mips64el -mcpu=mips64r1 < %s | FileCheck %s
+
+define i64 @f0(i64 %a0, i64 %a1) nounwind readnone {
+entry:
+; CHECK: daddu
+ %add = add nsw i64 %a1, %a0
+ ret i64 %add
+}
+
+define i64 @f1(i64 %a0, i64 %a1) nounwind readnone {
+entry:
+; CHECK: dsubu
+ %sub = sub nsw i64 %a0, %a1
+ ret i64 %sub
+}
+
+define i64 @f4(i64 %a0, i64 %a1) nounwind readnone {
+entry:
+; CHECK: and
+ %and = and i64 %a1, %a0
+ ret i64 %and
+}
+
+define i64 @f5(i64 %a0, i64 %a1) nounwind readnone {
+entry:
+; CHECK: or
+ %or = or i64 %a1, %a0
+ ret i64 %or
+}
+
+define i64 @f6(i64 %a0, i64 %a1) nounwind readnone {
+entry:
+; CHECK: xor
+ %xor = xor i64 %a1, %a0
+ ret i64 %xor
+}