aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/riscv/riscv-vector-builtins-shapes.cc
diff options
context:
space:
mode:
authorJu-Zhe Zhong <juzhe.zhong@rivai.ai>2023-01-19 14:07:49 +0800
committerKito Cheng <kito.cheng@sifive.com>2023-01-27 20:44:37 +0800
commitab39fa8c8fd72cc77f13ece3d6129760edfcfb8a (patch)
tree352f93c7e41cb479f1ca79a356392475612c26f7 /gcc/config/riscv/riscv-vector-builtins-shapes.cc
parentd324d56221d68bd965ac5fc2c3e0eba48076bf60 (diff)
downloadgcc-ab39fa8c8fd72cc77f13ece3d6129760edfcfb8a.zip
gcc-ab39fa8c8fd72cc77f13ece3d6129760edfcfb8a.tar.gz
gcc-ab39fa8c8fd72cc77f13ece3d6129760edfcfb8a.tar.bz2
RISC-V: Add vlm/vsm C/C++ API intrinsics support
gcc/ChangeLog: * config/riscv/riscv-vector-builtins-bases.cc (BASE): Add vlm/vsm support. * config/riscv/riscv-vector-builtins-bases.h: Ditto. * config/riscv/riscv-vector-builtins-functions.def (vlm): New define. (vsm): Ditto. * config/riscv/riscv-vector-builtins-shapes.cc (struct loadstore_def): Add vlm/vsm support. * config/riscv/riscv-vector-builtins-types.def (DEF_RVV_B_OPS): Ditto. (vbool64_t): Ditto. (vbool32_t): Ditto. (vbool16_t): Ditto. (vbool8_t): Ditto. (vbool4_t): Ditto. (vbool2_t): Ditto. (vbool1_t): Ditto. * config/riscv/riscv-vector-builtins.cc (DEF_RVV_B_OPS): Ditto. (rvv_arg_type_info::get_tree_type): Ditto. (function_expander::use_contiguous_load_insn): Ditto. * config/riscv/vector.md (@pred_store<mode>): Ditto. gcc/testsuite/ChangeLog: * g++.target/riscv/rvv/base/vsm-1.C: New test. * g++.target/riscv/rvv/rvv.exp: New test. * gcc.target/riscv/rvv/base/vlm_vsm-1.c: New test. * gcc.target/riscv/rvv/base/vlm_vsm-2.c: New test. * gcc.target/riscv/rvv/base/vlm_vsm-3.c: New test.
Diffstat (limited to 'gcc/config/riscv/riscv-vector-builtins-shapes.cc')
-rw-r--r--gcc/config/riscv/riscv-vector-builtins-shapes.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/config/riscv/riscv-vector-builtins-shapes.cc b/gcc/config/riscv/riscv-vector-builtins-shapes.cc
index e796aa8..896704b 100644
--- a/gcc/config/riscv/riscv-vector-builtins-shapes.cc
+++ b/gcc/config/riscv/riscv-vector-builtins-shapes.cc
@@ -116,7 +116,8 @@ struct loadstore_def : public build_base
machine_mode mode = TYPE_MODE (type);
int sew = GET_MODE_BITSIZE (GET_MODE_INNER (mode));
/* vop --> vop<sew>. */
- b.append_sew (sew);
+ if (GET_MODE_CLASS (mode) != MODE_VECTOR_BOOL)
+ b.append_sew (sew);
/* vop<sew>_v --> vop<sew>_v_<type>. */
if (!overloaded_p)