aboutsummaryrefslogtreecommitdiff
path: root/gcc/function.cc
diff options
context:
space:
mode:
authorJuzhe-Zhong <juzhe.zhong@rivai.ai>2024-01-12 17:28:44 +0800
committerPan Li <pan2.li@intel.com>2024-01-12 20:15:51 +0800
commit0acb63670bf1058fce00a75bd318c40be3bfa222 (patch)
tree65c43fe3e1430701918510faf52ab58a1b142d0a /gcc/function.cc
parentc75579169eba269a7c339d80b5ac0239f36a58b3 (diff)
downloadgcc-0acb63670bf1058fce00a75bd318c40be3bfa222.zip
gcc-0acb63670bf1058fce00a75bd318c40be3bfa222.tar.gz
gcc-0acb63670bf1058fce00a75bd318c40be3bfa222.tar.bz2
RISC-V: Adjust scalar_to_vec cost
1. Introduce vector regmove new tune info. 2. Adjust scalar_to_vec cost in add_stmt_cost. We will get optimal codegen after this patch with -march=rv64gcv_zvl256b: lui a5,%hi(a) li a4,19 sb a4,%lo(a)(a5) li a0,0 ret Tested on both RV32/RV64 no regression, Ok for trunk ? PR target/113281 gcc/ChangeLog: * config/riscv/riscv-protos.h (struct regmove_vector_cost): New struct. (struct cpu_vector_cost): Add regmove struct. (get_vector_costs): Export as global. * config/riscv/riscv-vector-costs.cc (adjust_stmt_cost): Adjust scalar_to_vec cost. (costs::add_stmt_cost): Ditto. * config/riscv/riscv.cc (get_common_costs): Export global function. gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/autovec/pr113209.c: Adapt test. * gcc.dg/vect/costmodel/riscv/rvv/pr113281-1.c: New test. * gcc.dg/vect/costmodel/riscv/rvv/pr113281-2.c: New test.
Diffstat (limited to 'gcc/function.cc')
0 files changed, 0 insertions, 0 deletions