https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99919
--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> --- Created attachment 54047 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54047&action=edit patch I also have a patch - this disables optimize_bit_field_compare for bitfield vs. constant compares which is the source of most premature obfuscation and avoids missing the optimization of multiple bitfield extracts as if more aggressively removing this code.