2018-05-17 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / scev-4.c
blob94ebfae7b93e25cd61d4519cce40a470c021c9a1
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fgimple -fdump-tree-ivopts" } */
4 typedef struct {
5 int x;
6 int y;
7 } S;
9 int *a_p;
10 S a[1000];
12 void __GIMPLE (startwith ("loop"))
13 f (int k)
15 int i;
16 int * _1;
18 bb_2:
19 i_5 = k_4(D);
20 if (i_5 <= 999)
21 goto bb_4;
22 else
23 goto bb_3;
25 bb_3:
26 return;
28 bb_4:
31 bb_5:
32 i_12 = __PHI (bb_6: i_9, bb_4: i_5);
33 _1 = &a[i_12].y;
34 a_p = _1;
35 __MEM <S[1000]> ((int *)&a)[i_12].y = 100;
36 i_9 = i_5 + i_12;
37 if (i_9 <= 999)
38 goto bb_6;
39 else
40 goto bb_3;
42 bb_6:
44 goto bb_5;
48 /* { dg-final { scan-tree-dump-times "&a" 1 "ivopts" } } */