Debian Codegraph @

gcc/testsuite/gcc.dg/tree-ssa/assoc-1.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-O -fdump-tree-optimized-raw -fno-tree-reassoc" } */
3
4 int f0(int a,int b,int c){
5 int d = a + b;
6 int e = c + b;
7 return d - e;
8 }
9 int f1(int a,int b,int c){
10 int d = a + b;
11 int e = b - c;
12 return d - e;
13 }
14 int f2(int a,int b,int c){
15 int d = a + b;
16 int e = c - b;
17 return e + d;
18 }
19 int f3(int a,int b,int c){
20 int d = a - b;
21 int e = c - b;
22 return d - e;
23 }
24 int f4(int a,int b,int c){
25 int d = b - a;
26 int e = c - b;
27 return e + d;
28 }
29
30 /* { dg-final { scan-tree-dump-times "plus_expr" 2 "optimized" } } */
31 /* { dg-final { scan-tree-dump-times "minus_expr" 3 "optimized" } } */