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

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

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

commit r15-10779-ga60ad47c00e393127034b2056d90d0c8d2222da3
Author: Jeff Law <[email protected]>
Date:   Wed Jul 9 05:23:34 2025 -0600

    [RISC-V][PR target/120642] Avoid propagating constant AVL for theadvector

    AVL propagation currently assumes that it can propagate a constant AVL into
any
    vector insn and trips an assert if the insn fails to recognize after such a
    propagation.

    However, for xtheadvector that is not a correct assumption; xtheadvector
does
    not allow the vector length to be a constant integer (other than zero which
    allowed via x0).

    After consulting with Jin Ma (thanks!) we agree the right fix is to avoid
    creating the immediate AVL for xtheadvector.

    This has been tested in my tester, just waiting for the pre-commit tester
to
    spin it.

            PR target/120642
    gcc/
            * config/riscv/riscv-avlprop.cc (pass_avlprop::execute): Do not do
            constant AVL propagation for xtheadvector.

    gcc/testsuite/
            * gcc.target/riscv/rvv/xtheadvector/pr120642.c: New test.

    (cherry picked from commit f2e3886a30c771b104bc2714992e072b21a52e76)
  • [Bug target/120642] ICE: in val... cvs-commit at gcc dot gnu.org via Gcc-bugs

Reply via email to