https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126434
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2026-07-28
CC| |jakub at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
--- gcc/avoid-store-forwarding.cc.jj 2026-06-05 20:39:09.411516351 +0200
+++ gcc/avoid-store-forwarding.cc 2026-07-28 11:50:15.835271670 +0200
@@ -444,7 +444,7 @@ process_store_forwarding (vec<store_fwd_
else
move_src = dest;
- rtx move = gen_rtx_SET (SET_DEST (load), move_src);
+ rtx move = gen_rtx_SET (copy_rtx (SET_DEST (load)), move_src);
start_sequence ();
rtx_insn *insn = emit_insn (move);
fixes this exact case, but wonder how many other RTX sharing bugs are in the
pass.
E.g. dest = SET_DEST (load); and tons of uses of dest in various new insns,
etc.