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

--- Comment #3 from Thomas Preud'homme <thopre01 at gcc dot gnu.org> ---
Things start to go awry in the get_defs called at the end of
make_defs_and_copies_lists for conditional move in ree.c. ree correctly detect
that insn 308 is a conditional move and do the transitive closure on it in
search for its definition. It finds insn 304 as the definition for register di
but then screw up by finding insn 308 itself as the definition for bp in insn
308.

This all happens in get_defs that uses df information. For insn 308, there is
only one link in the use-def chain for the dp use and the ref for that link
points to insn 308.

I'm not sure if it's a failure of df to link the use to the def being done in
the same instruction or if it's ree failing to detect this. If the latter, I
guess the fix would be to ignore a def to the same instruction and return an
error if there is only that def (so add a counter in the last loop).

Reply via email to