aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGen/Mips/i64arg.ll
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2011-06-12 15:42:51 +0000
committerDimitry Andric <dim@FreeBSD.org>2011-06-12 15:42:51 +0000
commit56fe8f14099930935e3870e3e823c322a85c1c89 (patch)
treeb3032e51d630e8070e9e08d6641648f195316a80 /test/CodeGen/Mips/i64arg.ll
parent6b943ff3a3f8617113ecbf611cf0f8957e4e19d2 (diff)
downloadsrc-56fe8f14099930935e3870e3e823c322a85c1c89.tar.gz
src-56fe8f14099930935e3870e3e823c322a85c1c89.zip
Vendor import of llvm trunk r132879:vendor/llvm/llvm-r132879
Notes
Notes: svn path=/vendor/llvm/dist/; revision=223013 svn path=/vendor/llvm/llvm-r132879/; revision=223014; tag=vendor/llvm/llvm-r132879
Diffstat (limited to 'test/CodeGen/Mips/i64arg.ll')
-rw-r--r--test/CodeGen/Mips/i64arg.ll34
1 files changed, 34 insertions, 0 deletions
diff --git a/test/CodeGen/Mips/i64arg.ll b/test/CodeGen/Mips/i64arg.ll
new file mode 100644
index 000000000000..9a30453a51fc
--- /dev/null
+++ b/test/CodeGen/Mips/i64arg.ll
@@ -0,0 +1,34 @@
+; RUN: llc -march=mips -mcpu=4ke < %s | FileCheck %s
+
+define void @f1(i64 %ll1, float %f, i64 %ll, i32 %i, float %f2) nounwind {
+entry:
+; CHECK: addu $[[R1:[0-9]+]], $zero, $5
+; CHECK: addu $[[R0:[0-9]+]], $zero, $4
+; CHECK: lw $25, %call16(ff1)
+; CHECK: ori $6, ${{[0-9]+}}, 3855
+; CHECK: ori $7, ${{[0-9]+}}, 22136
+; CHECK: jalr
+ tail call void @ff1(i32 %i, i64 1085102592623924856) nounwind
+; CHECK: lw $25, %call16(ff2)
+; CHECK: lw $[[R2:[0-9]+]], 80($sp)
+; CHECK: lw $[[R3:[0-9]+]], 84($sp)
+; CHECK: addu $4, $zero, $[[R2]]
+; CHECK: addu $5, $zero, $[[R3]]
+; CHECK: jalr $25
+ tail call void @ff2(i64 %ll, double 3.000000e+00) nounwind
+ %sub = add nsw i32 %i, -1
+; CHECK: sw $[[R0]], 24($sp)
+; CHECK: sw $[[R1]], 28($sp)
+; CHECK: lw $25, %call16(ff3)
+; CHECK: addu $6, $zero, $[[R2]]
+; CHECK: addu $7, $zero, $[[R3]]
+; CHECK: jalr $25
+ tail call void @ff3(i32 %i, i64 %ll, i32 %sub, i64 %ll1) nounwind
+ ret void
+}
+
+declare void @ff1(i32, i64)
+
+declare void @ff2(i64, double)
+
+declare void @ff3(i32, i64, i32, i64)