https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121158
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2025-07-18
Ever confirmed|0 |1
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
For aarch64 the issue could be solved in combine:
```
Failed to match this instruction:
(set (zero_extract:DI (reg:DI 115 [ D.4652+8 ])
(const_int 32 [0x20])
(const_int 32 [0x20]))
(const_int 0 [0]))
Failed to match this instruction:
(set (reg:DI 115 [ D.4652+8 ])
(ior:DI (and:DI (reg:DI 115 [ D.4652+8 ])
(const_int 4294967295 [0xffffffff]))
(and:DI (ashift:DI (const_int 0 [0])
(const_int 32 [0x20]))
(const_int -4294967296 [0xffffffff00000000]))))
```
That last insn should have been:
(set (reg:DI 115 [ D.4652+8 ])
(and:DI (reg:DI 115 [ D.4652+8 ])
(const_int 4294967295 [0xffffffff]))
because `0<<32 & 0xffffffff00000000` is just 0 and a | 0 is just a.