1 ; RUN: llc -mtriple x86_64-pc-windows-msvc -o - %s | FileCheck %s
5 ; struct S __declspec(align(32)) o;
15 %struct.S = type { i32 }
17 define dso_local void @"?foo@@YAXXZ"() #0 {
20 ; CHECK: movq %rsp, %rdx
21 ; CHECK-NOT: movq %rbp, %rdx
23 %o = alloca %struct.S, align 32
24 call void (...) @llvm.localescape(ptr %o)
25 %0 = call ptr @llvm.localaddress()
26 call void @"?fin$0@0@foo@@"(i8 0, ptr %0)
43 define dso_local void @"?bar@@YAXXZ"() personality ptr @__C_specific_handler {
46 ; CHECK: movq %rbp, %rdx
47 ; CHECK-NOT: movq %rsp, %rdx
48 %x = alloca i32, align 4
49 %fn = alloca ptr, align 8
50 call void (...) @llvm.localescape(ptr %x)
51 store i32 1, ptr %x, align 4
52 %0 = load ptr, ptr %fn, align 8
53 %1 = load i32, ptr %x, align 4
54 invoke void %0(i32 %1)
55 to label %invoke.cont unwind label %ehcleanup
56 invoke.cont: ; preds = %entry
57 %2 = call ptr @llvm.localaddress()
58 call void @"?fin$0@0@bar@@"(i8 0, ptr %2)
60 ehcleanup: ; preds = %entry
61 %3 = cleanuppad within none []
62 %4 = call ptr @llvm.localaddress()
63 call void @"?fin$0@0@bar@@"(i8 1, ptr %4) [ "funclet"(token %3) ]
64 cleanupret from %3 unwind to caller
67 declare void @"?fin$0@0@foo@@"(i8 %abnormal_termination, ptr %frame_pointer)
69 declare void @"?fin$0@0@bar@@"(i8 %abnormal_termination, ptr %frame_pointer)
71 declare ptr @llvm.localrecover(ptr, ptr, i32)
73 declare ptr @llvm.localaddress()
75 declare void @llvm.localescape(...)
77 declare dso_local i32 @__C_specific_handler(...)