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

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

https://gcc.gnu.org/g:6e33c9be872cc7d2474b4224d1a16515e1b0d2b8

commit r17-4259-g6e33c9be872cc7d2474b4224d1a16515e1b0d2b8
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.

Reply via email to