aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/pr40921.c
blob: 3a5a23a5e54d542b2b4f8dd934fe656066eca4d9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26

/* { dg-do compile } */
/* { dg-options "-O2  -fdump-tree-optimized -ffast-math" } */

unsigned int foo (unsigned int x, unsigned int y, unsigned int z)
{
      return x + (-y * z * z);
}

float bar (float x, float y, float z)
{
      return x + (-y * z * z);
}

float bar2 (float x, float y, float z)
{
      return x + (-y * z * z * 5.0f);
}

float bar3 (float x, float y, float z)
{
      return x + (-y * x * -z);
}


/* { dg-final { scan-tree-dump-times "_* = -y_" 0 "optimized" } } */