public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/94717] [10 Regression] segfault with -O2 -fnon-call-exceptions -ftracer
Date: Thu, 23 Apr 2020 12:40:41 +0000	[thread overview]
Message-ID: <bug-94717-4-4iUUvWSWtK@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-94717-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94717

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Eric Botcazou from comment #3)
> > The compiler is apparently not prepared for new trapping loads.  Fixing...
> 
> No, just a missing check on landing pads:
> 
> index a6687cd9c98..4ab8e0250ab 100644
> --- a/gcc/gimple-ssa-store-merging.c
> +++ b/gcc/gimple-ssa-store-merging.c
> @@ -2680,6 +2680,7 @@ imm_store_chain_info::coalesce_immediate_stores ()
>          p[3] = data;
>          using the bswap framework.  */
>        if (info->bitpos == merged_store->start + merged_store->width
> +         && info->lp_nr == merged_store->lp_nr
>           && merged_store->stores.length () == 1
>           && merged_store->stores[0]->ins_stmt != NULL
>           && info->ins_stmt != NULL)

Shouldn't that be done in try_coalesce_bswap instead?
Because checking lp_nr above will only make sure it is the same between
merged_store and the first store after it, but we are trying to coalesce often
more than that.
By checking it in try_coalesce_bswap, in the first loop in that function, it
will verify all stores.

  parent reply	other threads:[~2020-04-23 12:40 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-22 16:31 [Bug tree-optimization/94717] New: [10 Regression] ICE: SIGSEGV in output_merged_store (gimple-ssa-store-merging.c:4307) " zsojka at seznam dot cz
2020-04-23  5:17 ` [Bug tree-optimization/94717] [10 Regression] ICE: SIGSEGV in output_merged_store (gimple-ssa-store-merging.c:4307) with -O2 -fnon-call-exceptions -ftracer since r10-3575-g629387a6586a7531 marxin at gcc dot gnu.org
2020-04-23  9:35 ` ebotcazou at gcc dot gnu.org
2020-04-23 12:17 ` [Bug tree-optimization/94717] [10 Regression] segfault with -O2 -fnon-call-exceptions -ftracer ebotcazou at gcc dot gnu.org
2020-04-23 12:40 ` jakub at gcc dot gnu.org [this message]
2020-04-23 13:02 ` ebotcazou at gcc dot gnu.org
2020-04-23 13:06 ` jakub at gcc dot gnu.org
2020-04-23 20:28 ` cvs-commit at gcc dot gnu.org
2020-04-23 20:29 ` ebotcazou 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-94717-4-4iUUvWSWtK@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).