1 ; RUN: llc -mtriple=x86_64-pc-windows-msvc -verify-machineinstrs < %s | FileCheck %s
3 ; We should store -2 into UnwindHelp in a slot immediately after the last XMM
7 declare i32 @__CxxFrameHandler3(...)
9 @fp_global = global double 0.0
11 define void @f() personality i32 (...)* @__CxxFrameHandler3 {
12 %v = load double, double* @fp_global
14 %v1 = fadd double %v, 1.0
15 store double %v1, double* @fp_global
17 to label %return unwind label %catch.dispatch
23 %cs1 = catchswitch within none [label %catch] unwind to caller
26 %p = catchpad within %cs1 [i8* null, i32 64, i8* null]
27 catchret from %p to label %return
32 ; CHECK: .seh_pushreg 5
33 ; CHECK: subq $64, %rsp
34 ; CHECK: .seh_stackalloc 64
35 ; CHECK: leaq 64(%rsp), %rbp
36 ; CHECK: .seh_setframe 5, 64
37 ; CHECK: movaps %xmm6, -16(%rbp) # 16-byte Spill
38 ; CHECK: .seh_savexmm 6, 48
39 ; CHECK: .seh_endprologue
40 ; CHECK: movq $-2, -24(%rbp)
41 ; CHECK: movsd fp_global(%rip), %xmm6 # xmm6 = mem[0],zero
43 ; CHECK: addsd __real@3ff0000000000000(%rip), %xmm6
44 ; CHECK: movsd %xmm6, fp_global(%rip)
48 ; CHECK: .LBB{{.*}} # Block address taken
49 ; CHECK: movaps -16(%rbp), %xmm6
50 ; CHECK: addq $64, %rsp
53 ; CHECK: .seh_handlerdata