mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-18 10:31:57 +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
49 lines
1.6 KiB
LLVM
49 lines
1.6 KiB
LLVM
; RUN: llc < %s -mtriple=armv7-apple-ios -O0 -realign-stack=0 | FileCheck %s -check-prefix=NO-REALIGN
|
|
; RUN: llc < %s -mtriple=armv7-apple-ios -O0 | FileCheck %s
|
|
|
|
; rdar://12713765
|
|
; When realign-stack is set to false, make sure we are not creating stack
|
|
; objects that are assumed to be 64-byte aligned.
|
|
@T3_retval = common global <16 x float> zeroinitializer, align 16
|
|
|
|
define void @test(<16 x float>* noalias sret %agg.result) nounwind ssp {
|
|
entry:
|
|
; CHECK: test
|
|
; CHECK: bic sp, sp, #63
|
|
; CHECK: orr [[R2:r[0-9]+]], [[R1:r[0-9]+]], #48
|
|
; CHECK: vst1.64
|
|
; CHECK: orr [[R2:r[0-9]+]], [[R1:r[0-9]+]], #32
|
|
; CHECK: vst1.64
|
|
; CHECK: orr [[R2:r[0-9]+]], [[R1:r[0-9]+]], #16
|
|
; CHECK: vst1.64
|
|
; CHECK: vst1.64
|
|
; CHECK: add [[R2:r[0-9]+]], [[R1:r[0-9]+]], #48
|
|
; CHECK: vst1.64
|
|
; CHECK: add [[R2:r[0-9]+]], [[R1:r[0-9]+]], #32
|
|
; CHECK: vst1.64
|
|
; CHECK: add [[R2:r[0-9]+]], [[R1:r[0-9]+]], #16
|
|
; CHECK: vst1.64
|
|
; CHECK: vst1.64
|
|
; NO-REALIGN: test
|
|
; NO-REALIGN: add [[R2:r[0-9]+]], [[R1:r[0-9]+]], #48
|
|
; NO-REALIGN: vst1.64
|
|
; NO-REALIGN: add [[R2:r[0-9]+]], [[R1:r[0-9]+]], #32
|
|
; NO-REALIGN: vst1.64
|
|
; NO-REALIGN: add [[R2:r[0-9]+]], [[R1:r[0-9]+]], #16
|
|
; NO-REALIGN: vst1.64
|
|
; NO-REALIGN: vst1.64
|
|
; NO-REALIGN: add [[R2:r[0-9]+]], [[R1:r[0-9]+]], #48
|
|
; NO-REALIGN: vst1.64
|
|
; NO-REALIGN: add [[R2:r[0-9]+]], [[R1:r[0-9]+]], #32
|
|
; NO-REALIGN: vst1.64
|
|
; NO-REALIGN: add [[R2:r[0-9]+]], [[R1:r[0-9]+]], #16
|
|
; NO-REALIGN: vst1.64
|
|
; NO-REALIGN: vst1.64
|
|
%retval = alloca <16 x float>, align 4
|
|
%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
|
|
}
|