]> git.ipfire.org Git - thirdparty/gcc.git/commit
RISC-V: Add autovec mode param.
authorRobin Dapp <rdapp@ventanamicro.com>
Wed, 7 May 2025 19:02:21 +0000 (21:02 +0200)
committerRobin Dapp <rdapp@ventanamicro.com>
Fri, 23 May 2025 14:59:31 +0000 (16:59 +0200)
commitb949d048e914a4cd11a63004a9a2d42e51bc3ac8
tree2b81c04cff1849bed9a2f40291169637e0d323aa
parente6fea0a8be95e2a1cbe733301a205b8c00db9202
RISC-V: Add autovec mode param.

This patch adds a --param=autovec-mode=<MODE_NAME>.  When the param is
specified we make autovectorize_vector_modes return exactly this mode if
it is available.  This helps when testing different vectorizer settings.

gcc/ChangeLog:

* config/riscv/riscv-v.cc (autovectorize_vector_modes): Return
user-specified mode if available.
* config/riscv/riscv.opt: New param.

gcc/testsuite/ChangeLog:

* gcc.target/riscv/rvv/autovec/param-autovec-mode.c: New test.
gcc/config/riscv/riscv-v.cc
gcc/config/riscv/riscv.opt
gcc/testsuite/gcc.target/riscv/rvv/autovec/param-autovec-mode.c [new file with mode: 0644]