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

--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-13 branch has been updated by Kito Cheng <k...@gcc.gnu.org>:

https://gcc.gnu.org/g:67e50daa5bd05f16d98c2dc651af2d6fa8335186

commit r13-8644-g67e50daa5bd05f16d98c2dc651af2d6fa8335186
Author: Kito Cheng <kito.ch...@sifive.com>
Date:   Wed Apr 24 16:54:44 2024 +0800

    RISC-V: Fix recursive vsetvli checking [PR114172]

    extract_single_source will recursive checking the sources to
    make sure if it's single source, however it may cause infinite
    recursive when the source is come from itself, so it should just skip
    first source to prevent that.

    NOTE: This logic has existing on trunk/GCC 14, but it included in a big
    vsetvli improvement patch, which is not backport to GCC 13.

    ```

    void saxpy_rvv_m8(float *y, long vl)
    {
        for (;;)
        {
            vl = __riscv_vsetvl_e32m8(vl); //ICE
            vfloat32m8_t y_vec;
            __riscv_vse32_v_f32m8(y, y_vec, vl);
        }
    }
    ```

    gcc/ChangeLog:

            PR target/114172
            * config/riscv/riscv-vsetvl.cc (extract_single_source):
            Skip first set.

    gcc/testsuite/ChangeLog:

            PR target/114172
            * gcc.target/riscv/rvv/vsetvl/pr114172.c: New.
  • [Bug target/114172] [13 only] R... cvs-commit at gcc dot gnu.org via Gcc-bugs

Reply via email to