summaryrefslogtreecommitdiff
path: root/test/CodeGen/X86/inreg.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/X86/inreg.ll')
-rw-r--r--test/CodeGen/X86/inreg.ll19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/CodeGen/X86/inreg.ll b/test/CodeGen/X86/inreg.ll
new file mode 100644
index 0000000000..89810339a6
--- /dev/null
+++ b/test/CodeGen/X86/inreg.ll
@@ -0,0 +1,19 @@
+; RUN: llc < %s -march=x86 | FileCheck %s
+
+%struct.s = type { double, float }
+
+define void @g() nounwind {
+entry:
+ %tmp = alloca %struct.s, align 4
+ call void @f(%struct.s* inreg sret %tmp, i32 inreg 41, i32 inreg 42, i32 43)
+ ret void
+ ; CHECK: g:
+ ; CHECK: subl {{.*}}, %esp
+ ; CHECK-NEXT: $43, (%esp)
+ ; CHECK-NEXT: leal 16(%esp), %eax
+ ; CHECK-NEXT: movl $41, %edx
+ ; CHECK-NEXT: movl $42, %ecx
+ ; CHECK-NEXT: calll f
+}
+
+declare void @f(%struct.s* inreg sret, i32 inreg, i32 inreg, i32)