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

Filip Kastl <pheeck at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[15 Regression] tree FRE    |[15 Regression] tree FRE
                   |very slow when dealing with |very slow when dealing with
                   |big switch statements       |big switch statements since
                   |                            |r15-8050-g6470b4d749a0b9
                 CC|                            |rguenth at gcc dot gnu.org

--- Comment #2 from Filip Kastl <pheeck at gcc dot gnu.org> ---
Bisected to Richi's commit r15-8050-g6470b4d749a0b9

commit 6470b4d749a0b9896b985858ee6eae095cd8a37a (HEAD)
Author:     Richard Biener <rguent...@suse.de>
AuthorDate: Fri Mar 14 10:01:20 2025 +0100
Commit:     Richard Biener <rgue...@gcc.gnu.org>
CommitDate: Fri Mar 14 12:06:54 2025 +0100

    tree-optimization/119274 - improve VN optimistic dominance query

    The following improves how VN performs its dominance queries to
    determine availability, exploiting edges considered unreachable.
    The function already contains code to handle the leader block
    forking the CFG, but that looks like a situation that won't
    help the dominance query ever.  The following adds handling
    of the more useful case where this block forwards to a CFG
    merge with the forwarder being the only executable entry.

    This helps optimizing the code so the spurious array diagnostic
    does no longer appear.

            PR tree-optimization/119274
            * tree-ssa-sccvn.cc (dominated_by_p_w_unex): Handle the
            top block being the only executable forwarder to a CFG
            merge.

            * g++.dg/opt/pr119274.C: New testcase.

Reply via email to