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

--- Comment #5 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Biener <rgue...@gcc.gnu.org>:

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

commit r16-3662-ga632becefad29206a980cc080eee74ed808f9cd3
Author: Richard Biener <rguent...@suse.de>
Date:   Mon Sep 8 12:40:30 2025 +0200

    tree-optimization/121829 - bogus CFG with asm goto

    When the vectorizer removes a forwarder created earlier by split_edge
    it uses redirect_edge_pred for convenience and efficiency.  That breaks
    down when the edge split is originating from an asm goto as that is
    a jump that needs adjustments from redirect_edge_and_branch.  The
    following factores a simple vect_remove_forwarder handling this
    situation appropriately.

            PR tree-optimization/121829
            * tree-vect-loop-manip.cc (vect_remove_forwarder): New
            function.
            (slpeel_tree_duplicate_loop_to_edge_cfg): Use it.

            * gcc.dg/torture/pr121829.c: New testcase.

Reply via email to