https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103356
--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The trunk branch has been updated by Andrew Pinski <pins...@gcc.gnu.org>: https://gcc.gnu.org/g:f9378e3cc390f9bcc310ce206c6773a817aff2ca commit r13-4311-gf9378e3cc390f9bcc310ce206c6773a817aff2ca Author: Andrew Pinski <apin...@marvell.com> Date: Sat Nov 26 07:37:40 2022 +0000 tree-optimization/103356 Add missing (~a) == b folding for _Bool The following makes sure to fold (~a) == b to a ^ b for truth values. OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions. Thanks, Andrew Pinski PR tree-optimization/103356 gcc/ChangeLog: * match.pd: ((~a) == b -> a ^ b): New pattern. gcc/testsuite/ChangeLog: * gcc.dg/pr103356-1.c: New test.