public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Biener <richard.guenther@gmail.com>
To: Andrew Pinski <pinskia@gmail.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] [PR 81245] Fix tree-if-conv calling of update_stmt after fold_stmt
Date: Fri, 30 Jun 2017 08:20:00 -0000	[thread overview]
Message-ID: <CAFiYyc1gYWNFbrUi4vWWw+_YBcE1sOBKqs6Cdzme9-XCsqFq=Q@mail.gmail.com> (raw)
In-Reply-To: <CA+=Sn1nEo5FF4zAYD_ojNuDJ9v2Qh=RAw-XQ0B9W=F8S8EpKxg@mail.gmail.com>

On Thu, Jun 29, 2017 at 10:12 PM, Andrew Pinski <pinskia@gmail.com> wrote:
> Hi,
>   As described in the bug, tree-if-conv is calling update_stmt on an
> old stmt which might have been removed from the IR already
> (transforming of an assignment to a call in this case).  This fixes
> the problem by calling update_stmt on the new statement that fold_stmt
> might have created.
>
> OK?  Bootstrapped and tested on aarch64-linux-gnu with no regressions.

update_stmt is not necessary when fold_stmt doesn't return true as
gsi_insert_before already updates the stmt.

Thus ok with moving update_stmt under the conditional.

Thanks,
Richard.

> Thanks,
> Andrew Pinski
> ChangeLog:
> * tree-if-conv.c (predicate_scalar_phi): Update new_stmt if fold_stmt
> returned true.
>
> testsuite/ChangeLog:
> * gcc.dg/torture/pr81245.c: New testcase.

  reply	other threads:[~2017-06-30  8:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-29 20:12 Andrew Pinski
2017-06-30  8:20 ` Richard Biener [this message]
2017-06-30 20:40   ` Andrew Pinski

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='CAFiYyc1gYWNFbrUi4vWWw+_YBcE1sOBKqs6Cdzme9-XCsqFq=Q@mail.gmail.com' \
    --to=richard.guenther@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=pinskia@gmail.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).