diff options
| author | Bill Wendling <isanbard@gmail.com> | 2013-08-01 21:42:05 +0000 |
|---|---|---|
| committer | Bill Wendling <isanbard@gmail.com> | 2013-08-01 21:42:05 +0000 |
| commit | a5c536e1ee25daef4567e1e2a24b74f373b82011 (patch) | |
| tree | ddcd932266d4b1d7a4e1f3199352e91454d617af /llvm/test/CodeGen/ARM | |
| parent | d8f4950862aa2efcf0847f7185cdc2af436ff6f8 (diff) | |
| download | bcm5719-llvm-a5c536e1ee25daef4567e1e2a24b74f373b82011.tar.gz bcm5719-llvm-a5c536e1ee25daef4567e1e2a24b74f373b82011.zip | |
Use function attributes to indicate that we don't want to realign the stack.
Function attributes are the future! So just query whether we want to realign the
stack directly from the function instead of through a random target options
structure.
llvm-svn: 187618
Diffstat (limited to 'llvm/test/CodeGen/ARM')
| -rw-r--r-- | llvm/test/CodeGen/ARM/alloc-no-stack-realign.ll | 50 |
1 files changed, 30 insertions, 20 deletions
diff --git a/llvm/test/CodeGen/ARM/alloc-no-stack-realign.ll b/llvm/test/CodeGen/ARM/alloc-no-stack-realign.ll index 273041dee34..6e6311d4d34 100644 --- a/llvm/test/CodeGen/ARM/alloc-no-stack-realign.ll +++ b/llvm/test/CodeGen/ARM/alloc-no-stack-realign.ll @@ -1,30 +1,14 @@ -; 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 +; RUN: llc < %s -mtriple=armv7-apple-ios -O0 | FileCheck %s -check-prefix=NO-REALIGN +; RUN: llc < %s -mtriple=armv7-apple-ios -O0 | FileCheck %s -check-prefix=REALIGN ; 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 { +define void @test1(<16 x float>* noalias sret %agg.result) nounwind ssp "no-realign-stack" { 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: test1 ; 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 @@ -46,3 +30,29 @@ entry: store <16 x float> %1, <16 x float>* %agg.result, align 16 ret void } + +define void @test2(<16 x float>* noalias sret %agg.result) nounwind ssp { +entry: +; REALIGN: test2 +; REALIGN: bic sp, sp, #63 +; REALIGN: orr [[R2:r[0-9]+]], [[R1:r[0-9]+]], #48 +; REALIGN: vst1.64 +; REALIGN: orr [[R2:r[0-9]+]], [[R1:r[0-9]+]], #32 +; REALIGN: vst1.64 +; REALIGN: orr [[R2:r[0-9]+]], [[R1:r[0-9]+]], #16 +; REALIGN: vst1.64 +; REALIGN: vst1.64 +; REALIGN: add [[R2:r[0-9]+]], [[R1:r[0-9]+]], #48 +; REALIGN: vst1.64 +; REALIGN: add [[R2:r[0-9]+]], [[R1:r[0-9]+]], #32 +; REALIGN: vst1.64 +; REALIGN: add [[R2:r[0-9]+]], [[R1:r[0-9]+]], #16 +; REALIGN: vst1.64 +; REALIGN: vst1.64 + %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 +} |

