Skip to content
Snippets Groups Projects
Commit ce199a95 authored by Robin Dapp's avatar Robin Dapp
Browse files

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.
parent f1309dbc
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment