+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
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;
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. */
#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