[Bug tree-optimization/105165] ICE in gimple_redirect_edge_and_branch, at tree-cfg.cc:6136

rguenther at suse dot de gcc-bugzilla@gcc.gnu.org
Wed Apr 6 11:22:28 GMT 2022


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.


More information about the Gcc-bugs mailing list