1 /* { dg-do run { target { aarch64*-*-* alpha*-*-* arm*-*-* hppa*-*-* powerpc*-*-* s390*-*-* } } } */
2 /* { dg-options "-O2 -fdump-tree-esra --param sra-max-scalarization-size-Ospeed=32" } */
3 /* { dg-additional-options "-mcpu=ev4" { target alpha*-*-* } } */
5 extern void abort (void);
6 struct foo
{ long x
; };
8 struct bar
{ struct foo f
[2]; };
10 struct baz
{ struct bar b
[2]; };
13 main (int argc
, char **argv
)
15 struct baz a
= { { { { { 4 }, { 5 } } }, { { { 6 }, { 7 } } } } };
17 for (int i
= 0; i
< 2; i
++)
18 for (int j
= 0; j
< 2; j
++)
19 tot
= (tot
*256) + a
.b
[i
].f
[j
].x
;
20 if (tot
== 0x04050607)
25 /* { dg-final { scan-tree-dump-times "Removing load: a = \\\*.?L.?C.?.?.?0;" 1 "esra" } } */
26 /* { dg-final { scan-tree-dump-times "SR\\.\[0-9_\]+ = \\\*.?L.?C.?.?.?0\\.b\\\[0\\\]\\.f\\\[0\\\]\\.x" 1 "esra" } } */
27 /* { dg-final { scan-tree-dump-times "SR\\.\[0-9_\]+ = \\\*.?L.?C.?.?.?0\\.b\\\[0\\\]\\.f\\\[1\\\]\\.x" 1 "esra" } } */
28 /* { dg-final { scan-tree-dump-times "SR\\.\[0-9_\]+ = \\\*.?L.?C.?.?.?0\\.b\\\[1\\\]\\.f\\\[0\\\]\\.x" 1 "esra" } } */
29 /* { dg-final { scan-tree-dump-times "SR\\.\[0-9_\]+ = \\\*.?L.?C.?.?.?0\\.b\\\[1\\\]\\.f\\\[1\\\]\\.x" 1 "esra" } } */