This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug rtl-optimization/30773] [4.3 Regression] Spec cpu2k6/h264ref and sphinx3 miscompare regression



------- Comment #6 from steven at gcc dot gnu dot org  2007-02-16 05:26 -------
What Ian said is probably right, and the patch below should fix it.  I haven't
tried it yet, though...

Index: local-alloc.c
===================================================================
--- local-alloc.c       (revision 122011)
+++ local-alloc.c       (working copy)
@@ -1064,12 +1064,16 @@ update_equiv_regs (void)
          if (validate_equiv_mem (init_insn, src, dest)
              && ! memref_used_between_p (dest, init_insn, insn))
            {
-             set_unique_reg_note (init_insn, REG_EQUIV, copy_rtx (dest));
-
-             /* This insn makes the equivalence, not the one initializing
-                the register.  */
-             reg_equiv_init[regno]
-               = gen_rtx_INSN_LIST (VOIDmode, insn, NULL_RTX);
+             /* Try to set a REG_EQUIV note.  This may fail if init_insn
+                has multiple sets.  */
+             if (set_unique_reg_note (init_insn, REG_EQUIV,
+                                      copy_rtx (dest)))
+               {
+                 /* This insn makes the equivalence, not the one initializing
+                    the register.  */
+                 reg_equiv_init[regno]
+                   = gen_rtx_INSN_LIST (VOIDmode, insn, NULL_RTX);
+               }
            }
        }
     }


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30773


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]