https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115224
--- Comment #3 from GCC 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:547143df5aa0960fb149a26933dad7ca1c363afb commit r15-908-g547143df5aa0960fb149a26933dad7ca1c363afb Author: Andrew Pinski <quic_apin...@quicinc.com> Date: Sun May 26 17:38:37 2024 -0700 match: Add support for `a ^ CST` to bitwise_inverted_equal_p [PR115224] While looking into something else, I noticed that `a ^ CST` needed to be special casing to bitwise_inverted_equal_p as it would simplify to `a ^ ~CST` for the bitwise not. Bootstrapped and tested on x86_64-linux-gnu with no regressions. PR tree-optimization/115224 gcc/ChangeLog: * generic-match-head.cc (bitwise_inverted_equal_p): Add `a ^ CST` case. * gimple-match-head.cc (gimple_bit_xor_cst): New declaration. (gimple_bitwise_inverted_equal_p): Add `a ^ CST` case. * match.pd (bit_xor_cst): New match. (maybe_bit_not): Add bit_xor_cst case. gcc/testsuite/ChangeLog: * gcc.dg/tree-ssa/bitops-8.c: New test. Signed-off-by: Andrew Pinski <quic_apin...@quicinc.com>