]> gcc.gnu.org Git - gcc.git/commit
range-op-float: Improve binary reverse operations
authorJakub Jelinek <jakub@redhat.com>
Tue, 6 Dec 2022 09:26:09 +0000 (10:26 +0100)
committerJakub Jelinek <jakub@redhat.com>
Tue, 6 Dec 2022 09:26:09 +0000 (10:26 +0100)
commita0ee2e522523b35ac810bd31c9769b9906f87953
tree6fda7268de978ba8c5c6de5b5993fcfc03584253
parent0525a7fad2a5b1d933a9662c11aa074b38cfa3d5
range-op-float: Improve binary reverse operations

On Mon, Dec 05, 2022 at 02:29:36PM +0100, Aldy Hernandez wrote:
> > So like this for multiplication op1/2_range if it passes bootstrap/regtest?
> > For division I'll need to go to a drawing board...
>
> Sure, looks good to me.

Ulrich just filed PR107972, so in the light of that PR the following patch
attempts to do that differently.

As for testcase, I've tried both attached testcases, but unfortunately it
seems that in neither of the cases we actually figure out that res range
is finite (or for last function non-zero ordered).  So there is further
work needed on that.

2022-12-06  Jakub Jelinek  <jakub@redhat.com>

PR tree-optimization/107972
* range-op-float.cc (frange_drop_infs): New function.
(float_binary_op_range_finish): Add DIV_OP2 argument.  If DIV_OP2 is
false and lhs is finite or if DIV_OP2 is true and lhs is non-zero and
not NAN, r must be finite too.
(foperator_div::op2_range): Pass true to DIV_OP2 of
float_binary_op_range_finish.
gcc/range-op-float.cc
This page took 0.052309 seconds and 5 git commands to generate.