https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113951
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |missed-optimization Ever confirmed|0 |1 Status|UNCONFIRMED |NEW Component|target |rtl-optimization Target| |x86_64-*-* Last reconfirmed| |2024-02-16 --- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- Confirmed. There's no CSE between sched1 and RA and while GCSE after RA sees both loads: expr: (mem/f/c:DI (symbol_ref:DI ("g_677") [flags 0x2] <var_decl 0x7ffff6a19ea0 g_677>) [3 g_677+0 S8 A64]) hashcode: 2958100634 list of occurrences: (insn 19 16 57 5 (set (reg/f:DI 0 ax [orig:104 pretmp_21 ] [104]) (mem/f/c:DI (symbol_ref:DI ("g_677") [flags 0x2] <var_decl 0x7ffff6a19ea0 g_677>) [3 g_677+0 S8 A64])) "t.c":46:3 84 {*movdi_internal} (nil)) (insn 9 8 52 3 (set (reg/f:DI 0 ax [orig:104 pretmp_21 ] [104]) (mem/f/c:DI (symbol_ref:DI ("g_677") [flags 0x2] <var_decl 0x7ffff6a19ea0 g_677>) [3 g_677+0 S8 A64])) "t.c":46:3 84 {*movdi_internal} (nil)) it doesn't do anything here.