diff options
author | Aldy Hernandez <aldyh@redhat.com> | 2022-10-05 20:21:26 +0200 |
---|---|---|
committer | Aldy Hernandez <aldyh@redhat.com> | 2022-10-06 08:21:41 +0200 |
commit | 9eab8e45dd106ee6b9ca9fa9ec46876b0bb7f482 (patch) | |
tree | 2fd17e5b4e80cfbb0f19ac6d42b0b8594c471a16 | |
parent | ab4909fd8f5f77685e6ec12768c56545347f30c4 (diff) | |
download | gcc-9eab8e45dd106ee6b9ca9fa9ec46876b0bb7f482.zip gcc-9eab8e45dd106ee6b9ca9fa9ec46876b0bb7f482.tar.gz gcc-9eab8e45dd106ee6b9ca9fa9ec46876b0bb7f482.tar.bz2 |
Do not check finite_operands_p twice in range-ops-float.
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.
-rw-r--r-- | gcc/range-op-float.cc | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/gcc/range-op-float.cc b/gcc/range-op-float.cc index 6e9d51d..68578aa 100644 --- a/gcc/range-op-float.cc +++ b/gcc/range-op-float.cc @@ -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); |