From: Richard Biener <rguenther@suse.de>
To: Jeff Law <jeffreyalaw@gmail.com>
Cc: gcc-patches@gcc.gnu.org, richard.sandiford@arm.com
Subject: Re: [PATCH] Reduce multiple_of_p uses
Date: Mon, 31 Jan 2022 09:08:01 +0100 (CET) [thread overview]
Message-ID: <r2p7q5q3-3r92-89q1-n535-p1601o6pr7s@fhfr.qr> (raw)
In-Reply-To: <f1ff9f29-1bbc-e7bd-d27a-69667838e285@gmail.com>
On Fri, 28 Jan 2022, Jeff Law wrote:
>
>
> On 1/24/2022 7:45 AM, Richard Biener via Gcc-patches wrote:
> > There are a few cases where we know we're dealing with (poly-)integer
> > constants, so remove the use of multiple_of_p in those cases to make
> > the PR100499 fix less impactful.
> >
> > Bootstrapped and tested on x86_64-unknown-linux-gnu.
> >
> > OK?
> >
> > Thanks,
> > Richard.
> >
> > 2022-01-24 Richard Biener <rguenther@suse.de>
> >
> > PR tree-optimization/100499
> > * tree-cfg.cc (verify_gimple_assign_ternary): Use multiple_p
> > on poly-ints instead of multiple_of_p.
> > * tree-ssa.cc (maybe_rewrite_mem_ref_base): Likewise.
> > (non_rewritable_mem_ref_base): Likewise.
> > (non_rewritable_lvalue_p): Likewise.
> > (execute_update_addresses_taken): Likewise.
> So it's not a full fix for this class of problems, but removes some of the
> cases where we could potentially overflow and give the wrong result. I'd be
> happier if we had a concrete testcase for these instances you're fixing, but I
> think it's a move in the right direction and I obviously trust your judgment
> on whether or not to install it now or wait for gcc-13.
No, multiple_of_p has no issues with these cases since we only ever pass
it [POLY_]INT_CSTs, it's just that there's no need to use multiple_of_p
since we have a better tool for these cases (and thus later do not have
to decide whether to use the no-wrap or wrap variant).
> So your call. Both on whether or not to try and construct testcases to
> trigger these instances and whether or not to install now or wait for gcc-13.
I've pushed it now.
Richard.
prev parent reply other threads:[~2022-01-31 8:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-24 14:45 Richard Biener
2022-01-28 18:03 ` Jeff Law
2022-01-31 8:08 ` Richard Biener [this message]
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=r2p7q5q3-3r92-89q1-n535-p1601o6pr7s@fhfr.qr \
--to=rguenther@suse.de \
--cc=gcc-patches@gcc.gnu.org \
--cc=jeffreyalaw@gmail.com \
--cc=richard.sandiford@arm.com \
/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).