re PR rtl-optimization/77714 (Wrong code generation for gcc.c-torture/execute/pr51447.c)
authorBernd Edlinger <bernd.edlinger@hotmail.de>
Tue, 27 Sep 2016 04:54:49 +0000 (04:54 +0000)
committerBernd Edlinger <edlinger@gcc.gnu.org>
Tue, 27 Sep 2016 04:54:49 +0000 (04:54 +0000)
2016-09-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        PR rlt-optimization/77714
        * lra-eliminations.c (eliminate_regs_in_insn): Avoid alias on
        REG_EQUAL note.

From-SVN: r240518

gcc/ChangeLog
gcc/lra-eliminations.c

index 3e5b0994eae05eb01682fa8c50b911981da4fa6d..fa647886249bd2d328bb48f72e3a6b3cb4d8d0f4 100644 (file)
@@ -1,3 +1,9 @@
+2016-09-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
+
+       PR rlt-optimization/77714
+       * lra-eliminations.c (eliminate_regs_in_insn): Avoid alias on
+       REG_EQUAL note.
+
 2016-09-27  Kugan Vivekanandarajah  <kuganv@linaro.org>
 
        PR ipa/77677
index 1764bd699ce0b7ad98a75f8f18d7f974bad63be8..03b315e71997110298206e772723bd291e025f37 100644 (file)
@@ -981,7 +981,7 @@ eliminate_regs_in_insn (rtx_insn *insn, bool replace_p, bool first_p,
                      }
                    lra_update_insn_recog_data (insn);
                    /* Add offset note for future updates.  */
-                   add_reg_note (insn, REG_EQUAL, src);
+                   add_reg_note (insn, REG_EQUAL, copy_rtx (src));
                    return;
                  }
              }