Pass full range to build_* in range-op-float.cc
authorAldy Hernandez <aldyh@redhat.com>
Wed, 14 Sep 2022 06:01:16 +0000 (08:01 +0200)
committerAldy Hernandez <aldyh@redhat.com>
Wed, 14 Sep 2022 15:06:48 +0000 (17:06 +0200)
commit7d647a8d49d49dfbb82061e6c66a19c142331169
tree99d95f9dfa0e0918c5f2d1488b4cb6bb85712037
parent4a311a6160b3def190e64ca4a05a03fbcd163598
Pass full range to build_* in range-op-float.cc

The build_<relop> helper functions in range-op-float.cc take the
actual value from the operand's endpoint, but this value could be
deduced from the operand itself therefore cleaning up the call site.
This also reduces the potential of mistakenly passing the wrong bound.

No functional changes.

Regstrapped on x86-64 Linux, plus I ran selftests for
-ffinite-math-only.

gcc/ChangeLog:

* range-op-float.cc (build_le): Accept frange instead of number.
(build_lt): Same.
(build_ge): Same.
(build_gt): Same.
(foperator_lt::op1_range): Pass full range to build_*.
(foperator_lt::op2_range): Same.
(foperator_le::op1_range): Same.
(foperator_le::op2_range): Same.
(foperator_gt::op1_range): Same.
(foperator_gt::op2_range): Same.
(foperator_ge::op1_range): Same.
(foperator_ge::op2_range): Same.
gcc/range-op-float.cc