1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-optimized -ffast-math -ffp-contract=off" } */
3
foo(unsigned int x,unsigned int y,unsigned int z)4 unsigned int foo (unsigned int x, unsigned int y, unsigned int z)
5 {
6 return x + (-y * z * z);
7 }
8
bar(float x,float y,float z)9 float bar (float x, float y, float z)
10 {
11 return x + (-y * z * z);
12 }
13
bar2(float x,float y,float z)14 float bar2 (float x, float y, float z)
15 {
16 return x + (-y * z * z * 5.0f);
17 }
18
bar3(float x,float y,float z)19 float bar3 (float x, float y, float z)
20 {
21 return x + (-y * x * -z);
22 }
23
24 /* { dg-final { scan-tree-dump-times "_* = -y_" 0 "optimized" } } */
25