Commit f89935ed by Hans-Peter Nilsson Committed by Hans-Peter Nilsson

reload.c (find_reloads_address_1): Call REG_OK_FOR_CONTEXT with the autoincdec…

reload.c (find_reloads_address_1): Call REG_OK_FOR_CONTEXT with the autoincdec code, not outer_code.

	* reload.c (find_reloads_address_1) <autoincdec cases>:
	Call REG_OK_FOR_CONTEXT with the autoincdec code, not
	outer_code.

From-SVN: r130380
parent 27fa4044
2007-11-23 Hans-Peter Nilsson <hp@axis.com>
* reload.c (find_reloads_address_1) <autoincdec cases>:
Call REG_OK_FOR_CONTEXT with the autoincdec code, not
outer_code.
2007-11-23 Richard Guenther <rguenther@suse.de> 2007-11-23 Richard Guenther <rguenther@suse.de>
Michael Matz <matz@suse.de> Michael Matz <matz@suse.de>
...@@ -5676,8 +5676,10 @@ find_reloads_address_1 (enum machine_mode mode, rtx x, int context, ...@@ -5676,8 +5676,10 @@ find_reloads_address_1 (enum machine_mode mode, rtx x, int context,
} }
} }
/* If we have a hard register that is ok as an index, /* If we have a hard register that is ok in this incdec context,
don't make a reload. If an autoincrement of a nice register don't make a reload. If the register isn't nice enough for
autoincdec, we can reload it. But, if an autoincrement of a
register that we here verified as playing nice, still outside
isn't "valid", it must be that no autoincrement is "valid". isn't "valid", it must be that no autoincrement is "valid".
If that is true and something made an autoincrement anyway, If that is true and something made an autoincrement anyway,
this must be a special context where one is allowed. this must be a special context where one is allowed.
...@@ -5690,7 +5692,7 @@ find_reloads_address_1 (enum machine_mode mode, rtx x, int context, ...@@ -5690,7 +5692,7 @@ find_reloads_address_1 (enum machine_mode mode, rtx x, int context,
if (reg_renumber[regno] >= 0) if (reg_renumber[regno] >= 0)
regno = reg_renumber[regno]; regno = reg_renumber[regno];
if (regno >= FIRST_PSEUDO_REGISTER if (regno >= FIRST_PSEUDO_REGISTER
|| !REG_OK_FOR_CONTEXT (context, regno, mode, outer_code, || !REG_OK_FOR_CONTEXT (context, regno, mode, code,
index_code)) index_code))
{ {
int reloadnum; int reloadnum;
......
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