summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>1999-05-27 01:19:12 +0000
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>1999-05-27 01:19:12 +0000
commit9065e42bdc82c4671f1c463dd89782f36f3449b1 (patch)
tree9bdc224bb6b0a3678377fbf8e213738c6ec92bb8
parentbbea8197bcf635dc73608c6bbf01572d3ca0efc6 (diff)
downloadgcc-9065e42bdc82c4671f1c463dd89782f36f3449b1.tar.gz
p
* reload.c (push_reload): Do not call remove_address_replacements when presented with identical optional reloads. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@27191 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/reload.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/gcc/reload.c b/gcc/reload.c
index a68f2efa661..011f89955c6 100644
--- a/gcc/reload.c
+++ b/gcc/reload.c
@@ -1360,8 +1360,18 @@ push_reload (in, out, inloc, outloc, class,
are identical in content, there might be duplicate address
reloads. Remove the extra set now, so that if we later find
that we can inherit this reload, we can get rid of the
- address reloads altogether. */
- if (reload_in[i] != in && rtx_equal_p (in, reload_in[i]))
+ address reloads altogether.
+
+ Do not do this if both reloads are optional since the result
+ would be an optional reload which could potentially leave
+ unresolved address replacements.
+
+ It is not sufficient to call transfer_replacements since
+ choose_reload_regs will remove the replacements for address
+ reloads of inherited reloads which results in the same
+ problem. */
+ if (reload_in[i] != in && rtx_equal_p (in, reload_in[i])
+ && ! (reload_optional[i] && optional))
{
/* We must keep the address reload with the lower operand
number alive. */