PR testsuite/52641
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / ssa-ifcombine-8.c
bloba6c4282ef63559d3fcddf58edaa679a62cb5cc99
1 /* { dg-do compile } */
2 /* { dg-options "-O -fno-trapping-math -fdump-tree-ifcombine" } */
4 double test1 (double i, double j)
6 if (i >= j)
7 if (i <= j)
8 goto plif;
9 else
10 goto plouf;
11 else
12 goto plif;
14 plif:
15 return 0;
16 plouf:
17 return -1;
20 /* The above should be optimized to a i > j test by ifcombine.
21 The transformation would also be legal with -ftrapping-math.
22 Instead we get u<=, which is acceptable with -fno-trapping-math. */
24 /* { dg-final { scan-tree-dump " u<= " "ifcombine" } } */
25 /* { dg-final { cleanup-tree-dump "ifcombine" } } */