[Bug middle-end/123573] [16 Regression] Many aarch64 tests ICEing with invalid gimple since r16-6709-ga4716ece529dfd

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Mar 25 14:43:14 GMT 2026


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

--- Comment #8 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-14 branch has been updated by Alex Coplan
<acoplan@gcc.gnu.org>:

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

commit r14-12476-ga9476015ffc61fa3283425f40f47547b875478d3
Author: Richard Biener <rguenther@suse.de>
Date:   Tue Jan 13 12:59:41 2026 +0100

    middle-end/123573 - fix VEC_PERM folding more

    The following fixes the fix from r16-6709-ga4716ece529dfd some
    more by making sure permute to one operand folding faces same
    element number vectors but also insert a VIEW_CONVERT_EXPR for
    the case one is VLA and one is VLS (when the VLA case is actually
    constant, like with -msve-vector-bits=128).  It also makes the
    assert that output and input element numbers match done in
    fold_vec_perm which this pattern eventually dispatches to into
    a check (as the comment already indicates).

    Testcases are in the target specific aarch64 testsuite already.

            PR middle-end/123573
            * fold-const.cc (fold_vec_perm): Actually check, not assert,
            that input and output vector element numbers agree.
            * match.pd (vec_perm @0 @1 @2): Make sure element numbers
            are the same when folding to an input vector and wrap that
            inside a VIEW_CONVERT_EXPR.

    (cherry picked from commit e787d5ace5cc315892868f3e5e2a2a16fd31bcc8)


More information about the Gcc-bugs mailing list