Add support for dynamic stack realignment in the presence of dynamic allocas on
[oota-llvm.git] / test / CodeGen / X86 / alloca-align-rounding.ll
1 ; RUN: llc < %s -march=x86-64 -mtriple=i686-pc-linux | FileCheck %s
2
3 declare void @bar(<2 x i64>* %n)
4
5 define void @foo(i64 %h) {
6   %p = alloca <2 x i64>, i64 %h
7   call void @bar(<2 x i64>* %p)
8   ret void
9 ; CHECK: foo
10 ; CHECK-NOT: andq $-32, %rax
11 }
12
13 define void @foo2(i64 %h) {
14   %p = alloca <2 x i64>, i64 %h, align 32
15   call void @bar(<2 x i64>* %p)
16   ret void
17 ; CHECK: foo2
18 ; CHECK: andq $-32, %rsp
19 ; CHECK: andq $-32, %rax
20 }