This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/30773] [4.3 Regression] Spec cpu2k6/h264ref and sphinx3 miscompare regression
- From: "steven at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 16 Feb 2007 05:26:49 -0000
- Subject: [Bug rtl-optimization/30773] [4.3 Regression] Spec cpu2k6/h264ref and sphinx3 miscompare regression
- References: <bug-30773-7719@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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