https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67731
--- Comment #2 from Oleg Endo <olegendo at gcc dot gnu.org> --- (In reply to Richard Biener from comment #1) > Ok, so usually this gets optimized by fold-const.c > optimize_bit_field_compare but > appearantly that doesn't work here. Not that I like this function very > much... Can this one be handled by match.pd then? If so, can you please change this to tree-opt?