Bill Wendling | a5c536e | 2013-08-01 21:42:05 +0000 | [diff] [blame] | 1 | ; RUN: llc < %s -mtriple=armv7-apple-ios -O0 | FileCheck %s -check-prefix=NO-REALIGN |
| 2 | ; RUN: llc < %s -mtriple=armv7-apple-ios -O0 | FileCheck %s -check-prefix=REALIGN |
Manman Ren | f563941 | 2012-12-04 00:52:33 +0000 | [diff] [blame] | 3 | |
| 4 | ; rdar://12713765 |
| 5 | ; When realign-stack is set to false, make sure we are not creating stack |
| 6 | ; objects that are assumed to be 64-byte aligned. |
| 7 | @T3_retval = common global <16 x float> zeroinitializer, align 16 |
| 8 | |
Bill Wendling | a5c536e | 2013-08-01 21:42:05 +0000 | [diff] [blame] | 9 | define void @test1(<16 x float>* noalias sret %agg.result) nounwind ssp "no-realign-stack" { |
Manman Ren | f563941 | 2012-12-04 00:52:33 +0000 | [diff] [blame] | 10 | entry: |
Ahmed Bougacha | 9d2d7c1 | 2014-12-09 22:08:57 +0000 | [diff] [blame] | 11 | ; NO-REALIGN-LABEL: test1 |
Ahmed Bougacha | db141ac | 2015-02-19 23:52:41 +0000 | [diff] [blame] | 12 | ; NO-REALIGN: mov r[[R2:[0-9]+]], r[[R1:[0-9]+]] |
| 13 | ; NO-REALIGN: vld1.32 {{{d[0-9]+, d[0-9]+}}}, [r[[R2]]:128]! |
Ahmed Bougacha | 9d2d7c1 | 2014-12-09 22:08:57 +0000 | [diff] [blame] | 14 | ; NO-REALIGN: vld1.64 {{{d[0-9]+, d[0-9]+}}}, [r[[R2]]:128] |
| 15 | ; NO-REALIGN: add r[[R2:[0-9]+]], r[[R1]], #32 |
| 16 | ; NO-REALIGN: vld1.64 {{{d[0-9]+, d[0-9]+}}}, [r[[R2]]:128] |
| 17 | ; NO-REALIGN: add r[[R2:[0-9]+]], r[[R1]], #48 |
| 18 | ; NO-REALIGN: vld1.64 {{{d[0-9]+, d[0-9]+}}}, [r[[R2]]:128] |
| 19 | |
| 20 | ; NO-REALIGN: add r[[R2:[0-9]+]], r[[R1:[0-9]+]], #48 |
| 21 | ; NO-REALIGN: vst1.64 {{{d[0-9]+, d[0-9]+}}}, [r[[R2]]:128] |
| 22 | ; NO-REALIGN: add r[[R2:[0-9]+]], r[[R1]], #32 |
| 23 | ; NO-REALIGN: vst1.64 {{{d[0-9]+, d[0-9]+}}}, [r[[R2]]:128] |
Ahmed Bougacha | db141ac | 2015-02-19 23:52:41 +0000 | [diff] [blame] | 24 | ; NO-REALIGN: vst1.32 {{{d[0-9]+, d[0-9]+}}}, [r[[R1]]:128]! |
Ahmed Bougacha | 9d2d7c1 | 2014-12-09 22:08:57 +0000 | [diff] [blame] | 25 | ; NO-REALIGN: vst1.64 {{{d[0-9]+, d[0-9]+}}}, [r[[R1]]:128] |
| 26 | |
| 27 | ; NO-REALIGN: add r[[R2:[0-9]+]], r[[R0:0]], #48 |
| 28 | ; NO-REALIGN: vst1.64 {{{d[0-9]+, d[0-9]+}}}, [r[[R2]]:128] |
| 29 | ; NO-REALIGN: add r[[R2:[0-9]+]], r[[R0]], #32 |
| 30 | ; NO-REALIGN: vst1.64 {{{d[0-9]+, d[0-9]+}}}, [r[[R2]]:128] |
Ahmed Bougacha | db141ac | 2015-02-19 23:52:41 +0000 | [diff] [blame] | 31 | ; NO-REALIGN: vst1.32 {{{d[0-9]+, d[0-9]+}}}, [r[[R0]]:128]! |
Ahmed Bougacha | 9d2d7c1 | 2014-12-09 22:08:57 +0000 | [diff] [blame] | 32 | ; NO-REALIGN: vst1.64 {{{d[0-9]+, d[0-9]+}}}, [r[[R0]]:128] |
Bob Wilson | 67bbf3a | 2013-02-08 20:35:15 +0000 | [diff] [blame] | 33 | %retval = alloca <16 x float>, align 16 |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 34 | %0 = load <16 x float>, <16 x float>* @T3_retval, align 16 |
Manman Ren | f563941 | 2012-12-04 00:52:33 +0000 | [diff] [blame] | 35 | store <16 x float> %0, <16 x float>* %retval |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 36 | %1 = load <16 x float>, <16 x float>* %retval |
Manman Ren | f563941 | 2012-12-04 00:52:33 +0000 | [diff] [blame] | 37 | store <16 x float> %1, <16 x float>* %agg.result, align 16 |
| 38 | ret void |
| 39 | } |
Bill Wendling | a5c536e | 2013-08-01 21:42:05 +0000 | [diff] [blame] | 40 | |
| 41 | define void @test2(<16 x float>* noalias sret %agg.result) nounwind ssp { |
| 42 | entry: |
Ahmed Bougacha | 9d2d7c1 | 2014-12-09 22:08:57 +0000 | [diff] [blame] | 43 | ; REALIGN-LABEL: test2 |
Kristof Beyls | 933de7a | 2015-01-08 15:09:14 +0000 | [diff] [blame] | 44 | ; REALIGN: bfc sp, #0, #6 |
Ahmed Bougacha | db141ac | 2015-02-19 23:52:41 +0000 | [diff] [blame] | 45 | ; REALIGN: mov r[[R2:[0-9]+]], r[[R1:[0-9]+]] |
| 46 | ; REALIGN: vld1.32 {{{d[0-9]+, d[0-9]+}}}, [r[[R2]]:128]! |
Ahmed Bougacha | 9d2d7c1 | 2014-12-09 22:08:57 +0000 | [diff] [blame] | 47 | ; REALIGN: vld1.64 {{{d[0-9]+, d[0-9]+}}}, [r[[R2]]:128] |
| 48 | ; REALIGN: add r[[R2:[0-9]+]], r[[R1]], #32 |
| 49 | ; REALIGN: vld1.64 {{{d[0-9]+, d[0-9]+}}}, [r[[R2]]:128] |
| 50 | ; REALIGN: add r[[R2:[0-9]+]], r[[R1]], #48 |
| 51 | ; REALIGN: vld1.64 {{{d[0-9]+, d[0-9]+}}}, [r[[R2]]:128] |
| 52 | |
| 53 | |
| 54 | ; REALIGN: orr r[[R2:[0-9]+]], r[[R1:[0-9]+]], #48 |
| 55 | ; REALIGN: vst1.64 {{{d[0-9]+, d[0-9]+}}}, [r[[R2]]:128] |
| 56 | ; REALIGN: orr r[[R2:[0-9]+]], r[[R1]], #32 |
| 57 | ; REALIGN: vst1.64 {{{d[0-9]+, d[0-9]+}}}, [r[[R2]]:128] |
| 58 | ; REALIGN: orr r[[R2:[0-9]+]], r[[R1]], #16 |
| 59 | ; REALIGN: vst1.64 {{{d[0-9]+, d[0-9]+}}}, [r[[R2]]:128] |
| 60 | ; REALIGN: vst1.64 {{{d[0-9]+, d[0-9]+}}}, [r[[R1]]:128] |
| 61 | |
| 62 | ; REALIGN: add r[[R1:[0-9]+]], r[[R0:0]], #48 |
| 63 | ; REALIGN: vst1.64 {{{d[0-9]+, d[0-9]+}}}, [r[[R1]]:128] |
| 64 | ; REALIGN: add r[[R1:[0-9]+]], r[[R0]], #32 |
| 65 | ; REALIGN: vst1.64 {{{d[0-9]+, d[0-9]+}}}, [r[[R1]]:128] |
Ahmed Bougacha | db141ac | 2015-02-19 23:52:41 +0000 | [diff] [blame] | 66 | ; REALIGN: vst1.32 {{{d[0-9]+, d[0-9]+}}}, [r[[R0]]:128]! |
Ahmed Bougacha | 9d2d7c1 | 2014-12-09 22:08:57 +0000 | [diff] [blame] | 67 | ; REALIGN: vst1.64 {{{d[0-9]+, d[0-9]+}}}, [r[[R0]]:128] |
Bill Wendling | a5c536e | 2013-08-01 21:42:05 +0000 | [diff] [blame] | 68 | %retval = alloca <16 x float>, align 16 |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 69 | %0 = load <16 x float>, <16 x float>* @T3_retval, align 16 |
Bill Wendling | a5c536e | 2013-08-01 21:42:05 +0000 | [diff] [blame] | 70 | store <16 x float> %0, <16 x float>* %retval |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 71 | %1 = load <16 x float>, <16 x float>* %retval |
Bill Wendling | a5c536e | 2013-08-01 21:42:05 +0000 | [diff] [blame] | 72 | store <16 x float> %1, <16 x float>* %agg.result, align 16 |
| 73 | ret void |
| 74 | } |