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

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

https://gcc.gnu.org/g:7ffe5cc45541bcb74c3ea5b043a6d0c8d159e1cd

commit r16-9665-g7ffe5cc45541bcb74c3ea5b043a6d0c8d159e1cd
Author: Richard Biener <[email protected]>
Date:   Tue Sep 15 11:34:30 2026 +0200

    tree-optimization/126760 - vectorization of switches

    When if-conversion converts a switch statement it requires a certain
    shape of the CFG.  This is verified via if_convertible_switch_p
    but the check is incorrectly elided for blocks dominating the loop
    latch.  The following rectifies this.

            PR tree-optimization/126760
            PR tree-optimization/127391
            * tree-if-conv.cc (if_convertible_stmt_p): Delay switch
            validation to ...
            (if_convertible_loop_p_1): ... the loop iterating over
            PHIs.

            * gcc.dg/vect/vect-pr126760.c: New testcase.
            * gcc.dg/vect/vect-pr127391.c: Likewise.

    (cherry picked from commit 6e33c9be872cc7d2474b4224d1a16515e1b0d2b8)

Reply via email to