From: Bernd Schmidt Date: Thu, 16 Jan 2014 20:51:24 +0000 (+0000) Subject: 014-01-16 Bernd Schmidt X-Git-Tag: releases/gcc-4.9.0~1624 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9e6f9ad62c66546ac8b475521e840c9661b6fa78;p=thirdparty%2Fgcc.git 014-01-16 Bernd Schmidt 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2000ed83ac4d..e07d1aeefe7d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2014-01-16 Bernd Schmidt + + 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 * tree-vectorizer.h (struct _loop_vec_info): Add no_data_dependencies diff --git a/gcc/reload.c b/gcc/reload.c index 77dc04270510..851daf30f291 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