From: Jakub Jelinek <jakub@redhat.com>
To: Richard Biener <rguenther@suse.de>, Aldy Hernandez <aldyh@redhat.com>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] range-op-float: Fix up -ffinite-math-only range extension and don't extend into infinities [PR109008]
Date: Fri, 10 Mar 2023 11:29:36 +0100 [thread overview]
Message-ID: <ZAsGkC9YUrEvslUu@tucnak> (raw)
In-Reply-To: <nycvar.YFH.7.77.849.2303100842020.18795@jbgna.fhfr.qr>
On Fri, Mar 10, 2023 at 08:53:37AM +0000, Richard Biener wrote:
> Meh - I wonder if we can avoid all this by making float_widen_lhs_range
> friend of frange and simply access m_min/m_max directly and use the
> copy-CTOR to copy bounds and nan state ... after all verify_range
> will likely fail after you restore flag_finite_math_only ...
I'll defer such changes to Aldy.
As for verification, I think verify_range will not fail on it, it mainly
checks whether it is normalized (e.g. if minimum is frange_val_min and
maximum is frange_val_max and NaNs are possible with both signs (if NaNs
are supported) then it is VR_VARYING etc.). It doesn't check if the actual
VR_RANGE bounds are smaller or larger than the VR_VARYING bounds, there is
just equality check.
Of course, behavior of wider than varying ranges is still unexpected in
many ways, say the union_ of such a range and VR_VARYING will ICE etc.
Now, I guess another possibility for the reverse ops over these wider ranges
would be avoid calling fold_range in the reverse ops, but call rv_fold
directly or have fold_range variant which would instead of the op1, op2
argument have 2 triplets, op1, op1lb, op1ub, op2, op2lb, op2ub, and it
would use those const REAL_VALUE_TYPE &op??b in preference to
op?.{lower,upper}_bound () or perhaps normal fold_range be implemented
in terms of this extended fold_range. Then we wouldn't need to bother with
these non-standard franges...
> But OK for the moment.
Thanks, committed.
Jakub
next prev parent reply other threads:[~2023-03-10 10:29 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-10 8:07 Jakub Jelinek
2023-03-10 8:53 ` Richard Biener
2023-03-10 10:29 ` Jakub Jelinek [this message]
2023-03-13 7:18 ` Aldy Hernandez
2023-03-13 7:50 ` Richard Biener
2023-03-13 7:59 ` Aldy Hernandez
2023-03-13 8:06 ` Jakub Jelinek
2023-03-13 8:41 ` Aldy Hernandez
2023-03-20 16:14 ` Jakub Jelinek
2023-03-21 12:56 ` Aldy Hernandez
2023-03-21 13:28 ` Aldy Hernandez
2023-03-21 13:39 ` Jakub Jelinek
2023-03-21 13:49 ` Aldy Hernandez
2023-03-21 13:56 ` Jakub Jelinek
2023-03-22 6:32 ` Aldy Hernandez
2023-03-22 8:35 ` Jakub Jelinek
2023-03-28 7:54 ` [PATCH] range-op-float: Use get_nan_state in float_widen_lhs_range Jakub Jelinek
2023-03-28 8:50 ` Aldy Hernandez
2023-03-29 9:39 ` Aldy Hernandez
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZAsGkC9YUrEvslUu@tucnak \
--to=jakub@redhat.com \
--cc=aldyh@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=rguenther@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).