https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105090

--- Comment #1 from Richard Earnshaw <rearnsha at gcc dot gnu.org> ---
This was fallout from some changes made internally in the compiler in around
the gcc-10 timeframe, but it really just exposed a more general problem with
the failure to detect opportunities to use bitfield expressions.

TLDR;

We need to recognize that the pattern:

(set (reg:SI 119)
    (ior:SI (and:SI (reg:SI 123)
            (const_int -481 [0xfffffffffffffe1f]))
        (and:SI (ashift:SI (reg:SI 124)
                (const_int 5 [0x5]))
            (const_int 480 [0x1e0]))))

Is in fact a direct match for a bitfield insert instruction and handle it
accordingly.

Reply via email to