Commit 506b3b3a by Bernd Schmidt Committed by Jeff Law

reload.c (push_reload): When merging reloads...

�
        * reload.c (push_reload): When merging reloads, make sure
        that reload_in_reg and reload_in are from the same reload in
        all cases.

From-SVN: r23303
parent 9ff16ff2
...@@ -1320,6 +1320,7 @@ push_reload (in, out, inloc, outloc, class, ...@@ -1320,6 +1320,7 @@ push_reload (in, out, inloc, outloc, class,
reload_outmode[i] = outmode; reload_outmode[i] = outmode;
if (in != 0) if (in != 0)
{ {
rtx in_reg = inloc ? *inloc : 0;
/* If we merge reloads for two distinct rtl expressions that /* If we merge reloads for two distinct rtl expressions that
are identical in content, there might be duplicate address are identical in content, there might be duplicate address
reloads. Remove the extra set now, so that if we later find reloads. Remove the extra set now, so that if we later find
...@@ -1333,12 +1334,13 @@ push_reload (in, out, inloc, outloc, class, ...@@ -1333,12 +1334,13 @@ push_reload (in, out, inloc, outloc, class,
{ {
remove_address_replacements (in); remove_address_replacements (in);
in = reload_in[i]; in = reload_in[i];
in_reg = reload_in_reg[i];
} }
else else
remove_address_replacements (reload_in[i]); remove_address_replacements (reload_in[i]);
} }
reload_in[i] = in; reload_in[i] = in;
reload_in_reg[i] = inloc ? *inloc : 0; reload_in_reg[i] = in_reg;
} }
if (out != 0) if (out != 0)
{ {
......
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