RISC-V: Tweak generic vector COST model
commit4bfafea6922dffea145d1aa1d5f5fa4814e66173
authorJuzhe-Zhong <juzhe.zhong@rivai.ai>
Thu, 14 Dec 2023 22:24:32 +0000 (15 06:24 +0800)
committerPan Li <pan2.li@intel.com>
Fri, 15 Dec 2023 00:30:31 +0000 (15 08:30 +0800)
tree37a99cd265fc523a8e3ff433f03ae94fc38dea0b
parentc7ef2189855a8cf12427a778cd5a31d42ddf6260
RISC-V: Tweak generic vector COST model

Notice current generic vector cost model make PR112387 failed to vectorize.

Adapt it same as ARM SVE generic vector cost model which can fix it.

Committed as it is obvious fix.

PR target/112387

gcc/ChangeLog:

* config/riscv/riscv.cc: Adapt generic cost model same ARM SVE.

gcc/testsuite/ChangeLog:

* gcc.dg/vect/costmodel/riscv/rvv/pr112387.c: Moved to...
* gcc.dg/vect/costmodel/riscv/rvv/pr112387-1.c: ...here.
* gcc.dg/vect/costmodel/riscv/rvv/pr112387-2.c: New test.
gcc/config/riscv/riscv.cc
gcc/testsuite/gcc.dg/vect/costmodel/riscv/rvv/pr112387-1.c [copied from gcc/testsuite/gcc.dg/vect/costmodel/riscv/rvv/pr112387.c with 100% similarity]
gcc/testsuite/gcc.dg/vect/costmodel/riscv/rvv/pr112387-2.c [moved from gcc/testsuite/gcc.dg/vect/costmodel/riscv/rvv/pr112387.c with 80% similarity]