Skip to content
Snippets Groups Projects
Commit 3c23defe authored by Vladimir N. Makarov's avatar Vladimir N. Makarov
Browse files

[PR111497][LRA]: Copy substituted equivalence

When we substitute the equivalence and it becomes shared, we can fail
to correctly update reg info used by LRA.  This can result in wrong
code generation, e.g. because of incorrect live analysis.  It can also
result in compiler crash as the pseudo survives RA.  This is what
exactly happened for the PR.  This patch solves this problem by
unsharing substituted equivalences.

gcc/ChangeLog:

	PR middle-end/111497
	* lra-constraints.cc (lra_constraints): Copy substituted
	equivalence.
	* lra.cc (lra): Change comment for calling unshare_all_rtl_again.

gcc/testsuite/ChangeLog:

	PR middle-end/111497
	* g++.target/i386/pr111497.C: new test.
parent 19df06f6
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