]> gcc.gnu.org Git - gcc.git/commit
RISC-V: Refine the condition for add additional vars in RVV cost model
authordemin.han <demin.han@starfivetech.com>
Tue, 26 Mar 2024 08:52:12 +0000 (16:52 +0800)
committerdemin.han <demin.han@starfivetech.com>
Mon, 29 Apr 2024 11:18:56 +0000 (19:18 +0800)
commitca2f531cc5db4f1020d4329976610356033e0246
tree8733fdade03cc44f004f2d57cb054ad7bdae7435
parentbca41a8d55e830c882b0f39246afead4fcfae6f7
RISC-V: Refine the condition for add additional vars in RVV cost model

The adjacent_dr_p is sufficient and unnecessary condition for contiguous access.
So unnecessary live-ranges are added and result in smaller LMUL.

This patch uses MEMORY_ACCESS_TYPE as condition and constrains segment
load/store.

Tested on RV64 and no regression.

PR target/114506

gcc/ChangeLog:

* config/riscv/riscv-vector-costs.cc (non_contiguous_memory_access_p): Rename
(need_additional_vector_vars_p): Rename and refine condition

gcc/testsuite/ChangeLog:

* gcc.dg/vect/costmodel/riscv/rvv/pr114506.c: New test.

Signed-off-by: demin.han <demin.han@starfivetech.com>
gcc/config/riscv/riscv-vector-costs.cc
gcc/testsuite/gcc.dg/vect/costmodel/riscv/rvv/pr114506.c [new file with mode: 0644]
This page took 0.061881 seconds and 5 git commands to generate.