Skip to content
Snippets Groups Projects
Commit 0355c943 authored by Andrew Pinski's avatar Andrew Pinski
Browse files

sh: Don't call make_insn_raw in sh_recog_treg_set_expr [PR116189]


This was an interesting compare debug failure to debug. The first symptom
was in gcse which would produce different order of creating psedu-registers. This
was caused by a different order of a hashtable walk, due to the hash table having different
number of entries. Which in turn was due to the number of max insn being different between
the 2 runs. The place max insn uid comes from was in sh_recog_treg_set_expr which is called
via rtx_costs and fwprop would cause rtx_costs in some cases for debug insn related stuff.

Build and tested for sh4-linux-gnu.

	PR target/116189

gcc/ChangeLog:

	* config/sh/sh.cc (sh_recog_treg_set_expr): Don't call make_insn_raw,
	make the insn with a fake uid.

gcc/testsuite/ChangeLog:

	* c-c++-common/torture/pr116189-1.c: New test.

Signed-off-by: default avatarAndrew Pinski <quic_apinski@quicinc.com>
parent 935e8224
No related branches found
No related tags found
No related merge requests found
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