Commit ecbda484 by Bernd Schmidt Committed by Bernd Schmidt

Fix a miscompilation where a reload reg is reused after it has been clobbered.

	* reload1.c (reloads_unique_chain_p): Ensure that r1 is the input for
	r2.

From-SVN: r203596
parent ef163a0a
2013-10-15 Bernd Schmidt <bernds@codesourcery.com>
* reload1.c (reloads_unique_chain_p): Ensure that r1 is the input for
r2.
2013-10-15 Richard Biener <rguenther@suse.de>
* tree-loop-distribution.c (build_empty_rdg): Inline into
......
......@@ -5560,6 +5560,14 @@ reloads_unique_chain_p (int r1, int r2)
|| reg_mentioned_p (rld[r2].in, rld[r1].in)))
return false;
/* The following loop assumes that r1 is the reload that feeds r2. */
if (r1 > r2)
{
int tmp = r2;
r2 = r1;
r1 = tmp;
}
for (i = 0; i < n_reloads; i ++)
/* Look for input reloads that aren't our two */
if (i != r1 && i != r2 && rld[i].in)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment