https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96691
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> --- (~x | 123) ^ 321 can't be replaced by (x | 123) ^ ~321, that is not equivalent. I think the equivalencies this is based on are that for any X, C, D ((~X | C) ^ D) == ((X | C) ^ (~D ^ C)) and ((~X & C) ^ D) == ((X & C) ^ (D ^ C)) so if C and D are integral constants (scalar or vector), we should simplify it that way, and furthermore I'd say we should simplify (X | Y) ^ (~Z ^ Y) into (~X | Y) ^ Z as the latter has fewer operations.