https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124663
--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Torbjorn Svensson <[email protected]>: https://gcc.gnu.org/g:3e2b0fcab75527bae01a0e22fe993addcf8475d9 commit r17-2604-g3e2b0fcab75527bae01a0e22fe993addcf8475d9 Author: Torbjörn SVENSSON <[email protected]> Date: Sat Jul 18 11:00:32 2026 +0200 tree-optimization: Fold constant conditional selects [PR124663] Fold `(x == CST) ? x : CST` and `(x != CST) ? CST : x` to `CST` for integral scalar and vector types. This catches cases where earlier folding has converted bitwise mask expressions into conditional selects, including ARM MVE predicate-to-vector mask forms. PR tree-optimization/124663 gcc/ChangeLog: * match.pd: Fold constant conditional selects. gcc/testsuite/ChangeLog: * g++.dg/tree-ssa/pr124663.C: New test. Signed-off-by: Torbjörn SVENSSON <[email protected]>
