From: Jakub Jelinek <jakub@redhat.com>
To: Aldy Hernandez <aldyh@redhat.com>
Cc: gcc-patches@gcc.gnu.org, Andrew MacLeod <amacleod@redhat.com>
Subject: [PATCH] range-op-float: Use get_nan_state in float_widen_lhs_range
Date: Tue, 28 Mar 2023 09:54:14 +0200 [thread overview]
Message-ID: <ZCKdJtsc0vDzPq12@tucnak> (raw)
In-Reply-To: <4252dbc5-8b90-c2b7-e736-bc1f1cddfac6@redhat.com>
Hi!
On Wed, Mar 22, 2023 at 07:32:44AM +0100, Aldy Hernandez wrote:
> * value-range.cc (frange::set): Add nan_state argument.
> * value-range.h (class nan_state): New.
> (frange::get_nan_state): New.
The following patch makes use of those changes in float_widen_lhs_range.
Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?
2023-03-28 Jakub Jelinek <jakub@redhat.com>
* range-op-float.cc (float_widen_lhs_range): Use pass get_nan_state
as 4th argument to set to avoid clear_nan and union_ calls.
--- gcc/range-op-float.cc.jj 2023-03-23 15:25:47.119740274 +0100
+++ gcc/range-op-float.cc 2023-03-27 13:28:18.847264635 +0200
@@ -2262,12 +2262,7 @@ float_widen_lhs_range (tree type, const
or real_max_representable (type) as upper bound. */
bool save_flag_finite_math_only = flag_finite_math_only;
flag_finite_math_only = false;
- ret.set (type, lb, ub);
- if (lhs.kind () != VR_VARYING)
- {
- ret.clear_nan ();
- ret.union_ (lhs);
- }
+ ret.set (type, lb, ub, lhs.get_nan_state ());
flag_finite_math_only = save_flag_finite_math_only;
return ret;
}
Jakub
next prev parent reply other threads:[~2023-03-28 7:54 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-10 8:07 [PATCH] range-op-float: Fix up -ffinite-math-only range extension and don't extend into infinities [PR109008] Jakub Jelinek
2023-03-10 8:53 ` Richard Biener
2023-03-10 10:29 ` Jakub Jelinek
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 ` Jakub Jelinek [this message]
2023-03-28 8:50 ` [PATCH] range-op-float: Use get_nan_state in float_widen_lhs_range 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=ZCKdJtsc0vDzPq12@tucnak \
--to=jakub@redhat.com \
--cc=aldyh@redhat.com \
--cc=amacleod@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
/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).