https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95923
--- Comment #9 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:0407ae8a7732d90622a65ddf1798c9d51d450e9d commit r14-2556-g0407ae8a7732d90622a65ddf1798c9d51d450e9d Author: Andrew Pinski <apin...@marvell.com> Date: Sun Jul 16 22:31:59 2023 +0000 PR 95923: More (boolean) bitop simplifications in match.pd This adds the boolean version of some of the simplifications that were added with r8-4395-ge268a77b59cb78. That are the following: (a | b) & (a == b) --> a & b a | (a == b) --> a | (b ^ 1) (a & b) | (a == b) --> a == b OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions. gcc/ChangeLog: PR tree-optimization/95923 * match.pd ((a|b)&(a==b),a|(a==b),(a&b)|(a==b)): New transformation. gcc/testsuite/ChangeLog: PR tree-optimization/95923 * gcc.dg/tree-ssa/bitops-2.c: New test. * gcc.dg/tree-ssa/bool-checks-1.c: New test.