| ; RUN: llc < %s -stack-symbol-ordering=0 -mcpu=generic -stackrealign -mattr=+avx -mtriple=x86_64-apple-darwin10 | FileCheck %s |
| declare void @t1_helper(ptr) |
| declare void @t3_helper(ptr, ptr) |
| ; Test when forcing stack alignment |
| define i32 @t8() nounwind uwtable { |
| call void @t1_helper(ptr %a) nounwind |
| %0 = load i32, ptr %a, align 4 |
| %add = add nsw i32 %0, 13 |
| ; CHECK-NEXT: subq $32, %rsp |
| define i32 @t9(i64 %sz) nounwind uwtable { |
| %vla = alloca i32, i64 %sz, align 16 |
| call void @t3_helper(ptr %a, ptr %vla) nounwind |
| %0 = load i32, ptr %a, align 4 |
| %add = add nsw i32 %0, 13 |
| ; CHECK: leaq -8(%rbp), %rsp |
| !llvm.module.flags = !{!0} |
| !0 = !{i32 2, !"override-stack-alignment", i32 32} |