]> gcc.gnu.org Git - gcc.git/blobdiff - gcc/reload1.c
reload1.c (eliminate_regs_in_insn): Rerecognize some loads and stores.
[gcc.git] / gcc / reload1.c
index 19c1479b90a33aeb2f70e22f5767e32f07676f9d..00d781c45482916e4a53a0959e5f5e6f96a15736 100644 (file)
@@ -3198,6 +3198,14 @@ eliminate_regs_in_insn (insn, replace)
       if ((GET_CODE (old_body) == SET && GET_CODE (SET_SRC (old_body)) == REG
           && (GET_CODE (new_body) != SET
               || GET_CODE (SET_SRC (new_body)) != REG))
+         /* If this was a load from or store to memory, compare
+            the MEM in recog_operand to the one in the insn.  If they
+            are not equal, then rerecognize the insn.  */
+         || (GET_CODE (old_body) == SET
+             && ((GET_CODE (SET_SRC (old_body)) == MEM
+                  && SET_SRC (old_body) != recog_operand[1])
+                 || (GET_CODE (SET_DEST (old_body)) == MEM
+                     && SET_DEST (old_body) != recog_operand[0])))
          /* If this was an add insn before, rerecognize.  */
          ||
          (GET_CODE (old_body) == SET
This page took 0.032412 seconds and 5 git commands to generate.