https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108016
Jeffrey A. Law <law at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Status|UNCONFIRMED |NEW Last reconfirmed| |2025-02-09 --- Comment #6 from Jeffrey A. Law <law at gcc dot gnu.org> --- For DSE to kick in, I'm pretty sure we'd need to eliminate the memory load first. Eliminating the memory load will likely be nontrivial. (insn 10 8 19 2 (set (mem/c:QI (plus:DI (reg/f:DI 2 sp) (const_int 12 [0xc])) [0 D.2805.b+0 S1 A32]) (reg:QI 11 a1 [140])) "j.c":9:15 284 {*movqi_internal} (expr_list:REG_DEAD (reg:QI 11 a1 [140]) (nil))) (insn 19 10 21 2 (set (reg:DI 15 a5 [orig:148 D.2805+4 ] [148]) (zero_extend:DI (mem/c:SI (plus:DI (reg/f:DI 2 sp) (const_int 12 [0xc])) [2 D.2805+4 S4 A32]))) "j.c":10:12 519 {*zero_extendsidi2_bitmanip} (nil)) We store in QImode (8 bits). But we load 32bits and zero extend it out to DI. Meaning that the store doesn't set all the bits we load.