https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103660
--- Comment #10 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:b73373520f0ed5d131d2cd6ee9078939a98d7a0d commit r15-3040-gb73373520f0ed5d131d2cd6ee9078939a98d7a0d Author: Andrew Pinski <quic_apin...@quicinc.com> Date: Mon Aug 12 16:00:45 2024 -0700 match: extend the `((a CMP b) ? c : 0) | ((a CMP' b) ? d : 0)` patterns to support ^ and + [PR103660] r13-4620-g4d9db4bdd458 Added a few patterns and some of them can be extended to support XOR and PLUS. This extends the patterns to support XOR and PLUS instead of just IOR. Bootstrapped and tested on x86_64-linux-gnu. PR tree-optimization/103660 gcc/ChangeLog: * match.pd (`((a CMP b) ? c : 0) | ((a CMP' b) ? d : 0)`): Extend to support XOR and PLUS. gcc/testsuite/ChangeLog: * g++.dg/tree-ssa/pr103660-2.C: New test. * g++.dg/tree-ssa/pr103660-3.C: New test. * gcc.dg/tree-ssa/pr103660-2.c: New test. * gcc.dg/tree-ssa/pr103660-3.c: New test. Signed-off-by: Andrew Pinski <quic_apin...@quicinc.com>