https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115086
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to Andrew Pinski from comment #4) > So looking into this a little bit. There are many different patterns which > might need to be fixed. Maybe there is a better way of implementing this > into forwprop. Let see if that is doable. But that won't be until next week. I have a better idea than forwprop which I mentioned in a different bug report. Basically add an andnot optab and expand using that if we can match it. the open question is should we add an internal function and match it in isel/math-opt pass and expand the internal function that way or add the code to expand to match it. Either way the optab will be the same. Note that will fix even the pull the constant out of the loop issue too.