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

--- Comment #9 from rdapp at linux dot ibm.com ---
I believe I know what's happening and it's indeed something that could also
happen on other targets.

I did not anticipate backends re-creating the initial condition for the case
when we pass it a cc comparison.  The SPARC backend does this, using a (now)
already overwritten value for comparison.  Other targets could also do this but
maybe do not currently but it would always lead to wrong code.

Not yet sure about a proper solution.  Since we go over the insns twice anyway
we could check the created sequences for overlap with the condition again and
mark them.  In the second iteration we would make sure to not overwrite the
condition unless there is no insn later that uses it.  Hope to come up with
something testable by today.

Reply via email to