https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96928
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Note while moving this optimization to match-and-simplify I noticed that the gimple produced is: (~a) ^ b But this get changed around to: ~(a ^ b) By PRE latter on. I only noticed this because the testcase is failing as it depends being that.