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

--- Comment #7 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-15 branch has been updated by Alex Coplan
<[email protected]>:

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

commit r15-10976-gfad99a0893616663be529baea17c39748c675aff
Author: Richard Biener <[email protected]>
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)
  • [Bug middle-end/123573] [16 Reg... cvs-commit at gcc dot gnu.org via Gcc-bugs

Reply via email to