llvm-6502/test/CodeGen/X86/dyn_alloca_aligned.ll
Elena Demikhovsky 55240a5ddb Fixed a bug in dynamic allocation memory on stack.
The alignment of allocated space was wrong, see Bugzila 17345.

Done by Zvi Rackover <zvi.rackover@intel.com>.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192573 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-14 07:26:51 +00:00

10 lines
262 B
LLVM

; 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
}