Debian Codegraph @

gcc/testsuite/gcc.dg/tree-ssa/sra-18.c

raw
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*-*-* } } */
4 /* { dg-additional-options "-mno-vsx" { target { powerpc*-*-* && ilp32 } } } */
5
6 extern void abort (void);
7 struct foo { long x; };
8
9 struct bar { struct foo f[2]; };
10
11 struct baz { struct bar b[2]; };
12
13 int
14 main (int argc, char **argv)
15 {
16 struct baz a = { { { { { 4 }, { 5 } } }, { { { 6 }, { 7 } } } } };
17 int tot = 0;
18 for (int i = 0; i < 2; i++)
19 for (int j = 0; j < 2; j++)
20 tot = (tot*256) + a.b[i].f[j].x;
21 if (tot == 0x04050607)
22 return 0;
23 abort ();
24 }
25
26 /* { dg-final { scan-tree-dump-times "Removing load: a = \\\*.?L.?C.?.?.?0;" 1 "esra" { xfail hppa*64*-*-* } } } */
27 /* { dg-final { scan-tree-dump-times "SR\[.$\]\[0-9_\]+ = \\\*.?L.?C.?.?.?0\\.b\\\[0\\\]\\.f\\\[0\\\]\\.x" 1 "esra" { xfail hppa*64*-*-* } } } */
28 /* { dg-final { scan-tree-dump-times "SR\[.$\]\[0-9_\]+ = \\\*.?L.?C.?.?.?0\\.b\\\[0\\\]\\.f\\\[1\\\]\\.x" 1 "esra" { xfail hppa*64*-*-* } } } */
29 /* { dg-final { scan-tree-dump-times "SR\[.$\]\[0-9_\]+ = \\\*.?L.?C.?.?.?0\\.b\\\[1\\\]\\.f\\\[0\\\]\\.x" 1 "esra" { xfail hppa*64*-*-* } } } */
30 /* { dg-final { scan-tree-dump-times "SR\[.$\]\[0-9_\]+ = \\\*.?L.?C.?.?.?0\\.b\\\[1\\\]\\.f\\\[1\\\]\\.x" 1 "esra" { xfail hppa*64*-*-* } } } */