1 ; RUN: llc < %s -mtriple=i686-pc-win32 | FileCheck %s
3 %Foo = type { i32, i32 }
5 declare void @f(%Foo* inalloca %b)
10 %b = alloca inalloca %Foo
13 %f1 = getelementptr %Foo, %Foo* %b, i32 0, i32 0
14 %f2 = getelementptr %Foo, %Foo* %b, i32 0, i32 1
15 store i32 13, i32* %f1
16 store i32 42, i32* %f2
17 ; CHECK: movl %esp, %eax
18 ; CHECK: movl $13, (%eax)
19 ; CHECK: movl $42, 4(%eax)
20 call void @f(%Foo* inalloca %b)
25 declare void @inreg_with_inalloca(i32 inreg %a, %Foo* inalloca %b)
30 %b = alloca inalloca %Foo
33 %f1 = getelementptr %Foo, %Foo* %b, i32 0, i32 0
34 %f2 = getelementptr %Foo, %Foo* %b, i32 0, i32 1
35 store i32 13, i32* %f1
36 store i32 42, i32* %f2
37 ; CHECK: movl %esp, %eax
38 ; CHECK: movl $13, (%eax)
39 ; CHECK: movl $42, 4(%eax)
40 call void @inreg_with_inalloca(i32 inreg 1, %Foo* inalloca %b)
41 ; CHECK: movl $1, %eax
42 ; CHECK: calll _inreg_with_inalloca
46 declare x86_thiscallcc void @thiscall_with_inalloca(i8* %a, %Foo* inalloca %b)
51 %b = alloca inalloca %Foo
54 %f1 = getelementptr %Foo, %Foo* %b, i32 0, i32 0
55 %f2 = getelementptr %Foo, %Foo* %b, i32 0, i32 1
56 store i32 13, i32* %f1
57 store i32 42, i32* %f2
58 ; CHECK: movl %esp, %eax
59 ; CHECK-DAG: movl $13, (%eax)
60 ; CHECK-DAG: movl $42, 4(%eax)
61 call x86_thiscallcc void @thiscall_with_inalloca(i8* null, %Foo* inalloca %b)
62 ; CHECK-DAG: xorl %ecx, %ecx
63 ; CHECK: calll _thiscall_with_inalloca