mirror of git://gcc.gnu.org/git/gcc.git
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
This commit is contained in:
parent
ef163a0a63
commit
ecbda48438
|
|
@ -1,3 +1,8 @@
|
|||
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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue