]> gcc.gnu.org Git - gcc.git/commitdiff
[frange] Revert relation handling in LTGT_EXPR.
authorAldy Hernandez <aldyh@redhat.com>
Fri, 8 Sep 2023 00:27:35 +0000 (20:27 -0400)
committerAldy Hernandez <aldyh@redhat.com>
Fri, 8 Sep 2023 21:03:39 +0000 (17:03 -0400)
In trying to come up with a missing testcase for commit 979e0fbf53cd,
I've realized the patch doesn't catch anything.

A relation of VREL_EQ in foperator_ltgt::fold_range() is either both
arguments the same (x LTGT_EXPR x), which we should never emit, or two
arguments that are actually the same, in which case !NAN applies, and the
whole thing can be handled as NE_EXPR further down.

gcc/ChangeLog:

* range-op-float.cc (foperator_ltgt::fold_range): Do not special
case VREL_EQ nor call frelop_early_resolve.

gcc/range-op-float.cc

index 89c401e040a2de77a1f14632dad34c00ed317a54..cc729e12a9ec0b2c24cebfd59e3563f64a3c78cd 100644 (file)
@@ -2206,21 +2206,6 @@ public:
                   const frange &op1, const frange &op2,
                   relation_trio trio = TRIO_VARYING) const final override
   {
-    relation_kind rel = trio.op1_op2 ();
-
-    // VREL_EQ is really VREL_(UN)EQ because we could have a NAN in
-    // the operands, but since LTGT_EXPR is really a NE_EXPR without
-    // the NAN, VREL_EQ & LTGT_EXPR is an impossibility.
-    if (rel == VREL_EQ)
-      {
-       r = range_false (type);
-       return true;
-      }
-    // ...otherwise pretend we're trying to resolve a NE_EXPR and
-    // everything will "just work".
-    if (frelop_early_resolve (r, type, op1, op2, trio, VREL_NE))
-      return true;
-
     if (op1.known_isnan () || op2.known_isnan ())
       {
        r = range_false (type);
This page took 0.066473 seconds and 5 git commands to generate.