[Bug tree-optimization/103721] [12 regression] wrong code generated for loop with conditional since r12-4790-g4b3a325f07acebf4
amacleod at redhat dot com
gcc-bugzilla@gcc.gnu.org
Wed Jan 19 16:58:53 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103721
--- Comment #8 from Andrew Macleod <amacleod at redhat dot com> ---
No probably about it :-)
As soon as the path crosses a back edge, we can encounter definitions of
SSA_NAMEs that may have had a use in the path already, so this will then be a
new definition. The relation code is all designed around seeing things in
dominator order, and crossing a back edge in the path violates this assumption.
I thunk purging all relations from the current path list is safe/necessary when
we traverse a back edge, and then I think you can start registering new ones.
Its unclear to me whether its safe to query the root oracle again from the loop
top rather than path start at this point. It would depend on whether we can be
assured it dominates every other node in the path already.
More information about the Gcc-bugs
mailing list