diff options
author | Bernd Schmidt <bernds@codesourcery.com> | 2014-01-16 20:51:24 +0000 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 2014-01-16 13:51:24 -0700 |
commit | 9e6f9ad62c66546ac8b475521e840c9661b6fa78 (patch) | |
tree | 4e44333489f70b7533424fd42699fe0106d7a26a /gcc | |
parent | d1417442bf533b6a06246ef8f1627b196ff7c825 (diff) | |
download | gcc-9e6f9ad62c66546ac8b475521e840c9661b6fa78.zip gcc-9e6f9ad62c66546ac8b475521e840c9661b6fa78.tar.gz gcc-9e6f9ad62c66546ac8b475521e840c9661b6fa78.tar.bz2 |
014-01-16 Bernd Schmidt <bernds@codesourcery.com>
PR middle-end/56791
* reload.c (find_reloads_address_1): Do not use RELOAD_OTHER
* when
pushing a reload for an autoinc when we had previously reloaded an
inner part of the address.
From-SVN: r206688
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/reload.c | 7 |
2 files changed, 13 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2000ed8..e07d1ae 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2014-01-16 Bernd Schmidt <bernds@codesourcery.com> + + PR middle-end/56791 + * reload.c (find_reloads_address_1): Do not use RELOAD_OTHER when + pushing a reload for an autoinc when we had previously reloaded an + inner part of the address. + 2014-01-16 Jakub Jelinek <jakub@redhat.com> * tree-vectorizer.h (struct _loop_vec_info): Add no_data_dependencies diff --git a/gcc/reload.c b/gcc/reload.c index 77dc042..851daf3 100644 --- a/gcc/reload.c +++ b/gcc/reload.c @@ -5563,6 +5563,7 @@ find_reloads_address_1 (enum machine_mode mode, addr_space_t as, enum reg_class context_reg_class; RTX_CODE code = GET_CODE (x); + bool reloaded_inner_of_autoinc = false; if (context == 1) context_reg_class = INDEX_REG_CLASS; @@ -5850,6 +5851,7 @@ find_reloads_address_1 (enum machine_mode mode, addr_space_t as, find_reloads_address (GET_MODE (tem), &tem, XEXP (tem, 0), &XEXP (tem, 0), opnum, type, ind_levels, insn); + reloaded_inner_of_autoinc = true; if (!rtx_equal_p (tem, orig)) push_reg_equiv_alt_mem (regno, tem); /* Put this inside a new increment-expression. */ @@ -5898,7 +5900,10 @@ find_reloads_address_1 (enum machine_mode mode, addr_space_t as, #endif && ! (icode != CODE_FOR_nothing && insn_operand_matches (icode, 0, equiv) - && insn_operand_matches (icode, 1, equiv))) + && insn_operand_matches (icode, 1, equiv)) + /* Using RELOAD_OTHER means we emit this and the reload we + made earlier in the wrong order. */ + && !reloaded_inner_of_autoinc) { /* We use the original pseudo for loc, so that emit_reload_insns() knows which pseudo this |