public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenther at suse dot de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/105165] ICE in gimple_redirect_edge_and_branch, at tree-cfg.cc:6136
Date: Wed, 06 Apr 2022 11:22:28 +0000	[thread overview]
Message-ID: <bug-105165-4-9GG1Rh6YQI@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-105165-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #5 from rguenther at suse dot de <rguenther at suse dot de> ---
On Wed, 6 Apr 2022, jakub at gcc dot gnu.org wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105165
> 
> --- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
> Outputs from asm goto has been strongly demanded feature from mainly linux
> kernel folks.
> Allowing all but complex outputs from asm goto would be just weird.
> 
> I think if we can't punt on the cplx lowering for certain SSA_NAMEs (force them
> to be extracted before all uses instead), we'd need to extract them on all the
> edges from the asm goto (if they have a single predecessor, the asm goto, at
> the start of those bbs, if they have multiple, split the edges and adjust
> labels) but then we'd need to create PHIs somewhere.

The complex lowering machinery is currently neither set up to extract
before all uses nor to emit multiple copies on edges and update SSA
form accordingly for the ongoing rewrite.

I suppose the easiest thing to do would be to prepare the edge emission
upfront by emitting copies on all outgoing edges, updating SSA form
there (replace all uses with a bare decl, assign to the decl and then
rewrite that into SSA via update_ssa).  And then just assume duplicate
emission to each edge is "trivially" possible by consuming the copy
stmt (actually re-writing that).

But that feels like a hack for a feature going wrong :/  We should
have a way to have an asm output that's CONCAT (real, imag), that
would simplify things a lot here.

Anyway, nobody is going to run into this in practice.  Maybe
instead of ICEing we can just sorry from complex lowering ... eh.

  parent reply	other threads:[~2022-04-06 11:22 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-05 16:18 [Bug c/105165] New: [11/12 Regression] " gscfq@t-online.de
2022-04-05 16:30 ` [Bug c/105165] " jakub at gcc dot gnu.org
2022-04-06  7:53 ` [Bug tree-optimization/105165] " rguenth at gcc dot gnu.org
2022-04-06 10:43 ` rguenth at gcc dot gnu.org
2022-04-06 11:10 ` jakub at gcc dot gnu.org
2022-04-06 11:22 ` rguenther at suse dot de [this message]
2022-04-06 11:31 ` jakub at gcc dot gnu.org
2022-04-06 11:36 ` rguenth at gcc dot gnu.org
2022-04-07  6:17 ` [Bug tree-optimization/105165] Complex lowering does not handle asm goto with complex output; " cvs-commit at gcc dot gnu.org
2022-04-07  7:00 ` cvs-commit at gcc dot gnu.org
2022-04-07  7:01 ` rguenth 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-105165-4-9GG1Rh6YQI@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).