[Bug tree-optimization/126404] [16 Regression] ICE at -O2/3 on aarch64 during GIMPLE pass: vect

"cvs-commit at gcc dot gnu.org via Gcc-bugs" <[email protected]>
Newsgroups gmane.comp.gcc.bugs
Message-ID <[email protected]/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126404

--- Comment #9 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:762b68f15e6442aca835f1bb6da5e483f4ad0c1c

commit r16-9458-g762b68f15e6442aca835f1bb6da5e483f4ad0c1c
Author: Richard Biener <[email protected]>
Date:   Tue Jul 28 14:21:15 2026 +0200

    tree-optimization/126404 - CTZ pattern destroying reductions

    CTZ pattern recognition can recurse through a temporary pattern
    stmt but that will fail to be detected as part of a reduction
    because the setup is partial.  This causes the reduction chain
    to break due to multiple uses.  Avoid recursing in case the original
    pattern is for a reduction.

            PR tree-optimization/126404
            * tree-vect-patterns.cc (vect_recog_popcount_clz_ctz_ffs_pattern):
            Avoid recursing to vect_recog_ctz_ffs_pattern with a reduction.

            * gcc.dg/vect/vect-pr126404.c: Adjust.

    (cherry picked from commit a97f2ef0d90d46144b39a8c9ea670b52dd13233a)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.