annotate gcc/testsuite/gcc.dg/tree-ssa/slsr-13.c @ 152:2b5abeee2509

update gcc11
author anatofuz
date Mon, 25 May 2020 07:50:57 +0900
parents 04ced10e8804
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* x2 and x3 will be strength-reduced based on the same statement
kono
parents:
diff changeset
2 but with different variables as the stride. Note that they will
kono
parents:
diff changeset
3 be strength-reduced by introducing an initializer 4*s which is
kono
parents:
diff changeset
4 cheaper than 5*s; similar for 4*c and 5*c. */
kono
parents:
diff changeset
5
kono
parents:
diff changeset
6 /* { dg-do compile } */
kono
parents:
diff changeset
7 /* { dg-options "-O3 -fdump-tree-optimized" } */
kono
parents:
diff changeset
8
kono
parents:
diff changeset
9 int
kono
parents:
diff changeset
10 f (int s, int c)
kono
parents:
diff changeset
11 {
kono
parents:
diff changeset
12 int a2, a3, x1, x2, x3, x;
kono
parents:
diff changeset
13
kono
parents:
diff changeset
14 x1 = c + s;
kono
parents:
diff changeset
15 a2 = 5 * s;
kono
parents:
diff changeset
16 x2 = c + a2;
kono
parents:
diff changeset
17 a3 = 5 * c;
kono
parents:
diff changeset
18 x3 = s + a3;
kono
parents:
diff changeset
19 x = x1 + x2 + x3;
kono
parents:
diff changeset
20 return x;
kono
parents:
diff changeset
21 }
kono
parents:
diff changeset
22
kono
parents:
diff changeset
23 /* { dg-final { scan-tree-dump-times " \\* 4" 2 "optimized" } } */
kono
parents:
diff changeset
24 /* { dg-final { scan-tree-dump-times " \\* 5" 0 "optimized" } } */