https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124663

--- Comment #4 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-16 branch has been updated by Torbjorn Svensson
<[email protected]>:

https://gcc.gnu.org/g:f5f2074ea90ac9e1f4752f5aaffcb9877821666c

commit r16-9379-gf5f2074ea90ac9e1f4752f5aaffcb9877821666c
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]>
    (cherry picked from commit 3e2b0fcab75527bae01a0e22fe993addcf8475d9)

Reply via email to