* reload1.c (gen_reload): Create REG_EQUIV notes.
authorJ"orn Rennecke <amylaar@cygnus.co.uk>
Tue, 12 May 1998 19:28:01 +0000 (19:28 +0000)
committerJoern Rennecke <amylaar@gcc.gnu.org>
Tue, 12 May 1998 19:28:01 +0000 (20:28 +0100)
From-SVN: r19703

gcc/ChangeLog
gcc/reload1.c

index fcb71468b203db8b5a26fbdfd23f631437ac1b1a..5b4027319abef995e512171c5f04e794d9ff9f46 100644 (file)
@@ -1,3 +1,7 @@
+Wed May 13 03:23:45 1998  J"orn Rennecke <amylaar@cygnus.co.uk>
+
+       * reload1.c (gen_reload): Create REG_EQUIV notes.
+
 Tue May 12 22:21:07 1998  J"orn Rennecke <amylaar@cygnus.co.uk>
 
        * reload1.c (reload): Fix check for USEs to use code of pattern.
index fe0c7b241ba9d884dd45828cd9a3909626b12e1b..02b9087ce1d72673c4d83b8418caf36f1d3ca527 100644 (file)
@@ -7244,13 +7244,19 @@ gen_reload (out, in, opnum, type)
             its validity determination, i.e., the way it would after reload
             has completed.  */
          if (constrain_operands (code, 1))
-           return insn;
+           {
+             /* Add a REG_EQUIV note so that find_equiv_reg can find it.  */
+             REG_NOTES (insn)
+               = gen_rtx (EXPR_LIST, REG_EQUIV, in, REG_NOTES (insn));
+             return insn;
+           }
        }
 
       delete_insns_since (last);
 
       gen_reload (out, op1, opnum, type);
-      emit_insn (gen_add2_insn (out, op0));
+      insn = emit_insn (gen_add2_insn (out, op0));
+      REG_NOTES (insn) = gen_rtx (EXPR_LIST, REG_EQUIV, in, REG_NOTES (insn));
     }
 
 #ifdef SECONDARY_MEMORY_NEEDED