public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeff Law <jeffreyalaw@gmail.com>
To: Richard Biener <rguenther@suse.de>, gcc-patches@gcc.gnu.org
Cc: Jakub Jelinek <jakub@redhat.com>
Subject: Re: [PATCH] tree-optimization/107833 - invariant motion of uninit uses
Date: Mon, 5 Dec 2022 11:31:24 -0700	[thread overview]
Message-ID: <281f6c2a-d2db-82ce-bb16-950564568b1f@gmail.com> (raw)
In-Reply-To: <20221202143055.46CE813644@imap1.suse-dmz.suse.de>



On 12/2/22 07:30, Richard Biener via Gcc-patches wrote:
> The following fixes a wrong-code bug caused by loop invariant motion
> hoisting an expression using an uninitialized value outside of its
> controlling condition causing IVOPTs to use that to rewrite a defined
> value.  PR107839 is a similar case involving a bogus uninit diagnostic.
> 
> Bootstrapped and tested on x86_64-unknown-linux-gnu.
> 
> OK?
> 
> Thanks,
> Richard.
> 
> 	PR tree-optimization/107833
> 	PR tree-optimization/107839
> 	* cfghooks.cc: Include tree.h.
> 	* tree-ssa-loop-im.cc (movement_possibility): Wrap and
> 	make stmts using any ssa_name_maybe_undef_p operand
> 	to preserve execution.
> 	(loop_invariant_motion_in_fun): Call mark_ssa_maybe_undefs
> 	to init maybe-undefined status.
> 	* tree-ssa-loop-ivopts.cc (ssa_name_maybe_undef_p,
> 	ssa_name_set_maybe_undef, ssa_name_any_use_dominates_bb_p,
> 	mark_ssa_maybe_undefs): Move ...
> 	* tree-ssa.cc: ... here.
> 	* tree-ssa.h (ssa_name_any_use_dominates_bb_p,
> 	mark_ssa_maybe_undefs): Declare.
> 	(ssa_name_maybe_undef_p, ssa_name_set_maybe_undef): Define.
> 
> 	* gcc.dg/torture/pr107833.c: New testcase.
> 	* gcc.dg/uninit-pr107839.c: Likewise.
OK.

Jeff


      reply	other threads:[~2022-12-05 18:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-02 14:30 Richard Biener
2022-12-05 18:31 ` Jeff Law [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=281f6c2a-d2db-82ce-bb16-950564568b1f@gmail.com \
    --to=jeffreyalaw@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    --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).