diff mbox series

RISC-V: Fix vop_m overloaded C++ API name.

Message ID 20230120022029.215012-1-juzhe.zhong@rivai.ai
State New
Headers show
Series RISC-V: Fix vop_m overloaded C++ API name. | expand

Commit Message

钟居哲 Jan. 20, 2023, 2:20 a.m. UTC
From: Ju-Zhe Zhong <juzhe.zhong@rivai.ai>

According to https://github.com/riscv-non-isa/rvv-intrinsic-doc/tree/master/
For "vop_m" intrinsics, C++ overloaded API does not have "_m" suffix.

gcc/ChangeLog:

        * config/riscv/riscv-vector-builtins-shapes.cc (struct loadstore_def): Remove _m suffix for "vop_m" C++ overloaded API name.

---
 gcc/config/riscv/riscv-vector-builtins-shapes.cc | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Kito Cheng Jan. 27, 2023, 12:49 p.m. UTC | #1
committed, thanks!

On Fri, Jan 20, 2023 at 10:21 AM <juzhe.zhong@rivai.ai> wrote:

> From: Ju-Zhe Zhong <juzhe.zhong@rivai.ai>
>
> According to
> https://github.com/riscv-non-isa/rvv-intrinsic-doc/tree/master/
> For "vop_m" intrinsics, C++ overloaded API does not have "_m" suffix.
>
> gcc/ChangeLog:
>
>         * config/riscv/riscv-vector-builtins-shapes.cc (struct
> loadstore_def): Remove _m suffix for "vop_m" C++ overloaded API name.
>
> ---
>  gcc/config/riscv/riscv-vector-builtins-shapes.cc | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/gcc/config/riscv/riscv-vector-builtins-shapes.cc
> b/gcc/config/riscv/riscv-vector-builtins-shapes.cc
> index 76cf14a8cc4..56697f71cbd 100644
> --- a/gcc/config/riscv/riscv-vector-builtins-shapes.cc
> +++ b/gcc/config/riscv/riscv-vector-builtins-shapes.cc
> @@ -128,6 +128,10 @@ struct loadstore_def : public build_base
>         b.append_name (type_suffixes[instance.type.index].vector);
>        }
>
> +    /* According to rvv-intrinsic-doc, it does not add "_m" suffix
> +       for vop_m C++ overloaded API.  */
> +    if (overloaded_p && instance.pred == PRED_TYPE_m)
> +      return b.finish_name ();
>      b.append_name (predication_suffixes[instance.pred]);
>      return b.finish_name ();
>    }
> --
> 2.36.3
>
>
diff mbox series

Patch

diff --git a/gcc/config/riscv/riscv-vector-builtins-shapes.cc b/gcc/config/riscv/riscv-vector-builtins-shapes.cc
index 76cf14a8cc4..56697f71cbd 100644
--- a/gcc/config/riscv/riscv-vector-builtins-shapes.cc
+++ b/gcc/config/riscv/riscv-vector-builtins-shapes.cc
@@ -128,6 +128,10 @@  struct loadstore_def : public build_base
 	b.append_name (type_suffixes[instance.type.index].vector);
       }
 
+    /* According to rvv-intrinsic-doc, it does not add "_m" suffix
+       for vop_m C++ overloaded API.  */
+    if (overloaded_p && instance.pred == PRED_TYPE_m)
+      return b.finish_name ();
     b.append_name (predication_suffixes[instance.pred]);
     return b.finish_name ();
   }