https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124829
Drea Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Blocks| |19466
Component|c++ |tree-optimization
Last reconfirmed| |2026-04-09
Ever confirmed|0 |1
Severity|normal |enhancement
--- Comment #2 from Drea Pinski <pinskia at gcc dot gnu.org> ---
_2 = b0_12 >> 2;
_4 = b0_12 >> 3;
_6 = b0_12 >> 4;
b1_13 = MEM[(const element_type &)s$_M_ptr_11 + 1];
_40 = b0_12 & 3;
_39 = (unsigned short) _40;
_38 = _2 & 1;
_37 = (unsigned short) _38;
_36 = _37 << 2; // (unsigned short)(b0_12&0x4)
_30 = _36 | _39; // (unsigned short)(b0_12&0x7)
....
Referenced Bugs:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19466
[Bug 19466] [meta-bug] bit-fields are non optimal