https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102542
Aldy Hernandez <aldyh at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jeffreyalaw at gmail dot com
--- Comment #5 from Aldy Hernandez <aldyh at gcc dot gnu.org> ---
(In reply to [email protected] from comment #4)
> On Thu, 30 Sep 2021, aldyh at gcc dot gnu.org wrote:
Thanks for the loop explanation. It's quite helpful.
> So the threading at hand rotates the loop (which is only so-so OK),
> that might be problematic in case it creates a non-do-while loop
> after loop header copying.
>
> In this process it might also lose track of the loop, causing it to
> be re-discovered as separate entity which has problems of its own.
>
> IMHO we should avoid threadings through a loop header if the path
> ends in the loop itself, even if it doesn't introduce a new entry but
> just re-directs the existing one.
It looks like Jeff and you have stumbled on various corner cases we must
address in cancel_invalid_paths().
Could I inconvenience you to tweak this function with your insight? It's a
tiny function, and it seems you're much more qualified to add the restriction
code. If not, I'm sure I can stumble around it and send it for review.
Orthogonal to this, it does look like the extra thread is causing an ICE in slp
which must be addressed??
Thanks.