https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122529
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
Last reconfirmed| |2025-11-02
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed.
The first setting of EAX is in SImode while the second is in DImode.
```
(insn 33 3 34 2 (parallel [
(set (reg:SI 0 ax)
(const_int 0 [0]))
(clobber (reg:CC 17 flags))
]) "/app/example.cpp":8:5 88 {*movsi_xor}
(expr_list:REG_UNUSED (reg:CC 17 flags)
(nil)))
(insn 34 33 10 2 (set (mem:SI (plus:DI (reg/f:DI 5 di [orig:100 blah ] [100])
(const_int 4092 [0xffc])) [0 S4 A8])
(reg:SI 0 ax)) "/app/example.cpp":8:5 100 {*movsi_internal}
(expr_list:REG_DEAD (reg:SI 0 ax)
(nil)))
(insn 10 34 35 2 (set (reg:DI 2 cx [103])
(const_int 1023 [0x3ff])) "/app/example.cpp":8:5 99 {*movdi_internal}
(expr_list:REG_EQUAL (const_int 1023 [0x3ff])
(nil)))
(insn 35 10 11 2 (parallel [
(set (reg:DI 0 ax [102])
(const_int 0 [0]))
(clobber (reg:CC 17 flags))
]) "/app/example.cpp":8:5 89 {*movdi_xor}
(expr_list:REG_UNUSED (reg:CC 17 flags)
(nil)))
```
If they were swapped around the second one would be removed ...