mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-22 03:58:16 +00:00
86441169da
requirement when creating stack objects in MachineFrameInfo. Add CreateStackObjectWithMinAlign to throw error when the minimal alignment can't be achieved and to clamp the alignment when the preferred alignment can't be achieved. Same is true for CreateVariableSizedObject. Will not emit error in CreateSpillStackObject or CreateStackObject. As long as callers of CreateStackObject do not assume the object will be aligned at the requested alignment, we should not have miscompile since later optimizations which look at the object's alignment will have the correct information. rdar://12713765 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172027 91177308-0d34-0410-b5e6-96231b3b80d8
20 lines
793 B
LLVM
20 lines
793 B
LLVM
; RUN: llc < %s -mtriple=armv7-apple-ios -O0 -realign-stack=0 2>&1 | FileCheck %s
|
|
|
|
; rdar://12713765
|
|
@T3_retval = common global <16 x float> zeroinitializer, align 16
|
|
|
|
; If alignment for alloc is smaller than or equal to stack alignment, but the
|
|
; preferred type alignment is bigger, the alignment will be clamped.
|
|
; If alignment for alloca is bigger than stack alignment, the compiler
|
|
; will emit an error.
|
|
define void @test(<16 x float>* noalias sret %agg.result) nounwind ssp {
|
|
entry:
|
|
; CHECK: Requested Minimal Alignment exceeds the Stack Alignment!
|
|
%retval = alloca <16 x float>, align 16
|
|
%0 = load <16 x float>* @T3_retval, align 16
|
|
store <16 x float> %0, <16 x float>* %retval
|
|
%1 = load <16 x float>* %retval
|
|
store <16 x float> %1, <16 x float>* %agg.result, align 16
|
|
ret void
|
|
}
|