re PR tree-optimization/33291 (a+=2; a+=2 not simplified to a+=4; with -O3 ...
[gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / recip-7.c
1 /* { dg-options "-O1 -funsafe-math-optimizations -fno-trapping-math -fdump-tree-recip" } */
2 /* { dg-do compile } */
3
4 /* Test inserting in a block that does not contain a division. */
5
6 extern double h();
7
8 double f(int x, double z, double w)
9 {
10 double b, c, d, e, f;
11 double y = h ();
12
13 if (x)
14 b = 1 / y, c = z / y;
15 else
16 b = 3 / y, c = w / y;
17
18 d = b / y;
19 e = c / y;
20 f = 1 / y;
21
22 return d + e + f;
23 }
24
25 /* { dg-final { scan-tree-dump-times " / " 1 "recip" } } */
26 /* { dg-final { cleanup-tree-dump "recip" } } */
27