https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51428
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |missed-optimization Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |pinskia at gcc dot gnu.org Component|middle-end |tree-optimization --- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Mine for GCC 13 for bitfield lowering. With the current code I have (which is applied to GCC 10 base compiler), we get: _7 = MEM <unsigned char> [(struct f *)a_5(D)]; _8 = _7 & 3; _3 = _8 != 0; _10 = BIT_INSERT_EXPR <_7, _3, 0 (1 bits)>; MEM <unsigned char> [(struct f *)a_5(D)] = _10; And: _8 = _7 & 3; _6 = _8 == 3; _10 = BIT_INSERT_EXPR <_7, _6, 0 (1 bits)>; both are not good really as we don't need to extract bit 0 really.