On 12/29/2021 3:19 AM, Jakub Jelinek wrote:
Hi!

The r12-5978 change caused a -fcompare-debug issue, because without
-g a chain might start with a noop move, but with -g there could be
one or more DEBUG_INSNs in the chain before the noop move and so
regrename could make different decisions between -g and -g0.

Note, I must say I don't really understand the original change much,
if we want to make sure the noop moves are removed, couldn't regrename
during building of those du chains simply remove the noop moves instead?

Anyway, bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?

2021-12-28  Jakub Jelinek  <ja...@redhat.com>

        PR rtl-optimization/103756
        * regrename.c (find_rename_reg): Test noop_move_p on the first
        non-debug insn in the chain rather than on the first insn.

        * g++.dg/opt/pr103756.C: New test.
Sadly I wasn't ever able to trigger a nop-move in this code to investigate how the nop-move  more thoroughly.  IIRC Jojo indicated it occurred with some local changes he was playing with.

The patch is fine, of course.

jeff


Reply via email to