mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-24 21:42:54 +02:00
4e06f54193
This patch implements dynamic realignment of stack objects for targets with a non-realigned stack pointer. Behaviour in FunctionLoweringInfo is changed so that for a target that has StackRealignable set to false, over-aligned static allocas are considered to be variable-sized objects and are handled with DYNAMIC_STACKALLOC nodes. It would be good to group aligned allocas into a single big alloca as an optimization, but this is yet todo. SystemZ benefits from this, due to its stack frame layout. New tests SystemZ/alloca-03.ll for aligned allocas, and SystemZ/alloca-04.ll for "no-realign-stack" attribute on functions. Review and help from Ulrich Weigand and Hal Finkel. llvm-svn: 254227
15 lines
394 B
LLVM
15 lines
394 B
LLVM
; Check the "no-realign-stack" function attribute. We should get a warning.
|
|
|
|
; RUN: llc < %s -mtriple=s390x-linux-gnu -debug-only=codegen 2>&1 | \
|
|
; RUN: FileCheck %s
|
|
|
|
|
|
define void @f6() "no-realign-stack" {
|
|
%x = alloca i64, i64 1, align 128
|
|
store volatile i64 10, i64* %x, align 128
|
|
ret void
|
|
}
|
|
|
|
; CHECK: Warning: requested alignment 128 exceeds the stack alignment 8
|
|
; CHECK-NOT: nill
|