1 ; RUN: llc -stack-symbol-ordering=0 < %s | FileCheck %s
3 ; The aligned alloca means that we have to realign the stack, which forces the
4 ; use of ESI to address local variables.
6 target datalayout = "e-m:x-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32"
7 target triple = "i686--windows-msvc"
9 ; Function Attrs: nounwind
10 define void @realigned_try() personality ptr @_except_handler3 {
12 %x = alloca [4 x i32], align 16
13 invoke void @useit(ptr %x)
14 to label %__try.cont unwind label %catch.dispatch
16 catch.dispatch: ; preds = %entry
17 %cs1 = catchswitch within none [label %__except.ret] unwind to caller
19 __except.ret: ; preds = %catch.dispatch
20 %pad = catchpad within %cs1 [ptr @"\01?filt$0@0@realigned_try@@"]
21 catchret from %pad to label %__try.cont
23 __try.cont: ; preds = %entry, %__except.ret
27 ; Function Attrs: nounwind argmemonly
29 ; Function Attrs: nounwind
30 define internal i32 @"\01?filt$0@0@realigned_try@@"() {
35 declare void @useit(ptr)
37 declare i32 @_except_handler3(...)
39 ; CHECK-LABEL: _realigned_try:
42 ; CHECK: movl %esp, %ebp
46 ; CHECK: andl $-16, %esp
47 ; CHECK: subl $64, %esp
48 ; CHECK: movl %esp, %esi
50 ; CHECK: movl %ebp, 12(%esi)
52 ; CHECK: movl %esp, 36(%esi)
53 ; The state is stored at ESI+56, the end of the node is ESI+60.
54 ; CHECK: movl $-1, 56(%esi)
60 ; CHECK: LBB0_2: # %__try.cont
61 ; CHECK: leal -12(%ebp), %esp
68 ; CHECK: LBB0_1: # %__except.ret
70 ; CHECK: movl -24(%ebp), %esp
71 ; Recompute ESI by subtracting 60 from the end of the registration node.
72 ; CHECK: leal -60(%ebp), %esi
74 ; CHECK: movl 12(%esi), %ebp
75 ; Rejoin normal control flow