PR testsuite/52641
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / slsr-3.c
blob89d1d2e73fdb69153b7d911862655f94fc5a779d
1 /* { dg-do compile } */
2 /* { dg-options "-O3 -fdump-tree-optimized" } */
4 int
5 foo (int a[], int b[], int i)
7 a[i] = b[i] + 2;
8 i++;
9 a[i] = b[i] + 2;
10 i++;
11 a[i] = b[i] + 2;
12 i++;
13 a[i] = b[i] + 2;
14 i++;
15 return i;
18 /* { dg-final { scan-tree-dump-times "\\* 4" 1 "optimized" { target { int32 } } } } */
19 /* { dg-final { scan-tree-dump-times "\\* 2" 1 "optimized" { target { int16 } } } } */
20 /* { dg-final { scan-tree-dump-times "\\+ 2|\\, 2>" 5 "optimized" { target { int16 } } } } */
21 /* { dg-final { scan-tree-dump-times "\\+ 4|\\, 4>" 2 "optimized" } } */
22 /* { dg-final { scan-tree-dump-times "\\+ 8|\\, 8>" 1 "optimized" { target { int32plus } } } } */
23 /* { dg-final { scan-tree-dump-times "\\+ 6|\\, 6>" 1 "optimized" { target { int16 } } } } */
24 /* { dg-final { scan-tree-dump-times "\\+ 12|\\, 12>" 1 "optimized" { target { int32 } } } } */
25 /* { dg-final { cleanup-tree-dump "optimized" } } */