Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
RISC-V: Refine registered_functions list for rvv overloaded intrinsics.
Before this patch, each rvv overloaded intrinsic was registered twice, both in gcc and g++. Take vint8mf8_t __riscv_vle8(vbool64_t vm, const int8_t *rs1, size_t vl) as an example. For gcc, one decl is void __riscv_vle8(void), and the other is integer_zero_node, which is redundant. For g++, one decl is integer_zero_node, which is redundant. The other is vint8mf8_t __riscv_vle8(vbool64_t vm, const int8_t *rs1, size_t vl). Additionally, rfn is saved in the non_overloaded_function_table, which is also redundant. After this patch, both gcc and g++ regiter each rvv overloaded intrinsic once. Only gcc's rfn will be added to the non_overloaded_function_table. Passed the rv64gcv regression test. Signed-off-by: Li Xu <[email protected]> gcc/ChangeLog: * config/riscv/riscv-vector-builtins.cc (function_builder::add_unique_function): Only register overloaded intrinsic for g++. Only insert non_overloaded_function_table for gcc. (function_builder::add_overloaded_function): Only register overloaded intrinsic for gcc. (handle_pragma_vector): Only initialize non_overloaded_function_table for gcc.
- Loading branch information