public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: Richard Biener <rguenther@suse.de>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] rewrite undefined overflow to defined in ifcombine
Date: Thu, 5 May 2022 11:46:42 +0200	[thread overview]
Message-ID: <YnOdAqWemrkkOTCD@tucnak> (raw)
In-Reply-To: <20220505094459.912A313A65@imap2.suse-dmz.suse.de>

On Thu, May 05, 2022 at 11:44:59AM +0200, Richard Biener wrote:
> When we make stmts to execute unconditionally in ifcombine we have
> to make sure to rewrite stmts that can invoke undefined behavior
> on overflow into a form with defined overflow.  That's possible
> for all but signed division for which we have to avoid the transform.
> 
> Bootstrapped and tested on x86_64-unknown-linux-gnu.
> 
> This was developed as not working solution to fix PR105142 and
> I do not have a testcase that experiences wrong-code (but I only
> tried for about 10 minutes to construct one).  Still the problem
> is obviously latent and we should fix it.
> 
> Thus - OK for trunk?
> 
> Thanks,
> Richard.
> 
> 2022-04-04  Richard Biener  <rguenther@suse.de>
> 
> 	* tree-ssa-ifcombine.cc (bb_no_side_effects_p): Avoid executing
> 	divisions with undefined overflow unconditionally.
> 	(pass_tree_ifcombine::execute): Rewrite stmts with undefined
> 	overflow to defined.

LGTM.

	Jakub


      reply	other threads:[~2022-05-05  9:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-05  9:44 Richard Biener
2022-05-05  9:46 ` Jakub Jelinek [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=YnOdAqWemrkkOTCD@tucnak \
    --to=jakub@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).