1 ; RUN: llc < %s -stackrealign -mattr=+avx -mtriple=x86_64-apple-darwin10 | FileCheck %s
4 define void @f(i64 %sz) uwtable {
6 %a = alloca i32, align 32
7 store volatile i32 0, ptr %a, align 32
8 ; force to push r14 on stack
9 call void asm sideeffect "nop", "~{r14},~{dirflag},~{fpsr},~{flags}"() nounwind, !srcloc !0
14 ; CHECK: .cfi_offset %rbp, -16
15 ; CHECK: movq %rsp, %rbp
16 ; CHECK: .cfi_def_cfa_register %rbp
18 ; We first push register on stack, and then realign it, so that
19 ; .cfi_offset value is correct
21 ; CHECK: andq $-32, %rsp
22 ; CHECK: .cfi_offset %r14, -24
24 ; Restore %rsp from %rbp and subtract the total size of saved registers.
25 ; CHECK: leaq -8(%rbp), %rsp
27 ; Pop saved registers.
32 !llvm.module.flags = !{!1}
34 !1 = !{i32 2, !"override-stack-alignment", i32 32}