summaryrefslogtreecommitdiff
path: root/test/CodeGen/X86/dyn_alloca_aligned.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/X86/dyn_alloca_aligned.ll')
-rw-r--r--test/CodeGen/X86/dyn_alloca_aligned.ll9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/CodeGen/X86/dyn_alloca_aligned.ll b/test/CodeGen/X86/dyn_alloca_aligned.ll
new file mode 100644
index 0000000000000..993f4d2af75df
--- /dev/null
+++ b/test/CodeGen/X86/dyn_alloca_aligned.ll
@@ -0,0 +1,9 @@
+; RUN: llc -mtriple=x86_64-linux < %s | FileCheck %s
+define i32 @A(i32 %Size) {
+; CHECK: subq %rcx, %rax
+; CHECK: andq $-128, %rax
+; CHECK: movq %rax, %rsp
+ %A = alloca i8, i32 %Size, align 128
+ %A_addr = ptrtoint i8* %A to i32
+ ret i32 %A_addr
+}