]> git.ipfire.org Git - thirdparty/gcc.git/commit
[frange] Handle relations in LTGT_EXPR.
authorAldy Hernandez <aldyh@redhat.com>
Fri, 25 Aug 2023 16:21:16 +0000 (18:21 +0200)
committerAldy Hernandez <aldyh@redhat.com>
Mon, 28 Aug 2023 06:11:47 +0000 (08:11 +0200)
commit979e0fbf53cdf5ea2b885ddbb1369bfd3a7402f4
treed7c10106b15a10e2b7c3a0771507a45e6c24660d
parentc28c579f0dd9cd27f90df9aff7cbdb2db1c23b3b
[frange] Handle relations in LTGT_EXPR.

LTGT_EXPR hasn't been handling relations, especially with NANs as a
possibility.  This handles them while documenting how relations work
in a world with NANs.

Basically we need to special case VREL_EQ before calling
frelop_early_resolve.  Note that VREL_EQ on entry to a range-op entry
is really VREL_EQ U NAN, but to make sure about the NAN possibility,
one must look at the operands.  However, even VREL_EQ U NAN is false
for LTGT_EXPR since the latter is just NE_EXPR without a NAN.

After we handle VREL_EQ, we drop down to frelop_early_resolve
pretending to be a NE_EXPR, and everything should just map correctly.

2023-08-28  Aldy Hernandez  <aldyh@redhat.com>

* range-op-float.cc (fold_range): Handle relations.
gcc/range-op-float.cc