]> git.ipfire.org Git - thirdparty/gcc.git/commit
RISC-V: Add initial cost handling for segment loads/stores.
authorRobin Dapp <rdapp@ventanamicro.com>
Mon, 26 Feb 2024 12:09:15 +0000 (13:09 +0100)
committerRobin Dapp <rdapp@ventanamicro.com>
Fri, 17 May 2024 20:31:43 +0000 (22:31 +0200)
commite0b9c8ad7098fb08a25a61fe17d4274dd73e5145
treeb98f1a6072a7035a5d85ba3026a3e3b7f82a643c
parent7ca35f2e430081d6ec91e910002f92d9713350fa
RISC-V: Add initial cost handling for segment loads/stores.

This patch makes segment loads and stores more expensive.  It adds
segment_permute_2 as well as 3 to 8 cost fields to the common vector
costs and adds handling to adjust_stmt_cost.

gcc/ChangeLog:

* config/riscv/riscv-protos.h (struct common_vector_cost): Add
segment_permute cost.
* config/riscv/riscv-vector-costs.cc (costs::adjust_stmt_cost):
Handle segment loads/stores.
* config/riscv/riscv.cc: Initialize segment_permute_[2-8] to 1.

gcc/testsuite/ChangeLog:

* gcc.dg/vect/costmodel/riscv/rvv/pr113112-4.c: Adjust test.
gcc/config/riscv/riscv-protos.h
gcc/config/riscv/riscv-vector-costs.cc
gcc/config/riscv/riscv.cc
gcc/testsuite/gcc.dg/vect/costmodel/riscv/rvv/pr113112-4.c