https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114190
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever confirmed|0 |1 Last reconfirmed| |2024-03-01 Component|target |rtl-optimization --- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> --- cmpelim produces: ``` (insn 22 21 486 2 (set (reg:CCZ 17 flags) (compare:CCZ (reg:SI 4 si [orig:111 _21+4 ] [111]) (const_int 0 [0]))) "/app/example.cpp":8:8 discrim 1 7 {*cmpsi_ccno_1} (expr_list:REG_UNUSED (reg:CCZ 17 flags) (nil))) (insn 486 22 466 2 (set (reg:DI 1 dx [353]) (plus:DI (reg/f:DI 7 sp) (const_int 212 [0xd4]))) "/app/example.cpp":8:65 discrim 1 254 {*leadi} (nil)) (insn 466 486 383 2 (set (reg:DI 4 si [354]) (const:DI (plus:DI (symbol_ref:DI ("u") [flags 0x2] <var_decl 0x7fe775410c60 u>) (const_int 1 [0x1])))) "/app/example.cpp":8:65 discrim 1 84 {*movdi_internal} (expr_list:REG_EQUIV (const:DI (plus:DI (symbol_ref:DI ("u") [flags 0x2] <var_decl 0x7fe775410c60 u>) (const_int 1 [0x1]))) (nil))) (insn 383 466 384 2 (set (reg:DI 1 dx [348]) (if_then_else:DI (eq (reg:CCZ 17 flags) (const_int 0 [0])) (reg:DI 1 dx [353]) (reg:DI 4 si [354]))) "/app/example.cpp":8:65 discrim 1 1451 {*movdicc_noc} (expr_list:REG_DEAD (reg:CCZ 17 flags) (expr_list:REG_DEAD (reg:DI 4 si [354]) (nil)))) ``` Which is fine (but note the REG_UNUSED note which was not updated). >From pro_and_epilogue's dump: deleting insn with uid = 22. Which is totally bogus; I think someone didn't redo REG_UNUSED notes again.