PR tree-optimization/81303
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / pr63586-2.c
blob0dcfe327358cc08bd4d124b7adf299efe971d3cf
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -ffast-math -fdump-tree-reassoc1" } */
4 float f1_float (float x, float z)
6 float y = x + z;
7 y = y + x;
8 y = y + x;
9 y = y + x;
10 y = y + x;
11 y = y + x;
12 y = y + x;
13 y = y + x;
14 return y;
17 float f1_float2 (float x)
19 float y = x + 3 * x + x;
20 return y;
23 int f1_int (int x)
25 int y = x + 4 * x + x;
26 return y;
29 /* { dg-final { scan-tree-dump-times "\\\* 8\\\.0e\\\+0" 1 "reassoc1" } } */
30 /* { dg-final { scan-tree-dump-times "\\\* 5\\\.0e\\\+0" 1 "reassoc1" } } */
31 /* { dg-final { scan-tree-dump-times "\\\* 6" 1 "reassoc1" } } */