]> git.ipfire.org Git - thirdparty/gcc.git/commit
RISC-V: Fix dynamic LMUL cost model ICE
authorJuzhe-Zhong <juzhe.zhong@rivai.ai>
Thu, 9 Nov 2023 02:39:17 +0000 (10:39 +0800)
committerPan Li <pan2.li@intel.com>
Thu, 9 Nov 2023 03:31:36 +0000 (11:31 +0800)
commit5b6f4e6f05d5ef64ecb918db02f5b8149cb2b0a0
tree474326f775fbfea0bec435de478b7474a1d42590
parente39b3e02c27bd771a07e385f9672ecf1a45ced77
RISC-V: Fix dynamic LMUL cost model ICE

When trying to use dynamic LMUL to compile benchmark.
Notice there is a bunch ICEs.

This patch fixes those ICEs and append tests.

gcc/ChangeLog:

* config/riscv/riscv-vector-costs.cc (costs::preferred_new_lmul_p): Fix ICE.

gcc/testsuite/ChangeLog:

* gcc.dg/vect/costmodel/riscv/rvv/dynamic-lmul-ice-1.c: New test.
* gcc.dg/vect/costmodel/riscv/rvv/dynamic-lmul-ice-2.c: New test.
* gcc.dg/vect/costmodel/riscv/rvv/dynamic-lmul-ice-3.c: New test.
gcc/config/riscv/riscv-vector-costs.cc
gcc/testsuite/gcc.dg/vect/costmodel/riscv/rvv/dynamic-lmul-ice-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/vect/costmodel/riscv/rvv/dynamic-lmul-ice-2.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/vect/costmodel/riscv/rvv/dynamic-lmul-ice-3.c [new file with mode: 0644]