1 ; RUN: llc < %s -stackrealign -stack-alignment=32 -march=x86-64 -mattr=+avx -mtriple=i686-apple-darwin10 | FileCheck %s 2 ; PR11468 3 4 define void @f(i64 %sz) uwtable { 5 entry: 6 %a = alloca i32, align 32 7 store volatile i32 0, i32* %a, align 32 8 ; force to push r14 on stack 9 call void asm sideeffect "nop", "~{r14},~{dirflag},~{fpsr},~{flags}"() nounwind, !srcloc !0 10 ret void 11 12 ; CHECK: _f 13 ; CHECK: pushq %rbp 14 ; CHECK: .cfi_offset %rbp, -16 15 ; CHECK: movq %rsp, %rbp 16 ; CHECK: .cfi_def_cfa_register %rbp 17 18 ; We first push register on stack, and then realign it, so that 19 ; .cfi_offset value is correct 20 ; CHECK: pushq %r14 21 ; CHECK: andq $-32, %rsp 22 ; CHECK: .cfi_offset %r14, -24 23 24 ; Restore %rsp from %rbp and subtract the total size of saved regsiters. 25 ; CHECK: leaq -8(%rbp), %rsp 26 27 ; Pop saved registers. 28 ; CHECK: popq %r14 29 ; CHECK: popq %rbp 30 } 31 32 !0 = !{i32 125} 33 34