]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Do not check finite_operands_p twice in range-ops-float.
authorAldy Hernandez <aldyh@redhat.com>
Wed, 5 Oct 2022 18:21:26 +0000 (20:21 +0200)
committerAldy Hernandez <aldyh@redhat.com>
Thu, 6 Oct 2022 06:21:41 +0000 (08:21 +0200)
The uses of finite_operands_p removed are guarded by a call to
finite_operands_p already.

gcc/ChangeLog:

* range-op-float.cc (foperator_lt::fold_range): Remove extra check
to finite_operands_p.
(foperator_le::fold_range): Same.
(foperator_gt::fold_range): Same.
(foperator_ge::fold_range): Same.

gcc/range-op-float.cc

index 6e9d51d3b4b9a421fa510da18d45ea60c0e5af49..68578aa6fe7c9c421bea0f1b9da0fa08a585c03f 100644 (file)
@@ -572,8 +572,7 @@ foperator_lt::fold_range (irange &r, tree type,
     {
       if (real_less (&op1.upper_bound (), &op2.lower_bound ()))
        r = range_true (type);
-      else if (finite_operands_p (op1, op2)
-              && !real_less (&op1.lower_bound (), &op2.upper_bound ()))
+      else if (!real_less (&op1.lower_bound (), &op2.upper_bound ()))
        r = range_false (type);
       else
        r = range_true_and_false (type);
@@ -688,8 +687,7 @@ foperator_le::fold_range (irange &r, tree type,
     {
       if (real_compare (LE_EXPR, &op1.upper_bound (), &op2.lower_bound ()))
        r = range_true (type);
-      else if (finite_operands_p (op1, op2)
-              && !real_compare (LE_EXPR, &op1.lower_bound (), &op2.upper_bound ()))
+      else if (!real_compare (LE_EXPR, &op1.lower_bound (), &op2.upper_bound ()))
        r = range_false (type);
       else
        r = range_true_and_false (type);
@@ -796,8 +794,7 @@ foperator_gt::fold_range (irange &r, tree type,
     {
       if (real_compare (GT_EXPR, &op1.lower_bound (), &op2.upper_bound ()))
        r = range_true (type);
-      else if (finite_operands_p (op1, op2)
-              && !real_compare (GT_EXPR, &op1.upper_bound (), &op2.lower_bound ()))
+      else if (!real_compare (GT_EXPR, &op1.upper_bound (), &op2.lower_bound ()))
        r = range_false (type);
       else
        r = range_true_and_false (type);
@@ -912,8 +909,7 @@ foperator_ge::fold_range (irange &r, tree type,
     {
       if (real_compare (GE_EXPR, &op1.lower_bound (), &op2.upper_bound ()))
        r = range_true (type);
-      else if (finite_operands_p (op1, op2)
-              && !real_compare (GE_EXPR, &op1.upper_bound (), &op2.lower_bound ()))
+      else if (!real_compare (GE_EXPR, &op1.upper_bound (), &op2.lower_bound ()))
        r = range_false (type);
       else
        r = range_true_and_false (type);