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(%struct.S* %o)
25 %x = getelementptr inbounds %struct.S, %struct.S* %o, i32 0, i32 0
26 %0 = call i8* @llvm.localaddress()
27 call void @"?fin$0@0@foo@@"(i8 0, i8* %0)
44 define dso_local void @"?bar@@YAXXZ"() personality i8* bitcast (i32 (...)* @__C_specific_handler to i8*) {
47 ; CHECK: movq %rbp, %rdx
48 ; CHECK-NOT: movq %rsp, %rdx
49 %x = alloca i32, align 4
50 %fn = alloca void (i32)*, align 8
51 call void (...) @llvm.localescape(i32* %x)
52 store i32 1, i32* %x, align 4
53 %0 = load void (i32)*, void (i32)** %fn, align 8
54 %1 = load i32, i32* %x, align 4
55 invoke void %0(i32 %1)
56 to label %invoke.cont unwind label %ehcleanup
57 invoke.cont: ; preds = %entry
58 %2 = call i8* @llvm.localaddress()
59 call void @"?fin$0@0@bar@@"(i8 0, i8* %2)
61 ehcleanup: ; preds = %entry
62 %3 = cleanuppad within none []
63 %4 = call i8* @llvm.localaddress()
64 call void @"?fin$0@0@bar@@"(i8 1, i8* %4) [ "funclet"(token %3) ]
65 cleanupret from %3 unwind to caller
68 declare void @"?fin$0@0@foo@@"(i8 %abnormal_termination, i8* %frame_pointer)
70 declare void @"?fin$0@0@bar@@"(i8 %abnormal_termination, i8* %frame_pointer)
72 declare i8* @llvm.localrecover(i8*, i8*, i32)
74 declare i8* @llvm.localaddress()
76 declare void @llvm.localescape(...)
78 declare dso_local i32 @__C_specific_handler(...)