public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "aldyh at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/68097] We should track ranges for floating-point values too
Date: Mon, 19 Sep 2022 07:31:35 +0000 [thread overview]
Message-ID: <bug-68097-4-xBPy62QSvl@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-68097-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68097
--- Comment #8 from Aldy Hernandez <aldyh at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #7)
> Yes, I think fixed in that we can now record info on FP SSA names. There
> are other bugs for specific things.
>
> What's not fixed is that we still recurse to SSA defs in
> gimple_assign_nonnegative_warnv_p and friends. We might think to fix that
> now,
I see. If I understand things correctly, you may want to do something like:
if (frange::supports_p (TREE_TYPE (name)))
{
frange r;
bool sign;
if (get_global_range_query ()->range_of_expr (r, name)
&& r.signbit_p (sign))
return sign == false;
}
That is, get the global range of the SSA name, and if it has a known signbit,
you should be able to determine if it's nonnegative. The above works correctly
for signed zeros now too.
next prev parent reply other threads:[~2022-09-19 7:31 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-26 8:48 [Bug tree-optimization/68097] New: " rsandifo at gcc dot gnu.org
2015-10-26 8:50 ` [Bug tree-optimization/68097] " pinskia at gcc dot gnu.org
2015-10-26 10:36 ` glisse at gcc dot gnu.org
2015-10-26 11:37 ` rguenth at gcc dot gnu.org
2015-10-27 11:53 ` rsandifo at gcc dot gnu.org
2022-09-17 12:10 ` aldyh at gcc dot gnu.org
2022-09-19 7:03 ` rguenth at gcc dot gnu.org
2022-09-19 7:31 ` aldyh at gcc dot gnu.org [this message]
2022-09-20 17:36 ` cvs-commit at gcc dot gnu.org
2022-11-08 15:57 ` aldyh at gcc dot gnu.org
2022-11-17 8:54 ` cvs-commit at gcc dot gnu.org
2022-11-17 8:54 ` aldyh at gcc dot gnu.org
2022-11-28 22:24 ` pinskia at gcc dot gnu.org
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=bug-68097-4-xBPy62QSvl@http.gcc.gnu.org/bugzilla/ \
--to=gcc-bugzilla@gcc.gnu.org \
--cc=gcc-bugs@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).