Skip to content
Snippets Groups Projects
Commit 6c684aa5 authored by Jakub Jelinek's avatar Jakub Jelinek
Browse files

regrename: Fix -fcompare-debug issue in find_rename_reg [PR103756]

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?

2021-12-30  Jakub Jelinek  <jakub@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.
parent 5545d1ed
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment