https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116013
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to Andrew Pinski from comment #4) > I have patches for part of this, though the optabs need to be renamed so the > backend changes have to wait until I finish that. and I need to also match > ~(a | CST) into `BIT_ANDC (~CST, a)` which I will add too. Added that part of the patch to PR 115086. Once I change the optab name the x86 backend folks can implement the optabs and both of these will optimize now.