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

--- Comment #11 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Robin Dapp <rd...@gcc.gnu.org>:

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

commit r15-6277-gce199a952bfef3e27354a4586a17bc55274c1d3c
Author: Robin Dapp <rd...@ventanamicro.com>
Date:   Fri Dec 13 11:23:03 2024 +0100

    RISC-V: Increase cost for vec_construct [PR118019].

    For a generic vec_construct from scalar elements we need to load each
    scalar element and move it over to a vector register.
    Right now we only use a cost of 1 per element.

    This patch uses register-move cost as well as scalar_to_vec and
    multiplies it with the number of elements in the vector instead.

            PR target/118019

    gcc/ChangeLog:

            * config/riscv/riscv.cc (riscv_builtin_vectorization_cost):
            Increase vec_construct cost.

    gcc/testsuite/ChangeLog:

            * gcc.target/riscv/rvv/autovec/pr118019.c: New test.

Reply via email to