]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
014-01-16 Bernd Schmidt <bernds@codesourcery.com>
authorBernd Schmidt <bernds@codesourcery.com>
Thu, 16 Jan 2014 20:51:24 +0000 (20:51 +0000)
committerJeff Law <law@gcc.gnu.org>
Thu, 16 Jan 2014 20:51:24 +0000 (13:51 -0700)
        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

gcc/ChangeLog
gcc/reload.c

index 2000ed83ac4dedae5986358edf795e3a5ba377e3..e07d1aeefe7de9f91251bd2c3f0fbc68b093af20 100644 (file)
@@ -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
index 77dc042705100ef31b34fc6de122ace490bf59e3..851daf30f291a06f3e0926935d420ddfbe28e437 100644 (file)
@@ -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