reload.c (find_reloads): When reloading a nonoffsettable address...
authorBernd Schmidt <bernds@redhat.com>
Fri, 17 Mar 2017 15:39:28 +0000 (15:39 +0000)
committerBernd Schmidt <bernds@gcc.gnu.org>
Fri, 17 Mar 2017 15:39:28 +0000 (15:39 +0000)
* reload.c (find_reloads): When reloading a nonoffsettable address,
use RELOAD_OTHER for it and its address reloads.

From-SVN: r246227

gcc/ChangeLog
gcc/reload.c

index f6caadb967f37d11e718165c05743d562b238827..eb0e150d051477b8bea5efda997eb11bb4093c5f 100644 (file)
@@ -1,5 +1,8 @@
 2017-03-17  Bernd Schmidt  <bschmidt@redhat.com>
 
+       * reload.c (find_reloads): When reloading a nonoffsettable address,
+       use RELOAD_OTHER for it and its address reloads.
+
        PR rtl-optimization/79910
        * combine.c (record_used_regs): New static function.
        (try_combine): Handle situations where there is an additional
index 598b78d6ef4b2be8428c5dc29112e7a87d37940d..8074e541cee007ebb8c9ef8a24d6f9c022313101 100644 (file)
@@ -3997,14 +3997,14 @@ find_reloads (rtx_insn *insn, int replace, int ind_levels, int live_known,
                             &XEXP (recog_data.operand[i], 0), (rtx*) 0,
                             base_reg_class (VOIDmode, as, MEM, SCRATCH),
                             address_mode,
-                            VOIDmode, 0, 0, i, RELOAD_FOR_INPUT);
+                            VOIDmode, 0, 0, i, RELOAD_OTHER);
            rld[operand_reloadnum[i]].inc
              = GET_MODE_SIZE (GET_MODE (recog_data.operand[i]));
 
            /* If this operand is an output, we will have made any
               reloads for its address as RELOAD_FOR_OUTPUT_ADDRESS, but
               now we are treating part of the operand as an input, so
-              we must change these to RELOAD_FOR_INPUT_ADDRESS.  */
+              we must change these to RELOAD_FOR_OTHER_ADDRESS.  */
 
            if (modified[i] == RELOAD_WRITE)
              {
@@ -4013,10 +4013,10 @@ find_reloads (rtx_insn *insn, int replace, int ind_levels, int live_known,
                    if (rld[j].opnum == i)
                      {
                        if (rld[j].when_needed == RELOAD_FOR_OUTPUT_ADDRESS)
-                         rld[j].when_needed = RELOAD_FOR_INPUT_ADDRESS;
+                         rld[j].when_needed = RELOAD_FOR_OTHER_ADDRESS;
                        else if (rld[j].when_needed
                                 == RELOAD_FOR_OUTADDR_ADDRESS)
-                         rld[j].when_needed = RELOAD_FOR_INPADDR_ADDRESS;
+                         rld[j].when_needed = RELOAD_FOR_OTHER_ADDRESS;
                      }
                  }
              }