1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-29 23:12:55 +01:00
llvm-mirror/test/CodeGen/X86/dyn_alloca_aligned.ll
Elena Demikhovsky c460e7e50a 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>.

llvm-svn: 192573
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
}