]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/config/riscv/riscv.h
RISC-V: ADJUST_NUNITS according to -march.
authorJu-Zhe Zhong <juzhe.zhong@rivai.ai>
Tue, 25 Oct 2022 03:22:38 +0000 (11:22 +0800)
committerKito Cheng <kito.cheng@sifive.com>
Wed, 26 Oct 2022 09:05:09 +0000 (17:05 +0800)
commit7e924ba3474b96a6c0b87c38cc4fca7af8d3910c
treed51fea3e62451d2aefb266d0a2614700b5bce70a
parentf556cd8bd7929be8b73c66d55f98feac8c9ef1ee
RISC-V: ADJUST_NUNITS according to -march.

This patch fixed PR107357: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107357

gcc/ChangeLog:

PR target/107357
* config/riscv/riscv-modes.def (VECTOR_BOOL_MODE): Set to minimum size.
(ADJUST_NUNITS): Adjust according to -march.
(ADJUST_BYTESIZE): Ditto.
* config/riscv/riscv-protos.h (riscv_v_ext_enabled_vector_mode_p):
Remove.
(riscv_v_ext_vector_mode_p): Change function implementation.
* config/riscv/riscv-vector-builtins.cc (rvv_switcher::rvv_switcher):
Change to riscv_v_ext_vector_mode_p.
(register_builtin_type): Ditto.
* config/riscv/riscv.cc (riscv_v_ext_vector_mode_p): Change to enabled
modes.
(ENTRY): Ditto.
(riscv_v_ext_enabled_vector_mode_p): Remove.
(riscv_v_adjust_nunits): New function.
(riscv_vector_mode_supported_p): Use riscv_v_ext_vector_mode_p instead.
* config/riscv/riscv.h (riscv_v_adjust_nunits): New function.
gcc/config/riscv/riscv-modes.def
gcc/config/riscv/riscv-protos.h
gcc/config/riscv/riscv-vector-builtins.cc
gcc/config/riscv/riscv.cc
gcc/config/riscv/riscv.h