[PR tree-optimization/107355] Handle NANs in abs range-op entry.
authorAldy Hernandez <aldyh@redhat.com>
Mon, 24 Oct 2022 10:37:25 +0000 (12:37 +0200)
committerAldy Hernandez <aldyh@redhat.com>
Mon, 24 Oct 2022 13:33:43 +0000 (15:33 +0200)
commit5bcd92d0d4029f3d1d2eacc0e2bff1685545b74f
tree68f2f856bf8e594612e3fd2725c0d2d38b167fc5
parent178ac530fe67e4f2fc439cc4ce89bc19d571ca31
[PR tree-optimization/107355] Handle NANs in abs range-op entry.

The problem here is that the threader is coming up with a path where
the only valid result is a NAN.  When the abs op1_range entry is
trying to add the negative posibility, it attempts to get the bounds
of the working range.  NANs don't have bounds so they need to be
special cased.

PR tree-optimization/107355

gcc/ChangeLog:

* range-op-float.cc (foperator_abs::op1_range): Handle NAN.

gcc/testsuite/ChangeLog:

* gcc.dg/tree-ssa/pr107355.c: New test.
gcc/range-op-float.cc
gcc/testsuite/gcc.dg/tree-ssa/pr107355.c [new file with mode: 0644]