https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114187
Roger Sayle <roger at nextmovesoftware dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2024-03-01
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
--- Comment #3 from Roger Sayle <roger at nextmovesoftware dot com> ---
There's a missing simplification in combine:
Trying 6 -> 11:
6: r102:TI=zero_extend(r109:DF#0)<<0x40|zero_extend(r108:DF#0)
REG_DEAD r108:DF
REG_DEAD r109:DF
11: r105:DF=r102:TI#0+r102:TI#8
REG_DEAD r102:TI
Failed to match this instruction:
(set (reg:DF 105 [ _4 ])
(plus:DF (subreg:DF (ior:TI (ashift:TI (zero_extend:TI (subreg:DI (reg:DF
109) 0))
(const_int 64 [0x40]))
(zero_extend:TI (subreg:DI (reg:DF 108) 0))) 8)
(reg:DF 108)))
where the lowpart is getting simplified to reg:DF 108, but the highpart isn't
getting simplified to reg:DF 109. i.e.
(subreg:DF (ior:TI (ashift:TI (zero_extend:TI (subreg:DI (reg:DF 109) 0))
(const_int 64 [0x40]))
(zero_extend:TI (subreg:DI (reg:DF 108) 0))) 8)
can be simplified to just (reg:DF 109).
I'm looking into why this isn't happening.