1 ; RUN: llc < %s -enable-shrink-wrap=true | FileCheck %s
3 ; chkstk cannot come before the usual prologue, since it adjusts ESP.
5 target datalayout = "e-m:x-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32"
6 target triple = "i686-pc-windows-msvc18.0.0"
8 %struct.S = type { [12 x i8] }
10 define x86_thiscallcc void @call_inalloca(i1 %x) {
12 %argmem = alloca inalloca <{ %struct.S }>, align 4
13 %argidx1 = getelementptr inbounds <{ %struct.S }>, <{ %struct.S }>* %argmem, i32 0, i32 0, i32 0, i32 0
14 %argidx2 = getelementptr inbounds <{ %struct.S }>, <{ %struct.S }>* %argmem, i32 0, i32 0, i32 0, i32 1
15 store i8 42, i8* %argidx2, align 4
16 br i1 %x, label %bb1, label %bb2
19 store i8 42, i8* %argidx1, align 4
23 call void @inalloca_params(<{ %struct.S }>* inalloca nonnull %argmem)
27 ; CHECK-LABEL: _call_inalloca: # @call_inalloca
29 ; CHECK: movl %esp, %ebp
30 ; CHECK: movl $12, %eax
31 ; CHECK: calll __chkstk
32 ; CHECK: calll _inalloca_params
33 ; CHECK: movl %ebp, %esp
37 declare void @inalloca_params(<{ %struct.S }>* inalloca)