Home | History | Annotate | Line # | Download | only in riscv
      1 /* Builtins implementation for RISC-V 'V' Extension for GNU compiler.
      2    Copyright (C) 2022-2024 Free Software Foundation, Inc.
      3    Contributed by Ju-Zhe Zhong (juzhe.zhong (at) rivai.ai), RiVAI Technologies Ltd.
      4 
      5    This file is part of GCC.
      6 
      7    GCC is free software; you can redistribute it and/or modify it
      8    under the terms of the GNU General Public License as published by
      9    the Free Software Foundation; either version 3, or (at your option)
     10    any later version.
     11 
     12    GCC is distributed in the hope that it will be useful, but
     13    WITHOUT ANY WARRANTY; without even the implied warranty of
     14    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
     15    General Public License for more details.
     16 
     17    You should have received a copy of the GNU General Public License
     18    along with GCC; see the file COPYING3.  If not see
     19    <http://www.gnu.org/licenses/>.  */
     20 
     21 #define IN_TARGET_CODE 1
     22 
     23 #include "config.h"
     24 #include "system.h"
     25 #include "coretypes.h"
     26 #include "tm.h"
     27 #include "tree.h"
     28 #include "rtl.h"
     29 #include "tm_p.h"
     30 #include "memmodel.h"
     31 #include "insn-codes.h"
     32 #include "optabs.h"
     33 #include "recog.h"
     34 #include "diagnostic.h"
     35 #include "expr.h"
     36 #include "function.h"
     37 #include "fold-const.h"
     38 #include "gimplify.h"
     39 #include "explow.h"
     40 #include "stor-layout.h"
     41 #include "alias.h"
     42 #include "langhooks.h"
     43 #include "stringpool.h"
     44 #include "attribs.h"
     45 #include "targhooks.h"
     46 #include "regs.h"
     47 #include "emit-rtl.h"
     48 #include "basic-block.h"
     49 #include "gimple.h"
     50 #include "gimple-iterator.h"
     51 #include "riscv-vector-builtins.h"
     52 #include "riscv-vector-builtins-shapes.h"
     53 #include "riscv-vector-builtins-bases.h"
     54 
     55 using namespace riscv_vector;
     56 
     57 namespace riscv_vector {
     58 
     59 /* Static information about each vector type.  */
     60 struct vector_type_info
     61 {
     62   /* The name of the type as declared by riscv_vector.h
     63      which is recommend to use. For example: 'vint32m1_t'.  */
     64   const char *name;
     65 
     66   /* ABI name of vector type. The type is always available
     67      under this name, even when riscv_vector.h isn't included.
     68      For example:  '__rvv_int32m1_t'.  */
     69   const char *abi_name;
     70 
     71   /* The C++ mangling of ABI_NAME.  */
     72   const char *mangled_name;
     73 };
     74 
     75 /* Describes a function decl.  */
     76 class GTY (()) registered_function
     77 {
     78 public:
     79   function_instance GTY ((skip)) instance;
     80 
     81   /* The decl itself.  */
     82   tree GTY ((skip)) decl;
     83 
     84   /* The overload hash of non-overloaded intrinsic is determined by
     85      the overload name and argument list. Adding the overload name to
     86      the hash is also to address the following situations:
     87      vint16mf4_t  __riscv_vreinterpret_i16mf4 (vfloat16mf4_t src);
     88      vuint16mf4_t __riscv_vreinterpret_u16mf4 (vfloat16mf4_t src);
     89      The base, shape and argument list of the vreinterpret instance are
     90      the same, only the overload name is different. Therefore, it is
     91      enough to add overload_name and argument list to the hash value.*/
     92   const char *overload_name;
     93 
     94   /* The argument list part of the hash value. Add the unsigned/signed type
     95      and machine mode of each argument to the hash value. */
     96   vec<tree> GTY ((skip)) argument_types;
     97 
     98   /* True if the decl represents an overloaded function that needs to be
     99      resolved. */
    100   bool overloaded_p;
    101 
    102   /* The hash value to indicate the non-overloaded function. Generate hash value
    103      based on overload_name and argument_types. */
    104   hashval_t overloaded_hash () const;
    105 
    106   /* Generate hash value based on the overload_name and the argument list passed
    107      by the user when calling. */
    108   hashval_t overloaded_hash (const vec<tree, va_gc> &);
    109 
    110   /* The reqired extension for the register function.  */
    111   enum required_ext required;
    112 };
    113 
    114 /* Hash traits for registered_function.  */
    115 struct registered_function_hasher : nofree_ptr_hash<registered_function>
    116 {
    117   typedef function_instance compare_type;
    118 
    119   static hashval_t hash (value_type);
    120   static bool equal (value_type, const compare_type &);
    121 };
    122 
    123 /* Hash traits for overload registered_function. */
    124 struct non_overloaded_registered_function_hasher
    125   : nofree_ptr_hash<registered_function>
    126 {
    127   static hashval_t hash (value_type);
    128   static bool equal (value_type, const compare_type &);
    129 };
    130 
    131 /* Static information about each RVV type.  */
    132 static CONSTEXPR const vector_type_info vector_types[] = {
    133 #define DEF_RVV_TYPE(NAME, NCHARS, ABI_NAME, ARGS...)                          \
    134   {#NAME, #ABI_NAME, "u" #NCHARS #ABI_NAME},
    135 #define DEF_RVV_TUPLE_TYPE(NAME, NCHARS, ABI_NAME, ARGS...)                    \
    136   {#NAME, #ABI_NAME, "u" #NCHARS #ABI_NAME},
    137 #include "riscv-vector-builtins.def"
    138 };
    139 
    140 /* Static information about operand suffix for each RVV type.  */
    141 const char *const operand_suffixes[NUM_OP_TYPES] = {
    142   "", /* OP_TYPE_none.  */
    143 #define DEF_RVV_OP_TYPE(NAME) "_" # NAME,
    144 #include "riscv-vector-builtins.def"
    145 };
    146 
    147 /* Static information about type suffix for each RVV type.  */
    148 const rvv_builtin_suffixes type_suffixes[NUM_VECTOR_TYPES + 1] = {
    149 #define DEF_RVV_TYPE(NAME, NCHARS, ABI_NAME, SCALAR_TYPE, VECTOR_MODE,         \
    150 		     VECTOR_SUFFIX, SCALAR_SUFFIX, VSETVL_SUFFIX)              \
    151   {#VECTOR_SUFFIX, #SCALAR_SUFFIX, #VSETVL_SUFFIX},
    152 #define DEF_RVV_TUPLE_TYPE(NAME, NCHARS, ABI_NAME, SUBPART_TYPE, SCALAR_TYPE,  \
    153 			   NF, VECTOR_SUFFIX)                                  \
    154   {#VECTOR_SUFFIX, "", ""},
    155 #include "riscv-vector-builtins.def"
    156 };
    157 
    158 /* Static information about predication suffix for each RVV type.  */
    159 const char *const predication_suffixes[NUM_PRED_TYPES] = {
    160   "", /* PRED_TYPE_none.  */
    161 #define DEF_RVV_PRED_TYPE(NAME) "_" # NAME,
    162 #include "riscv-vector-builtins.def"
    163 };
    164 
    165 /* A list of all signed integer will be registered for intrinsic functions.  */
    166 static const rvv_type_info none_ops[] = {{NUM_VECTOR_TYPES, 0}};
    167 
    168 /* A list of all signed integer will be registered for intrinsic functions.  */
    169 static const rvv_type_info i_ops[] = {
    170 #define DEF_RVV_I_OPS(TYPE, REQUIRE) {VECTOR_TYPE_##TYPE, REQUIRE},
    171 #include "riscv-vector-builtins-types.def"
    172   {NUM_VECTOR_TYPES, 0}};
    173 
    174 /* A list of all signed integer can be widened will be registered for intrinsic
    175  * functions.  */
    176 static const rvv_type_info wi_ops[] = {
    177 #define DEF_RVV_WI_OPS(TYPE, REQUIRE) {VECTOR_TYPE_##TYPE, REQUIRE},
    178 #include "riscv-vector-builtins-types.def"
    179   {NUM_VECTOR_TYPES, 0}};
    180 
    181 /* A list of all unsigned integer can be widened will be registered for
    182  * intrinsic functions.  */
    183 static const rvv_type_info wu_ops[] = {
    184 #define DEF_RVV_WU_OPS(TYPE, REQUIRE) {VECTOR_TYPE_##TYPE, REQUIRE},
    185 #include "riscv-vector-builtins-types.def"
    186   {NUM_VECTOR_TYPES, 0}};
    187 
    188 /* A list of all floating-point can be widened will be registered for intrinsic
    189  * functions.  */
    190 static const rvv_type_info wf_ops[] = {
    191 #define DEF_RVV_WF_OPS(TYPE, REQUIRE) {VECTOR_TYPE_##TYPE, REQUIRE},
    192 #include "riscv-vector-builtins-types.def"
    193   {NUM_VECTOR_TYPES, 0}};
    194 
    195 /* A list of all signed integer that SEW = 64 require full 'V' extension will be
    196    registered for intrinsic functions.  */
    197 static const rvv_type_info full_v_i_ops[] = {
    198 #define DEF_RVV_FULL_V_I_OPS(TYPE, REQUIRE) {VECTOR_TYPE_##TYPE, REQUIRE},
    199 #include "riscv-vector-builtins-types.def"
    200   {NUM_VECTOR_TYPES, 0}};
    201 
    202 /* A list of all unsigned integer that SEW = 64 require full 'V' extension will
    203    be registered for intrinsic functions.  */
    204 static const rvv_type_info full_v_u_ops[] = {
    205 #define DEF_RVV_FULL_V_U_OPS(TYPE, REQUIRE) {VECTOR_TYPE_##TYPE, REQUIRE},
    206 #include "riscv-vector-builtins-types.def"
    207   {NUM_VECTOR_TYPES, 0}};
    208 
    209 /* A list of all unsigned integer will be registered for intrinsic functions.  */
    210 static const rvv_type_info u_ops[] = {
    211 #define DEF_RVV_U_OPS(TYPE, REQUIRE) {VECTOR_TYPE_##TYPE, REQUIRE},
    212 #include "riscv-vector-builtins-types.def"
    213   {NUM_VECTOR_TYPES, 0}};
    214 
    215 /* A list of all signed integer will be registered for intrinsic functions.  */
    216 static const rvv_type_info convert_i_ops[] = {
    217 #define DEF_RVV_CONVERT_I_OPS(TYPE, REQUIRE) {VECTOR_TYPE_##TYPE, REQUIRE},
    218 #include "riscv-vector-builtins-types.def"
    219   {NUM_VECTOR_TYPES, 0}};
    220 
    221 /* A list of all unsigned integer will be registered for intrinsic functions.  */
    222 static const rvv_type_info convert_u_ops[] = {
    223 #define DEF_RVV_CONVERT_U_OPS(TYPE, REQUIRE) {VECTOR_TYPE_##TYPE, REQUIRE},
    224 #include "riscv-vector-builtins-types.def"
    225   {NUM_VECTOR_TYPES, 0}};
    226 
    227 /* A list of all signed integer will be registered for intrinsic functions.  */
    228 static const rvv_type_info wconvert_i_ops[] = {
    229 #define DEF_RVV_WCONVERT_I_OPS(TYPE, REQUIRE) {VECTOR_TYPE_##TYPE, REQUIRE},
    230 #include "riscv-vector-builtins-types.def"
    231   {NUM_VECTOR_TYPES, 0}};
    232 
    233 /* A list of all unsigned integer will be registered for intrinsic functions. */
    234 static const rvv_type_info wconvert_u_ops[] = {
    235 #define DEF_RVV_WCONVERT_U_OPS(TYPE, REQUIRE) {VECTOR_TYPE_##TYPE, REQUIRE},
    236 #include "riscv-vector-builtins-types.def"
    237   {NUM_VECTOR_TYPES, 0}};
    238 
    239 /* A list of all floating-point will be registered for intrinsic functions. */
    240 static const rvv_type_info wconvert_f_ops[] = {
    241 #define DEF_RVV_WCONVERT_F_OPS(TYPE, REQUIRE) {VECTOR_TYPE_##TYPE, REQUIRE},
    242 #include "riscv-vector-builtins-types.def"
    243   {NUM_VECTOR_TYPES, 0}};
    244 
    245 /* A list of all integer will be registered for intrinsic functions.  */
    246 static const rvv_type_info iu_ops[] = {
    247 #define DEF_RVV_I_OPS(TYPE, REQUIRE) {VECTOR_TYPE_##TYPE, REQUIRE},
    248 #define DEF_RVV_U_OPS(TYPE, REQUIRE) {VECTOR_TYPE_##TYPE, REQUIRE},
    249 #include "riscv-vector-builtins-types.def"
    250   {NUM_VECTOR_TYPES, 0}};
    251 
    252 /* A list of all types will be registered for intrinsic functions.  */
    253 static const rvv_type_info all_ops[] = {
    254 #define DEF_RVV_I_OPS(TYPE, REQUIRE) {VECTOR_TYPE_##TYPE, REQUIRE},
    255 #define DEF_RVV_U_OPS(TYPE, REQUIRE) {VECTOR_TYPE_##TYPE, REQUIRE},
    256 #define DEF_RVV_F_OPS(TYPE, REQUIRE) {VECTOR_TYPE_##TYPE, REQUIRE},
    257 #include "riscv-vector-builtins-types.def"
    258   {NUM_VECTOR_TYPES, 0}};
    259 
    260 /* A list of all types will be registered for intrinsic functions.  */
    261 static const rvv_type_info ei16_ops[] = {
    262 #define DEF_RVV_EI16_OPS(TYPE, REQUIRE) {VECTOR_TYPE_##TYPE, REQUIRE},
    263 #include "riscv-vector-builtins-types.def"
    264   {NUM_VECTOR_TYPES, 0}};
    265 
    266 /* A list of all bool will be registered for intrinsic functions.  */
    267 static const rvv_type_info b_ops[] = {
    268 #define DEF_RVV_B_OPS(TYPE, REQUIRE) {VECTOR_TYPE_##TYPE, REQUIRE},
    269 #include "riscv-vector-builtins-types.def"
    270   {NUM_VECTOR_TYPES, 0}};
    271 
    272 /* A list of all float will be registered for intrinsic functions.  */
    273 static const rvv_type_info f_ops[] = {
    274 #define DEF_RVV_F_OPS(TYPE, REQUIRE) {VECTOR_TYPE_##TYPE, REQUIRE},
    275 #include "riscv-vector-builtins-types.def"
    276   {NUM_VECTOR_TYPES, 0}};
    277 
    278 /* A list of Double-Widening signed integer will be registered for intrinsic
    279  * functions.  */
    280 static const rvv_type_info wexti_ops[] = {
    281 #define DEF_RVV_WEXTI_OPS(TYPE, REQUIRE) {VECTOR_TYPE_##TYPE, REQUIRE},
    282 #include "riscv-vector-builtins-types.def"
    283   {NUM_VECTOR_TYPES, 0}};
    284 
    285 /* A list of Double-Widening float will be registered for intrinsic functions.
    286  */
    287 static const rvv_type_info wextf_ops[] = {
    288 #define DEF_RVV_WEXTF_OPS(TYPE, REQUIRE) {VECTOR_TYPE_##TYPE, REQUIRE},
    289 #include "riscv-vector-builtins-types.def"
    290   {NUM_VECTOR_TYPES, 0}};
    291 
    292 /* A list of Quad-Widening signed integer will be registered for intrinsic
    293  * functions.  */
    294 static const rvv_type_info qexti_ops[] = {
    295 #define DEF_RVV_QEXTI_OPS(TYPE, REQUIRE) {VECTOR_TYPE_##TYPE, REQUIRE},
    296 #include "riscv-vector-builtins-types.def"
    297   {NUM_VECTOR_TYPES, 0}};
    298 
    299 /* A list of Oct-Widening signed integer will be registered for intrinsic
    300  * functions.  */
    301 static const rvv_type_info oexti_ops[] = {
    302 #define DEF_RVV_OEXTI_OPS(TYPE, REQUIRE) {VECTOR_TYPE_##TYPE, REQUIRE},
    303 #include "riscv-vector-builtins-types.def"
    304   {NUM_VECTOR_TYPES, 0}};
    305 
    306 /* A list of Double-Widening unsigned integer will be registered for intrinsic
    307  * functions.  */
    308 static const rvv_type_info wextu_ops[] = {
    309 #define DEF_RVV_WEXTU_OPS(TYPE, REQUIRE) {VECTOR_TYPE_##TYPE, REQUIRE},
    310 #include "riscv-vector-builtins-types.def"
    311   {NUM_VECTOR_TYPES, 0}};
    312 
    313 /* A list of Double-Widening all integer will be registered for intrinsic
    314  * functions.  */
    315 static const rvv_type_info wextiu_ops[] = {
    316 #define DEF_RVV_WEXTI_OPS(TYPE, REQUIRE) {VECTOR_TYPE_##TYPE, REQUIRE},
    317 #define DEF_RVV_WEXTU_OPS(TYPE, REQUIRE) {VECTOR_TYPE_##TYPE, REQUIRE},
    318 #include "riscv-vector-builtins-types.def"
    319   {NUM_VECTOR_TYPES, 0}};
    320 
    321 /* A list of Quad-Widening unsigned integer will be registered for intrinsic
    322  * functions.  */
    323 static const rvv_type_info qextu_ops[] = {
    324 #define DEF_RVV_QEXTU_OPS(TYPE, REQUIRE) {VECTOR_TYPE_##TYPE, REQUIRE},
    325 #include "riscv-vector-builtins-types.def"
    326   {NUM_VECTOR_TYPES, 0}};
    327 
    328 /* A list of Oct-Widening unsigned integer will be registered for intrinsic
    329  * functions.  */
    330 static const rvv_type_info oextu_ops[] = {
    331 #define DEF_RVV_OEXTU_OPS(TYPE, REQUIRE) {VECTOR_TYPE_##TYPE, REQUIRE},
    332 #include "riscv-vector-builtins-types.def"
    333   {NUM_VECTOR_TYPES, 0}};
    334 
    335 /* A list of eew8 interpret will be registered for intrinsic functions.  */
    336 static const rvv_type_info eew8_interpret_ops[] = {
    337 #define DEF_RVV_EEW8_INTERPRET_OPS(TYPE, REQUIRE) {VECTOR_TYPE_##TYPE, REQUIRE},
    338 #include "riscv-vector-builtins-types.def"
    339   {NUM_VECTOR_TYPES, 0}};
    340 
    341 /* A list of eew16 interpret will be registered for intrinsic functions.  */
    342 static const rvv_type_info eew16_interpret_ops[] = {
    343 #define DEF_RVV_EEW16_INTERPRET_OPS(TYPE, REQUIRE)                             \
    344   {VECTOR_TYPE_##TYPE, REQUIRE},
    345 #include "riscv-vector-builtins-types.def"
    346   {NUM_VECTOR_TYPES, 0}};
    347 
    348 /* A list of eew32 interpret will be registered for intrinsic functions.  */
    349 static const rvv_type_info eew32_interpret_ops[] = {
    350 #define DEF_RVV_EEW32_INTERPRET_OPS(TYPE, REQUIRE)                             \
    351   {VECTOR_TYPE_##TYPE, REQUIRE},
    352 #include "riscv-vector-builtins-types.def"
    353   {NUM_VECTOR_TYPES, 0}};
    354 
    355 /* A list of eew64 interpret will be registered for intrinsic functions.  */
    356 static const rvv_type_info eew64_interpret_ops[] = {
    357 #define DEF_RVV_EEW64_INTERPRET_OPS(TYPE, REQUIRE)                             \
    358   {VECTOR_TYPE_##TYPE, REQUIRE},
    359 #include "riscv-vector-builtins-types.def"
    360   {NUM_VECTOR_TYPES, 0}};
    361 
    362 /* A list of bool1 interpret will be registered for intrinsic functions.  */
    363 static const rvv_type_info bool1_interpret_ops[] = {
    364 #define DEF_RVV_BOOL1_INTERPRET_OPS(TYPE, REQUIRE)                             \
    365   {VECTOR_TYPE_##TYPE, REQUIRE},
    366 #include "riscv-vector-builtins-types.def"
    367   {NUM_VECTOR_TYPES, 0}};
    368 
    369 /* A list of bool2 interpret will be registered for intrinsic functions.  */
    370 static const rvv_type_info bool2_interpret_ops[] = {
    371 #define DEF_RVV_BOOL2_INTERPRET_OPS(TYPE, REQUIRE)                             \
    372   {VECTOR_TYPE_##TYPE, REQUIRE},
    373 #include "riscv-vector-builtins-types.def"
    374   {NUM_VECTOR_TYPES, 0}};
    375 
    376 /* A list of bool4 interpret will be registered for intrinsic functions.  */
    377 static const rvv_type_info bool4_interpret_ops[] = {
    378 #define DEF_RVV_BOOL4_INTERPRET_OPS(TYPE, REQUIRE)                             \
    379   {VECTOR_TYPE_##TYPE, REQUIRE},
    380 #include "riscv-vector-builtins-types.def"
    381   {NUM_VECTOR_TYPES, 0}};
    382 
    383 /* A list of bool8 interpret will be registered for intrinsic functions.  */
    384 static const rvv_type_info bool8_interpret_ops[] = {
    385 #define DEF_RVV_BOOL8_INTERPRET_OPS(TYPE, REQUIRE)                             \
    386   {VECTOR_TYPE_##TYPE, REQUIRE},
    387 #include "riscv-vector-builtins-types.def"
    388   {NUM_VECTOR_TYPES, 0}};
    389 
    390 /* A list of bool16 interpret will be registered for intrinsic functions.  */
    391 static const rvv_type_info bool16_interpret_ops[] = {
    392 #define DEF_RVV_BOOL16_INTERPRET_OPS(TYPE, REQUIRE)                            \
    393   {VECTOR_TYPE_##TYPE, REQUIRE},
    394 #include "riscv-vector-builtins-types.def"
    395   {NUM_VECTOR_TYPES, 0}};
    396 
    397 /* A list of bool32 interpret will be registered for intrinsic functions.  */
    398 static const rvv_type_info bool32_interpret_ops[] = {
    399 #define DEF_RVV_BOOL32_INTERPRET_OPS(TYPE, REQUIRE)                            \
    400   {VECTOR_TYPE_##TYPE, REQUIRE},
    401 #include "riscv-vector-builtins-types.def"
    402   {NUM_VECTOR_TYPES, 0}};
    403 
    404 /* A list of bool64 interpret will be registered for intrinsic functions.  */
    405 static const rvv_type_info bool64_interpret_ops[] = {
    406 #define DEF_RVV_BOOL64_INTERPRET_OPS(TYPE, REQUIRE)                            \
    407   {VECTOR_TYPE_##TYPE, REQUIRE},
    408 #include "riscv-vector-builtins-types.def"
    409   {NUM_VECTOR_TYPES, 0}};
    410 
    411 /* A list of vint8m1 interpret will be registered for intrinsic functions.  */
    412 static const rvv_type_info signed_eew8_lmul1_interpret_ops[] = {
    413 #define DEF_RVV_SIGNED_EEW8_LMUL1_INTERPRET_OPS(TYPE, REQUIRE)                 \
    414   {VECTOR_TYPE_##TYPE, REQUIRE},
    415 #include "riscv-vector-builtins-types.def"
    416   {NUM_VECTOR_TYPES, 0}};
    417 
    418 /* A list of vint16m1 interpret will be registered for intrinsic functions.  */
    419 static const rvv_type_info signed_eew16_lmul1_interpret_ops[] = {
    420 #define DEF_RVV_SIGNED_EEW16_LMUL1_INTERPRET_OPS(TYPE, REQUIRE)                \
    421   {VECTOR_TYPE_##TYPE, REQUIRE},
    422 #include "riscv-vector-builtins-types.def"
    423   {NUM_VECTOR_TYPES, 0}};
    424 
    425 /* A list of vint32m1 interpret will be registered for intrinsic functions.  */
    426 static const rvv_type_info signed_eew32_lmul1_interpret_ops[] = {
    427 #define DEF_RVV_SIGNED_EEW32_LMUL1_INTERPRET_OPS(TYPE, REQUIRE)                \
    428   {VECTOR_TYPE_##TYPE, REQUIRE},
    429 #include "riscv-vector-builtins-types.def"
    430   {NUM_VECTOR_TYPES, 0}};
    431 
    432 /* A list of vint64m1 interpret will be registered for intrinsic functions.  */
    433 static const rvv_type_info signed_eew64_lmul1_interpret_ops[] = {
    434 #define DEF_RVV_SIGNED_EEW64_LMUL1_INTERPRET_OPS(TYPE, REQUIRE)                \
    435   {VECTOR_TYPE_##TYPE, REQUIRE},
    436 #include "riscv-vector-builtins-types.def"
    437   {NUM_VECTOR_TYPES, 0}};
    438 
    439 /* A list of vuint8m1 interpret will be registered for intrinsic functions.  */
    440 static const rvv_type_info unsigned_eew8_lmul1_interpret_ops[] = {
    441 #define DEF_RVV_UNSIGNED_EEW8_LMUL1_INTERPRET_OPS(TYPE, REQUIRE)               \
    442   {VECTOR_TYPE_##TYPE, REQUIRE},
    443 #include "riscv-vector-builtins-types.def"
    444   {NUM_VECTOR_TYPES, 0}};
    445 
    446 /* A list of vuint16m1 interpret will be registered for intrinsic functions.  */
    447 static const rvv_type_info unsigned_eew16_lmul1_interpret_ops[] = {
    448 #define DEF_RVV_UNSIGNED_EEW16_LMUL1_INTERPRET_OPS(TYPE, REQUIRE)              \
    449   {VECTOR_TYPE_##TYPE, REQUIRE},
    450 #include "riscv-vector-builtins-types.def"
    451   {NUM_VECTOR_TYPES, 0}};
    452 
    453 /* A list of vuint32m1 interpret will be registered for intrinsic functions.  */
    454 static const rvv_type_info unsigned_eew32_lmul1_interpret_ops[] = {
    455 #define DEF_RVV_UNSIGNED_EEW32_LMUL1_INTERPRET_OPS(TYPE, REQUIRE)              \
    456   {VECTOR_TYPE_##TYPE, REQUIRE},
    457 #include "riscv-vector-builtins-types.def"
    458   {NUM_VECTOR_TYPES, 0}};
    459 
    460 /* A list of vuint64m1 interpret will be registered for intrinsic functions.  */
    461 static const rvv_type_info unsigned_eew64_lmul1_interpret_ops[] = {
    462 #define DEF_RVV_UNSIGNED_EEW64_LMUL1_INTERPRET_OPS(TYPE, REQUIRE)              \
    463   {VECTOR_TYPE_##TYPE, REQUIRE},
    464 #include "riscv-vector-builtins-types.def"
    465   {NUM_VECTOR_TYPES, 0}};
    466 
    467 /* A list of x2 vlmul ext will be registered for intrinsic functions.  */
    468 static const rvv_type_info vlmul_ext_x2_ops[] = {
    469 #define DEF_RVV_X2_VLMUL_EXT_OPS(TYPE, REQUIRE) {VECTOR_TYPE_##TYPE, REQUIRE},
    470 #include "riscv-vector-builtins-types.def"
    471   {NUM_VECTOR_TYPES, 0}};
    472 
    473 /* A list of x4 vlmul ext will be registered for intrinsic functions.  */
    474 static const rvv_type_info vlmul_ext_x4_ops[] = {
    475 #define DEF_RVV_X4_VLMUL_EXT_OPS(TYPE, REQUIRE) {VECTOR_TYPE_##TYPE, REQUIRE},
    476 #include "riscv-vector-builtins-types.def"
    477   {NUM_VECTOR_TYPES, 0}};
    478 
    479 /* A list of x8 vlmul ext will be registered for intrinsic functions.  */
    480 static const rvv_type_info vlmul_ext_x8_ops[] = {
    481 #define DEF_RVV_X8_VLMUL_EXT_OPS(TYPE, REQUIRE) {VECTOR_TYPE_##TYPE, REQUIRE},
    482 #include "riscv-vector-builtins-types.def"
    483   {NUM_VECTOR_TYPES, 0}};
    484 
    485 /* A list of x16 vlmul ext will be registered for intrinsic functions.  */
    486 static const rvv_type_info vlmul_ext_x16_ops[] = {
    487 #define DEF_RVV_X16_VLMUL_EXT_OPS(TYPE, REQUIRE) {VECTOR_TYPE_##TYPE, REQUIRE},
    488 #include "riscv-vector-builtins-types.def"
    489   {NUM_VECTOR_TYPES, 0}};
    490 
    491 /* A list of x32 vlmul ext will be registered for intrinsic functions.  */
    492 static const rvv_type_info vlmul_ext_x32_ops[] = {
    493 #define DEF_RVV_X32_VLMUL_EXT_OPS(TYPE, REQUIRE) {VECTOR_TYPE_##TYPE, REQUIRE},
    494 #include "riscv-vector-builtins-types.def"
    495   {NUM_VECTOR_TYPES, 0}};
    496 
    497 /* A list of x64 vlmul ext will be registered for intrinsic functions.  */
    498 static const rvv_type_info vlmul_ext_x64_ops[] = {
    499 #define DEF_RVV_X64_VLMUL_EXT_OPS(TYPE, REQUIRE) {VECTOR_TYPE_##TYPE, REQUIRE},
    500 #include "riscv-vector-builtins-types.def"
    501   {NUM_VECTOR_TYPES, 0}};
    502 
    503 /* A list of LMUL1 will be registered for intrinsic functions.  */
    504 static const rvv_type_info lmul1_ops[] = {
    505 #define DEF_RVV_LMUL1_OPS(TYPE, REQUIRE) {VECTOR_TYPE_##TYPE, REQUIRE},
    506 #include "riscv-vector-builtins-types.def"
    507   {NUM_VECTOR_TYPES, 0}};
    508 
    509 /* A list of LMUL2 will be registered for intrinsic functions.  */
    510 static const rvv_type_info lmul2_ops[] = {
    511 #define DEF_RVV_LMUL2_OPS(TYPE, REQUIRE) {VECTOR_TYPE_##TYPE, REQUIRE},
    512 #include "riscv-vector-builtins-types.def"
    513   {NUM_VECTOR_TYPES, 0}};
    514 
    515 /* A list of LMUL4 will be registered for intrinsic functions.  */
    516 static const rvv_type_info lmul4_ops[] = {
    517 #define DEF_RVV_LMUL4_OPS(TYPE, REQUIRE) {VECTOR_TYPE_##TYPE, REQUIRE},
    518 #include "riscv-vector-builtins-types.def"
    519   {NUM_VECTOR_TYPES, 0}};
    520 
    521 /* A list of Tuple types will be registered for intrinsic functions.  */
    522 static const rvv_type_info tuple_ops[] = {
    523 #define DEF_RVV_TUPLE_OPS(TYPE, REQUIRE) {VECTOR_TYPE_##TYPE, REQUIRE},
    524 #include "riscv-vector-builtins-types.def"
    525   {NUM_VECTOR_TYPES, 0}};
    526 
    527 /* Below types will be registered for vector-crypto intrinsic functions*/
    528 /* A list of sew32 will be registered for vector-crypto intrinsic functions.  */
    529 static const rvv_type_info crypto_sew32_ops[] = {
    530 #define DEF_RVV_CRYPTO_SEW32_OPS(TYPE, REQUIRE) {VECTOR_TYPE_##TYPE, REQUIRE},
    531 #include "riscv-vector-builtins-types.def"
    532   {NUM_VECTOR_TYPES, 0}};
    533 
    534 /* A list of sew64 will be registered for vector-crypto intrinsic functions.  */
    535 static const rvv_type_info crypto_sew64_ops[] = {
    536 #define DEF_RVV_CRYPTO_SEW64_OPS(TYPE, REQUIRE) {VECTOR_TYPE_##TYPE, REQUIRE},
    537 #include "riscv-vector-builtins-types.def"
    538   {NUM_VECTOR_TYPES, 0}};
    539 
    540 static CONSTEXPR const rvv_arg_type_info rvv_arg_type_info_end
    541   = rvv_arg_type_info (NUM_BASE_TYPES);
    542 
    543 /* A list of args for size_t func () function.  */
    544 static CONSTEXPR const rvv_arg_type_info void_args[] = {rvv_arg_type_info_end};
    545 
    546 /* A list of args for size_t func () function.  */
    547 static CONSTEXPR const rvv_arg_type_info end_args[]
    548   = {rvv_arg_type_info_end};
    549 
    550 /* A list of args for size_t func (size_t) function.  */
    551 static CONSTEXPR const rvv_arg_type_info size_args[]
    552   = {rvv_arg_type_info (RVV_BASE_size), rvv_arg_type_info_end};
    553 
    554 /* A list of args for vector_type func (const scalar_type *) function.  */
    555 static CONSTEXPR const rvv_arg_type_info scalar_const_ptr_args[]
    556   = {rvv_arg_type_info (RVV_BASE_scalar_const_ptr), rvv_arg_type_info_end};
    557 
    558 /* A list of args for vector_type func (const scalar_type *, size_t *) function.
    559  */
    560 static CONSTEXPR const rvv_arg_type_info scalar_const_ptr_size_ptr_args[]
    561   = {rvv_arg_type_info (RVV_BASE_scalar_const_ptr),
    562      rvv_arg_type_info (RVV_BASE_size_ptr), rvv_arg_type_info_end};
    563 
    564 /* A list of args for void func (scalar_type *, vector_type) function.  */
    565 static CONSTEXPR const rvv_arg_type_info scalar_ptr_args[]
    566   = {rvv_arg_type_info (RVV_BASE_scalar_ptr),
    567      rvv_arg_type_info (RVV_BASE_vector), rvv_arg_type_info_end};
    568 
    569 /* A list of args for vector_type func (const scalar_type *, ptrdiff_t)
    570  * function.  */
    571 static CONSTEXPR const rvv_arg_type_info scalar_const_ptr_ptrdiff_args[]
    572   = {rvv_arg_type_info (RVV_BASE_scalar_const_ptr),
    573      rvv_arg_type_info (RVV_BASE_ptrdiff), rvv_arg_type_info_end};
    574 
    575 /* A list of args for void func (scalar_type *, ptrdiff_t, vector_type)
    576  * function.  */
    577 static CONSTEXPR const rvv_arg_type_info scalar_ptr_ptrdiff_args[]
    578   = {rvv_arg_type_info (RVV_BASE_scalar_ptr),
    579      rvv_arg_type_info (RVV_BASE_ptrdiff), rvv_arg_type_info (RVV_BASE_vector),
    580      rvv_arg_type_info_end};
    581 
    582 /* A list of args for vector_type func (const scalar_type *, eew8_index_type)
    583  * function.  */
    584 static CONSTEXPR const rvv_arg_type_info scalar_const_ptr_eew8_index_args[]
    585   = {rvv_arg_type_info (RVV_BASE_scalar_const_ptr),
    586      rvv_arg_type_info (RVV_BASE_eew8_index), rvv_arg_type_info_end};
    587 
    588 /* A list of args for vector_type func (const scalar_type *, eew16_index_type)
    589  * function.  */
    590 static CONSTEXPR const rvv_arg_type_info scalar_const_ptr_eew16_index_args[]
    591   = {rvv_arg_type_info (RVV_BASE_scalar_const_ptr),
    592      rvv_arg_type_info (RVV_BASE_eew16_index), rvv_arg_type_info_end};
    593 
    594 /* A list of args for vector_type func (const scalar_type *, eew32_index_type)
    595  * function.  */
    596 static CONSTEXPR const rvv_arg_type_info scalar_const_ptr_eew32_index_args[]
    597   = {rvv_arg_type_info (RVV_BASE_scalar_const_ptr),
    598      rvv_arg_type_info (RVV_BASE_eew32_index), rvv_arg_type_info_end};
    599 
    600 /* A list of args for vector_type func (const scalar_type *, eew64_index_type)
    601  * function.  */
    602 static CONSTEXPR const rvv_arg_type_info scalar_const_ptr_eew64_index_args[]
    603   = {rvv_arg_type_info (RVV_BASE_scalar_const_ptr),
    604      rvv_arg_type_info (RVV_BASE_eew64_index), rvv_arg_type_info_end};
    605 
    606 /* A list of args for void func (scalar_type *, eew8_index_type, vector_type)
    607  * function.  */
    608 static CONSTEXPR const rvv_arg_type_info scalar_ptr_eew8_index_args[]
    609   = {rvv_arg_type_info (RVV_BASE_scalar_ptr),
    610      rvv_arg_type_info (RVV_BASE_eew8_index),
    611      rvv_arg_type_info (RVV_BASE_vector), rvv_arg_type_info_end};
    612 
    613 /* A list of args for void func (scalar_type *, eew16_index_type, vector_type)
    614  * function.  */
    615 static CONSTEXPR const rvv_arg_type_info scalar_ptr_eew16_index_args[]
    616   = {rvv_arg_type_info (RVV_BASE_scalar_ptr),
    617      rvv_arg_type_info (RVV_BASE_eew16_index),
    618      rvv_arg_type_info (RVV_BASE_vector), rvv_arg_type_info_end};
    619 
    620 /* A list of args for void func (scalar_type *, eew32_index_type, vector_type)
    621  * function.  */
    622 static CONSTEXPR const rvv_arg_type_info scalar_ptr_eew32_index_args[]
    623   = {rvv_arg_type_info (RVV_BASE_scalar_ptr),
    624      rvv_arg_type_info (RVV_BASE_eew32_index),
    625      rvv_arg_type_info (RVV_BASE_vector), rvv_arg_type_info_end};
    626 
    627 /* A list of args for void func (scalar_type *, eew64_index_type, vector_type)
    628  * function.  */
    629 static CONSTEXPR const rvv_arg_type_info scalar_ptr_eew64_index_args[]
    630   = {rvv_arg_type_info (RVV_BASE_scalar_ptr),
    631      rvv_arg_type_info (RVV_BASE_eew64_index),
    632      rvv_arg_type_info (RVV_BASE_vector), rvv_arg_type_info_end};
    633 
    634 /* A list of args for vector_type func (vector_type, vector_type) function.  */
    635 static CONSTEXPR const rvv_arg_type_info vv_args[]
    636   = {rvv_arg_type_info (RVV_BASE_vector), rvv_arg_type_info (RVV_BASE_vector),
    637      rvv_arg_type_info_end};
    638 
    639 /* A list of args for vector_type func (vector_type, vector_type, vector_type)
    640  * function.  */
    641 static CONSTEXPR const rvv_arg_type_info vvv_args[]
    642   = {rvv_arg_type_info (RVV_BASE_vector), rvv_arg_type_info (RVV_BASE_vector),
    643      rvv_arg_type_info (RVV_BASE_vector), rvv_arg_type_info_end};
    644 
    645 /* A list of args for vector_type func (vector_type, vector_type, vector_type)
    646  * function.  */
    647 static CONSTEXPR const rvv_arg_type_info vxv_args[]
    648   = {rvv_arg_type_info (RVV_BASE_vector), rvv_arg_type_info (RVV_BASE_scalar),
    649      rvv_arg_type_info (RVV_BASE_vector), rvv_arg_type_info_end};
    650 
    651 /* A list of args for vector_type func (vector_type, vector_type, mask_type)
    652  * function.  */
    653 static CONSTEXPR const rvv_arg_type_info vvm_args[]
    654   = {rvv_arg_type_info (RVV_BASE_vector), rvv_arg_type_info (RVV_BASE_vector),
    655      rvv_arg_type_info (RVV_BASE_mask), rvv_arg_type_info_end};
    656 
    657 /* A list of args for vector_type func (vector_type, mask_type)
    658  * function.  */
    659 static CONSTEXPR const rvv_arg_type_info vm_args[]
    660   = {rvv_arg_type_info (RVV_BASE_vector), rvv_arg_type_info (RVV_BASE_mask),
    661      rvv_arg_type_info_end};
    662 
    663 /* A list of args for vector_type func (vector_type, scalar_type, mask_type)
    664  * function.  */
    665 static CONSTEXPR const rvv_arg_type_info vxm_args[]
    666   = {rvv_arg_type_info (RVV_BASE_vector), rvv_arg_type_info (RVV_BASE_scalar),
    667      rvv_arg_type_info (RVV_BASE_mask), rvv_arg_type_info_end};
    668 
    669 /* A list of args for vector_type func (signed vector_type, unsigned
    670  * vector_type) function.  */
    671 static CONSTEXPR const rvv_arg_type_info su_vv_args[]
    672   = {rvv_arg_type_info (RVV_BASE_vector),
    673      rvv_arg_type_info (RVV_BASE_unsigned_vector), rvv_arg_type_info_end};
    674 
    675 /* A list of args for vector_type func (vector_type, scalar_type) function.  */
    676 static CONSTEXPR const rvv_arg_type_info vx_args[]
    677   = {rvv_arg_type_info (RVV_BASE_vector), rvv_arg_type_info (RVV_BASE_scalar),
    678      rvv_arg_type_info_end};
    679 
    680 /* A list of args for vector_type func (signed vector_type, unsigned
    681  * scalar_type) function.  */
    682 static CONSTEXPR const rvv_arg_type_info su_vx_args[]
    683   = {rvv_arg_type_info (RVV_BASE_vector),
    684      rvv_arg_type_info (RVV_BASE_unsigned_scalar), rvv_arg_type_info_end};
    685 
    686 /* A list of args for vector_type func (vector_type, shift_type) function.  */
    687 static CONSTEXPR const rvv_arg_type_info shift_vv_args[]
    688   = {rvv_arg_type_info (RVV_BASE_vector),
    689      rvv_arg_type_info (RVV_BASE_shift_vector), rvv_arg_type_info_end};
    690 
    691 /* A list of args for vector_type func (vector_type, shift_type) function.  */
    692 static CONSTEXPR const rvv_arg_type_info gather_vv_args[]
    693   = {rvv_arg_type_info (RVV_BASE_vector),
    694      rvv_arg_type_info (RVV_BASE_unsigned_vector), rvv_arg_type_info_end};
    695 
    696 /* A list of args for vector_type func (vector_type, shift_type) function.  */
    697 static CONSTEXPR const rvv_arg_type_info gatherei16_vv_args[]
    698   = {rvv_arg_type_info (RVV_BASE_vector),
    699      rvv_arg_type_info (RVV_BASE_eew16_index), rvv_arg_type_info_end};
    700 
    701 /* A list of args for double demote type func (vector_type, shift_type)
    702  * function.  */
    703 static CONSTEXPR const rvv_arg_type_info shift_wv_args[]
    704   = {rvv_arg_type_info (RVV_BASE_vector),
    705      rvv_arg_type_info (RVV_BASE_double_trunc_unsigned_vector),
    706      rvv_arg_type_info_end};
    707 
    708 /* A list of args for vector_type func (vector_type) function.  */
    709 static CONSTEXPR const rvv_arg_type_info v_args[]
    710   = {rvv_arg_type_info (RVV_BASE_vector), rvv_arg_type_info_end};
    711 
    712 /* A list of args for vector_type func (vector_type) function.  */
    713 static CONSTEXPR const rvv_arg_type_info v_x2_trunc_args[]
    714   = {rvv_arg_type_info (RVV_BASE_vlmul_ext_x2), rvv_arg_type_info_end};
    715 
    716 /* A list of args for vector_type func (vector_type) function.  */
    717 static CONSTEXPR const rvv_arg_type_info v_x4_trunc_args[]
    718   = {rvv_arg_type_info (RVV_BASE_vlmul_ext_x4), rvv_arg_type_info_end};
    719 
    720 /* A list of args for vector_type func (vector_type) function.  */
    721 static CONSTEXPR const rvv_arg_type_info v_x8_trunc_args[]
    722   = {rvv_arg_type_info (RVV_BASE_vlmul_ext_x8), rvv_arg_type_info_end};
    723 
    724 /* A list of args for vector_type func (vector_type) function.  */
    725 static CONSTEXPR const rvv_arg_type_info v_x16_trunc_args[]
    726   = {rvv_arg_type_info (RVV_BASE_vlmul_ext_x16), rvv_arg_type_info_end};
    727 
    728 /* A list of args for vector_type func (vector_type) function.  */
    729 static CONSTEXPR const rvv_arg_type_info v_x32_trunc_args[]
    730   = {rvv_arg_type_info (RVV_BASE_vlmul_ext_x32), rvv_arg_type_info_end};
    731 
    732 /* A list of args for vector_type func (vector_type) function.  */
    733 static CONSTEXPR const rvv_arg_type_info v_x64_trunc_args[]
    734   = {rvv_arg_type_info (RVV_BASE_vlmul_ext_x64), rvv_arg_type_info_end};
    735 
    736 /* A list of args for vector_type func (vector_type, lmul1_type) function.  */
    737 static CONSTEXPR const rvv_arg_type_info vs_args[]
    738   = {rvv_arg_type_info (RVV_BASE_vector),
    739      rvv_arg_type_info (RVV_BASE_lmul1_vector), rvv_arg_type_info_end};
    740 
    741 /* A list of args for vector_type func (vector_type, widen_lmul1_type) function.
    742  */
    743 static CONSTEXPR const rvv_arg_type_info wvs_args[]
    744   = {rvv_arg_type_info (RVV_BASE_vector),
    745      rvv_arg_type_info (RVV_BASE_widen_lmul1_vector), rvv_arg_type_info_end};
    746 
    747 /* A list of args for vector_type func (vector_type) function.  */
    748 static CONSTEXPR const rvv_arg_type_info f_v_args[]
    749   = {rvv_arg_type_info (RVV_BASE_float_vector), rvv_arg_type_info_end};
    750 
    751 /* A list of args for vector_type func (vector_type) function.  */
    752 static CONSTEXPR const rvv_arg_type_info trunc_f_v_args[]
    753   = {rvv_arg_type_info (RVV_BASE_double_trunc_float_vector),
    754      rvv_arg_type_info_end};
    755 
    756 /* A list of args for vector_type func (vector_type) function.  */
    757 static CONSTEXPR const rvv_arg_type_info w_v_args[]
    758   = {rvv_arg_type_info (RVV_BASE_double_trunc_vector), rvv_arg_type_info_end};
    759 
    760 /* A list of args for vector_type func (vector_type) function.  */
    761 static CONSTEXPR const rvv_arg_type_info m_args[]
    762   = {rvv_arg_type_info (RVV_BASE_mask), rvv_arg_type_info_end};
    763 
    764 /* A list of args for vector_type func (scalar_type) function.  */
    765 static CONSTEXPR const rvv_arg_type_info x_args[]
    766   = {rvv_arg_type_info (RVV_BASE_scalar), rvv_arg_type_info_end};
    767 
    768 /* A list of args for vector_type func (vector_type, size) function.  */
    769 static CONSTEXPR const rvv_arg_type_info v_size_args[]
    770   = {rvv_arg_type_info (RVV_BASE_vector), rvv_arg_type_info (RVV_BASE_size),
    771      rvv_arg_type_info_end};
    772 
    773 /* A list of args for vector_type func (double demote_type, size_t) function.  */
    774 static CONSTEXPR const rvv_arg_type_info wv_size_args[]
    775   = {rvv_arg_type_info (RVV_BASE_double_trunc_vector),
    776     rvv_arg_type_info (RVV_BASE_size),rvv_arg_type_info_end};
    777 
    778 /* A list of args for vector_type func (vector_type, vector_type, size)
    779  * function.  */
    780 static CONSTEXPR const rvv_arg_type_info vv_size_args[]
    781   = {rvv_arg_type_info (RVV_BASE_vector), rvv_arg_type_info (RVV_BASE_vector),
    782      rvv_arg_type_info (RVV_BASE_size), rvv_arg_type_info_end};
    783 
    784 /* A list of args for vector_type func (double demote type) function.  */
    785 static CONSTEXPR const rvv_arg_type_info vf2_args[]
    786   = {rvv_arg_type_info (RVV_BASE_double_trunc_vector), rvv_arg_type_info_end};
    787 
    788 /* A list of args for vector_type func (double demote type, double demote type)
    789  * function.  */
    790 static CONSTEXPR const rvv_arg_type_info wvv_args[]
    791   = {rvv_arg_type_info (RVV_BASE_double_trunc_vector),
    792      rvv_arg_type_info (RVV_BASE_double_trunc_vector), rvv_arg_type_info_end};
    793 
    794 /* A list of args for vector_type func (vector_type, double demote type, double
    795  * demote type) function.  */
    796 static CONSTEXPR const rvv_arg_type_info wwvv_args[]
    797   = {rvv_arg_type_info (RVV_BASE_vector),
    798      rvv_arg_type_info (RVV_BASE_double_trunc_vector),
    799      rvv_arg_type_info (RVV_BASE_double_trunc_vector), rvv_arg_type_info_end};
    800 
    801 /* A list of args for vector_type func (vector_type, double demote type, double
    802  * demote type) function.  */
    803 static CONSTEXPR const rvv_arg_type_info wwxv_args[]
    804   = {rvv_arg_type_info (RVV_BASE_vector),
    805      rvv_arg_type_info (RVV_BASE_double_trunc_scalar),
    806      rvv_arg_type_info (RVV_BASE_double_trunc_vector), rvv_arg_type_info_end};
    807 
    808 /* A list of args for vector_type func (vector_type, double demote type, double
    809  * demote type) function.  */
    810 static CONSTEXPR const rvv_arg_type_info su_wwvv_args[]
    811   = {rvv_arg_type_info (RVV_BASE_vector),
    812      rvv_arg_type_info (RVV_BASE_double_trunc_vector),
    813      rvv_arg_type_info (RVV_BASE_double_trunc_unsigned_vector),
    814      rvv_arg_type_info_end};
    815 
    816 /* A list of args for vector_type func (vector_type, double demote type, double
    817  * demote type) function.  */
    818 static CONSTEXPR const rvv_arg_type_info su_wwxv_args[]
    819   = {rvv_arg_type_info (RVV_BASE_vector),
    820      rvv_arg_type_info (RVV_BASE_double_trunc_scalar),
    821      rvv_arg_type_info (RVV_BASE_double_trunc_unsigned_vector),
    822      rvv_arg_type_info_end};
    823 
    824 /* A list of args for vector_type func (vector_type, double demote type, double
    825  * demote type) function.  */
    826 static CONSTEXPR const rvv_arg_type_info us_wwxv_args[]
    827   = {rvv_arg_type_info (RVV_BASE_vector),
    828      rvv_arg_type_info (RVV_BASE_double_trunc_unsigned_scalar),
    829      rvv_arg_type_info (RVV_BASE_double_trunc_vector),
    830      rvv_arg_type_info_end};
    831 
    832 /* A list of args for vector_type func (signed double demote type,
    833  * unsigneddouble demote type) function.  */
    834 static CONSTEXPR const rvv_arg_type_info su_wvv_args[]
    835   = {rvv_arg_type_info (RVV_BASE_double_trunc_vector),
    836      rvv_arg_type_info (RVV_BASE_double_trunc_unsigned_vector), rvv_arg_type_info_end};
    837 
    838 /* A list of args for vector_type func (double demote type, double demote type)
    839  * function.  */
    840 static CONSTEXPR const rvv_arg_type_info wvx_args[]
    841   = {rvv_arg_type_info (RVV_BASE_double_trunc_vector),
    842      rvv_arg_type_info (RVV_BASE_double_trunc_scalar), rvv_arg_type_info_end};
    843 
    844 /* A list of args for vector_type func (signed double demote type, unsigned
    845  * double demote type) function.  */
    846 static CONSTEXPR const rvv_arg_type_info su_wvx_args[]
    847   = {rvv_arg_type_info (RVV_BASE_double_trunc_vector),
    848      rvv_arg_type_info (RVV_BASE_double_trunc_unsigned_scalar),
    849      rvv_arg_type_info_end};
    850 
    851 /* A list of args for vector_type func (double demote type, double demote type)
    852  * function.  */
    853 static CONSTEXPR const rvv_arg_type_info wwv_args[]
    854   = {rvv_arg_type_info (RVV_BASE_vector),
    855      rvv_arg_type_info (RVV_BASE_double_trunc_vector), rvv_arg_type_info_end};
    856 
    857 /* A list of args for vector_type func (double demote type, double demote type)
    858  * function.  */
    859 static CONSTEXPR const rvv_arg_type_info wwx_args[]
    860   = {rvv_arg_type_info (RVV_BASE_vector),
    861      rvv_arg_type_info (RVV_BASE_double_trunc_scalar), rvv_arg_type_info_end};
    862 
    863 /* A list of args for vector_type func (quad demote type) function.  */
    864 static CONSTEXPR const rvv_arg_type_info vf4_args[]
    865   = {rvv_arg_type_info (RVV_BASE_quad_trunc_vector), rvv_arg_type_info_end};
    866 
    867 /* A list of args for vector_type func (oct demote type) function.  */
    868 static CONSTEXPR const rvv_arg_type_info vf8_args[]
    869   = {rvv_arg_type_info (RVV_BASE_oct_trunc_vector), rvv_arg_type_info_end};
    870 
    871 /* A list of args for vector_type func (double demote type) function.  */
    872 static CONSTEXPR const rvv_arg_type_info x_x_v_args[]
    873   = {rvv_arg_type_info (RVV_BASE_double_trunc_vector), rvv_arg_type_info_end};
    874 
    875 /* A list of args for vector_type func (vector_type) function.  */
    876 static CONSTEXPR const rvv_arg_type_info x_v_args[]
    877   = {rvv_arg_type_info (RVV_BASE_signed_vector), rvv_arg_type_info_end};
    878 
    879 /* A list of args for vector_type func (vector_type) function.  */
    880 static CONSTEXPR const rvv_arg_type_info xu_v_args[]
    881   = {rvv_arg_type_info (RVV_BASE_unsigned_vector), rvv_arg_type_info_end};
    882 
    883 /* A list of args for vector_type func (vector_type) function.  */
    884 static CONSTEXPR const rvv_arg_type_info w_x_v_args[]
    885   = {rvv_arg_type_info (RVV_BASE_double_trunc_signed_vector),
    886      rvv_arg_type_info_end};
    887 
    888 /* A list of args for vector_type func (vector_type) function.  */
    889 static CONSTEXPR const rvv_arg_type_info w_xu_v_args[]
    890   = {rvv_arg_type_info (RVV_BASE_double_trunc_unsigned_vector),
    891      rvv_arg_type_info_end};
    892 
    893 /* A list of args for vector_type func (vector_type) function.  */
    894 static CONSTEXPR const rvv_arg_type_info ext_x2_vset_args[]
    895   = {rvv_arg_type_info (RVV_BASE_vlmul_ext_x2),
    896      rvv_arg_type_info (RVV_BASE_size), rvv_arg_type_info (RVV_BASE_vector),
    897      rvv_arg_type_info_end};
    898 
    899 /* A list of args for vector_type func (vector_type) function.  */
    900 static CONSTEXPR const rvv_arg_type_info ext_x4_vset_args[]
    901   = {rvv_arg_type_info (RVV_BASE_vlmul_ext_x4),
    902      rvv_arg_type_info (RVV_BASE_size), rvv_arg_type_info (RVV_BASE_vector),
    903      rvv_arg_type_info_end};
    904 
    905 /* A list of args for vector_type func (vector_type) function.  */
    906 static CONSTEXPR const rvv_arg_type_info ext_x8_vset_args[]
    907   = {rvv_arg_type_info (RVV_BASE_vlmul_ext_x8),
    908      rvv_arg_type_info (RVV_BASE_size), rvv_arg_type_info (RVV_BASE_vector),
    909      rvv_arg_type_info_end};
    910 
    911 /* A list of args for vector_type func (vector_type) function.  */
    912 static CONSTEXPR const rvv_arg_type_info ext_x2_vget_args[]
    913   = {rvv_arg_type_info (RVV_BASE_vlmul_ext_x2),
    914      rvv_arg_type_info (RVV_BASE_size), rvv_arg_type_info_end};
    915 
    916 /* A list of args for vector_type func (vector_type) function.  */
    917 static CONSTEXPR const rvv_arg_type_info ext_x4_vget_args[]
    918   = {rvv_arg_type_info (RVV_BASE_vlmul_ext_x4),
    919      rvv_arg_type_info (RVV_BASE_size), rvv_arg_type_info_end};
    920 
    921 /* A list of args for vector_type func (vector_type) function.  */
    922 static CONSTEXPR const rvv_arg_type_info ext_x8_vget_args[]
    923   = {rvv_arg_type_info (RVV_BASE_vlmul_ext_x8),
    924      rvv_arg_type_info (RVV_BASE_size), rvv_arg_type_info_end};
    925 
    926 /* A list of args for vector_type func (vector_type) function.  */
    927 static CONSTEXPR const rvv_arg_type_info tuple_vset_args[]
    928   = {rvv_arg_type_info (RVV_BASE_vector), rvv_arg_type_info (RVV_BASE_size),
    929      rvv_arg_type_info (RVV_BASE_tuple_subpart), rvv_arg_type_info_end};
    930 
    931 /* A list of args for vector_type func (vector_type) function.  */
    932 static CONSTEXPR const rvv_arg_type_info tuple_vcreate_args[]
    933   = {rvv_arg_type_info (RVV_BASE_tuple_subpart), rvv_arg_type_info_end};
    934 
    935 /* A list of args for vector_type func (vector_type) function.  */
    936 static CONSTEXPR const rvv_arg_type_info ext_vcreate_args[]
    937   = {rvv_arg_type_info (RVV_BASE_vector),
    938      rvv_arg_type_info_end};
    939 
    940 /* A list of args for vector_type func (const scalar_type *, size_t)
    941  * function.  */
    942 static CONSTEXPR const rvv_arg_type_info scalar_const_ptr_size_args[]
    943   = {rvv_arg_type_info (RVV_BASE_scalar_const_ptr),
    944      rvv_arg_type_info (RVV_BASE_size), rvv_arg_type_info_end};
    945 
    946 /* A list of args for vector_type func (const scalar_type *, eew8_index_type)
    947  * function.  */
    948 static CONSTEXPR const rvv_arg_type_info scalar_const_ptr_index_args[]
    949   = {rvv_arg_type_info (RVV_BASE_scalar_const_ptr),
    950      rvv_arg_type_info (RVV_BASE_unsigned_vector), rvv_arg_type_info_end};
    951 
    952 /* A list of args for void func (scalar_type *, eew8_index_type, vector_type)
    953  * function.  */
    954 static CONSTEXPR const rvv_arg_type_info scalar_ptr_index_args[]
    955   = {rvv_arg_type_info (RVV_BASE_scalar_ptr),
    956      rvv_arg_type_info (RVV_BASE_unsigned_vector),
    957      rvv_arg_type_info (RVV_BASE_vector), rvv_arg_type_info_end};
    958 
    959 /* A list of args for void func (scalar_type *, size_t, vector_type)
    960  * function.  */
    961 static CONSTEXPR const rvv_arg_type_info scalar_ptr_size_args[]
    962   = {rvv_arg_type_info (RVV_BASE_scalar_ptr),
    963      rvv_arg_type_info (RVV_BASE_size), rvv_arg_type_info (RVV_BASE_vector),
    964      rvv_arg_type_info_end};
    965 
    966 /* A list of none preds that will be registered for intrinsic functions.  */
    967 static CONSTEXPR const predication_type_index none_preds[]
    968   = {PRED_TYPE_none, NUM_PRED_TYPES};
    969 
    970 /* vop/vop_m/vop_tu/vop_tum/vop_tumu/vop_mu will be registered.  */
    971 static CONSTEXPR const predication_type_index full_preds[]
    972   = {PRED_TYPE_none, PRED_TYPE_m,  PRED_TYPE_tu,  PRED_TYPE_tum,
    973      PRED_TYPE_tumu, PRED_TYPE_mu, NUM_PRED_TYPES};
    974 
    975 /* vop/vop_m/vop_tu/vop_tum/ will be registered.  */
    976 static CONSTEXPR const predication_type_index no_mu_preds[]
    977   = {PRED_TYPE_none, PRED_TYPE_m, PRED_TYPE_tu, PRED_TYPE_tum, NUM_PRED_TYPES};
    978 
    979 /* vop/vop_tu will be registered.  */
    980 static CONSTEXPR const predication_type_index none_tu_preds[]
    981   = {PRED_TYPE_none, PRED_TYPE_tu, NUM_PRED_TYPES};
    982 
    983 /* vop/vop_m will be registered.  */
    984 static CONSTEXPR const predication_type_index none_m_preds[]
    985   = {PRED_TYPE_none, PRED_TYPE_m, NUM_PRED_TYPES};
    986 
    987 /* vop/vop_m/vop_mu will be registered.  */
    988 static CONSTEXPR const predication_type_index none_m_mu_preds[]
    989   = {PRED_TYPE_none, PRED_TYPE_m, PRED_TYPE_mu, NUM_PRED_TYPES};
    990 
    991 /* A static operand information for size_t func () function registration. */
    992 static CONSTEXPR const rvv_op_info i_none_size_void_ops
    993   = {i_ops,				/* Types */
    994      OP_TYPE_none,			/* Suffix */
    995      rvv_arg_type_info (RVV_BASE_size), /* Return type */
    996      void_args /* Args */};
    997 
    998 /* A static operand information for size_t func (size_t) function registration.
    999  */
   1000 static CONSTEXPR const rvv_op_info i_none_size_size_ops
   1001   = {i_ops,				/* Types */
   1002      OP_TYPE_none,			/* Suffix */
   1003      rvv_arg_type_info (RVV_BASE_size), /* Return type */
   1004      size_args /* Args */};
   1005 
   1006 /* A static operand information for vector_type func () function registration.
   1007  */
   1008 static CONSTEXPR const rvv_op_info all_none_void_ops
   1009   = {all_ops,				  /* Types */
   1010      OP_TYPE_none,			  /* Suffix */
   1011      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   1012      void_args /* Args */};
   1013 
   1014 /* A static operand information for vector_type func (const scalar_type *)
   1015  * function registration. */
   1016 static CONSTEXPR const rvv_op_info all_v_scalar_const_ptr_ops
   1017   = {all_ops,				  /* Types */
   1018      OP_TYPE_v,				  /* Suffix */
   1019      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   1020      scalar_const_ptr_args /* Args */};
   1021 
   1022 /* A static operand information for vector_type func (const scalar_type *)
   1023  * function registration. */
   1024 static CONSTEXPR const rvv_op_info all_v_scalar_const_ptr_size_ptr_ops
   1025   = {all_ops,				  /* Types */
   1026      OP_TYPE_v,				  /* Suffix */
   1027      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   1028      scalar_const_ptr_size_ptr_args /* Args */};
   1029 
   1030 /* A static operand information for void func (scalar_type *, vector_type)
   1031  * function registration. */
   1032 static CONSTEXPR const rvv_op_info all_v_scalar_ptr_ops
   1033   = {all_ops,				/* Types */
   1034      OP_TYPE_v,				/* Suffix */
   1035      rvv_arg_type_info (RVV_BASE_void), /* Return type */
   1036      scalar_ptr_args /* Args */};
   1037 
   1038 /* A static operand information for vector_type func (const scalar_type *)
   1039  * function registration. */
   1040 static CONSTEXPR const rvv_op_info b_v_scalar_const_ptr_ops
   1041   = {b_ops,				  /* Types */
   1042      OP_TYPE_v,				  /* Suffix */
   1043      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   1044      scalar_const_ptr_args /* Args */};
   1045 
   1046 /* A static operand information for void func (scalar_type *, vector_type)
   1047  * function registration. */
   1048 static CONSTEXPR const rvv_op_info b_v_scalar_ptr_ops
   1049   = {b_ops,				/* Types */
   1050      OP_TYPE_v,				/* Suffix */
   1051      rvv_arg_type_info (RVV_BASE_void), /* Return type */
   1052      scalar_ptr_args /* Args */};
   1053 
   1054 /* A static operand information for vector_type func (vector_type, vector_type)
   1055  * function registration. */
   1056 static CONSTEXPR const rvv_op_info b_mmm_ops
   1057   = {b_ops,				  /* Types */
   1058      OP_TYPE_mm,			  /* Suffix */
   1059      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   1060      vv_args /* Args */};
   1061 
   1062 /* A static operand information for vector_type func (vector_type)
   1063  * function registration. */
   1064 static CONSTEXPR const rvv_op_info b_mm_ops
   1065   = {b_ops,				  /* Types */
   1066      OP_TYPE_m,				  /* Suffix */
   1067      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   1068      v_args /* Args */};
   1069 
   1070 /* A static operand information for vector_type func (vector_type)
   1071  * function registration. */
   1072 static CONSTEXPR const rvv_op_info u_vm_ops
   1073   = {u_ops,				  /* Types */
   1074      OP_TYPE_m,				  /* Suffix */
   1075      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   1076      m_args /* Args */};
   1077 
   1078 /* A static operand information for vector_type func ()
   1079  * function registration. */
   1080 static CONSTEXPR const rvv_op_info b_m_ops
   1081   = {b_ops,				  /* Types */
   1082      OP_TYPE_m,				  /* Suffix */
   1083      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   1084      end_args /* Args */};
   1085 
   1086 /* A static operand information for vector_type func ()
   1087  * function registration. */
   1088 static CONSTEXPR const rvv_op_info u_v_ops
   1089   = {u_ops,				  /* Types */
   1090      OP_TYPE_v,				  /* Suffix */
   1091      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   1092      end_args /* Args */};
   1093 
   1094 /* A static operand information for vector_type func (vector_type)
   1095  * function registration. */
   1096 static CONSTEXPR const rvv_op_info u_vv_ops
   1097   = {u_ops,					/* Types */
   1098      OP_TYPE_v,					/* Suffix */
   1099      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   1100      v_args /* Args */};
   1101 
   1102 /* A static operand information for unsigned long func (vector_type)
   1103  * function registration. */
   1104 static CONSTEXPR const rvv_op_info b_ulong_m_ops
   1105   = {b_ops,					 /* Types */
   1106      OP_TYPE_m,					 /* Suffix */
   1107      rvv_arg_type_info (RVV_BASE_unsigned_long), /* Return type */
   1108      v_args /* Args */};
   1109 
   1110 /* A static operand information for long func (vector_type)
   1111  * function registration. */
   1112 static CONSTEXPR const rvv_op_info b_long_m_ops
   1113   = {b_ops,				/* Types */
   1114      OP_TYPE_m,				/* Suffix */
   1115      rvv_arg_type_info (RVV_BASE_long), /* Return type */
   1116      v_args /* Args */};
   1117 
   1118 /* A static operand information for vector_type func (const scalar_type *,
   1119  * ptrdiff_t) function registration. */
   1120 static CONSTEXPR const rvv_op_info all_v_scalar_const_ptr_ptrdiff_ops
   1121   = {all_ops,				  /* Types */
   1122      OP_TYPE_v,				  /* Suffix */
   1123      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   1124      scalar_const_ptr_ptrdiff_args /* Args */};
   1125 
   1126 /* A static operand information for vector_type func (const scalar_type *,
   1127  * eew8_index_type) function registration. */
   1128 static CONSTEXPR const rvv_op_info all_v_scalar_const_ptr_eew8_index_ops
   1129   = {all_ops,				  /* Types */
   1130      OP_TYPE_v,				  /* Suffix */
   1131      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   1132      scalar_const_ptr_eew8_index_args /* Args */};
   1133 
   1134 /* A static operand information for vector_type func (const scalar_type *,
   1135  * eew16_index_type) function registration. */
   1136 static CONSTEXPR const rvv_op_info all_v_scalar_const_ptr_eew16_index_ops
   1137   = {all_ops,				  /* Types */
   1138      OP_TYPE_v,				  /* Suffix */
   1139      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   1140      scalar_const_ptr_eew16_index_args /* Args */};
   1141 
   1142 /* A static operand information for vector_type func (const scalar_type *,
   1143  * eew32_index_type) function registration. */
   1144 static CONSTEXPR const rvv_op_info all_v_scalar_const_ptr_eew32_index_ops
   1145   = {all_ops,				  /* Types */
   1146      OP_TYPE_v,				  /* Suffix */
   1147      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   1148      scalar_const_ptr_eew32_index_args /* Args */};
   1149 
   1150 /* A static operand information for vector_type func (const scalar_type *,
   1151  * eew64_index_type) function registration. */
   1152 static CONSTEXPR const rvv_op_info all_v_scalar_const_ptr_eew64_index_ops
   1153   = {all_ops,				  /* Types */
   1154      OP_TYPE_v,				  /* Suffix */
   1155      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   1156      scalar_const_ptr_eew64_index_args /* Args */};
   1157 
   1158 /* A static operand information for void func (scalar_type *, ptrdiff_t,
   1159  * vector_type) function registration. */
   1160 static CONSTEXPR const rvv_op_info all_v_scalar_ptr_ptrdiff_ops
   1161   = {all_ops,				/* Types */
   1162      OP_TYPE_v,				/* Suffix */
   1163      rvv_arg_type_info (RVV_BASE_void), /* Return type */
   1164      scalar_ptr_ptrdiff_args /* Args */};
   1165 
   1166 /* A static operand information for void func (scalar_type *, eew8_index_type,
   1167  * vector_type) function registration. */
   1168 static CONSTEXPR const rvv_op_info all_v_scalar_ptr_eew8_index_ops
   1169   = {all_ops,				/* Types */
   1170      OP_TYPE_v,				/* Suffix */
   1171      rvv_arg_type_info (RVV_BASE_void), /* Return type */
   1172      scalar_ptr_eew8_index_args /* Args */};
   1173 
   1174 /* A static operand information for void func (scalar_type *, eew16_index_type,
   1175  * vector_type) function registration. */
   1176 static CONSTEXPR const rvv_op_info all_v_scalar_ptr_eew16_index_ops
   1177   = {all_ops,				/* Types */
   1178      OP_TYPE_v,				/* Suffix */
   1179      rvv_arg_type_info (RVV_BASE_void), /* Return type */
   1180      scalar_ptr_eew16_index_args /* Args */};
   1181 
   1182 /* A static operand information for void func (scalar_type *, eew32_index_type,
   1183  * vector_type) function registration. */
   1184 static CONSTEXPR const rvv_op_info all_v_scalar_ptr_eew32_index_ops
   1185   = {all_ops,				/* Types */
   1186      OP_TYPE_v,				/* Suffix */
   1187      rvv_arg_type_info (RVV_BASE_void), /* Return type */
   1188      scalar_ptr_eew32_index_args /* Args */};
   1189 
   1190 /* A static operand information for void func (scalar_type *, eew64_index_type,
   1191  * vector_type) function registration. */
   1192 static CONSTEXPR const rvv_op_info all_v_scalar_ptr_eew64_index_ops
   1193   = {all_ops,				/* Types */
   1194      OP_TYPE_v,				/* Suffix */
   1195      rvv_arg_type_info (RVV_BASE_void), /* Return type */
   1196      scalar_ptr_eew64_index_args /* Args */};
   1197 
   1198 /* A static operand information for vector_type func (vector_type, vector_type)
   1199  * function registration. */
   1200 static CONSTEXPR const rvv_op_info iu_vvv_ops
   1201   = {iu_ops,				/* Types */
   1202      OP_TYPE_vv,			/* Suffix */
   1203      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   1204      vv_args /* Args */};
   1205 
   1206 /* A static operand information for vector_type func (vector_type, vector_type,
   1207  * vector_type) function registration. */
   1208 static CONSTEXPR const rvv_op_info iu_vvvv_ops
   1209   = {iu_ops,				  /* Types */
   1210      OP_TYPE_vv,			  /* Suffix */
   1211      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   1212      vvv_args /* Args */};
   1213 
   1214 /* A static operand information for vector_type func (vector_type, scalar_type,
   1215  * vector_type) function registration. */
   1216 static CONSTEXPR const rvv_op_info iu_vvxv_ops
   1217   = {iu_ops,				  /* Types */
   1218      OP_TYPE_vx,			  /* Suffix */
   1219      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   1220      vxv_args /* Args */};
   1221 
   1222 /* A static operand information for vector_type func (vector_type, vector_type,
   1223  * vector_type) function registration. */
   1224 static CONSTEXPR const rvv_op_info f_vvvv_ops
   1225   = {f_ops,				  /* Types */
   1226      OP_TYPE_vv,			  /* Suffix */
   1227      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   1228      vvv_args /* Args */};
   1229 
   1230 /* A static operand information for vector_type func (vector_type, scalar_type,
   1231  * vector_type) function registration. */
   1232 static CONSTEXPR const rvv_op_info f_vvfv_ops
   1233   = {f_ops,				  /* Types */
   1234      OP_TYPE_vf,			  /* Suffix */
   1235      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   1236      vxv_args /* Args */};
   1237 
   1238 /* A static operand information for vector_type func (vector_type, vector_type,
   1239  * mask_type) function registration. */
   1240 static CONSTEXPR const rvv_op_info iu_vvvm_ops
   1241   = {iu_ops,				  /* Types */
   1242      OP_TYPE_vvm,			  /* Suffix */
   1243      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   1244      vvm_args /* Args */};
   1245 
   1246 /* A static operand information for vector_type func (vector_type, vector_type,
   1247  * mask_type) function registration. */
   1248 static CONSTEXPR const rvv_op_info all_vvvm_ops
   1249   = {all_ops,				  /* Types */
   1250      OP_TYPE_vvm,			  /* Suffix */
   1251      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   1252      vvm_args /* Args */};
   1253 
   1254 /* A static operand information for vector_type func (vector_type, vector_type,
   1255  * mask_type) function registration. */
   1256 static CONSTEXPR const rvv_op_info all_vvm_ops
   1257   = {all_ops,				  /* Types */
   1258      OP_TYPE_vm,			  /* Suffix */
   1259      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   1260      vm_args /* Args */};
   1261 
   1262 /* A static operand information for vector_type func (vector_type, scalar_type,
   1263  * mask_type) function registration. */
   1264 static CONSTEXPR const rvv_op_info iu_vvxm_ops
   1265   = {iu_ops,				  /* Types */
   1266      OP_TYPE_vxm,			  /* Suffix */
   1267      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   1268      vxm_args /* Args */};
   1269 
   1270 /* A static operand information for vector_type func (vector_type, scalar_type,
   1271  * mask_type) function registration. */
   1272 static CONSTEXPR const rvv_op_info f_vvfm_ops
   1273   = {f_ops,				  /* Types */
   1274      OP_TYPE_vfm,			  /* Suffix */
   1275      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   1276      vxm_args /* Args */};
   1277 
   1278 /* A static operand information for mask_type func (vector_type, vector_type,
   1279  * mask_type) function registration. */
   1280 static CONSTEXPR const rvv_op_info iu_mvvm_ops
   1281   = {iu_ops,				  /* Types */
   1282      OP_TYPE_vvm,			  /* Suffix */
   1283      rvv_arg_type_info (RVV_BASE_mask), /* Return type */
   1284      vvm_args /* Args */};
   1285 
   1286 /* A static operand information for mask_type func (vector_type, scalar_type,
   1287  * mask_type) function registration. */
   1288 static CONSTEXPR const rvv_op_info iu_mvxm_ops
   1289   = {iu_ops,				  /* Types */
   1290      OP_TYPE_vxm,			  /* Suffix */
   1291      rvv_arg_type_info (RVV_BASE_mask), /* Return type */
   1292      vxm_args /* Args */};
   1293 
   1294 /* A static operand information for mask_type func (vector_type, vector_type)
   1295  * function registration. */
   1296 static CONSTEXPR const rvv_op_info iu_mvv_ops
   1297   = {iu_ops,				/* Types */
   1298      OP_TYPE_vv,			/* Suffix */
   1299      rvv_arg_type_info (RVV_BASE_mask), /* Return type */
   1300      vv_args /* Args */};
   1301 
   1302 /* A static operand information for mask_type func (vector_type, vector_type)
   1303  * function registration. */
   1304 static CONSTEXPR const rvv_op_info i_mvv_ops
   1305   = {i_ops,				/* Types */
   1306      OP_TYPE_vv,			/* Suffix */
   1307      rvv_arg_type_info (RVV_BASE_mask), /* Return type */
   1308      vv_args /* Args */};
   1309 
   1310 /* A static operand information for mask_type func (vector_type, vector_type)
   1311  * function registration. */
   1312 static CONSTEXPR const rvv_op_info u_mvv_ops
   1313   = {u_ops,				/* Types */
   1314      OP_TYPE_vv,			/* Suffix */
   1315      rvv_arg_type_info (RVV_BASE_mask), /* Return type */
   1316      vv_args /* Args */};
   1317 
   1318 /* A static operand information for mask_type func (vector_type, vector_type)
   1319  * function registration. */
   1320 static CONSTEXPR const rvv_op_info f_mvv_ops
   1321   = {f_ops,				/* Types */
   1322      OP_TYPE_vv,			/* Suffix */
   1323      rvv_arg_type_info (RVV_BASE_mask), /* Return type */
   1324      vv_args /* Args */};
   1325 
   1326 /* A static operand information for mask_type func (vector_type, scalar_type)
   1327  * function registration. */
   1328 static CONSTEXPR const rvv_op_info iu_mvx_ops
   1329   = {iu_ops,				/* Types */
   1330      OP_TYPE_vx,			/* Suffix */
   1331      rvv_arg_type_info (RVV_BASE_mask), /* Return type */
   1332      vx_args /* Args */};
   1333 
   1334 /* A static operand information for mask_type func (vector_type, scalar_type)
   1335  * function registration. */
   1336 static CONSTEXPR const rvv_op_info i_mvx_ops
   1337   = {i_ops,				/* Types */
   1338      OP_TYPE_vx,			/* Suffix */
   1339      rvv_arg_type_info (RVV_BASE_mask), /* Return type */
   1340      vx_args /* Args */};
   1341 
   1342 /* A static operand information for mask_type func (vector_type, scalar_type)
   1343  * function registration. */
   1344 static CONSTEXPR const rvv_op_info u_mvx_ops
   1345   = {u_ops,				/* Types */
   1346      OP_TYPE_vx,			/* Suffix */
   1347      rvv_arg_type_info (RVV_BASE_mask), /* Return type */
   1348      vx_args /* Args */};
   1349 
   1350 /* A static operand information for mask_type func (vector_type, scalar_type)
   1351  * function registration. */
   1352 static CONSTEXPR const rvv_op_info f_mvf_ops
   1353   = {f_ops,				/* Types */
   1354      OP_TYPE_vf,			/* Suffix */
   1355      rvv_arg_type_info (RVV_BASE_mask), /* Return type */
   1356      vx_args /* Args */};
   1357 
   1358 /* A static operand information for vector_type func (vector_type, vector_type)
   1359  * function registration. */
   1360 static CONSTEXPR const rvv_op_info i_vvv_ops
   1361   = {i_ops,				/* Types */
   1362      OP_TYPE_vv,			/* Suffix */
   1363      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   1364      vv_args /* Args */};
   1365 
   1366 /* A static operand information for vector_type func (vector_type, vector_type)
   1367  * function registration. */
   1368 static CONSTEXPR const rvv_op_info u_vvv_ops
   1369   = {u_ops,				/* Types */
   1370      OP_TYPE_vv,			/* Suffix */
   1371      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   1372      vv_args /* Args */};
   1373 
   1374 /* A static operand information for vector_type func (vector_type, vector_type)
   1375  * function registration. */
   1376 static CONSTEXPR const rvv_op_info f_vvv_ops
   1377   = {f_ops,				/* Types */
   1378      OP_TYPE_vv,			/* Suffix */
   1379      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   1380      vv_args /* Args */};
   1381 
   1382 /* A static operand information for vector_type func (vector_type, vector_type)
   1383  * function registration. */
   1384 static CONSTEXPR const rvv_op_info f_vvf_ops
   1385   = {f_ops,				/* Types */
   1386      OP_TYPE_vf,			/* Suffix */
   1387      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   1388      vx_args /* Args */};
   1389 
   1390 /* A static operand information for vector_type func (vector_type, vector_type)
   1391  * function registration. */
   1392 static CONSTEXPR const rvv_op_info full_v_i_vvv_ops
   1393   = {full_v_i_ops,			/* Types */
   1394      OP_TYPE_vv,			/* Suffix */
   1395      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   1396      vv_args /* Args */};
   1397 
   1398 /* A static operand information for vector_type func (vector_type, vector_type)
   1399  * function registration. */
   1400 static CONSTEXPR const rvv_op_info full_v_u_vvv_ops
   1401   = {full_v_u_ops,			/* Types */
   1402      OP_TYPE_vv,			/* Suffix */
   1403      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   1404      vv_args /* Args */};
   1405 
   1406 /* A static operand information for vector_type func (signed vector_type,
   1407  * unsigned vector_type) function registration. */
   1408 static CONSTEXPR const rvv_op_info full_v_i_su_vvv_ops
   1409   = {full_v_i_ops,			  /* Types */
   1410      OP_TYPE_vv,			  /* Suffix */
   1411      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   1412      su_vv_args /* Args */};
   1413 
   1414 /* A static operand information for vector_type func (vector_type, scalar_type)
   1415  * function registration. */
   1416 static CONSTEXPR const rvv_op_info iu_vvx_ops
   1417   = {iu_ops,				/* Types */
   1418      OP_TYPE_vx,			/* Suffix */
   1419      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   1420      vx_args /* Args */};
   1421 
   1422 /* A static operand information for vector_type func (vector_type, scalar_type)
   1423  * function registration. */
   1424 static CONSTEXPR const rvv_op_info all_vvx_ops
   1425   = {all_ops,				  /* Types */
   1426      OP_TYPE_vx,			  /* Suffix */
   1427      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   1428      v_size_args /* Args */};
   1429 
   1430 /* A static operand information for vector_type func (vector_type, vector_type,
   1431  * scalar_type) function registration. */
   1432 static CONSTEXPR const rvv_op_info all_vvvx_ops
   1433   = {all_ops,				  /* Types */
   1434      OP_TYPE_vx,			  /* Suffix */
   1435      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   1436      vv_size_args /* Args */};
   1437 
   1438 /* A static operand information for vector_type func (vector_type, scalar_type)
   1439  * function registration. */
   1440 static CONSTEXPR const rvv_op_info i_vvx_ops
   1441   = {i_ops,				/* Types */
   1442      OP_TYPE_vx,			/* Suffix */
   1443      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   1444      vx_args /* Args */};
   1445 
   1446 /* A static operand information for vector_type func (vector_type, scalar_type)
   1447  * function registration. */
   1448 static CONSTEXPR const rvv_op_info u_vvx_ops
   1449   = {u_ops,				/* Types */
   1450      OP_TYPE_vx,			/* Suffix */
   1451      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   1452      vx_args /* Args */};
   1453 
   1454 /* A static operand information for vector_type func (vector_type, scalar_type)
   1455  * function registration that require full 'V' extension. */
   1456 static CONSTEXPR const rvv_op_info full_v_i_vvx_ops
   1457   = {full_v_i_ops,			  /* Types */
   1458      OP_TYPE_vx,			  /* Suffix */
   1459      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   1460      vx_args /* Args */};
   1461 
   1462 /* A static operand information for vector_type func (vector_type, scalar_type)
   1463  * function registration that require full 'V' extension. */
   1464 static CONSTEXPR const rvv_op_info full_v_u_vvx_ops
   1465   = {full_v_u_ops,			  /* Types */
   1466      OP_TYPE_vx,			  /* Suffix */
   1467      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   1468      vx_args /* Args */};
   1469 
   1470 /* A static operand information for vector_type func (signed vector_type,
   1471  * unsigned scalar_type) function registration that require full 'V' extension.
   1472  */
   1473 static CONSTEXPR const rvv_op_info full_v_i_su_vvx_ops
   1474   = {full_v_i_ops,			  /* Types */
   1475      OP_TYPE_vx,			  /* Suffix */
   1476      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   1477      su_vx_args /* Args */};
   1478 
   1479 /* A static operand information for vector_type func (vector_type, shift_type)
   1480  * function registration. */
   1481 static CONSTEXPR const rvv_op_info iu_shift_vvv_ops
   1482   = {iu_ops,				/* Types */
   1483      OP_TYPE_vv,			/* Suffix */
   1484      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   1485      shift_vv_args /* Args */};
   1486 
   1487 /* A static operand information for scalar_type func (vector_type, size_t)
   1488  * function registration. */
   1489 static CONSTEXPR const rvv_op_info iu_x_s_u_ops
   1490   = {iu_ops,          /* Types */
   1491      OP_TYPE_vx,        /* Suffix */
   1492      rvv_arg_type_info (RVV_BASE_scalar), /* Return type */
   1493      v_size_args /* Args */};
   1494 
   1495 /* A static operand information for vector_type func (vector_type, size_t)
   1496  * function registration. */
   1497 static CONSTEXPR const rvv_op_info iu_shift_vvx_ops
   1498   = {iu_ops,				  /* Types */
   1499      OP_TYPE_vx,			  /* Suffix */
   1500      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   1501      v_size_args /* Args */};
   1502 
   1503 /* A static operand information for vector_type func (vector_type, shift_type)
   1504  * function registration. */
   1505 static CONSTEXPR const rvv_op_info i_shift_vvv_ops
   1506   = {i_ops,				/* Types */
   1507      OP_TYPE_vv,			/* Suffix */
   1508      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   1509      shift_vv_args /* Args */};
   1510 
   1511 /* A static operand information for vector_type func (vector_type, size_t)
   1512  * function registration. */
   1513 static CONSTEXPR const rvv_op_info i_shift_vvx_ops
   1514   = {i_ops,				  /* Types */
   1515      OP_TYPE_vx,			  /* Suffix */
   1516      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   1517      v_size_args /* Args */};
   1518 
   1519 /* A static operand information for vector_type func (vector_type, shift_type)
   1520  * function registration. */
   1521 static CONSTEXPR const rvv_op_info u_shift_vvv_ops
   1522   = {u_ops,				/* Types */
   1523      OP_TYPE_vv,			/* Suffix */
   1524      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   1525      shift_vv_args /* Args */};
   1526 
   1527 /* A static operand information for vector_type func (vector_type, size_t)
   1528  * function registration. */
   1529 static CONSTEXPR const rvv_op_info u_shift_vvx_ops
   1530   = {u_ops,				  /* Types */
   1531      OP_TYPE_vx,			  /* Suffix */
   1532      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   1533      v_size_args /* Args */};
   1534 
   1535 /* A static operand information for vector_type func (vector_type, index_type)
   1536  * function registration. */
   1537 static CONSTEXPR const rvv_op_info all_gather_vvv_ops
   1538   = {all_ops,				  /* Types */
   1539      OP_TYPE_vv,			  /* Suffix */
   1540      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   1541      gather_vv_args /* Args */};
   1542 
   1543 /* A static operand information for vector_type func (vector_type, size_t)
   1544  * function registration. */
   1545 static CONSTEXPR const rvv_op_info all_gather_vvx_ops
   1546   = {all_ops,				  /* Types */
   1547      OP_TYPE_vx,			  /* Suffix */
   1548      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   1549      v_size_args /* Args */};
   1550 
   1551 /* A static operand information for vector_type func (vector_type, index_type)
   1552  * function registration. */
   1553 static CONSTEXPR const rvv_op_info all_gatherei16_vvv_ops
   1554   = {ei16_ops,				  /* Types */
   1555      OP_TYPE_vv,			  /* Suffix */
   1556      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   1557      gatherei16_vv_args /* Args */};
   1558 
   1559 /* A static operand information for vector_type func (vector_type)
   1560  * function registration. */
   1561 static CONSTEXPR const rvv_op_info iu_v_ops
   1562   = {iu_ops,			/* Types */
   1563      OP_TYPE_v,			/* Suffix */
   1564      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   1565      v_args /* Args */};
   1566 
   1567 /* A static operand information for scalar_type func (vector_type)
   1568  * function registration. */
   1569 static CONSTEXPR const rvv_op_info iu_x_s_ops
   1570   = {iu_ops,				  /* Types */
   1571      OP_TYPE_s,				  /* Suffix */
   1572      rvv_arg_type_info (RVV_BASE_scalar), /* Return type */
   1573      v_args /* Args */};
   1574 
   1575 /* A static operand information for scalar_type func (vector_type)
   1576  * function registration. */
   1577 static CONSTEXPR const rvv_op_info f_f_s_ops
   1578   = {f_ops,				  /* Types */
   1579      OP_TYPE_s,				  /* Suffix */
   1580      rvv_arg_type_info (RVV_BASE_scalar), /* Return type */
   1581      v_args /* Args */};
   1582 
   1583 /* A static operand information for vector_type func (vector_type)
   1584  * function registration. */
   1585 static CONSTEXPR const rvv_op_info iu_vs_ops
   1586   = {iu_ops,					/* Types */
   1587      OP_TYPE_vs,				/* Suffix */
   1588      rvv_arg_type_info (RVV_BASE_lmul1_vector), /* Return type */
   1589      vs_args /* Args */};
   1590 
   1591 /* A static operand information for vector_type func (vector_type)
   1592  * function registration. */
   1593 static CONSTEXPR const rvv_op_info f_vs_ops
   1594   = {f_ops,					/* Types */
   1595      OP_TYPE_vs,				/* Suffix */
   1596      rvv_arg_type_info (RVV_BASE_lmul1_vector), /* Return type */
   1597      vs_args /* Args */};
   1598 
   1599 /* A static operand information for vector_type func (vector_type)
   1600  * function registration. */
   1601 static CONSTEXPR const rvv_op_info wi_vs_ops
   1602   = {wi_ops,					      /* Types */
   1603      OP_TYPE_vs,				      /* Suffix */
   1604      rvv_arg_type_info (RVV_BASE_widen_lmul1_vector), /* Return type */
   1605      wvs_args /* Args */};
   1606 
   1607 /* A static operand information for vector_type func (vector_type)
   1608  * function registration. */
   1609 static CONSTEXPR const rvv_op_info wu_vs_ops
   1610   = {wu_ops,					      /* Types */
   1611      OP_TYPE_vs,				      /* Suffix */
   1612      rvv_arg_type_info (RVV_BASE_widen_lmul1_vector), /* Return type */
   1613      wvs_args /* Args */};
   1614 
   1615 /* A static operand information for vector_type func (vector_type)
   1616  * function registration. */
   1617 static CONSTEXPR const rvv_op_info wf_vs_ops
   1618   = {wf_ops,					      /* Types */
   1619      OP_TYPE_vs,				      /* Suffix */
   1620      rvv_arg_type_info (RVV_BASE_widen_lmul1_vector), /* Return type */
   1621      wvs_args /* Args */};
   1622 
   1623 /* A static operand information for vector_type func (vector_type)
   1624  * function registration. */
   1625 static CONSTEXPR const rvv_op_info f_v_ops
   1626   = {f_ops,				  /* Types */
   1627      OP_TYPE_v,				  /* Suffix */
   1628      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   1629      v_args /* Args */};
   1630 
   1631 /* A static operand information for vector_type func (vector_type)
   1632  * function registration. */
   1633 static CONSTEXPR const rvv_op_info f_to_u_v_ops
   1634   = {convert_u_ops,			  /* Types */
   1635      OP_TYPE_v,				  /* Suffix */
   1636      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   1637      f_v_args /* Args */};
   1638 
   1639 /* A static operand information for vector_type func (vector_type)
   1640  * function registration. */
   1641 static CONSTEXPR const rvv_op_info f_to_i_f_v_ops
   1642   = {convert_i_ops,			  /* Types */
   1643      OP_TYPE_f_v,			  /* Suffix */
   1644      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   1645      f_v_args /* Args */};
   1646 
   1647 /* A static operand information for vector_type func (vector_type)
   1648  * function registration. */
   1649 static CONSTEXPR const rvv_op_info f_to_wi_f_v_ops
   1650   = {wconvert_i_ops,			  /* Types */
   1651      OP_TYPE_f_v,			  /* Suffix */
   1652      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   1653      trunc_f_v_args /* Args */};
   1654 
   1655 /* A static operand information for vector_type func (vector_type)
   1656  * function registration. */
   1657 static CONSTEXPR const rvv_op_info f_to_ni_f_w_ops
   1658   = {f_ops,						      /* Types */
   1659      OP_TYPE_f_w,					      /* Suffix */
   1660      rvv_arg_type_info (RVV_BASE_double_trunc_signed_vector), /* Return type */
   1661      v_args /* Args */};
   1662 
   1663 /* A static operand information for vector_type func (vector_type)
   1664  * function registration. */
   1665 static CONSTEXPR const rvv_op_info f_to_nu_f_w_ops
   1666   = {f_ops,	  /* Types */
   1667      OP_TYPE_f_w, /* Suffix */
   1668      rvv_arg_type_info (
   1669        RVV_BASE_double_trunc_unsigned_vector), /* Return type */
   1670      v_args /* Args */};
   1671 
   1672 /* A static operand information for vector_type func (vector_type)
   1673  * function registration. */
   1674 static CONSTEXPR const rvv_op_info i_to_f_x_v_ops
   1675   = {f_ops,				  /* Types */
   1676      OP_TYPE_x_v,			  /* Suffix */
   1677      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   1678      x_v_args /* Args */};
   1679 
   1680 /* A static operand information for vector_type func (vector_type)
   1681  * function registration. */
   1682 static CONSTEXPR const rvv_op_info u_to_f_xu_v_ops
   1683   = {f_ops,				  /* Types */
   1684      OP_TYPE_xu_v,			  /* Suffix */
   1685      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   1686      xu_v_args /* Args */};
   1687 
   1688 /* A static operand information for vector_type func (vector_type)
   1689  * function registration. */
   1690 static CONSTEXPR const rvv_op_info i_to_wf_x_v_ops
   1691   = {f_ops,				  /* Types */
   1692      OP_TYPE_x_v,			  /* Suffix */
   1693      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   1694      w_x_v_args /* Args */};
   1695 
   1696 /* A static operand information for vector_type func (vector_type)
   1697  * function registration. */
   1698 static CONSTEXPR const rvv_op_info u_to_wf_xu_v_ops
   1699   = {f_ops,				  /* Types */
   1700      OP_TYPE_xu_v,			  /* Suffix */
   1701      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   1702      w_xu_v_args /* Args */};
   1703 
   1704 /* A static operand information for vector_type func (vector_type)
   1705  * function registration. */
   1706 static CONSTEXPR const rvv_op_info i_to_nf_x_w_ops
   1707   = {wconvert_i_ops,					     /* Types */
   1708      OP_TYPE_x_w,					     /* Suffix */
   1709      rvv_arg_type_info (RVV_BASE_double_trunc_float_vector), /* Return type */
   1710      v_args /* Args */};
   1711 
   1712 /* A static operand information for vector_type func (vector_type)
   1713  * function registration. */
   1714 static CONSTEXPR const rvv_op_info u_to_nf_xu_w_ops
   1715   = {wconvert_u_ops,					     /* Types */
   1716      OP_TYPE_xu_w,					     /* Suffix */
   1717      rvv_arg_type_info (RVV_BASE_double_trunc_float_vector), /* Return type */
   1718      v_args /* Args */};
   1719 
   1720 /* A static operand information for vector_type func (vector_type)
   1721  * function registration. */
   1722 static CONSTEXPR const rvv_op_info f_to_u_f_v_ops
   1723   = {convert_u_ops,			  /* Types */
   1724      OP_TYPE_f_v,				  /* Suffix */
   1725      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   1726      f_v_args /* Args */};
   1727 
   1728 /* A static operand information for vector_type func (vector_type)
   1729  * function registration. */
   1730 static CONSTEXPR const rvv_op_info f_to_wu_f_v_ops
   1731   = {wconvert_u_ops,			  /* Types */
   1732      OP_TYPE_f_v,			  /* Suffix */
   1733      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   1734      trunc_f_v_args /* Args */};
   1735 
   1736 /* A static operand information for vector_type func (vector_type)
   1737  * function registration. */
   1738 static CONSTEXPR const rvv_op_info f_to_wf_f_v_ops
   1739   = {f_ops,				  /* Types */
   1740      OP_TYPE_f_v,			  /* Suffix */
   1741      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   1742      w_v_args /* Args */};
   1743 
   1744 /* A static operand information for vector_type func (vector_type)
   1745  * function registration. */
   1746 static CONSTEXPR const rvv_op_info f_to_nf_f_w_ops
   1747   = {wconvert_f_ops,					     /* Types */
   1748      OP_TYPE_f_w,					     /* Suffix */
   1749      rvv_arg_type_info (RVV_BASE_double_trunc_float_vector), /* Return type */
   1750      v_args /* Args */};
   1751 
   1752 /* A static operand information for vector_type func (vector_type)
   1753  * function registration. */
   1754 static CONSTEXPR const rvv_op_info all_v_ops
   1755   = {all_ops,			/* Types */
   1756      OP_TYPE_v,			/* Suffix */
   1757      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   1758      v_args /* Args */};
   1759 
   1760 /* A static operand information for vector_type func (vector_type)
   1761  * function registration. */
   1762 static CONSTEXPR const rvv_op_info i_v_u_ops
   1763   = {i_ops,					/* Types */
   1764      OP_TYPE_v,					/* Suffix */
   1765      rvv_arg_type_info (RVV_BASE_unsigned_vector), /* Return type */
   1766      v_args /* Args */};
   1767 
   1768 /* A static operand information for vector_type func (vector_type)
   1769  * function registration. */
   1770 static CONSTEXPR const rvv_op_info u_v_i_ops
   1771   = {u_ops,					/* Types */
   1772      OP_TYPE_v,					/* Suffix */
   1773      rvv_arg_type_info (RVV_BASE_signed_vector), /* Return type */
   1774      v_args /* Args */};
   1775 
   1776 /* A static operand information for vector_type func (vector_type)
   1777  * function registration. */
   1778 static CONSTEXPR const rvv_op_info iu_v_eew8_interpret_ops
   1779   = {eew8_interpret_ops,			  /* Types */
   1780      OP_TYPE_v,					  /* Suffix */
   1781      rvv_arg_type_info (RVV_BASE_eew8_interpret), /* Return type */
   1782      v_args /* Args */};
   1783 
   1784 /* A static operand information for vector_type func (vector_type)
   1785  * function registration. */
   1786 static CONSTEXPR const rvv_op_info iu_v_eew16_interpret_ops
   1787   = {eew16_interpret_ops,			   /* Types */
   1788      OP_TYPE_v,					   /* Suffix */
   1789      rvv_arg_type_info (RVV_BASE_eew16_interpret), /* Return type */
   1790      v_args /* Args */};
   1791 
   1792 /* A static operand information for vector_type func (vector_type)
   1793  * function registration. */
   1794 static CONSTEXPR const rvv_op_info iu_v_eew32_interpret_ops
   1795   = {eew32_interpret_ops,			   /* Types */
   1796      OP_TYPE_v,					   /* Suffix */
   1797      rvv_arg_type_info (RVV_BASE_eew32_interpret), /* Return type */
   1798      v_args /* Args */};
   1799 
   1800 /* A static operand information for vector_type func (vector_type)
   1801  * function registration. */
   1802 static CONSTEXPR const rvv_op_info iu_v_eew64_interpret_ops
   1803   = {eew64_interpret_ops,			   /* Types */
   1804      OP_TYPE_v,					   /* Suffix */
   1805      rvv_arg_type_info (RVV_BASE_eew64_interpret), /* Return type */
   1806      v_args /* Args */};
   1807 
   1808 /* A static operand information for vbool1_t func (vector_type)
   1809  * function registration. */
   1810 static CONSTEXPR const rvv_op_info iu_v_bool1_interpret_ops
   1811   = {bool1_interpret_ops,			   /* Types */
   1812      OP_TYPE_v,					   /* Suffix */
   1813      rvv_arg_type_info (RVV_BASE_bool1_interpret), /* Return type */
   1814      v_args					   /* Args */};
   1815 
   1816 /* A static operand information for vbool2_t func (vector_type)
   1817  * function registration. */
   1818 static CONSTEXPR const rvv_op_info iu_v_bool2_interpret_ops
   1819   = {bool2_interpret_ops,			   /* Types */
   1820      OP_TYPE_v,					   /* Suffix */
   1821      rvv_arg_type_info (RVV_BASE_bool2_interpret), /* Return type */
   1822      v_args					   /* Args */};
   1823 
   1824 /* A static operand information for vbool4_t func (vector_type)
   1825  * function registration. */
   1826 static CONSTEXPR const rvv_op_info iu_v_bool4_interpret_ops
   1827   = {bool4_interpret_ops,			   /* Types */
   1828      OP_TYPE_v,					   /* Suffix */
   1829      rvv_arg_type_info (RVV_BASE_bool4_interpret), /* Return type */
   1830      v_args					   /* Args */};
   1831 
   1832 /* A static operand information for vbool8_t func (vector_type)
   1833  * function registration. */
   1834 static CONSTEXPR const rvv_op_info iu_v_bool8_interpret_ops
   1835   = {bool8_interpret_ops,			   /* Types */
   1836      OP_TYPE_v,					   /* Suffix */
   1837      rvv_arg_type_info (RVV_BASE_bool8_interpret), /* Return type */
   1838      v_args					   /* Args */};
   1839 
   1840 /* A static operand information for vbool16_t func (vector_type)
   1841  * function registration. */
   1842 static CONSTEXPR const rvv_op_info iu_v_bool16_interpret_ops
   1843   = {bool16_interpret_ops,			    /* Types */
   1844      OP_TYPE_v,					    /* Suffix */
   1845      rvv_arg_type_info (RVV_BASE_bool16_interpret), /* Return type */
   1846      v_args					    /* Args */};
   1847 
   1848 /* A static operand information for vbool32_t func (vector_type)
   1849  * function registration. */
   1850 static CONSTEXPR const rvv_op_info iu_v_bool32_interpret_ops
   1851   = {bool32_interpret_ops,			    /* Types */
   1852      OP_TYPE_v,					    /* Suffix */
   1853      rvv_arg_type_info (RVV_BASE_bool32_interpret), /* Return type */
   1854      v_args					    /* Args */};
   1855 
   1856 /* A static operand information for vbool64_t func (vector_type)
   1857  * function registration. */
   1858 static CONSTEXPR const rvv_op_info iu_v_bool64_interpret_ops
   1859   = {bool64_interpret_ops,			    /* Types */
   1860      OP_TYPE_v,					    /* Suffix */
   1861      rvv_arg_type_info (RVV_BASE_bool64_interpret), /* Return type */
   1862      v_args					    /* Args */};
   1863 
   1864 /* A static operand information for vint8_t func (vector_type)
   1865  * function registration. */
   1866 static CONSTEXPR const rvv_op_info b_v_signed_eew8_lmul1_interpret_ops
   1867   = {signed_eew8_lmul1_interpret_ops,			      /* Types */
   1868      OP_TYPE_v,						      /* Suffix */
   1869      rvv_arg_type_info (RVV_BASE_signed_eew8_lmul1_interpret),/* Return type */
   1870      v_args						      /* Args */};
   1871 
   1872 /* A static operand information for vint16_t func (vector_type)
   1873  * function registration. */
   1874 static CONSTEXPR const rvv_op_info b_v_signed_eew16_lmul1_interpret_ops
   1875   = {signed_eew16_lmul1_interpret_ops,			       /* Types */
   1876      OP_TYPE_v,						       /* Suffix */
   1877      rvv_arg_type_info (RVV_BASE_signed_eew16_lmul1_interpret),/* Return type */
   1878      v_args						       /* Args */};
   1879 
   1880 /* A static operand information for vint32_t func (vector_type)
   1881  * function registration. */
   1882 static CONSTEXPR const rvv_op_info b_v_signed_eew32_lmul1_interpret_ops
   1883   = {signed_eew32_lmul1_interpret_ops,			       /* Types */
   1884      OP_TYPE_v,						       /* Suffix */
   1885      rvv_arg_type_info (RVV_BASE_signed_eew32_lmul1_interpret),/* Return type */
   1886      v_args						       /* Args */};
   1887 
   1888 /* A static operand information for vint64_t func (vector_type)
   1889  * function registration. */
   1890 static CONSTEXPR const rvv_op_info b_v_signed_eew64_lmul1_interpret_ops
   1891   = {signed_eew64_lmul1_interpret_ops,			       /* Types */
   1892      OP_TYPE_v,						       /* Suffix */
   1893      rvv_arg_type_info (RVV_BASE_signed_eew64_lmul1_interpret),/* Return type */
   1894      v_args						       /* Args */};
   1895 
   1896 /* A static operand information for vuint8_t func (vector_type)
   1897  * function registration. */
   1898 static CONSTEXPR const rvv_op_info b_v_unsigned_eew8_lmul1_interpret_ops
   1899   = {unsigned_eew8_lmul1_interpret_ops,				/* Types */
   1900      OP_TYPE_v,							/* Suffix */
   1901      rvv_arg_type_info (RVV_BASE_unsigned_eew8_lmul1_interpret),/* Return type */
   1902      v_args							/* Args */};
   1903 
   1904 /* A static operand information for vuint16_t func (vector_type)
   1905  * function registration. */
   1906 static CONSTEXPR const rvv_op_info b_v_unsigned_eew16_lmul1_interpret_ops
   1907   = {unsigned_eew16_lmul1_interpret_ops,			 /* Types */
   1908      OP_TYPE_v,							 /* Suffix */
   1909      rvv_arg_type_info (RVV_BASE_unsigned_eew16_lmul1_interpret),/* Return type */
   1910      v_args							 /* Args */};
   1911 
   1912 /* A static operand information for vuint32_t func (vector_type)
   1913  * function registration. */
   1914 static CONSTEXPR const rvv_op_info b_v_unsigned_eew32_lmul1_interpret_ops
   1915   = {unsigned_eew32_lmul1_interpret_ops,			 /* Types */
   1916      OP_TYPE_v,							 /* Suffix */
   1917      rvv_arg_type_info (RVV_BASE_unsigned_eew32_lmul1_interpret),/* Return type */
   1918      v_args							 /* Args */};
   1919 
   1920 /* A static operand information for vuint64_t func (vector_type)
   1921  * function registration. */
   1922 static CONSTEXPR const rvv_op_info b_v_unsigned_eew64_lmul1_interpret_ops
   1923   = {unsigned_eew64_lmul1_interpret_ops,			 /* Types */
   1924      OP_TYPE_v,							 /* Suffix */
   1925      rvv_arg_type_info (RVV_BASE_unsigned_eew64_lmul1_interpret),/* Return type */
   1926      v_args							 /* Args */};
   1927 
   1928 /* A static operand information for vector_type func (vector_type)
   1929  * function registration. */
   1930 static CONSTEXPR const rvv_op_info all_v_vlmul_ext_x2_ops
   1931   = {vlmul_ext_x2_ops,				/* Types */
   1932      OP_TYPE_v,					/* Suffix */
   1933      rvv_arg_type_info (RVV_BASE_vlmul_ext_x2), /* Return type */
   1934      v_args /* Args */};
   1935 
   1936 /* A static operand information for vector_type func (vector_type)
   1937  * function registration. */
   1938 static CONSTEXPR const rvv_op_info all_v_vlmul_ext_x4_ops
   1939   = {vlmul_ext_x4_ops,				/* Types */
   1940      OP_TYPE_v,					/* Suffix */
   1941      rvv_arg_type_info (RVV_BASE_vlmul_ext_x4), /* Return type */
   1942      v_args /* Args */};
   1943 
   1944 /* A static operand information for vector_type func (vector_type)
   1945  * function registration. */
   1946 static CONSTEXPR const rvv_op_info all_v_vlmul_ext_x8_ops
   1947   = {vlmul_ext_x8_ops,				/* Types */
   1948      OP_TYPE_v,					/* Suffix */
   1949      rvv_arg_type_info (RVV_BASE_vlmul_ext_x8), /* Return type */
   1950      v_args /* Args */};
   1951 
   1952 /* A static operand information for vector_type func (vector_type)
   1953  * function registration. */
   1954 static CONSTEXPR const rvv_op_info all_v_vlmul_ext_x16_ops
   1955   = {vlmul_ext_x16_ops,				 /* Types */
   1956      OP_TYPE_v,					 /* Suffix */
   1957      rvv_arg_type_info (RVV_BASE_vlmul_ext_x16), /* Return type */
   1958      v_args /* Args */};
   1959 
   1960 /* A static operand information for vector_type func (vector_type)
   1961  * function registration. */
   1962 static CONSTEXPR const rvv_op_info all_v_vlmul_ext_x32_ops
   1963   = {vlmul_ext_x32_ops,				 /* Types */
   1964      OP_TYPE_v,					 /* Suffix */
   1965      rvv_arg_type_info (RVV_BASE_vlmul_ext_x32), /* Return type */
   1966      v_args /* Args */};
   1967 
   1968 /* A static operand information for vector_type func (vector_type)
   1969  * function registration. */
   1970 static CONSTEXPR const rvv_op_info all_v_vlmul_ext_x64_ops
   1971   = {vlmul_ext_x64_ops,				 /* Types */
   1972      OP_TYPE_v,					 /* Suffix */
   1973      rvv_arg_type_info (RVV_BASE_vlmul_ext_x64), /* Return type */
   1974      v_args /* Args */};
   1975 
   1976 /* A static operand information for vector_type func (vector_type)
   1977  * function registration. */
   1978 static CONSTEXPR const rvv_op_info all_v_vlmul_trunc_x2_ops
   1979   = {vlmul_ext_x2_ops,			  /* Types */
   1980      OP_TYPE_v,				  /* Suffix */
   1981      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   1982      v_x2_trunc_args /* Args */};
   1983 
   1984 /* A static operand information for vector_type func (vector_type)
   1985  * function registration. */
   1986 static CONSTEXPR const rvv_op_info all_v_vlmul_trunc_x4_ops
   1987   = {vlmul_ext_x4_ops,			  /* Types */
   1988      OP_TYPE_v,				  /* Suffix */
   1989      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   1990      v_x4_trunc_args /* Args */};
   1991 
   1992 /* A static operand information for vector_type func (vector_type)
   1993  * function registration. */
   1994 static CONSTEXPR const rvv_op_info all_v_vlmul_trunc_x8_ops
   1995   = {vlmul_ext_x8_ops,			  /* Types */
   1996      OP_TYPE_v,				  /* Suffix */
   1997      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   1998      v_x8_trunc_args /* Args */};
   1999 
   2000 /* A static operand information for vector_type func (vector_type)
   2001  * function registration. */
   2002 static CONSTEXPR const rvv_op_info all_v_vlmul_trunc_x16_ops
   2003   = {vlmul_ext_x16_ops,			  /* Types */
   2004      OP_TYPE_v,				  /* Suffix */
   2005      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   2006      v_x16_trunc_args /* Args */};
   2007 
   2008 /* A static operand information for vector_type func (vector_type)
   2009  * function registration. */
   2010 static CONSTEXPR const rvv_op_info all_v_vlmul_trunc_x32_ops
   2011   = {vlmul_ext_x32_ops,			  /* Types */
   2012      OP_TYPE_v,				  /* Suffix */
   2013      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   2014      v_x32_trunc_args /* Args */};
   2015 
   2016 /* A static operand information for vector_type func (vector_type)
   2017  * function registration. */
   2018 static CONSTEXPR const rvv_op_info all_v_vlmul_trunc_x64_ops
   2019   = {vlmul_ext_x64_ops,			  /* Types */
   2020      OP_TYPE_v,				  /* Suffix */
   2021      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   2022      v_x64_trunc_args /* Args */};
   2023 
   2024 /* A static operand information for vector_type func (vector_type)
   2025  * function registration. */
   2026 static CONSTEXPR const rvv_op_info f_v_i_ops
   2027   = {f_ops,					 /* Types */
   2028      OP_TYPE_v,					 /* Suffix */
   2029      rvv_arg_type_info (RVV_BASE_signed_vector), /* Return type */
   2030      v_args /* Args */};
   2031 
   2032 /* A static operand information for vector_type func (vector_type)
   2033  * function registration. */
   2034 static CONSTEXPR const rvv_op_info f_v_u_ops
   2035   = {f_ops,					   /* Types */
   2036      OP_TYPE_v,					   /* Suffix */
   2037      rvv_arg_type_info (RVV_BASE_unsigned_vector), /* Return type */
   2038      v_args /* Args */};
   2039 
   2040 /* A static operand information for vector_type func (vector_type)
   2041  * function registration. */
   2042 static CONSTEXPR const rvv_op_info i_v_f_ops
   2043   = {f_ops,				  /* Types */
   2044      OP_TYPE_v,				  /* Suffix */
   2045      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   2046      x_v_args /* Args */};
   2047 
   2048 /* A static operand information for vector_type func (vector_type)
   2049  * function registration. */
   2050 static CONSTEXPR const rvv_op_info u_v_f_ops
   2051   = {f_ops,				  /* Types */
   2052      OP_TYPE_v,				  /* Suffix */
   2053      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   2054      xu_v_args /* Args */};
   2055 
   2056 /* A static operand information for vector_type func (scalar_type)
   2057  * function registration. */
   2058 static CONSTEXPR const rvv_op_info iu_x_ops
   2059   = {iu_ops,			/* Types */
   2060      OP_TYPE_x,			/* Suffix */
   2061      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   2062      x_args /* Args */};
   2063 
   2064 /* A static operand information for vector_type func (scalar_type)
   2065  * function registration. */
   2066 static CONSTEXPR const rvv_op_info iu_s_x_ops
   2067   = {iu_ops,				  /* Types */
   2068      OP_TYPE_x,				  /* Suffix */
   2069      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   2070      x_args /* Args */};
   2071 
   2072 /* A static operand information for vector_type func (scalar_type)
   2073  * function registration. */
   2074 static CONSTEXPR const rvv_op_info f_f_ops
   2075   = {f_ops,			/* Types */
   2076      OP_TYPE_f,			/* Suffix */
   2077      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   2078      x_args /* Args */};
   2079 
   2080 /* A static operand information for vector_type func (scalar_type)
   2081  * function registration. */
   2082 static CONSTEXPR const rvv_op_info f_s_f_ops
   2083   = {f_ops,				  /* Types */
   2084      OP_TYPE_f,				  /* Suffix */
   2085      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   2086      x_args /* Args */};
   2087 
   2088 /* A static operand information for vector_type func (double demote type)
   2089  * function registration. */
   2090 static CONSTEXPR const rvv_op_info i_vf2_ops
   2091   = {wexti_ops,				  /* Types */
   2092      OP_TYPE_vf2,			  /* Suffix */
   2093      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   2094      vf2_args /* Args */};
   2095 
   2096 /* A static operand information for vector_type func (quad demote type)
   2097  * function registration. */
   2098 static CONSTEXPR const rvv_op_info i_vf4_ops
   2099   = {qexti_ops,				  /* Types */
   2100      OP_TYPE_vf4,			  /* Suffix */
   2101      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   2102      vf4_args /* Args */};
   2103 
   2104 /* A static operand information for vector_type func (oct demote type)
   2105  * function registration. */
   2106 static CONSTEXPR const rvv_op_info i_vf8_ops
   2107   = {oexti_ops,				  /* Types */
   2108      OP_TYPE_vf8,			  /* Suffix */
   2109      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   2110      vf8_args /* Args */};
   2111 
   2112 /* A static operand information for vector_type func (double demote type)
   2113  * function registration. */
   2114 static CONSTEXPR const rvv_op_info u_vf2_ops
   2115   = {wextu_ops,				  /* Types */
   2116      OP_TYPE_vf2,			  /* Suffix */
   2117      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   2118      vf2_args /* Args */};
   2119 
   2120 /* A static operand information for vector_type func (quad demote type)
   2121  * function registration. */
   2122 static CONSTEXPR const rvv_op_info u_vf4_ops
   2123   = {qextu_ops,				  /* Types */
   2124      OP_TYPE_vf4,			  /* Suffix */
   2125      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   2126      vf4_args /* Args */};
   2127 
   2128 /* A static operand information for vector_type func (oct demote type)
   2129  * function registration. */
   2130 static CONSTEXPR const rvv_op_info u_vf8_ops
   2131   = {oextu_ops,				  /* Types */
   2132      OP_TYPE_vf8,			  /* Suffix */
   2133      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   2134      vf8_args /* Args */};
   2135 
   2136 /* A static operand information for vector_type func (double demote type, double
   2137  * demote type) function registration. */
   2138 static CONSTEXPR const rvv_op_info i_wvv_ops
   2139   = {wexti_ops,				  /* Types */
   2140      OP_TYPE_vv,			  /* Suffix */
   2141      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   2142      wvv_args /* Args */};
   2143 
   2144 /* A static operand information for vector_type func (double demote type, double
   2145  * demote type) function registration. */
   2146 static CONSTEXPR const rvv_op_info f_wvv_ops
   2147   = {wextf_ops,				  /* Types */
   2148      OP_TYPE_vv,			  /* Suffix */
   2149      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   2150      wvv_args /* Args */};
   2151 
   2152 /* A static operand information for vector_type func (vector_type, double demote
   2153  * type, double demote type) function registration. */
   2154 static CONSTEXPR const rvv_op_info i_wwvv_ops
   2155   = {wexti_ops,				  /* Types */
   2156      OP_TYPE_vv,			  /* Suffix */
   2157      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   2158      wwvv_args /* Args */};
   2159 
   2160 /* A static operand information for vector_type func (vector_type, double demote
   2161  * scalar_type, double demote type) function registration. */
   2162 static CONSTEXPR const rvv_op_info i_wwxv_ops
   2163   = {wexti_ops,				  /* Types */
   2164      OP_TYPE_vx,			  /* Suffix */
   2165      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   2166      wwxv_args /* Args */};
   2167 
   2168 /* A static operand information for vector_type func (vector_type, double demote
   2169  * type, double demote type) function registration. */
   2170 static CONSTEXPR const rvv_op_info f_wwvv_ops
   2171   = {wextf_ops,				  /* Types */
   2172      OP_TYPE_vv,			  /* Suffix */
   2173      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   2174      wwvv_args /* Args */};
   2175 
   2176 /* A static operand information for vector_type func (vector_type, double demote
   2177  * scalar_type, double demote type) function registration. */
   2178 static CONSTEXPR const rvv_op_info f_wwfv_ops
   2179   = {wextf_ops,				  /* Types */
   2180      OP_TYPE_vf,			  /* Suffix */
   2181      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   2182      wwxv_args /* Args */};
   2183 
   2184 /* A static operand information for vector_type func (vector_type, double demote
   2185  * type, double demote type) function registration. */
   2186 static CONSTEXPR const rvv_op_info u_wwvv_ops
   2187   = {wextu_ops,				  /* Types */
   2188      OP_TYPE_vv,			  /* Suffix */
   2189      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   2190      wwvv_args /* Args */};
   2191 
   2192 /* A static operand information for vector_type func (vector_type, double demote
   2193  * scalar_type, double demote type) function registration. */
   2194 static CONSTEXPR const rvv_op_info u_wwxv_ops
   2195   = {wextu_ops,				  /* Types */
   2196      OP_TYPE_vx,			  /* Suffix */
   2197      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   2198      wwxv_args /* Args */};
   2199 
   2200 /* A static operand information for vector_type func (vector_type, double demote
   2201  * type, double demote type) function registration. */
   2202 static CONSTEXPR const rvv_op_info i_su_wwvv_ops
   2203   = {wexti_ops,				  /* Types */
   2204      OP_TYPE_vv,			  /* Suffix */
   2205      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   2206      su_wwvv_args /* Args */};
   2207 
   2208 /* A static operand information for vector_type func (vector_type, double demote
   2209  * scalar_type, double demote type) function registration. */
   2210 static CONSTEXPR const rvv_op_info i_su_wwxv_ops
   2211   = {wexti_ops,				  /* Types */
   2212      OP_TYPE_vx,			  /* Suffix */
   2213      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   2214      su_wwxv_args /* Args */};
   2215 
   2216 /* A static operand information for vector_type func (vector_type, double demote
   2217  * scalar_type, double demote type) function registration. */
   2218 static CONSTEXPR const rvv_op_info i_us_wwxv_ops
   2219   = {wexti_ops,				  /* Types */
   2220      OP_TYPE_vx,			  /* Suffix */
   2221      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   2222      us_wwxv_args /* Args */};
   2223 
   2224 /* A static operand information for vector_type func (signed double demote type,
   2225  * unsigned double demote type) function registration. */
   2226 static CONSTEXPR const rvv_op_info i_su_wvv_ops
   2227   = {wexti_ops,				  /* Types */
   2228      OP_TYPE_vv,			  /* Suffix */
   2229      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   2230      su_wvv_args /* Args */};
   2231 
   2232 /* A static operand information for vector_type func (double demote type, double
   2233  * demote type) function registration. */
   2234 static CONSTEXPR const rvv_op_info u_wvv_ops
   2235   = {wextu_ops,				  /* Types */
   2236      OP_TYPE_vv,			  /* Suffix */
   2237      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   2238      wvv_args /* Args */};
   2239 
   2240 /* A static operand information for vector_type func (double demote type, size type)
   2241  * function registration. */
   2242 static CONSTEXPR const rvv_op_info u_shift_wvx_ops
   2243   = {wextu_ops,				  /* Types */
   2244      OP_TYPE_vx,			  /* Suffix */
   2245      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   2246      wv_size_args /* Args */};
   2247 
   2248 /* A static operand information for vector_type func (double demote type, double
   2249  * demote scalar_type) function registration. */
   2250 static CONSTEXPR const rvv_op_info i_wvx_ops
   2251   = {wexti_ops,				  /* Types */
   2252      OP_TYPE_vx,			  /* Suffix */
   2253      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   2254      wvx_args /* Args */};
   2255 
   2256 /* A static operand information for vector_type func (double demote type, double
   2257  * demote scalar_type) function registration. */
   2258 static CONSTEXPR const rvv_op_info f_wvf_ops
   2259   = {wextf_ops,				  /* Types */
   2260      OP_TYPE_vf,			  /* Suffix */
   2261      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   2262      wvx_args /* Args */};
   2263 
   2264 /* A static operand information for vector_type func (signed double demote type,
   2265  * unsigned double demote scalar_type) function registration. */
   2266 static CONSTEXPR const rvv_op_info i_su_wvx_ops
   2267   = {wexti_ops,				  /* Types */
   2268      OP_TYPE_vx,			  /* Suffix */
   2269      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   2270      su_wvx_args /* Args */};
   2271 
   2272 /* A static operand information for vector_type func (vector_type, double
   2273  * demote type) function registration. */
   2274 static CONSTEXPR const rvv_op_info i_wwv_ops
   2275   = {wexti_ops,				  /* Types */
   2276      OP_TYPE_wv,			  /* Suffix */
   2277      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   2278      wwv_args /* Args */};
   2279 
   2280 /* A static operand information for vector_type func (vector_type, double
   2281  * demote type) function registration. */
   2282 static CONSTEXPR const rvv_op_info f_wwv_ops
   2283   = {wextf_ops,				  /* Types */
   2284      OP_TYPE_wv,			  /* Suffix */
   2285      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   2286      wwv_args /* Args */};
   2287 
   2288 /* A static operand information for vector_type func (vector_type, double
   2289  * demote scalar_type) function registration. */
   2290 static CONSTEXPR const rvv_op_info i_wwx_ops
   2291   = {wexti_ops,				  /* Types */
   2292      OP_TYPE_wx,			  /* Suffix */
   2293      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   2294      wwx_args /* Args */};
   2295 
   2296 /* A static operand information for vector_type func (vector_type, double
   2297  * demote scalar_type) function registration. */
   2298 static CONSTEXPR const rvv_op_info f_wwf_ops
   2299   = {wextf_ops,				  /* Types */
   2300      OP_TYPE_wf,			  /* Suffix */
   2301      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   2302      wwx_args /* Args */};
   2303 
   2304 /* A static operand information for vector_type func (vector_type, double
   2305  * demote type) function registration. */
   2306 static CONSTEXPR const rvv_op_info u_wwv_ops
   2307   = {wextu_ops,				  /* Types */
   2308      OP_TYPE_wv,			  /* Suffix */
   2309      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   2310      wwv_args /* Args */};
   2311 
   2312 /* A static operand information for vector_type func (vector_type, double
   2313  * demote scalar_type) function registration. */
   2314 static CONSTEXPR const rvv_op_info u_wwx_ops
   2315   = {wextu_ops,				  /* Types */
   2316      OP_TYPE_wx,			  /* Suffix */
   2317      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   2318      wwx_args /* Args */};
   2319 
   2320 /* A static operand information for vector_type func (double demote type, double
   2321  * demote scalar_type) function registration. */
   2322 static CONSTEXPR const rvv_op_info u_wvx_ops
   2323   = {wextu_ops,				  /* Types */
   2324      OP_TYPE_vx,			  /* Suffix */
   2325      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   2326      wvx_args /* Args */};
   2327 
   2328 /* A static operand information for vector_type func (double demote type)
   2329  * function registration. */
   2330 static CONSTEXPR const rvv_op_info i_x_x_v_ops
   2331   = {wexti_ops,				  /* Types */
   2332      OP_TYPE_x_v,			  /* Suffix */
   2333      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   2334      x_x_v_args /* Args */};
   2335 
   2336 /* A static operand information for vector_type func (unsigned double demote
   2337  * type) function registration. */
   2338 static CONSTEXPR const rvv_op_info u_x_x_v_ops
   2339   = {wextu_ops,				  /* Types */
   2340      OP_TYPE_x_v,			  /* Suffix */
   2341      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   2342      x_x_v_args /* Args */};
   2343 
   2344 /* A static operand information for double demote type func (vector_type,
   2345  * shift_type) function registration. */
   2346 static CONSTEXPR const rvv_op_info i_narrow_shift_vwv_ops
   2347   = {wexti_ops,					       /* Types */
   2348      OP_TYPE_wv,				       /* Suffix */
   2349      rvv_arg_type_info (RVV_BASE_double_trunc_vector), /* Return type */
   2350      shift_wv_args /* Args */};
   2351 
   2352 /* A static operand information for double demote type func (vector_type,
   2353  * shift_type) function registration. */
   2354 static CONSTEXPR const rvv_op_info u_narrow_shift_vwv_ops
   2355   = {wextu_ops,					       /* Types */
   2356      OP_TYPE_wv,				       /* Suffix */
   2357      rvv_arg_type_info (RVV_BASE_double_trunc_vector), /* Return type */
   2358      shift_wv_args /* Args */};
   2359 
   2360 /* A static operand information for double demote type func (vector_type,
   2361  * size_t) function registration. */
   2362 static CONSTEXPR const rvv_op_info i_narrow_shift_vwx_ops
   2363   = {wexti_ops,					       /* Types */
   2364      OP_TYPE_wx,				       /* Suffix */
   2365      rvv_arg_type_info (RVV_BASE_double_trunc_vector), /* Return type */
   2366      v_size_args /* Args */};
   2367 
   2368 /* A static operand information for double demote type func (vector_type,
   2369  * size_t) function registration. */
   2370 static CONSTEXPR const rvv_op_info u_narrow_shift_vwx_ops
   2371   = {wextu_ops,					       /* Types */
   2372      OP_TYPE_wx,				       /* Suffix */
   2373      rvv_arg_type_info (RVV_BASE_double_trunc_vector), /* Return type */
   2374      v_size_args /* Args */};
   2375 
   2376 /* A static operand information for double demote type func (vector_type)
   2377  * function registration. */
   2378 static CONSTEXPR const rvv_op_info iu_trunc_ops
   2379   = {wextiu_ops,				       /* Types */
   2380      OP_TYPE_x_w,				       /* Suffix */
   2381      rvv_arg_type_info (RVV_BASE_double_trunc_vector), /* Return type */
   2382      v_args /* Args */};
   2383 
   2384 /* A static operand information for vector_type func (vector_type)
   2385  * function registration. */
   2386 static CONSTEXPR const rvv_op_info all_v_vset_lmul1_x2_ops
   2387   = {lmul1_ops,					/* Types */
   2388      OP_TYPE_v,					/* Suffix */
   2389      rvv_arg_type_info (RVV_BASE_vlmul_ext_x2), /* Return type */
   2390      ext_x2_vset_args /* Args */};
   2391 
   2392 /* A static operand information for vector_type func (vector_type)
   2393  * function registration. */
   2394 static CONSTEXPR const rvv_op_info all_v_vset_lmul1_x4_ops
   2395   = {lmul1_ops,					/* Types */
   2396      OP_TYPE_v,					/* Suffix */
   2397      rvv_arg_type_info (RVV_BASE_vlmul_ext_x4), /* Return type */
   2398      ext_x4_vset_args /* Args */};
   2399 
   2400 /* A static operand information for vector_type func (vector_type)
   2401  * function registration. */
   2402 static CONSTEXPR const rvv_op_info all_v_vset_lmul1_x8_ops
   2403   = {lmul1_ops,					/* Types */
   2404      OP_TYPE_v,					/* Suffix */
   2405      rvv_arg_type_info (RVV_BASE_vlmul_ext_x8), /* Return type */
   2406      ext_x8_vset_args /* Args */};
   2407 
   2408 /* A static operand information for vector_type func (vector_type)
   2409  * function registration. */
   2410 static CONSTEXPR const rvv_op_info all_v_vset_lmul2_x2_ops
   2411   = {lmul2_ops,					/* Types */
   2412      OP_TYPE_v,					/* Suffix */
   2413      rvv_arg_type_info (RVV_BASE_vlmul_ext_x2), /* Return type */
   2414      ext_x2_vset_args /* Args */};
   2415 
   2416 /* A static operand information for vector_type func (vector_type)
   2417  * function registration. */
   2418 static CONSTEXPR const rvv_op_info all_v_vset_lmul2_x4_ops
   2419   = {lmul2_ops,					/* Types */
   2420      OP_TYPE_v,					/* Suffix */
   2421      rvv_arg_type_info (RVV_BASE_vlmul_ext_x4), /* Return type */
   2422      ext_x4_vset_args /* Args */};
   2423 
   2424 /* A static operand information for vector_type func (vector_type)
   2425  * function registration. */
   2426 static CONSTEXPR const rvv_op_info all_v_vset_lmul4_x2_ops
   2427   = {lmul4_ops,					/* Types */
   2428      OP_TYPE_v,					/* Suffix */
   2429      rvv_arg_type_info (RVV_BASE_vlmul_ext_x2), /* Return type */
   2430      ext_x2_vset_args /* Args */};
   2431 
   2432 /* A static operand information for vector_type func (vector_type)
   2433  * function registration. */
   2434 static CONSTEXPR const rvv_op_info all_v_vget_lmul1_x2_ops
   2435   = {lmul1_ops,				  /* Types */
   2436      OP_TYPE_v,				  /* Suffix */
   2437      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   2438      ext_x2_vget_args /* Args */};
   2439 
   2440 /* A static operand information for vector_type func (vector_type)
   2441  * function registration. */
   2442 static CONSTEXPR const rvv_op_info all_v_vget_lmul1_x4_ops
   2443   = {lmul1_ops,				  /* Types */
   2444      OP_TYPE_v,				  /* Suffix */
   2445      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   2446      ext_x4_vget_args /* Args */};
   2447 
   2448 /* A static operand information for vector_type func (vector_type)
   2449  * function registration. */
   2450 static CONSTEXPR const rvv_op_info all_v_vget_lmul1_x8_ops
   2451   = {lmul1_ops,				  /* Types */
   2452      OP_TYPE_v,				  /* Suffix */
   2453      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   2454      ext_x8_vget_args /* Args */};
   2455 
   2456 /* A static operand information for vector_type func (vector_type)
   2457  * function registration. */
   2458 static CONSTEXPR const rvv_op_info all_v_vget_lmul2_x2_ops
   2459   = {lmul2_ops,				  /* Types */
   2460      OP_TYPE_v,				  /* Suffix */
   2461      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   2462      ext_x2_vget_args /* Args */};
   2463 
   2464 /* A static operand information for vector_type func (vector_type)
   2465  * function registration. */
   2466 static CONSTEXPR const rvv_op_info all_v_vget_lmul2_x4_ops
   2467   = {lmul2_ops,				  /* Types */
   2468      OP_TYPE_v,				  /* Suffix */
   2469      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   2470      ext_x4_vget_args /* Args */};
   2471 
   2472 /* A static operand information for vector_type func (vector_type)
   2473  * function registration. */
   2474 static CONSTEXPR const rvv_op_info all_v_vget_lmul4_x2_ops
   2475   = {lmul4_ops,				  /* Types */
   2476      OP_TYPE_v,				  /* Suffix */
   2477      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   2478      ext_x2_vget_args /* Args */};
   2479 
   2480 /* A static operand information for size_t func () function registration. */
   2481 static CONSTEXPR const rvv_op_info p_none_void_ops
   2482   = {none_ops,				/* Types */
   2483      OP_TYPE_none,			/* Suffix */
   2484      rvv_arg_type_info (RVV_BASE_size), /* Return type */
   2485      void_args /* Args */};
   2486 
   2487 /* A static operand information for unsigned long func () function registration. */
   2488 static CONSTEXPR const rvv_op_info ul_none_void_ops
   2489   = {none_ops,				/* Types */
   2490      OP_TYPE_none,			/* Suffix */
   2491      rvv_arg_type_info (RVV_BASE_unsigned_long), /* Return type */
   2492      void_args /* Args */};
   2493 
   2494 /* A static operand information for vector_type func (vector_type)
   2495  * function registration. */
   2496 static CONSTEXPR const rvv_op_info all_v_vset_tuple_ops
   2497   = {tuple_ops,				  /* Types */
   2498      OP_TYPE_v,				  /* Suffix */
   2499      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   2500      tuple_vset_args /* Args */};
   2501 
   2502 /* A static operand information for vector_type func (vector_type)
   2503  * function registration. */
   2504 static CONSTEXPR const rvv_op_info all_v_vget_tuple_ops
   2505   = {tuple_ops,					 /* Types */
   2506      OP_TYPE_v,					 /* Suffix */
   2507      rvv_arg_type_info (RVV_BASE_tuple_subpart), /* Return type */
   2508      v_size_args /* Args */};
   2509 
   2510 /* A static operand information for vector_type func (const scalar_type *)
   2511  * function registration. */
   2512 static CONSTEXPR const rvv_op_info tuple_v_scalar_const_ptr_ops
   2513   = {tuple_ops,				  /* Types */
   2514      OP_TYPE_v,				  /* Suffix */
   2515      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   2516      scalar_const_ptr_args /* Args */};
   2517 
   2518 /* A static operand information for void func (scalar_type *, vector_type)
   2519  * function registration. */
   2520 static CONSTEXPR const rvv_op_info tuple_v_scalar_ptr_ops
   2521   = {tuple_ops,				/* Types */
   2522      OP_TYPE_v,				/* Suffix */
   2523      rvv_arg_type_info (RVV_BASE_void), /* Return type */
   2524      scalar_ptr_args /* Args */};
   2525 
   2526 /* A static operand information for vector_type func (const scalar_type *,
   2527  * ptrdiff_t) function registration. */
   2528 static CONSTEXPR const rvv_op_info tuple_v_scalar_const_ptr_ptrdiff_ops
   2529   = {tuple_ops,				  /* Types */
   2530      OP_TYPE_v,				  /* Suffix */
   2531      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   2532      scalar_const_ptr_ptrdiff_args /* Args */};
   2533 
   2534 /* A static operand information for void func (scalar_type *, ptrdiff_t,
   2535  * vector_type) function registration. */
   2536 static CONSTEXPR const rvv_op_info tuple_v_scalar_ptr_ptrdiff_ops
   2537   = {tuple_ops,				/* Types */
   2538      OP_TYPE_v,				/* Suffix */
   2539      rvv_arg_type_info (RVV_BASE_void), /* Return type */
   2540      scalar_ptr_ptrdiff_args /* Args */};
   2541 
   2542 /* A static operand information for vector_type func (const scalar_type *,
   2543  * eew8_index_type) function registration. */
   2544 static CONSTEXPR const rvv_op_info tuple_v_scalar_const_ptr_eew8_index_ops
   2545   = {tuple_ops,				  /* Types */
   2546      OP_TYPE_v,				  /* Suffix */
   2547      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   2548      scalar_const_ptr_eew8_index_args /* Args */};
   2549 
   2550 /* A static operand information for vector_type func (const scalar_type *,
   2551  * eew16_index_type) function registration. */
   2552 static CONSTEXPR const rvv_op_info tuple_v_scalar_const_ptr_eew16_index_ops
   2553   = {tuple_ops,				  /* Types */
   2554      OP_TYPE_v,				  /* Suffix */
   2555      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   2556      scalar_const_ptr_eew16_index_args /* Args */};
   2557 
   2558 /* A static operand information for vector_type func (const scalar_type *,
   2559  * eew32_index_type) function registration. */
   2560 static CONSTEXPR const rvv_op_info tuple_v_scalar_const_ptr_eew32_index_ops
   2561   = {tuple_ops,				  /* Types */
   2562      OP_TYPE_v,				  /* Suffix */
   2563      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   2564      scalar_const_ptr_eew32_index_args /* Args */};
   2565 
   2566 /* A static operand information for vector_type func (const scalar_type *,
   2567  * eew64_index_type) function registration. */
   2568 static CONSTEXPR const rvv_op_info tuple_v_scalar_const_ptr_eew64_index_ops
   2569   = {tuple_ops,				  /* Types */
   2570      OP_TYPE_v,				  /* Suffix */
   2571      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   2572      scalar_const_ptr_eew64_index_args /* Args */};
   2573 
   2574 /* A static operand information for void func (scalar_type *, eew8_index_type,
   2575  * vector_type) function registration. */
   2576 static CONSTEXPR const rvv_op_info tuple_v_scalar_ptr_eew8_index_ops
   2577   = {tuple_ops,				/* Types */
   2578      OP_TYPE_v,				/* Suffix */
   2579      rvv_arg_type_info (RVV_BASE_void), /* Return type */
   2580      scalar_ptr_eew8_index_args /* Args */};
   2581 
   2582 /* A static operand information for void func (scalar_type *, eew16_index_type,
   2583  * vector_type) function registration. */
   2584 static CONSTEXPR const rvv_op_info tuple_v_scalar_ptr_eew16_index_ops
   2585   = {tuple_ops,				/* Types */
   2586      OP_TYPE_v,				/* Suffix */
   2587      rvv_arg_type_info (RVV_BASE_void), /* Return type */
   2588      scalar_ptr_eew16_index_args /* Args */};
   2589 
   2590 /* A static operand information for void func (scalar_type *, eew32_index_type,
   2591  * vector_type) function registration. */
   2592 static CONSTEXPR const rvv_op_info tuple_v_scalar_ptr_eew32_index_ops
   2593   = {tuple_ops,				/* Types */
   2594      OP_TYPE_v,				/* Suffix */
   2595      rvv_arg_type_info (RVV_BASE_void), /* Return type */
   2596      scalar_ptr_eew32_index_args /* Args */};
   2597 
   2598 /* A static operand information for void func (scalar_type *, eew64_index_type,
   2599  * vector_type) function registration. */
   2600 static CONSTEXPR const rvv_op_info tuple_v_scalar_ptr_eew64_index_ops
   2601   = {tuple_ops,				/* Types */
   2602      OP_TYPE_v,				/* Suffix */
   2603      rvv_arg_type_info (RVV_BASE_void), /* Return type */
   2604      scalar_ptr_eew64_index_args /* Args */};
   2605 
   2606 /* A static operand information for vector_type func (const scalar_type *)
   2607  * function registration. */
   2608 static CONSTEXPR const rvv_op_info tuple_v_scalar_const_ptr_size_ptr_ops
   2609   = {tuple_ops,				  /* Types */
   2610      OP_TYPE_v,				  /* Suffix */
   2611      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   2612      scalar_const_ptr_size_ptr_args /* Args */};
   2613 
   2614 /* A static operand information for vector_type func (vector_type)
   2615  * function registration. */
   2616 static CONSTEXPR const rvv_op_info all_v_vcreate_tuple_ops
   2617   = {tuple_ops,				  /* Types */
   2618      OP_TYPE_v,				  /* Suffix */
   2619      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   2620      tuple_vcreate_args /* Args */};
   2621 
   2622 /* A static operand information for vector_type func () function registration.
   2623  */
   2624 static CONSTEXPR const rvv_op_info all_none_void_tuple_ops
   2625   = {tuple_ops,				  /* Types */
   2626      OP_TYPE_none,			  /* Suffix */
   2627      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   2628      void_args /* Args */};
   2629 
   2630 /* A static operand information for vector_type func (vector_type)
   2631  * function registration. */
   2632 static CONSTEXPR const rvv_op_info all_v_vcreate_lmul1_x2_ops
   2633   = {lmul1_ops,					/* Types */
   2634      OP_TYPE_v,					/* Suffix */
   2635      rvv_arg_type_info (RVV_BASE_vlmul_ext_x2), /* Return type */
   2636      ext_vcreate_args /* Args */};
   2637 
   2638 /* A static operand information for vector_type func (vector_type)
   2639  * function registration. */
   2640 static CONSTEXPR const rvv_op_info all_v_vcreate_lmul1_x4_ops
   2641   = {lmul1_ops,					/* Types */
   2642      OP_TYPE_v,					/* Suffix */
   2643      rvv_arg_type_info (RVV_BASE_vlmul_ext_x4), /* Return type */
   2644      ext_vcreate_args /* Args */};
   2645 
   2646 /* A static operand information for vector_type func (vector_type)
   2647  * function registration. */
   2648 static CONSTEXPR const rvv_op_info all_v_vcreate_lmul1_x8_ops
   2649   = {lmul1_ops,					/* Types */
   2650      OP_TYPE_v,					/* Suffix */
   2651      rvv_arg_type_info (RVV_BASE_vlmul_ext_x8), /* Return type */
   2652      ext_vcreate_args /* Args */};
   2653 
   2654 /* A static operand information for vector_type func (vector_type)
   2655  * function registration. */
   2656 static CONSTEXPR const rvv_op_info all_v_vcreate_lmul2_x2_ops
   2657   = {lmul2_ops,					/* Types */
   2658      OP_TYPE_v,					/* Suffix */
   2659      rvv_arg_type_info (RVV_BASE_vlmul_ext_x2), /* Return type */
   2660      ext_vcreate_args /* Args */};
   2661 
   2662 /* A static operand information for vector_type func (vector_type)
   2663  * function registration. */
   2664 static CONSTEXPR const rvv_op_info all_v_vcreate_lmul2_x4_ops
   2665   = {lmul2_ops,					/* Types */
   2666      OP_TYPE_v,					/* Suffix */
   2667      rvv_arg_type_info (RVV_BASE_vlmul_ext_x4), /* Return type */
   2668      ext_vcreate_args /* Args */};
   2669 
   2670 /* A static operand information for vector_type func (vector_type)
   2671  * function registration. */
   2672 static CONSTEXPR const rvv_op_info all_v_vcreate_lmul4_x2_ops
   2673   = {lmul4_ops,					/* Types */
   2674      OP_TYPE_v,					/* Suffix */
   2675      rvv_arg_type_info (RVV_BASE_vlmul_ext_x2), /* Return type */
   2676      ext_vcreate_args /* Args */};
   2677 
   2678 /* A static operand information for vector_type func (const scalar_type *,
   2679  * size_t) function registration.  */
   2680 static CONSTEXPR const rvv_op_info all_v_scalar_const_ptr_size_ops
   2681   = {all_ops,				  /* Types  */
   2682      OP_TYPE_v,				  /* Suffix  */
   2683      rvv_arg_type_info (RVV_BASE_vector), /* Return type  */
   2684      scalar_const_ptr_size_args /* Args */};
   2685 
   2686 /* A static operand information for void func (scalar_type *, size_t,
   2687  * vector_type) function registration.  */
   2688 static CONSTEXPR const rvv_op_info all_v_scalar_ptr_size_ops
   2689   = {all_ops,				/* Types  */
   2690      OP_TYPE_v,				/* Suffix  */
   2691      rvv_arg_type_info (RVV_BASE_void), /* Return type  */
   2692      scalar_ptr_size_args /* Args */};
   2693 
   2694 /* A static operand information for vector_type func (const scalar_type *,
   2695  * index_type) function registration.  */
   2696 static CONSTEXPR const rvv_op_info all_v_scalar_const_ptr_index_ops
   2697   = {all_ops,				  /* Types  */
   2698      OP_TYPE_v,				  /* Suffix  */
   2699      rvv_arg_type_info (RVV_BASE_vector), /* Return type  */
   2700      scalar_const_ptr_index_args /* Args */};
   2701 
   2702 /* A static operand information for void func (scalar_type *, index_type,
   2703  * vector_type) function registration.  */
   2704 static CONSTEXPR const rvv_op_info all_v_scalar_ptr_index_ops
   2705   = {all_ops,				/* Types  */
   2706      OP_TYPE_v,				/* Suffix  */
   2707      rvv_arg_type_info (RVV_BASE_void), /* Return type  */
   2708      scalar_ptr_index_args /* Args */};
   2709 
   2710 /* A static operand information for vector_type func (vector_type).
   2711    Some ins just supports SEW=32, such as crypto vectol Zvkg extension.
   2712  * function registration.  */
   2713 static CONSTEXPR const rvv_arg_type_info vs_lmul_x2_args[]
   2714   = {rvv_arg_type_info (RVV_BASE_vlmul_ext_x2),
   2715      rvv_arg_type_info (RVV_BASE_vector), rvv_arg_type_info_end};
   2716 
   2717 static CONSTEXPR const rvv_arg_type_info vs_lmul_x4_args[]
   2718   = {rvv_arg_type_info (RVV_BASE_vlmul_ext_x4),
   2719      rvv_arg_type_info (RVV_BASE_vector), rvv_arg_type_info_end};
   2720 
   2721 static CONSTEXPR const rvv_arg_type_info vs_lmul_x8_args[]
   2722   = {rvv_arg_type_info (RVV_BASE_vlmul_ext_x8),
   2723      rvv_arg_type_info (RVV_BASE_vector), rvv_arg_type_info_end};
   2724 
   2725 static CONSTEXPR const rvv_arg_type_info vs_lmul_x16_args[]
   2726   = {rvv_arg_type_info (RVV_BASE_vlmul_ext_x16),
   2727      rvv_arg_type_info (RVV_BASE_vector), rvv_arg_type_info_end};
   2728 
   2729 static CONSTEXPR const rvv_op_info u_vvv_crypto_sew32_ops
   2730   = {crypto_sew32_ops,			   /* Types */
   2731      OP_TYPE_vv,					   /* Suffix */
   2732      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   2733      vv_args /* Args */};
   2734 
   2735 static CONSTEXPR const rvv_op_info u_vvvv_crypto_sew32_ops
   2736   = {crypto_sew32_ops,			   /* Types */
   2737      OP_TYPE_vv,					   /* Suffix */
   2738      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   2739      vvv_args /* Args */};
   2740 
   2741 static CONSTEXPR const rvv_op_info u_vvv_size_crypto_sew32_ops
   2742   = {crypto_sew32_ops,			   /* Types */
   2743      OP_TYPE_vi,					   /* Suffix */
   2744      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   2745      vv_size_args /* Args */};
   2746 
   2747 static CONSTEXPR const rvv_op_info u_vv_size_crypto_sew32_ops
   2748   = {crypto_sew32_ops,			   /* Types */
   2749      OP_TYPE_vi,					   /* Suffix */
   2750      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   2751      v_size_args /* Args */};
   2752 
   2753 static CONSTEXPR const rvv_op_info u_vvs_crypto_sew32_ops
   2754   = {crypto_sew32_ops,			   /* Types */
   2755      OP_TYPE_vs,					   /* Suffix */
   2756      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   2757      vv_args /* Args */};
   2758 
   2759 static CONSTEXPR const rvv_op_info u_vvs_crypto_sew32_lmul_x2_ops
   2760   = {crypto_sew32_ops,			   /* Types */
   2761      OP_TYPE_vs,					   /* Suffix */
   2762      rvv_arg_type_info (RVV_BASE_vlmul_ext_x2), /* Return type */
   2763      vs_lmul_x2_args /* Args */};
   2764 
   2765 static CONSTEXPR const rvv_op_info u_vvs_crypto_sew32_lmul_x4_ops
   2766   = {crypto_sew32_ops,			   /* Types */
   2767      OP_TYPE_vs,					   /* Suffix */
   2768      rvv_arg_type_info (RVV_BASE_vlmul_ext_x4), /* Return type */
   2769      vs_lmul_x4_args /* Args */};
   2770 
   2771 static CONSTEXPR const rvv_op_info u_vvs_crypto_sew32_lmul_x8_ops
   2772   = {crypto_sew32_ops,			   /* Types */
   2773      OP_TYPE_vs,					   /* Suffix */
   2774      rvv_arg_type_info (RVV_BASE_vlmul_ext_x8), /* Return type */
   2775      vs_lmul_x8_args /* Args */};
   2776 
   2777 static CONSTEXPR const rvv_op_info u_vvs_crypto_sew32_lmul_x16_ops
   2778   = {crypto_sew32_ops,			   /* Types */
   2779      OP_TYPE_vs,					   /* Suffix */
   2780      rvv_arg_type_info (RVV_BASE_vlmul_ext_x16), /* Return type */
   2781      vs_lmul_x16_args /* Args */};
   2782 
   2783 /* A static operand information for vector_type func (vector_type).
   2784    Some ins just supports SEW=64, such as crypto vectol Zvbc extension
   2785    vclmul.vv, vclmul.vx.
   2786  * function registration.  */
   2787 static CONSTEXPR const rvv_op_info u_vvv_crypto_sew64_ops
   2788   = {crypto_sew64_ops,			   /* Types */
   2789      OP_TYPE_vv,					   /* Suffix */
   2790      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   2791      vv_args /* Args */};
   2792 
   2793 static CONSTEXPR const rvv_op_info u_vvx_crypto_sew64_ops
   2794   = {crypto_sew64_ops,			   /* Types */
   2795      OP_TYPE_vx,					   /* Suffix */
   2796      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   2797      vx_args /* Args */};
   2798 
   2799 static CONSTEXPR const rvv_op_info u_vvvv_crypto_sew64_ops
   2800   = {crypto_sew64_ops,			   /* Types */
   2801      OP_TYPE_vv,					   /* Suffix */
   2802      rvv_arg_type_info (RVV_BASE_vector), /* Return type */
   2803      vvv_args /* Args */};
   2804 
   2805 /* A list of all RVV base function types.  */
   2806 static CONSTEXPR const function_type_info function_types[] = {
   2807 #define DEF_RVV_TYPE_INDEX(                                                    \
   2808   VECTOR, MASK, SIGNED, UNSIGNED, EEW8_INDEX, EEW16_INDEX, EEW32_INDEX,        \
   2809   EEW64_INDEX, SHIFT, DOUBLE_TRUNC, QUAD_TRUNC, OCT_TRUNC,                     \
   2810   DOUBLE_TRUNC_SCALAR, DOUBLE_TRUNC_SIGNED, DOUBLE_TRUNC_UNSIGNED,             \
   2811   DOUBLE_TRUNC_UNSIGNED_SCALAR, DOUBLE_TRUNC_FLOAT, FLOAT, LMUL1, WLMUL1,      \
   2812   EEW8_INTERPRET, EEW16_INTERPRET, EEW32_INTERPRET, EEW64_INTERPRET,           \
   2813   BOOL1_INTERPRET, BOOL2_INTERPRET, BOOL4_INTERPRET, BOOL8_INTERPRET,          \
   2814   BOOL16_INTERPRET, BOOL32_INTERPRET, BOOL64_INTERPRET,                        \
   2815   SIGNED_EEW8_LMUL1_INTERPRET, SIGNED_EEW16_LMUL1_INTERPRET,                   \
   2816   SIGNED_EEW32_LMUL1_INTERPRET, SIGNED_EEW64_LMUL1_INTERPRET,                  \
   2817   UNSIGNED_EEW8_LMUL1_INTERPRET, UNSIGNED_EEW16_LMUL1_INTERPRET,               \
   2818   UNSIGNED_EEW32_LMUL1_INTERPRET, UNSIGNED_EEW64_LMUL1_INTERPRET,              \
   2819   X2_VLMUL_EXT, X4_VLMUL_EXT, X8_VLMUL_EXT, X16_VLMUL_EXT, X32_VLMUL_EXT,      \
   2820   X64_VLMUL_EXT, TUPLE_SUBPART)                                                \
   2821   {                                                                            \
   2822     VECTOR_TYPE_##VECTOR,                                                      \
   2823     VECTOR_TYPE_INVALID,                                                       \
   2824     VECTOR_TYPE_##MASK,                                                        \
   2825     VECTOR_TYPE_##SIGNED,                                                      \
   2826     VECTOR_TYPE_##UNSIGNED,                                                    \
   2827     VECTOR_TYPE_INVALID,                                                       \
   2828     VECTOR_TYPE_INVALID,                                                       \
   2829     VECTOR_TYPE_INVALID,                                                       \
   2830     VECTOR_TYPE_INVALID,                                                       \
   2831     VECTOR_TYPE_INVALID,                                                       \
   2832     VECTOR_TYPE_INVALID,                                                       \
   2833     VECTOR_TYPE_INVALID,                                                       \
   2834     VECTOR_TYPE_INVALID,                                                       \
   2835     VECTOR_TYPE_INVALID,                                                       \
   2836     VECTOR_TYPE_##EEW8_INDEX,                                                  \
   2837     VECTOR_TYPE_##EEW16_INDEX,                                                 \
   2838     VECTOR_TYPE_##EEW32_INDEX,                                                 \
   2839     VECTOR_TYPE_##EEW64_INDEX,                                                 \
   2840     VECTOR_TYPE_##SHIFT,                                                       \
   2841     VECTOR_TYPE_##DOUBLE_TRUNC,                                                \
   2842     VECTOR_TYPE_##QUAD_TRUNC,                                                  \
   2843     VECTOR_TYPE_##OCT_TRUNC,                                                   \
   2844     VECTOR_TYPE_##DOUBLE_TRUNC_SCALAR,                                         \
   2845     VECTOR_TYPE_##DOUBLE_TRUNC_SIGNED,                                         \
   2846     VECTOR_TYPE_##DOUBLE_TRUNC_UNSIGNED,                                       \
   2847     VECTOR_TYPE_##DOUBLE_TRUNC_UNSIGNED_SCALAR,                                \
   2848     VECTOR_TYPE_##DOUBLE_TRUNC_FLOAT,                                          \
   2849     VECTOR_TYPE_##FLOAT,                                                       \
   2850     VECTOR_TYPE_##LMUL1,                                                       \
   2851     VECTOR_TYPE_##WLMUL1,                                                      \
   2852     VECTOR_TYPE_##EEW8_INTERPRET,                                              \
   2853     VECTOR_TYPE_##EEW16_INTERPRET,                                             \
   2854     VECTOR_TYPE_##EEW32_INTERPRET,                                             \
   2855     VECTOR_TYPE_##EEW64_INTERPRET,                                             \
   2856     VECTOR_TYPE_##BOOL1_INTERPRET,                                             \
   2857     VECTOR_TYPE_##BOOL2_INTERPRET,                                             \
   2858     VECTOR_TYPE_##BOOL4_INTERPRET,                                             \
   2859     VECTOR_TYPE_##BOOL8_INTERPRET,                                             \
   2860     VECTOR_TYPE_##BOOL16_INTERPRET,                                            \
   2861     VECTOR_TYPE_##BOOL32_INTERPRET,                                            \
   2862     VECTOR_TYPE_##BOOL64_INTERPRET,                                            \
   2863     VECTOR_TYPE_##SIGNED_EEW8_LMUL1_INTERPRET,                                 \
   2864     VECTOR_TYPE_##SIGNED_EEW16_LMUL1_INTERPRET,                                \
   2865     VECTOR_TYPE_##SIGNED_EEW32_LMUL1_INTERPRET,                                \
   2866     VECTOR_TYPE_##SIGNED_EEW64_LMUL1_INTERPRET,                                \
   2867     VECTOR_TYPE_##UNSIGNED_EEW8_LMUL1_INTERPRET,                               \
   2868     VECTOR_TYPE_##UNSIGNED_EEW16_LMUL1_INTERPRET,                              \
   2869     VECTOR_TYPE_##UNSIGNED_EEW32_LMUL1_INTERPRET,                              \
   2870     VECTOR_TYPE_##UNSIGNED_EEW64_LMUL1_INTERPRET,                              \
   2871     VECTOR_TYPE_##X2_VLMUL_EXT,                                                \
   2872     VECTOR_TYPE_##X4_VLMUL_EXT,                                                \
   2873     VECTOR_TYPE_##X8_VLMUL_EXT,                                                \
   2874     VECTOR_TYPE_##X16_VLMUL_EXT,                                               \
   2875     VECTOR_TYPE_##X32_VLMUL_EXT,                                               \
   2876     VECTOR_TYPE_##X64_VLMUL_EXT,                                               \
   2877     VECTOR_TYPE_INVALID,                                                       \
   2878     VECTOR_TYPE_##TUPLE_SUBPART,                                               \
   2879   },
   2880 #include "riscv-vector-builtins.def"
   2881 }; // namespace riscv_vector
   2882 
   2883 /* A list of all RVV intrinsic functions.  */
   2884 static function_group_info function_groups[] = {
   2885 #define DEF_RVV_FUNCTION(NAME, SHAPE, PREDS, OPS_INFO)                         \
   2886   {#NAME, &bases::NAME, &shapes::SHAPE, PREDS, OPS_INFO, REQUIRED_EXTENSIONS},
   2887 #include "riscv-vector-builtins-functions.def"
   2888 #undef DEF_RVV_FUNCTION
   2889 #define DEF_RVV_FUNCTION(NAME, SHAPE, PREDS, OPS_INFO)                         \
   2890   {#NAME, &bases::NAME, &shapes::SHAPE, PREDS, OPS_INFO, REQUIRED_EXTENSIONS},
   2891 #include "thead-vector-builtins-functions.def"
   2892 };
   2893 
   2894 /* The RVV types, with their built-in
   2895    "__rvv..._t" name.  Allow an index of NUM_VECTOR_TYPES, which always
   2896    yields a null tree.  */
   2897 static GTY (()) tree abi_vector_types[NUM_VECTOR_TYPES + 1];
   2898 
   2899 /* Same, but with the riscv_vector.h "v..._t" name.  */
   2900 extern GTY (()) rvv_builtin_types_t builtin_types[NUM_VECTOR_TYPES + 1];
   2901 rvv_builtin_types_t builtin_types[NUM_VECTOR_TYPES + 1];
   2902 
   2903 /* The list of all registered function decls, indexed by code.  */
   2904 static GTY (()) vec<registered_function *, va_gc> *registered_functions;
   2905 
   2906 /* All registered function decls, hashed on the function_instance
   2907    that they implement.  This is used for looking up implementations of
   2908    overloaded functions.  */
   2909 static hash_table<registered_function_hasher> *function_table;
   2910 
   2911 /* All registered function decls, hashed on overload_name and argument list
   2912    of the registered_function.  This is used for looking up implementations
   2913    of non-overloaded functions. */
   2914 static hash_table<non_overloaded_registered_function_hasher>
   2915   *non_overloaded_function_table;
   2916 
   2917 /* RAII class for enabling enough RVV features to define the built-in
   2918    types and implement the riscv_vector.h pragma.
   2919 
   2920    Note: According to 'TYPE_MODE' macro implementation, we need set
   2921    have_regs_of_mode[mode] to be true if we want to get the exact mode
   2922    from 'TYPE_MODE'. However, have_regs_of_mode has not been set yet in
   2923    targetm.init_builtins (). We need rvv_switcher to set have_regs_of_mode
   2924    before targetm.init_builtins () and recover back have_regs_of_mode
   2925    after targetm.init_builtins ().  */
   2926 class rvv_switcher
   2927 {
   2928 public:
   2929   rvv_switcher ();
   2930   ~rvv_switcher ();
   2931 
   2932 private:
   2933   bool m_old_have_regs_of_mode[MAX_MACHINE_MODE];
   2934 };
   2935 
   2936 rvv_switcher::rvv_switcher ()
   2937 {
   2938   /* Set have_regs_of_mode before targetm.init_builtins ().  */
   2939   memcpy (m_old_have_regs_of_mode, have_regs_of_mode,
   2940 	  sizeof (have_regs_of_mode));
   2941   for (int i = 0; i < NUM_MACHINE_MODES; ++i)
   2942     if (riscv_v_ext_vector_mode_p ((machine_mode) i))
   2943       have_regs_of_mode[i] = true;
   2944 }
   2945 
   2946 rvv_switcher::~rvv_switcher ()
   2947 {
   2948   /* Recover back have_regs_of_mode.  */
   2949   memcpy (have_regs_of_mode, m_old_have_regs_of_mode,
   2950 	  sizeof (have_regs_of_mode));
   2951 }
   2952 
   2953 /* Add attribute NAME to ATTRS.  */
   2954 static tree
   2955 add_attribute (const char *name, tree attrs)
   2956 {
   2957   return tree_cons (get_identifier (name), NULL_TREE, attrs);
   2958 }
   2959 
   2960 /* Add type attributes to builtin type tree, currently only the mangled name. */
   2961 static void
   2962 add_vector_type_attribute (tree type, const char *mangled_name)
   2963 {
   2964   tree mangled_name_tree = get_identifier (mangled_name);
   2965   tree value = tree_cons (NULL_TREE, mangled_name_tree, NULL_TREE);
   2966   TYPE_ATTRIBUTES (type)
   2967     = tree_cons (get_identifier ("RVV type"), value, TYPE_ATTRIBUTES (type));
   2968 }
   2969 
   2970 /* Force TYPE to be a sizeless type.  */
   2971 static void
   2972 make_type_sizeless (tree type)
   2973 {
   2974   TYPE_ATTRIBUTES (type) = tree_cons (get_identifier ("RVV sizeless type"),
   2975 				      NULL_TREE, TYPE_ATTRIBUTES (type));
   2976 }
   2977 
   2978 /* Return true if TYPE is a sizeless type.  */
   2979 static bool
   2980 sizeless_type_p (const_tree type)
   2981 {
   2982   if (type == error_mark_node)
   2983     return NULL_TREE;
   2984   return lookup_attribute ("RVV sizeless type", TYPE_ATTRIBUTES (type));
   2985 }
   2986 
   2987 /* If TYPE is an ABI-defined RVV type, return its attribute descriptor,
   2988    otherwise return null.  */
   2989 tree
   2990 lookup_vector_type_attribute (const_tree type)
   2991 {
   2992   if (type == error_mark_node)
   2993     return NULL_TREE;
   2994   return lookup_attribute ("RVV type", TYPE_ATTRIBUTES (type));
   2995 }
   2996 
   2997 /* Return a representation of "const T *".  */
   2998 static tree
   2999 build_const_pointer (tree t)
   3000 {
   3001   return build_pointer_type (build_qualified_type (t, TYPE_QUAL_CONST));
   3002 }
   3003 
   3004 /* Helper function for register a single built-in RVV ABI type.  */
   3005 static void
   3006 register_builtin_type (vector_type_index type, tree eltype, machine_mode mode)
   3007 {
   3008   builtin_types[type].scalar = eltype;
   3009   builtin_types[type].scalar_ptr = build_pointer_type (eltype);
   3010   builtin_types[type].scalar_const_ptr = build_const_pointer (eltype);
   3011   /* TODO: We currently just skip the register of the illegal RVV type.
   3012      Ideally, we should report error message more friendly instead of
   3013      reporting "unknown" type. Support more friendly error message in
   3014      the future.  */
   3015   if (!riscv_v_ext_vector_mode_p (mode))
   3016     return;
   3017 
   3018   tree vectype = build_vector_type_for_mode (eltype, mode);
   3019   gcc_assert (VECTOR_MODE_P (TYPE_MODE (vectype)) && TYPE_MODE (vectype) == mode
   3020 	      && TYPE_MODE_RAW (vectype) == mode && TYPE_ALIGN (vectype) <= 128
   3021 	      && known_eq (tree_to_poly_uint64 (TYPE_SIZE (vectype)),
   3022 			   GET_MODE_BITSIZE (mode)));
   3023   vectype = build_distinct_type_copy (vectype);
   3024   gcc_assert (vectype == TYPE_MAIN_VARIANT (vectype));
   3025   SET_TYPE_STRUCTURAL_EQUALITY (vectype);
   3026   TYPE_ARTIFICIAL (vectype) = 1;
   3027   TYPE_INDIVISIBLE_P (vectype) = 1;
   3028   add_vector_type_attribute (vectype, vector_types[type].mangled_name);
   3029   make_type_sizeless (vectype);
   3030   abi_vector_types[type] = vectype;
   3031   lang_hooks.types.register_builtin_type (vectype, vector_types[type].abi_name);
   3032 }
   3033 
   3034 /* Register the tuple type that contains NUM_VECTORS vectors of type TYPE.  */
   3035 static void
   3036 register_tuple_type (vector_type_index type, vector_type_index subpart_type,
   3037 		     tree eltype, unsigned int nf)
   3038 {
   3039   /* TODO: We currently just skip the register of the illegal RVV type.
   3040     Ideally, we should report error message more friendly instead of
   3041     reporting "unknown" type. Support more friendly error message in
   3042     the future.  */
   3043   if (!abi_vector_types[subpart_type])
   3044     return;
   3045   tree tuple_type = lang_hooks.types.make_type (RECORD_TYPE);
   3046 
   3047   /* The contents of the type are opaque, so we can define them in any
   3048      way that maps to the correct ABI type.
   3049 
   3050      Here we choose to use the same layout as for riscv_vector.h, with
   3051      "__val":
   3052 
   3053 	struct vfooxN_t { vfoo_t __val[N]; };
   3054 
   3055      (It wouldn't be possible to write that directly in C or C++ for
   3056      sizeless types, but that's not a problem for this function.)
   3057 
   3058      Using arrays simplifies the handling of vget and vset for variable
   3059      arguments.  */
   3060   tree array_type = build_array_type_nelts (abi_vector_types[subpart_type], nf);
   3061   gcc_assert (array_type);
   3062   gcc_assert (VECTOR_MODE_P (TYPE_MODE (array_type))
   3063 	      && TYPE_MODE_RAW (array_type) == TYPE_MODE (array_type));
   3064 
   3065   tree field = build_decl (input_location, FIELD_DECL, get_identifier ("__val"),
   3066 			   array_type);
   3067   DECL_FIELD_CONTEXT (field) = tuple_type;
   3068   TYPE_FIELDS (tuple_type) = field;
   3069   add_vector_type_attribute (tuple_type, vector_types[type].mangled_name);
   3070   make_type_sizeless (tuple_type);
   3071   layout_type (tuple_type);
   3072   gcc_assert (VECTOR_MODE_P (TYPE_MODE (tuple_type))
   3073 	      && TYPE_MODE_RAW (tuple_type) == TYPE_MODE (tuple_type));
   3074 
   3075   tree decl
   3076     = build_decl (input_location, TYPE_DECL,
   3077 		  get_identifier (vector_types[type].abi_name), tuple_type);
   3078   TYPE_NAME (tuple_type) = decl;
   3079   TYPE_STUB_DECL (tuple_type) = decl;
   3080   lang_hooks.decls.pushdecl (decl);
   3081   /* ??? Undo the effect of set_underlying_type for C.  The C frontend
   3082      doesn't recognize DECL as a built-in because (as intended) the decl has
   3083      a real location instead of BUILTINS_LOCATION.  The frontend therefore
   3084      treats the decl like a normal C "typedef struct foo foo;", expecting
   3085      the type for tag "struct foo" to have a dummy unnamed TYPE_DECL instead
   3086      of the named one we attached above.  It then sets DECL_ORIGINAL_TYPE
   3087      on the supposedly unnamed decl, creating a circularity that upsets
   3088      dwarf2out.
   3089 
   3090      We don't want to follow the normal C model and create "struct foo"
   3091      tags for tuple types since (a) the types are supposed to be opaque
   3092      and (b) they couldn't be defined as a real struct anyway.  Treating
   3093      the TYPE_DECLs as "typedef struct foo foo;" without creating
   3094      "struct foo" would lead to confusing error messages.  */
   3095   DECL_ORIGINAL_TYPE (decl) = NULL_TREE;
   3096 
   3097   builtin_types[type].scalar = eltype;
   3098   builtin_types[type].scalar_ptr = build_pointer_type (eltype);
   3099   builtin_types[type].scalar_const_ptr = build_const_pointer (eltype);
   3100   abi_vector_types[type] = tuple_type;
   3101 }
   3102 
   3103 /* Register the built-in RVV ABI types, such as __rvv_int32m1_t.  */
   3104 static void
   3105 register_builtin_types ()
   3106 {
   3107   /* Get type node from get_typenode_from_name to prevent we have different type
   3108      node define in different target libraries, e.g. int32_t defined as
   3109      `long` in RV32/newlib-stdint, but `int` for RV32/glibc-stdint.h.
   3110      NOTE: uint[16|32|64]_type_node already defined in tree.h.  */
   3111   tree int8_type_node = get_typenode_from_name (INT8_TYPE);
   3112   tree uint8_type_node = get_typenode_from_name (UINT8_TYPE);
   3113   tree int16_type_node = get_typenode_from_name (INT16_TYPE);
   3114   tree int32_type_node = get_typenode_from_name (INT32_TYPE);
   3115   tree int64_type_node = get_typenode_from_name (INT64_TYPE);
   3116 
   3117   machine_mode mode;
   3118 #define DEF_RVV_TYPE(NAME, NCHARS, ABI_NAME, SCALAR_TYPE, VECTOR_MODE,         \
   3119 		     ARGS...)                                                  \
   3120   mode = VECTOR_MODE##mode;                                                    \
   3121   register_builtin_type (VECTOR_TYPE_##NAME, SCALAR_TYPE##_type_node, mode);
   3122 #define DEF_RVV_TUPLE_TYPE(NAME, NCHARS, ABI_NAME, SUBPART_TYPE, SCALAR_TYPE,  \
   3123 			   NF, VECTOR_SUFFIX)                                  \
   3124   register_tuple_type (VECTOR_TYPE_##NAME, VECTOR_TYPE_##SUBPART_TYPE,         \
   3125 		       SCALAR_TYPE##_type_node, NF);
   3126 #include "riscv-vector-builtins.def"
   3127 }
   3128 
   3129 /* Similar as register_builtin_types but perform the registration if and
   3130    only if the element of abi_vector_type is NULL_TREE.  */
   3131 static void
   3132 register_builtin_types_on_null ()
   3133 {
   3134   /* Get type node from get_typenode_from_name to prevent we have different type
   3135      node define in different target libraries, e.g. int32_t defined as
   3136      `long` in RV32/newlib-stdint, but `int` for RV32/glibc-stdint.h.
   3137      NOTE: uint[16|32|64]_type_node already defined in tree.h.  */
   3138   tree int8_type_node = get_typenode_from_name (INT8_TYPE);
   3139   tree uint8_type_node = get_typenode_from_name (UINT8_TYPE);
   3140   tree int16_type_node = get_typenode_from_name (INT16_TYPE);
   3141   tree int32_type_node = get_typenode_from_name (INT32_TYPE);
   3142   tree int64_type_node = get_typenode_from_name (INT64_TYPE);
   3143 
   3144   machine_mode mode;
   3145 #define DEF_RVV_TYPE(NAME, NCHARS, ABI_NAME, SCALAR_TYPE, VECTOR_MODE,         \
   3146 		     ARGS...)                                                  \
   3147   mode = VECTOR_MODE##mode;                                                    \
   3148   if (abi_vector_types[VECTOR_TYPE_##NAME] == NULL_TREE)                       \
   3149     register_builtin_type (VECTOR_TYPE_##NAME, SCALAR_TYPE##_type_node, mode);
   3150 
   3151 #define DEF_RVV_TUPLE_TYPE(NAME, NCHARS, ABI_NAME, SUBPART_TYPE, SCALAR_TYPE,  \
   3152 			   NF, VECTOR_SUFFIX)                                  \
   3153   if (abi_vector_types[VECTOR_TYPE_##NAME] == NULL_TREE)                       \
   3154     register_tuple_type (VECTOR_TYPE_##NAME, VECTOR_TYPE_##SUBPART_TYPE,       \
   3155 			 SCALAR_TYPE##_type_node, NF);
   3156 #include "riscv-vector-builtins.def"
   3157 }
   3158 
   3159 /* Register vector type TYPE under its risv_vector.h name.  */
   3160 static void
   3161 register_vector_type (vector_type_index type)
   3162 {
   3163   tree vectype = abi_vector_types[type];
   3164 
   3165   /* When vectype is NULL, the corresponding builtin type
   3166      is disabled according to '-march'.  */
   3167   /* TODO: We currently just skip the register of the illegal RVV type.
   3168      Ideally, we should report error message more friendly instead of
   3169      reporting "unknown" type. Support more friendly error message in
   3170      the future.  */
   3171   if (!vectype)
   3172     return;
   3173   tree id = get_identifier (vector_types[type].name);
   3174   tree decl = build_decl (input_location, TYPE_DECL, id, vectype);
   3175   decl = lang_hooks.decls.pushdecl (decl);
   3176 
   3177   /* Record the new RVV type if pushdecl succeeded without error.  Use
   3178      the ABI type otherwise, so that the type we record at least has the
   3179      right form, even if it doesn't have the right name.  This should give
   3180      better error recovery behavior than installing error_mark_node or
   3181      installing an incorrect type.  */
   3182   if (decl && TREE_CODE (decl) == TYPE_DECL
   3183       && TREE_TYPE (decl) != error_mark_node
   3184       && TYPE_MAIN_VARIANT (TREE_TYPE (decl)) == vectype)
   3185     vectype = TREE_TYPE (decl);
   3186 
   3187   builtin_types[type].vector = vectype;
   3188   builtin_types[type].vector_ptr = build_pointer_type (vectype);
   3189 }
   3190 
   3191 /* Return true if the type has required_extensions.  */
   3192 static bool
   3193 required_extensions_p (enum rvv_base_type type)
   3194 {
   3195   switch (type)
   3196     {
   3197       case RVV_BASE_eew8_index:
   3198       case RVV_BASE_eew16_index:
   3199       case RVV_BASE_eew32_index:
   3200       case RVV_BASE_eew64_index:
   3201       case RVV_BASE_float_vector:
   3202       case RVV_BASE_double_trunc_float_vector:
   3203       case RVV_BASE_double_trunc_vector:
   3204       case RVV_BASE_widen_lmul1_vector:
   3205       case RVV_BASE_eew8_interpret:
   3206       case RVV_BASE_eew16_interpret:
   3207       case RVV_BASE_eew32_interpret:
   3208       case RVV_BASE_eew64_interpret:
   3209       case RVV_BASE_bool1_interpret:
   3210       case RVV_BASE_bool2_interpret:
   3211       case RVV_BASE_bool4_interpret:
   3212       case RVV_BASE_bool8_interpret:
   3213       case RVV_BASE_bool16_interpret:
   3214       case RVV_BASE_bool32_interpret:
   3215       case RVV_BASE_bool64_interpret:
   3216       case RVV_BASE_signed_eew8_lmul1_interpret:
   3217       case RVV_BASE_signed_eew16_lmul1_interpret:
   3218       case RVV_BASE_signed_eew32_lmul1_interpret:
   3219       case RVV_BASE_signed_eew64_lmul1_interpret:
   3220       case RVV_BASE_unsigned_eew8_lmul1_interpret:
   3221       case RVV_BASE_unsigned_eew16_lmul1_interpret:
   3222       case RVV_BASE_unsigned_eew32_lmul1_interpret:
   3223       case RVV_BASE_unsigned_eew64_lmul1_interpret:
   3224       case RVV_BASE_vlmul_ext_x2:
   3225       case RVV_BASE_vlmul_ext_x4:
   3226       case RVV_BASE_vlmul_ext_x8:
   3227       case RVV_BASE_vlmul_ext_x16:
   3228       case RVV_BASE_vlmul_ext_x32:
   3229       case RVV_BASE_vlmul_ext_x64:
   3230 	return true;
   3231       default:
   3232 	return false;
   3233     }
   3234 
   3235   gcc_unreachable ();
   3236 }
   3237 
   3238 static uint64_t
   3239 get_required_extensions (vector_type_index type_idx)
   3240 {
   3241   for (unsigned int i = 0; all_ops[i].index != NUM_VECTOR_TYPES; i++)
   3242     if (type_idx == all_ops[i].index)
   3243       return all_ops[i].required_extensions;
   3244   for (unsigned int i = 0; b_ops[i].index != NUM_VECTOR_TYPES; i++)
   3245     if (type_idx == b_ops[i].index)
   3246       return b_ops[i].required_extensions;
   3247   gcc_unreachable ();
   3248 }
   3249 
   3250 /* Check whether all the RVV_REQUIRE_* values in REQUIRED_EXTENSIONS are
   3251    enabled.  */
   3252 static bool
   3253 check_required_extensions (const function_instance &instance)
   3254 {
   3255   rvv_type_info type_info = instance.type;
   3256   uint64_t required_extensions = type_info.required_extensions;
   3257   const rvv_op_info *op_info = instance.op_info;
   3258 
   3259   if (required_extensions_p (op_info->ret.base_type))
   3260     {
   3261       enum vector_type_index ret_type_idx
   3262 	= op_info->ret.get_function_type_index (type_info.index);
   3263       if (ret_type_idx == NUM_VECTOR_TYPES)
   3264 	return false;
   3265       required_extensions |= get_required_extensions (ret_type_idx);
   3266     }
   3267 
   3268   for (unsigned i = 0; op_info->args[i].base_type != NUM_BASE_TYPES; ++i)
   3269     {
   3270       if (!required_extensions_p (op_info->args[i].base_type))
   3271 	continue;
   3272 
   3273       enum vector_type_index vector_type
   3274 	= op_info->args[i].get_function_type_index (type_info.index);
   3275       if (vector_type == NUM_VECTOR_TYPES)
   3276 	return false;
   3277       required_extensions |= get_required_extensions (vector_type);
   3278 
   3279       /* According to RVV ISA, EEW=64 index of indexed loads/stores require
   3280 	 XLEN = 64.  */
   3281       if (op_info->args[i].base_type == RVV_BASE_eew64_index)
   3282 	required_extensions |= RVV_REQUIRE_RV64BIT;
   3283     }
   3284 
   3285   uint64_t riscv_isa_flags = 0;
   3286 
   3287   if (TARGET_VECTOR_ELEN_FP_16)
   3288     riscv_isa_flags |= RVV_REQUIRE_ELEN_FP_16;
   3289   if (TARGET_VECTOR_ELEN_FP_32)
   3290     riscv_isa_flags |= RVV_REQUIRE_ELEN_FP_32;
   3291   if (TARGET_VECTOR_ELEN_FP_64)
   3292     riscv_isa_flags |= RVV_REQUIRE_ELEN_FP_64;
   3293   if (TARGET_VECTOR_ELEN_64)
   3294     riscv_isa_flags |= RVV_REQUIRE_ELEN_64;
   3295   if (TARGET_64BIT)
   3296     riscv_isa_flags |= RVV_REQUIRE_RV64BIT;
   3297   if (TARGET_FULL_V)
   3298     riscv_isa_flags |= RVV_REQUIRE_FULL_V;
   3299   if (TARGET_MIN_VLEN > 32)
   3300     riscv_isa_flags |= RVV_REQUIRE_MIN_VLEN_64;
   3301 
   3302   uint64_t missing_extensions = required_extensions & ~riscv_isa_flags;
   3303   if (missing_extensions != 0)
   3304     return false;
   3305   return true;
   3306 }
   3307 
   3308 /* Return true if predication is using a real mask operand.  */
   3309 static bool
   3310 use_real_mask_p (enum predication_type_index pred)
   3311 {
   3312   return pred == PRED_TYPE_m || pred == PRED_TYPE_tum || pred == PRED_TYPE_tumu
   3313 	 || pred == PRED_TYPE_mu;
   3314 }
   3315 
   3316 /* Return true if predication is using a real merge operand.  */
   3317 static bool
   3318 use_real_merge_p (enum predication_type_index pred)
   3319 {
   3320   return pred == PRED_TYPE_tu || pred == PRED_TYPE_tum || pred == PRED_TYPE_tumu
   3321 	 || pred == PRED_TYPE_mu;
   3322 }
   3323 
   3324 /* Get TAIL policy for predication. If predication indicates TU, return the TU.
   3325    Otherwise, return the prefer default configuration.  */
   3326 static rtx
   3327 get_tail_policy_for_pred (enum predication_type_index pred)
   3328 {
   3329   if (pred == PRED_TYPE_tu || pred == PRED_TYPE_tum || pred == PRED_TYPE_tumu)
   3330     return gen_int_mode (TAIL_UNDISTURBED, Pmode);
   3331   return gen_int_mode (get_prefer_tail_policy (), Pmode);
   3332 }
   3333 
   3334 /* Get MASK policy for predication. If predication indicates MU, return the MU.
   3335    Otherwise, return the prefer default configuration.  */
   3336 static rtx
   3337 get_mask_policy_for_pred (enum predication_type_index pred)
   3338 {
   3339   if (pred == PRED_TYPE_tumu || pred == PRED_TYPE_mu)
   3340     return gen_int_mode (MASK_UNDISTURBED, Pmode);
   3341   return gen_int_mode (get_prefer_mask_policy (), Pmode);
   3342 }
   3343 
   3344 tree
   3345 rvv_arg_type_info::get_scalar_ptr_type (vector_type_index type_idx) const
   3346 {
   3347   /* According to the latest rvv-intrinsic-doc, it defines vsm.v intrinsic:
   3348    __riscv_vsm (uint8_t *base, vbool1_t value, size_t vl).  */
   3349   if (type_idx >= VECTOR_TYPE_vbool64_t && type_idx <= VECTOR_TYPE_vbool1_t)
   3350     return builtin_types[VECTOR_TYPE_vuint8mf8_t].scalar_ptr;
   3351   else
   3352     return builtin_types[type_idx].scalar_ptr;
   3353 }
   3354 
   3355 tree
   3356 rvv_arg_type_info::get_scalar_const_ptr_type (vector_type_index type_idx) const
   3357 {
   3358   /* According to the latest rvv-intrinsic-doc, it defines vlm.v intrinsic:
   3359    __riscv_vlm_v_b1 (const uint8_t *base, size_t vl).  */
   3360   if (type_idx >= VECTOR_TYPE_vbool64_t && type_idx <= VECTOR_TYPE_vbool1_t)
   3361     return builtin_types[VECTOR_TYPE_vuint8mf8_t].scalar_const_ptr;
   3362   else
   3363     return builtin_types[type_idx].scalar_const_ptr;
   3364 }
   3365 
   3366 vector_type_index
   3367 rvv_arg_type_info::get_function_type_index (vector_type_index type_idx) const
   3368 {
   3369   tree type
   3370     = builtin_types[function_types[type_idx].type_indexes[base_type]].vector;
   3371   return type ? function_types[type_idx].type_indexes[base_type]
   3372 	      : NUM_VECTOR_TYPES;
   3373 }
   3374 
   3375 tree
   3376 rvv_arg_type_info::get_tree_type (vector_type_index type_idx) const
   3377 {
   3378   /* If the builtin type is not registered means '-march' doesn't
   3379      satisfy the require extension of the type. For example,
   3380      vfloat32m1_t require floating-point extension. In this case,
   3381      just return NULL_TREE.  */
   3382   if (type_idx != VECTOR_TYPE_INVALID && !builtin_types[type_idx].vector)
   3383     return NULL_TREE;
   3384 
   3385   switch (base_type)
   3386     {
   3387 #define DEF_RVV_BASE_TYPE(NAME, TYPE)                                          \
   3388   case RVV_BASE_##NAME:                                                        \
   3389     return TYPE;
   3390 #include "riscv-vector-builtins.def"
   3391     default:
   3392       gcc_unreachable ();
   3393     }
   3394   gcc_unreachable ();
   3395 }
   3396 
   3397 tree
   3398 rvv_arg_type_info::get_tuple_subpart_type (vector_type_index type_idx) const
   3399 {
   3400   switch (type_idx)
   3401     {
   3402 #define DEF_RVV_TUPLE_TYPE(NAME, NCHARS, ABI_NAME, SUBPART_TYPE, ARGS...)      \
   3403   case VECTOR_TYPE_##NAME:                                                     \
   3404     return builtin_types[VECTOR_TYPE_##SUBPART_TYPE].vector;
   3405 #include "riscv-vector-builtins.def"
   3406     default:
   3407       gcc_unreachable ();
   3408     }
   3409   gcc_unreachable ();
   3410 }
   3411 
   3412 function_instance::function_instance (const char *base_name_in,
   3413 				      const function_base *base_in,
   3414 				      const function_shape *shape_in,
   3415 				      rvv_type_info type_in,
   3416 				      predication_type_index pred_in,
   3417 				      const rvv_op_info *op_info_in)
   3418   : base_name (base_name_in), base (base_in), shape (shape_in), type (type_in),
   3419     pred (pred_in), op_info (op_info_in)
   3420 {
   3421 }
   3422 
   3423 bool
   3424 function_instance::operator== (const function_instance &other) const
   3425 {
   3426   for (unsigned int i = 0; op_info->args[i].base_type != NUM_BASE_TYPES; ++i)
   3427     if (op_info->args[i].base_type != other.op_info->args[i].base_type)
   3428       return false;
   3429   return (base == other.base && shape == other.shape
   3430 	  && type.index == other.type.index && op_info->op == other.op_info->op
   3431 	  && pred == other.pred
   3432 	  && op_info->ret.base_type == other.op_info->ret.base_type);
   3433 }
   3434 
   3435 bool
   3436 function_instance::any_type_float_p () const
   3437 {
   3438   if (FLOAT_MODE_P (TYPE_MODE (get_return_type ())))
   3439     return true;
   3440 
   3441   for (int i = 0; op_info->args[i].base_type != NUM_BASE_TYPES; ++i)
   3442     if (FLOAT_MODE_P (TYPE_MODE (get_arg_type (i))))
   3443       return true;
   3444 
   3445   return false;
   3446 }
   3447 
   3448 tree
   3449 function_instance::get_return_type () const
   3450 {
   3451   return op_info->ret.get_tree_type (type.index);
   3452 }
   3453 
   3454 tree
   3455 function_instance::get_arg_type (unsigned opno) const
   3456 {
   3457   return op_info->args[opno].get_tree_type (type.index);
   3458 }
   3459 
   3460 /* Return a hash code for a function_instance.  */
   3461 hashval_t
   3462 function_instance::hash () const
   3463 {
   3464   inchash::hash h;
   3465   /* BASE uniquely determines BASE_NAME, so we don't need to hash both.  */
   3466   h.add_ptr (base);
   3467   h.add_ptr (shape);
   3468   h.add_int (type.index);
   3469   h.add_int (op_info->op);
   3470   h.add_int (pred);
   3471   h.add_int (op_info->ret.base_type);
   3472   for (unsigned int i = 0; op_info->args[i].base_type != NUM_BASE_TYPES; ++i)
   3473     h.add_int (op_info->args[i].base_type);
   3474   return h.end ();
   3475 }
   3476 
   3477 /* Return a set of CP_* flags that describe what the function could do,
   3478    taking the command-line flags into account.  */
   3479 unsigned int
   3480 function_instance::call_properties () const
   3481 {
   3482   unsigned int flags = base->call_properties (*this);
   3483 
   3484   /* -fno-trapping-math means that we can assume any FP exceptions
   3485      are not user-visible.  */
   3486   if (!flag_trapping_math)
   3487     flags &= ~CP_RAISE_FP_EXCEPTIONS;
   3488 
   3489   return flags;
   3490 }
   3491 
   3492 /* Return true if calls to the function could read some form of
   3493    global state.  */
   3494 bool
   3495 function_instance::reads_global_state_p () const
   3496 {
   3497   unsigned int flags = call_properties ();
   3498 
   3499   /* Preserve any dependence on rounding mode, flush to zero mode, etc.
   3500      There is currently no way of turning this off; in particular,
   3501      -fno-rounding-math (which is the default) means that we should make
   3502      the usual assumptions about rounding mode, which for intrinsics means
   3503      acting as the instructions do.  */
   3504   if (flags & CP_READ_FPCR)
   3505     return true;
   3506 
   3507   /* Handle direct reads of global state.  */
   3508   return flags & (CP_READ_MEMORY | CP_READ_CSR);
   3509 }
   3510 
   3511 /* Return true if calls to the function could modify some form of
   3512    global state.  */
   3513 bool
   3514 function_instance::modifies_global_state_p () const
   3515 {
   3516   unsigned int flags = call_properties ();
   3517 
   3518   /* Preserve any exception state written back to the FPCR,
   3519      unless -fno-trapping-math says this is unnecessary.  */
   3520   if (flags & CP_RAISE_FP_EXCEPTIONS)
   3521     return true;
   3522 
   3523   /* Handle direct modifications of global state.  */
   3524   return flags & (CP_WRITE_MEMORY | CP_WRITE_CSR);
   3525 }
   3526 
   3527 /* Return true if calls to the function could raise a signal.  */
   3528 bool
   3529 function_instance::could_trap_p () const
   3530 {
   3531   unsigned int flags = call_properties ();
   3532 
   3533   /* Handle functions that could raise SIGFPE.  */
   3534   if (flags & CP_RAISE_FP_EXCEPTIONS)
   3535     return true;
   3536 
   3537   /* Handle functions that could raise SIGBUS or SIGSEGV.  */
   3538   if (flags & (CP_READ_MEMORY | CP_WRITE_MEMORY))
   3539     return true;
   3540 
   3541   return false;
   3542 }
   3543 
   3544 function_builder::function_builder ()
   3545 {
   3546   m_direct_overloads = lang_GNU_CXX ();
   3547   gcc_obstack_init (&m_string_obstack);
   3548 }
   3549 
   3550 function_builder::~function_builder ()
   3551 {
   3552   obstack_free (&m_string_obstack, NULL);
   3553 }
   3554 
   3555 /* Allocate arguments of the function.  */
   3556 void
   3557 function_builder::allocate_argument_types (const function_instance &instance,
   3558 					   vec<tree> &argument_types) const
   3559 {
   3560   for (unsigned int i = 0;
   3561        instance.op_info->args[i].base_type != NUM_BASE_TYPES; ++i)
   3562     argument_types.quick_push (
   3563       instance.op_info->args[i].get_tree_type (instance.type.index));
   3564 }
   3565 
   3566 /* Apply predication into argument_types.  */
   3567 void
   3568 function_builder::apply_predication (const function_instance &instance,
   3569 				     tree return_type,
   3570 				     vec<tree> &argument_types) const
   3571 {
   3572   /* These predication types need to apply merge type.  */
   3573   if (instance.base->has_merge_operand_p ())
   3574     if (instance.pred == PRED_TYPE_tu || instance.pred == PRED_TYPE_tum
   3575 	|| instance.pred == PRED_TYPE_tumu || instance.pred == PRED_TYPE_mu)
   3576       argument_types.quick_insert (0, return_type);
   3577 
   3578   /* These predication types need to apply mask type.  */
   3579   vector_type_index mask_type_index
   3580     = function_types[instance.type.index].type_indexes[RVV_BASE_mask];
   3581   tree mask_type = builtin_types[mask_type_index].vector;
   3582   if (instance.pred == PRED_TYPE_m || instance.pred == PRED_TYPE_tum
   3583       || instance.pred == PRED_TYPE_tumu || instance.pred == PRED_TYPE_mu)
   3584     argument_types.quick_insert (0, mask_type);
   3585 
   3586   /* check if rounding mode parameter need  */
   3587   if (instance.base->has_rounding_mode_operand_p ())
   3588     argument_types.quick_push (unsigned_type_node);
   3589 
   3590   /* check if vl parameter need  */
   3591   if (instance.base->apply_vl_p ())
   3592     argument_types.quick_push (size_type_node);
   3593 }
   3594 
   3595 /* Register all the functions in GROUP.  */
   3596 void
   3597 function_builder::register_function_group (const function_group_info &group)
   3598 {
   3599   (*group.shape)->build (*this, group);
   3600 }
   3601 
   3602 /* Add NAME to the end of the function name being built.  */
   3603 void
   3604 function_builder::append_name (const char *name)
   3605 {
   3606   obstack_grow (&m_string_obstack, name, strlen (name));
   3607 }
   3608 
   3609 /* Add "__riscv_" and "name".  */
   3610 void
   3611 function_builder::append_base_name (const char *name)
   3612 {
   3613   append_name ("__riscv_");
   3614   append_name (name);
   3615 }
   3616 
   3617 /* Add SEW into function name.  */
   3618 void
   3619 function_builder::append_sew (int sew)
   3620 {
   3621   switch (sew)
   3622     {
   3623     case 8:
   3624       append_name ("8");
   3625       break;
   3626     case 16:
   3627       append_name ("16");
   3628       break;
   3629     case 32:
   3630       append_name ("32");
   3631       break;
   3632     case 64:
   3633       append_name ("64");
   3634       break;
   3635     default:
   3636       gcc_unreachable ();
   3637     }
   3638 }
   3639 
   3640 /* Add NF into function name.  */
   3641 void
   3642 function_builder::append_nf (int nf)
   3643 {
   3644   switch (nf)
   3645     {
   3646     case 2:
   3647       append_name ("2");
   3648       break;
   3649     case 3:
   3650       append_name ("3");
   3651       break;
   3652     case 4:
   3653       append_name ("4");
   3654       break;
   3655     case 5:
   3656       append_name ("5");
   3657       break;
   3658     case 6:
   3659       append_name ("6");
   3660       break;
   3661     case 7:
   3662       append_name ("7");
   3663       break;
   3664     case 8:
   3665       append_name ("8");
   3666       break;
   3667     default:
   3668       gcc_unreachable ();
   3669     }
   3670 }
   3671 
   3672 /* Zero-terminate and complete the function name being built.  */
   3673 char *
   3674 function_builder::finish_name ()
   3675 {
   3676   obstack_1grow (&m_string_obstack, 0);
   3677   return (char *) obstack_finish (&m_string_obstack);
   3678 }
   3679 
   3680 /* Return the appropriate function attributes for INSTANCE.  */
   3681 tree
   3682 function_builder::get_attributes (const function_instance &instance)
   3683 {
   3684   tree attrs = NULL_TREE;
   3685 
   3686   if (!instance.modifies_global_state_p ())
   3687     {
   3688       if (instance.reads_global_state_p ())
   3689 	attrs = add_attribute ("pure", attrs);
   3690       else
   3691 	attrs = add_attribute ("const", attrs);
   3692     }
   3693 
   3694   if (!flag_non_call_exceptions || !instance.could_trap_p ())
   3695     attrs = add_attribute ("nothrow", attrs);
   3696 
   3697   return add_attribute ("leaf", attrs);
   3698 }
   3699 
   3700 /* Add a function called NAME with type FNTYPE and attributes ATTRS.
   3701    INSTANCE describes what the function does.  */
   3702 registered_function &
   3703 function_builder::add_function (const function_instance &instance,
   3704 				const char *name, tree fntype, tree attrs,
   3705 				bool placeholder_p, const char *overload_name,
   3706 				const vec<tree> &argument_types,
   3707 				enum required_ext required,
   3708 				bool overloaded_p = false)
   3709 {
   3710   unsigned int code = vec_safe_length (registered_functions);
   3711   code = (code << RISCV_BUILTIN_SHIFT) + RISCV_BUILTIN_VECTOR;
   3712 
   3713   /* We need to be able to generate placeholders to enusre that we have a
   3714      consistent numbering scheme for function codes between the C and C++
   3715      frontends, so that everything ties up in LTO.
   3716 
   3717      Currently, tree-streamer-in.c:unpack_ts_function_decl_value_fields
   3718      validates that tree nodes returned by TARGET_BUILTIN_DECL are non-NULL and
   3719      some node other than error_mark_node. This is a holdover from when builtin
   3720      decls were streamed by code rather than by value.
   3721 
   3722      Ultimately, we should be able to remove this validation of BUILT_IN_MD
   3723      nodes and remove the target hook. For now, however, we need to appease the
   3724      validation and return a non-NULL, non-error_mark_node node, so we
   3725      arbitrarily choose integer_zero_node.  */
   3726   tree decl = placeholder_p
   3727 		? integer_zero_node
   3728 		: simulate_builtin_function_decl (input_location, name, fntype,
   3729 						  code, NULL, attrs);
   3730 
   3731   registered_function &rfn = *ggc_alloc<registered_function> ();
   3732   rfn.instance = instance;
   3733   rfn.decl = decl;
   3734   rfn.overload_name = overload_name ? xstrdup (overload_name) : NULL;
   3735   rfn.argument_types = argument_types;
   3736   rfn.overloaded_p = overloaded_p;
   3737   rfn.required = required;
   3738   vec_safe_push (registered_functions, &rfn);
   3739 
   3740   return rfn;
   3741 }
   3742 
   3743 /* Add a built-in function for INSTANCE, with the argument types given
   3744    by ARGUMENT_TYPES and the return type given by RETURN_TYPE. NAME is
   3745    the "full" name for C function. OVERLOAD_NAME is the "short" name for
   3746    C++ overloaded function. OVERLOAD_NAME can be nullptr because some
   3747    instance doesn't have C++ overloaded function.  */
   3748 void
   3749 function_builder::add_unique_function (const function_instance &instance,
   3750 				       const function_shape *shape,
   3751 				       tree return_type,
   3752 				       vec<tree> &argument_types,
   3753 				       enum required_ext required)
   3754 {
   3755   /* Do not add this function if it is invalid.  */
   3756   if (!check_required_extensions (instance))
   3757     return;
   3758 
   3759   /* Also add the function under its overloaded alias, if we want
   3760      a separate decl for each instance of an overloaded function.  */
   3761   char *overload_name = shape->get_name (*this, instance, true);
   3762 
   3763   /* Add the function under its full (unique) name.  */
   3764   char *name = shape->get_name (*this, instance, false);
   3765   tree fntype
   3766     = build_function_type_array (return_type, argument_types.length (),
   3767 				 argument_types.address ());
   3768   tree attrs = get_attributes (instance);
   3769   registered_function &rfn
   3770     = add_function (instance, name, fntype, attrs, false, overload_name,
   3771 		    argument_types.copy (), required);
   3772 
   3773   /* Enter the function into the hash table.  */
   3774   hashval_t hash = instance.hash ();
   3775   registered_function **rfn_slot
   3776     = function_table->find_slot_with_hash (instance, hash, INSERT);
   3777   gcc_assert (!*rfn_slot);
   3778   *rfn_slot = &rfn;
   3779 
   3780   if (overload_name)
   3781     {
   3782       /* Attribute lists shouldn't be shared.  */
   3783       tree attrs = get_attributes (instance);
   3784       bool placeholder_p = !m_direct_overloads;
   3785       add_function (instance, overload_name, fntype, attrs, placeholder_p, NULL,
   3786 		    vNULL, required);
   3787 
   3788       /* Enter the function into the non-overloaded hash table.  */
   3789       hash = rfn.overloaded_hash ();
   3790       rfn_slot = non_overloaded_function_table->find_slot_with_hash (&rfn, hash,
   3791 								     INSERT);
   3792       gcc_assert (!*rfn_slot);
   3793       *rfn_slot = &rfn;
   3794     }
   3795   obstack_free (&m_string_obstack, name);
   3796 }
   3797 
   3798 /* Add overloaded function for gcc. */
   3799 void
   3800 function_builder::add_overloaded_function (const function_instance &instance,
   3801 					   const function_shape *shape,
   3802 					   enum required_ext required)
   3803 {
   3804   if (!check_required_extensions (instance))
   3805     return;
   3806 
   3807   char *name = shape->get_name (*this, instance, true);
   3808 
   3809   if (name)
   3810     {
   3811       /* To avoid API conflicting, take void return type and void argument
   3812 	 for the overloaded function.  */
   3813       tree fntype = build_function_type (void_type_node, void_list_node);
   3814       add_function (instance, name, fntype, NULL_TREE, m_direct_overloads, name,
   3815 		    vNULL, required, true);
   3816       obstack_free (&m_string_obstack, name);
   3817     }
   3818 }
   3819 
   3820 function_call_info::function_call_info (location_t location_in,
   3821 					const function_instance &instance_in,
   3822 					tree fndecl_in)
   3823   : function_instance (instance_in), location (location_in), fndecl (fndecl_in)
   3824 {}
   3825 
   3826 gimple_folder::gimple_folder (const function_instance &instance, tree fndecl,
   3827 			      gimple_stmt_iterator *gsi_in, gcall *call_in)
   3828   : function_call_info (gimple_location (call_in), instance, fndecl),
   3829     gsi (gsi_in), call (call_in), lhs (gimple_call_lhs (call_in))
   3830 {
   3831 }
   3832 
   3833 /* Try to fold the call.  Return the new statement on success and null
   3834    on failure.  */
   3835 gimple *
   3836 gimple_folder::fold ()
   3837 {
   3838   /* Don't fold anything when RVV is disabled; emit an error during
   3839      expansion instead.  */
   3840   if (!TARGET_VECTOR)
   3841     return NULL;
   3842 
   3843   /* Punt if the function has a return type and no result location is
   3844      provided.  The attributes should allow target-independent code to
   3845      remove the calls if appropriate.  */
   3846   if (!lhs && TREE_TYPE (gimple_call_fntype (call)) != void_type_node)
   3847     return NULL;
   3848 
   3849   return base->fold (*this);
   3850 }
   3851 
   3852 function_expander::function_expander (const function_instance &instance,
   3853 				      tree fndecl_in, tree exp_in,
   3854 				      rtx target_in)
   3855   : function_call_info (EXPR_LOCATION (exp_in), instance, fndecl_in),
   3856     exp (exp_in), target (target_in), opno (0)
   3857 {
   3858   if (!function_returns_void_p ())
   3859     {
   3860       if (target != NULL_RTX && MEM_P (target))
   3861 	/* Since there is no intrinsic where target is a mem operand, it
   3862 	   should be converted to reg if it is a mem operand.  */
   3863 	target = force_reg (GET_MODE (target), target);
   3864       create_output_operand (&m_ops[opno++], target,
   3865 			     TYPE_MODE (TREE_TYPE (exp)));
   3866     }
   3867 }
   3868 
   3869 /* Take argument ARGNO from EXP's argument list and convert it into
   3870    an expand operand.  Store the operand in *M_OPS.  */
   3871 void
   3872 function_expander::add_input_operand (unsigned argno)
   3873 {
   3874   tree arg = CALL_EXPR_ARG (exp, argno);
   3875   rtx x = expand_normal (arg);
   3876   add_input_operand (TYPE_MODE (TREE_TYPE (arg)), x);
   3877 }
   3878 
   3879 /* Since we may normalize vop/vop_tu/vop_m/vop_tumu.. into a single patter.
   3880    We add a undef for the intrinsics that don't need a real merge.  */
   3881 void
   3882 function_expander::add_vundef_operand (machine_mode mode)
   3883 {
   3884   add_input_operand (mode, RVV_VUNDEF (mode));
   3885 }
   3886 
   3887 /* Add a memory operand with mode MODE and address ADDR.  */
   3888 void
   3889 function_expander::add_mem_operand (machine_mode mode, unsigned argno)
   3890 {
   3891   gcc_assert (VECTOR_MODE_P (mode));
   3892   rtx addr = expand_normal (CALL_EXPR_ARG (exp, argno));
   3893   rtx mem = gen_rtx_MEM (mode, memory_address (mode, addr));
   3894   /* The memory is only guaranteed to be element-aligned.  */
   3895   set_mem_align (mem, GET_MODE_ALIGNMENT (GET_MODE_INNER (mode)));
   3896   add_fixed_operand (mem);
   3897 }
   3898 
   3899 /* Return the machine_mode of the corresponding mask type.  */
   3900 machine_mode
   3901 function_expander::mask_mode (void) const
   3902 {
   3903   vector_type_index mask_type_index
   3904     = function_types[type.index].type_indexes[RVV_BASE_mask];
   3905   return TYPE_MODE (builtin_types[mask_type_index].vector);
   3906 }
   3907 
   3908 /* Implement the call using instruction ICODE, with a 1:1 mapping between
   3909    arguments and input operands.  */
   3910 rtx
   3911 function_expander::use_exact_insn (insn_code icode)
   3912 {
   3913   machine_mode mode = TYPE_MODE (TREE_TYPE (exp));
   3914 
   3915   /* Record the offset to get the argument.  */
   3916   int arg_offset = 0;
   3917 
   3918   if (base->use_mask_predication_p ())
   3919     {
   3920       if (use_real_mask_p (pred))
   3921 	add_input_operand (arg_offset++);
   3922       else
   3923 	add_all_one_mask_operand (mask_mode ());
   3924     }
   3925 
   3926   /* Store operation doesn't have merge operand.  */
   3927   if (!function_returns_void_p () && base->has_merge_operand_p ())
   3928     {
   3929       if (use_real_merge_p (pred))
   3930 	add_input_operand (arg_offset++);
   3931       else
   3932 	add_vundef_operand (mode);
   3933     }
   3934 
   3935   for (int argno = arg_offset; argno < call_expr_nargs (exp); argno++)
   3936     {
   3937       if (base->has_rounding_mode_operand_p ()
   3938 	  && argno == call_expr_nargs (exp) - 2)
   3939 	{
   3940 	  /* Since the rounding mode argument position is not consistent with
   3941 	     the instruction pattern, we need to skip rounding mode argument
   3942 	     here.  */
   3943 	  continue;
   3944 	}
   3945       add_input_operand (argno);
   3946     }
   3947 
   3948   if (base->apply_tail_policy_p ())
   3949     add_input_operand (Pmode, get_tail_policy_for_pred (pred));
   3950   if (base->apply_mask_policy_p ())
   3951     add_input_operand (Pmode, get_mask_policy_for_pred (pred));
   3952 
   3953   if (base->apply_vl_p ())
   3954     add_input_operand (Pmode, get_avl_type_rtx (avl_type::NONVLMAX));
   3955 
   3956   if (base->has_rounding_mode_operand_p ())
   3957     add_input_operand (call_expr_nargs (exp) - 2);
   3958 
   3959   /* The RVV floating-point only support dynamic rounding mode in the
   3960      FRM register.  */
   3961   if (opno != insn_data[icode].n_generator_args)
   3962     add_input_operand (Pmode, gen_int_mode (riscv_vector::FRM_DYN, Pmode));
   3963 
   3964   return generate_insn (icode);
   3965 }
   3966 
   3967 /* Use contiguous load INSN.  */
   3968 rtx
   3969 function_expander::use_contiguous_load_insn (insn_code icode)
   3970 {
   3971   gcc_assert (call_expr_nargs (exp) > 0);
   3972   machine_mode mode = TYPE_MODE (TREE_TYPE (exp));
   3973 
   3974   /* Record the offset to get the argument.  */
   3975   int arg_offset = 0;
   3976 
   3977   if (use_real_mask_p (pred))
   3978     add_input_operand (arg_offset++);
   3979   else
   3980     add_all_one_mask_operand (mask_mode ());
   3981 
   3982   if (use_real_merge_p (pred))
   3983     add_input_operand (arg_offset++);
   3984   else
   3985     add_vundef_operand (mode);
   3986 
   3987   add_mem_operand (mode, arg_offset++);
   3988 
   3989   for (int argno = arg_offset; argno < call_expr_nargs (exp); argno++)
   3990     add_input_operand (argno);
   3991 
   3992   if (GET_MODE_CLASS (mode) != MODE_VECTOR_BOOL)
   3993     {
   3994       add_input_operand (Pmode, get_tail_policy_for_pred (pred));
   3995       add_input_operand (Pmode, get_mask_policy_for_pred (pred));
   3996     }
   3997 
   3998   if (opno != insn_data[icode].n_generator_args)
   3999     add_input_operand (Pmode, get_avl_type_rtx (avl_type::NONVLMAX));
   4000 
   4001   return generate_insn (icode);
   4002 }
   4003 
   4004 /* Use contiguous store INSN.  */
   4005 rtx
   4006 function_expander::use_contiguous_store_insn (insn_code icode)
   4007 {
   4008   gcc_assert (call_expr_nargs (exp) > 0);
   4009   machine_mode mode = TYPE_MODE (builtin_types[type.index].vector);
   4010 
   4011   /* Record the offset to get the argument.  */
   4012   int arg_offset = 0;
   4013 
   4014   add_mem_operand (mode, use_real_mask_p (pred) ? 1 : 0);
   4015 
   4016   if (use_real_mask_p (pred))
   4017     add_input_operand (arg_offset++);
   4018   else
   4019     add_all_one_mask_operand (mask_mode ());
   4020 
   4021   arg_offset++;
   4022   for (int argno = arg_offset; argno < call_expr_nargs (exp); argno++)
   4023     add_input_operand (argno);
   4024 
   4025   add_input_operand (Pmode, get_avl_type_rtx (avl_type::NONVLMAX));
   4026   return generate_insn (icode);
   4027 }
   4028 
   4029 /* Implement the call using instruction ICODE, with a 1:1 mapping between
   4030    arguments and input operands.  */
   4031 rtx
   4032 function_expander::use_compare_insn (rtx_code rcode, insn_code icode)
   4033 {
   4034   machine_mode mode = TYPE_MODE (builtin_types[type.index].vector);
   4035   machine_mode mask_mode = TYPE_MODE (TREE_TYPE (exp));
   4036 
   4037   /* Record the offset to get the argument.  */
   4038   int arg_offset = 0;
   4039 
   4040   if (use_real_mask_p (pred))
   4041     add_input_operand (arg_offset++);
   4042   else
   4043     add_all_one_mask_operand (mask_mode);
   4044 
   4045   if (use_real_merge_p (pred))
   4046     add_input_operand (arg_offset++);
   4047   else
   4048     add_vundef_operand (mask_mode);
   4049 
   4050   rtx op1 = expand_normal (CALL_EXPR_ARG (exp, arg_offset++));
   4051   rtx op2 = expand_normal (CALL_EXPR_ARG (exp, arg_offset++));
   4052   if (!insn_operand_matches (icode, opno + 1, op1))
   4053     op1 = force_reg (mode, op1);
   4054   if (!insn_operand_matches (icode, opno + 2, op2))
   4055     {
   4056       if (VECTOR_MODE_P (GET_MODE (op2)))
   4057 	op2 = force_reg (mode, op2);
   4058       else
   4059 	op2 = force_reg (GET_MODE_INNER (mode), op2);
   4060     }
   4061   rtx comparison = gen_rtx_fmt_ee (rcode, mask_mode, op1, op2);
   4062   if (!VECTOR_MODE_P (GET_MODE (op2)))
   4063     comparison = gen_rtx_fmt_ee (rcode, mask_mode, op1,
   4064 				 gen_rtx_VEC_DUPLICATE (mode, op2));
   4065   add_fixed_operand (comparison);
   4066   add_fixed_operand (op1);
   4067   if (CONST_INT_P (op2))
   4068     add_integer_operand (op2);
   4069   else
   4070     add_fixed_operand (op2);
   4071   for (int argno = arg_offset; argno < call_expr_nargs (exp); argno++)
   4072     add_input_operand (argno);
   4073 
   4074   add_input_operand (Pmode, get_mask_policy_for_pred (pred));
   4075   add_input_operand (Pmode, get_avl_type_rtx (avl_type::NONVLMAX));
   4076   return generate_insn (icode);
   4077 }
   4078 
   4079 /* Implement the call using instruction ICODE, with a 1:1 mapping between
   4080    arguments and input operands.  */
   4081 rtx
   4082 function_expander::use_ternop_insn (bool vd_accum_p, insn_code icode)
   4083 {
   4084   machine_mode mode = TYPE_MODE (builtin_types[type.index].vector);
   4085 
   4086   /* Record the offset to get the argument.  */
   4087   int arg_offset = 0;
   4088 
   4089   if (use_real_mask_p (pred))
   4090     add_input_operand (arg_offset++);
   4091   else
   4092     add_all_one_mask_operand (mask_mode ());
   4093 
   4094   rtx vd = expand_normal (CALL_EXPR_ARG (exp, arg_offset++));
   4095   rtx vs1 = expand_normal (CALL_EXPR_ARG (exp, arg_offset++));
   4096   rtx vs2 = expand_normal (CALL_EXPR_ARG (exp, arg_offset++));
   4097 
   4098   if (VECTOR_MODE_P (GET_MODE (vs1)))
   4099     {
   4100       if (!vd_accum_p)
   4101 	add_input_operand (mode, vd);
   4102       add_input_operand (mode, vs1);
   4103       add_input_operand (mode, vs2);
   4104       if (vd_accum_p)
   4105 	add_input_operand (mode, vd);
   4106       add_input_operand (mode, vd);
   4107     }
   4108   else
   4109     {
   4110       add_input_operand (GET_MODE_INNER (mode), vs1);
   4111       if (vd_accum_p)
   4112 	{
   4113 	  add_input_operand (mode, vs2);
   4114 	  add_input_operand (mode, vd);
   4115 	}
   4116       else
   4117 	{
   4118 	  add_input_operand (mode, vd);
   4119 	  add_input_operand (mode, vs2);
   4120 	}
   4121       add_input_operand (mode, vd);
   4122     }
   4123 
   4124   for (int argno = arg_offset; argno < call_expr_nargs (exp); argno++)
   4125     {
   4126       if (base->has_rounding_mode_operand_p ()
   4127 	  && argno == call_expr_nargs (exp) - 2)
   4128 	{
   4129 	  /* Since the rounding mode argument position is not consistent with
   4130 	     the instruction pattern, we need to skip rounding mode argument
   4131 	     here.  */
   4132 	  continue;
   4133 	}
   4134       add_input_operand (argno);
   4135     }
   4136 
   4137   add_input_operand (Pmode, get_tail_policy_for_pred (pred));
   4138   add_input_operand (Pmode, get_mask_policy_for_pred (pred));
   4139   add_input_operand (Pmode, get_avl_type_rtx (avl_type::NONVLMAX));
   4140 
   4141   if (base->has_rounding_mode_operand_p ())
   4142     add_input_operand (call_expr_nargs (exp) - 2);
   4143 
   4144   /* The RVV floating-point only support dynamic rounding mode in the
   4145      FRM register.  */
   4146   if (opno != insn_data[icode].n_generator_args)
   4147     add_input_operand (Pmode, gen_int_mode (riscv_vector::FRM_DYN, Pmode));
   4148 
   4149   return generate_insn (icode);
   4150 }
   4151 
   4152 /* Implement the call using instruction ICODE, with a 1:1 mapping between
   4153    arguments and input operands.  */
   4154 rtx
   4155 function_expander::use_widen_ternop_insn (insn_code icode)
   4156 {
   4157   /* Record the offset to get the argument.  */
   4158   int arg_offset = 0;
   4159 
   4160   if (use_real_mask_p (pred))
   4161     add_input_operand (arg_offset++);
   4162   else
   4163     add_all_one_mask_operand (mask_mode ());
   4164 
   4165   for (int argno = arg_offset; argno < call_expr_nargs (exp); argno++)
   4166     {
   4167       if (base->has_rounding_mode_operand_p ()
   4168 	  && argno == call_expr_nargs (exp) - 2)
   4169 	{
   4170 	  /* Since the rounding mode argument position is not consistent with
   4171 	     the instruction pattern, we need to skip rounding mode argument
   4172 	     here.  */
   4173 	  continue;
   4174 	}
   4175       add_input_operand (argno);
   4176     }
   4177 
   4178   add_input_operand (Pmode, get_tail_policy_for_pred (pred));
   4179   add_input_operand (Pmode, get_mask_policy_for_pred (pred));
   4180   add_input_operand (Pmode, get_avl_type_rtx (avl_type::NONVLMAX));
   4181 
   4182   if (base->has_rounding_mode_operand_p ())
   4183     add_input_operand (call_expr_nargs (exp) - 2);
   4184 
   4185   /* The RVV floating-point only support dynamic rounding mode in the
   4186      FRM register.  */
   4187   if (opno != insn_data[icode].n_generator_args)
   4188     add_input_operand (Pmode, gen_int_mode (riscv_vector::FRM_DYN, Pmode));
   4189 
   4190   return generate_insn (icode);
   4191 }
   4192 
   4193 /* Implement the call using instruction ICODE, with a 1:1 mapping between
   4194    arguments and input operands.  */
   4195 rtx
   4196 function_expander::use_scalar_move_insn (insn_code icode)
   4197 {
   4198   machine_mode mode = TYPE_MODE (TREE_TYPE (exp));
   4199 
   4200   /* Record the offset to get the argument.  */
   4201   int arg_offset = 0;
   4202   add_scalar_move_mask_operand (mask_mode ());
   4203 
   4204   if (use_real_merge_p (pred))
   4205     add_input_operand (arg_offset++);
   4206   else
   4207     add_vundef_operand (mode);
   4208 
   4209   for (int argno = arg_offset; argno < call_expr_nargs (exp); argno++)
   4210     add_input_operand (argno);
   4211 
   4212   add_input_operand (Pmode, get_tail_policy_for_pred (pred));
   4213   add_input_operand (Pmode, get_mask_policy_for_pred (pred));
   4214   add_input_operand (Pmode, get_avl_type_rtx (avl_type::NONVLMAX));
   4215   return generate_insn (icode);
   4216 }
   4217 
   4218 /* Generate instruction ICODE, given that its operands have already
   4219    been added to M_OPS.  Return the value of the first operand.  */
   4220 rtx
   4221 function_expander::generate_insn (insn_code icode)
   4222 {
   4223   gcc_assert (opno == insn_data[icode].n_generator_args);
   4224   if (!maybe_expand_insn (icode, opno, m_ops))
   4225     {
   4226       error ("invalid argument to built-in function");
   4227       return NULL_RTX;
   4228     }
   4229   return function_returns_void_p () ? const0_rtx : m_ops[0].value;
   4230 }
   4231 
   4232 function_checker::function_checker (location_t location,
   4233 				    const function_instance &instance,
   4234 				    tree fndecl, tree fntype,
   4235 				    unsigned int nargs, tree *args)
   4236   : function_call_info (location, instance, fndecl), m_fntype (fntype),
   4237     m_nargs (nargs), m_args (args)
   4238 {}
   4239 
   4240 /* Report that LOCATION has a call to FNDECL in which argument ARGNO
   4241    was not an integer constant expression.  ARGNO counts from zero.  */
   4242 void
   4243 function_checker::report_non_ice (unsigned int argno) const
   4244 {
   4245   error_at (location,
   4246 	    "argument %d of %qE must be an integer constant"
   4247 	    " expression",
   4248 	    argno + 1, fndecl);
   4249 }
   4250 
   4251 /* Report that LOCATION has a call to FNDECL in which argument ARGNO has
   4252    the value ACTUAL, whereas the function requires a value in the range
   4253    [MIN, MAX].  ARGNO counts from zero.  */
   4254 void
   4255 function_checker::report_out_of_range (unsigned int argno, HOST_WIDE_INT actual,
   4256 				       HOST_WIDE_INT min,
   4257 				       HOST_WIDE_INT max) const
   4258 {
   4259   error_at (location,
   4260 	    "passing %wd to argument %d of %qE, which expects"
   4261 	    " a value in the range [%wd, %wd]",
   4262 	    actual, argno + 1, fndecl, min, max);
   4263 }
   4264 
   4265 /* Report that LOCATION has a call to FNDECL in which argument ARGNO has
   4266    the value ACTUAL, whereas the function requires a value in the range
   4267    [MIN, MAX] or OR_VAL.  ARGNO counts from zero.  */
   4268 void
   4269 function_checker::report_out_of_range_and_not (unsigned int argno,
   4270 					       HOST_WIDE_INT actual,
   4271 					       HOST_WIDE_INT min,
   4272 					       HOST_WIDE_INT max,
   4273 					       HOST_WIDE_INT or_val) const
   4274 {
   4275   error_at (location,
   4276 	    "passing %wd to argument %d of %qE, which expects"
   4277 	    " a value in the range [%wd, %wd] or %wd",
   4278 	    actual, argno + 1, fndecl, min, max, or_val);
   4279 }
   4280 
   4281 
   4282 /* Check that argument ARGNO is an integer constant expression and
   4283    store its value in VALUE_OUT if so.  The caller should first
   4284    check that argument ARGNO exists.  */
   4285 bool
   4286 function_checker::require_immediate (unsigned int argno, HOST_WIDE_INT min,
   4287 				     HOST_WIDE_INT max) const
   4288 {
   4289   gcc_assert (argno < m_nargs);
   4290   tree arg = m_args[argno];
   4291 
   4292   /* The type and range are unsigned, so read the argument as an
   4293      unsigned rather than signed HWI.  */
   4294   if (!tree_fits_uhwi_p (arg))
   4295     {
   4296       report_non_ice (argno);
   4297       return false;
   4298     }
   4299   return require_immediate_range (argno, min, max);
   4300 }
   4301 
   4302 /* Check that argument REL_ARGNO is an integer constant expression in the
   4303    range [MIN, MAX].  REL_ARGNO counts from the end of the predication
   4304    arguments.  */
   4305 bool
   4306 function_checker::require_immediate_range (unsigned int argno,
   4307 					   HOST_WIDE_INT min,
   4308 					   HOST_WIDE_INT max) const
   4309 {
   4310   gcc_assert (argno < m_nargs);
   4311   tree arg = m_args[argno];
   4312   HOST_WIDE_INT actual = tree_to_uhwi (arg);
   4313 
   4314   if (!IN_RANGE (actual, min, max))
   4315     {
   4316       report_out_of_range (argno, actual, min, max);
   4317       return false;
   4318     }
   4319 
   4320   return true;
   4321 }
   4322 
   4323 /* Check that argument REL_ARGNO is an integer constant expression in the
   4324    range [MIN, MAX] or OR_VAL.  REL_ARGNO counts from the end of the
   4325    predication arguments.  */
   4326 bool
   4327 function_checker::require_immediate_range_or (unsigned int argno,
   4328 					      HOST_WIDE_INT min,
   4329 					      HOST_WIDE_INT max,
   4330 					      HOST_WIDE_INT or_val) const
   4331 {
   4332   gcc_assert (min >= 0 && min <= max);
   4333   gcc_assert (argno < m_nargs);
   4334 
   4335   tree arg = m_args[argno];
   4336   HOST_WIDE_INT actual = tree_to_uhwi (arg);
   4337 
   4338   if (!IN_RANGE (actual, min, max) && actual != or_val)
   4339     {
   4340       report_out_of_range_and_not (argno, actual, min, max, or_val);
   4341       return false;
   4342     }
   4343 
   4344   return true;
   4345 }
   4346 
   4347 /* Perform semantic checks on the call.  Return true if the call is valid,
   4348    otherwise report a suitable error.  */
   4349 bool
   4350 function_checker::check ()
   4351 {
   4352   return shape->check (*this);
   4353 }
   4354 
   4355 inline hashval_t
   4356 registered_function_hasher::hash (value_type value)
   4357 {
   4358   return value->instance.hash ();
   4359 }
   4360 
   4361 inline bool
   4362 registered_function_hasher::equal (value_type value, const compare_type &key)
   4363 {
   4364   return value->instance == key;
   4365 }
   4366 
   4367 hashval_t
   4368 registered_function::overloaded_hash () const
   4369 {
   4370   inchash::hash h;
   4371   tree type;
   4372   unsigned int unsigned_p, mode_p;
   4373   h.add (overload_name, strlen (overload_name));
   4374   for (unsigned int i = 0; i < argument_types.length (); i++)
   4375     {
   4376       type = argument_types[i];
   4377       unsigned_p = POINTER_TYPE_P (type) ? TYPE_UNSIGNED (TREE_TYPE (type))
   4378 					 : TYPE_UNSIGNED (type);
   4379       mode_p = POINTER_TYPE_P (type) ? TYPE_MODE (TREE_TYPE (type))
   4380 				     : TYPE_MODE (type);
   4381       if (POINTER_TYPE_P (type) || lookup_vector_type_attribute (type))
   4382 	{
   4383 	  h.add_int (unsigned_p);
   4384 	  h.add_int (mode_p);
   4385 	}
   4386       else if (instance.base->may_require_vxrm_p ()
   4387 	       || instance.base->may_require_frm_p ())
   4388 	{
   4389 	  h.add_int (argument_types.length ());
   4390 	  break;
   4391 	}
   4392     }
   4393 
   4394   return h.end ();
   4395 }
   4396 
   4397 hashval_t
   4398 registered_function::overloaded_hash (const vec<tree, va_gc> &arglist)
   4399 {
   4400   argument_types = vNULL;
   4401   unsigned int len = arglist.length ();
   4402 
   4403   for (unsigned int i = 0; i < len; i++)
   4404     argument_types.safe_push (TREE_TYPE (arglist[i]));
   4405 
   4406   return overloaded_hash ();
   4407 }
   4408 
   4409 inline hashval_t
   4410 non_overloaded_registered_function_hasher::hash (value_type value)
   4411 {
   4412   return value->overloaded_hash ();
   4413 }
   4414 
   4415 inline bool
   4416 non_overloaded_registered_function_hasher::equal (value_type value,
   4417 						  const compare_type &key)
   4418 {
   4419   return ((strcmp (value->overload_name, key->overload_name) == 0)
   4420 	  && value->overloaded_hash () == key->overloaded_hash ());
   4421 }
   4422 
   4423 /* If TYPE is a built-in type defined by the RVV ABI, return the mangled name,
   4424    otherwise return NULL.  */
   4425 const char *
   4426 mangle_builtin_type (const_tree type)
   4427 {
   4428   if (TYPE_NAME (type) && TREE_CODE (TYPE_NAME (type)) == TYPE_DECL)
   4429     type = TREE_TYPE (TYPE_NAME (type));
   4430   if (tree attr = lookup_vector_type_attribute (type))
   4431     if (tree id = TREE_VALUE (chain_index (0, TREE_VALUE (attr))))
   4432       return IDENTIFIER_POINTER (id);
   4433   return NULL;
   4434 }
   4435 
   4436 /* Return true if TYPE is a built-in RVV type defined by the ABI.  */
   4437 bool
   4438 builtin_type_p (const_tree type)
   4439 {
   4440   if (!type)
   4441     return false;
   4442 
   4443   return lookup_vector_type_attribute (type);
   4444 }
   4445 
   4446 /* Initialize all compiler built-ins related to RVV that should be
   4447    defined at start-up.  */
   4448 void
   4449 init_builtins ()
   4450 {
   4451   rvv_switcher rvv;
   4452   if (!TARGET_VECTOR)
   4453     return;
   4454   register_builtin_types ();
   4455   if (in_lto_p)
   4456     handle_pragma_vector ();
   4457 }
   4458 
   4459 /* Reinitialize builtins similar to init_builtins,  but only the null
   4460    builtin types will be registered.  */
   4461 void
   4462 reinit_builtins ()
   4463 {
   4464   rvv_switcher rvv;
   4465 
   4466   if (!TARGET_VECTOR)
   4467     return;
   4468 
   4469   register_builtin_types_on_null ();
   4470 
   4471   if (in_lto_p)
   4472     handle_pragma_vector ();
   4473 }
   4474 
   4475 /* Implement TARGET_VERIFY_TYPE_CONTEXT for RVV types.  */
   4476 bool
   4477 verify_type_context (location_t loc, type_context_kind context, const_tree type,
   4478 		     bool silent_p)
   4479 {
   4480   if (!sizeless_type_p (type))
   4481     return true;
   4482 
   4483   switch (context)
   4484     {
   4485     case TCTX_SIZEOF:
   4486     case TCTX_STATIC_STORAGE:
   4487       if (!silent_p)
   4488 	error_at (loc, "RVV type %qT does not have a fixed size", type);
   4489 
   4490       return false;
   4491 
   4492     case TCTX_ALIGNOF:
   4493       if (!silent_p)
   4494 	error_at (loc, "RVV type %qT does not have a defined alignment", type);
   4495 
   4496       return false;
   4497 
   4498     case TCTX_THREAD_STORAGE:
   4499       if (!silent_p)
   4500 	error_at (loc,
   4501 		  "variables of type %qT cannot have thread-local"
   4502 		  " storage duration",
   4503 		  type);
   4504 
   4505       return false;
   4506 
   4507     case TCTX_POINTER_ARITH:
   4508       if (!silent_p)
   4509 	error_at (loc, "arithmetic on pointer to RVV type %qT", type);
   4510 
   4511       return false;
   4512 
   4513     case TCTX_FIELD:
   4514       if (silent_p)
   4515 	;
   4516       else if (lang_GNU_CXX ())
   4517 	error_at (loc, "member variables cannot have RVV type %qT", type);
   4518       else
   4519 	error_at (loc, "fields cannot have RVV type %qT", type);
   4520 
   4521       return false;
   4522 
   4523     case TCTX_ARRAY_ELEMENT:
   4524       if (!silent_p)
   4525 	error_at (loc, "array elements cannot have RVV type %qT", type);
   4526 
   4527       return false;
   4528 
   4529     case TCTX_ALLOCATION:
   4530       if (!silent_p)
   4531 	error_at (loc, "cannot allocate objects with RVV type %qT", type);
   4532 
   4533       return false;
   4534 
   4535     case TCTX_DEALLOCATION:
   4536       if (!silent_p)
   4537 	error_at (loc, "cannot delete objects with RVV type %qT", type);
   4538 
   4539       return false;
   4540 
   4541     case TCTX_EXCEPTIONS:
   4542       if (!silent_p)
   4543 	error_at (loc, "cannot throw or catch RVV type %qT", type);
   4544 
   4545       return false;
   4546 
   4547     case TCTX_CAPTURE_BY_COPY:
   4548       if (!silent_p)
   4549 	error_at (loc, "capture by copy of RVV type %qT", type);
   4550 
   4551       return false;
   4552     }
   4553 
   4554   gcc_unreachable ();
   4555 }
   4556 
   4557 /* Register the vxrm enum.  */
   4558 static void
   4559 register_vxrm ()
   4560 {
   4561   auto_vec<string_int_pair, 4> values;
   4562 #define DEF_RVV_VXRM_ENUM(NAME, VALUE)                                          \
   4563   values.quick_push (string_int_pair ("__RISCV_VXRM_" #NAME, VALUE));
   4564 #include "riscv-vector-builtins.def"
   4565 #undef DEF_RVV_VXRM_ENUM
   4566 
   4567   lang_hooks.types.simulate_enum_decl (input_location, "__RISCV_VXRM", &values);
   4568 }
   4569 
   4570 /* Register the frm enum.  */
   4571 static void
   4572 register_frm ()
   4573 {
   4574   auto_vec<string_int_pair, 5> values;
   4575 #define DEF_RVV_FRM_ENUM(NAME, VALUE)                                          \
   4576   values.quick_push (string_int_pair ("__RISCV_FRM_" #NAME, VALUE));
   4577 #include "riscv-vector-builtins.def"
   4578 #undef DEF_RVV_FRM_ENUM
   4579 
   4580   lang_hooks.types.simulate_enum_decl (input_location, "__RISCV_FRM", &values);
   4581 }
   4582 
   4583 /* Implement #pragma riscv intrinsic vector.  */
   4584 void
   4585 handle_pragma_vector ()
   4586 {
   4587   if (function_table || non_overloaded_function_table)
   4588     {
   4589       error ("duplicate definition of %qs", "riscv_vector.h");
   4590       return;
   4591     }
   4592   rvv_switcher rvv;
   4593 
   4594   /* Define the vector and tuple types.  */
   4595   for (unsigned int type_i = 0; type_i < NUM_VECTOR_TYPES; ++type_i)
   4596     register_vector_type ((enum vector_type_index) type_i);
   4597 
   4598   /* Define the enums.  */
   4599   register_vxrm ();
   4600   register_frm ();
   4601 
   4602   /* Define the functions.  */
   4603   function_table = new hash_table<registered_function_hasher> (1023);
   4604   non_overloaded_function_table
   4605     = new hash_table<non_overloaded_registered_function_hasher> (1023);
   4606   function_builder builder;
   4607   for (unsigned int i = 0; i < ARRAY_SIZE (function_groups); ++i)
   4608   {
   4609     if (function_groups[i].match (function_groups[i].required_extensions))
   4610       builder.register_function_group (function_groups[i]);
   4611   }
   4612 }
   4613 
   4614 /* Return the function decl with RVV function subcode CODE, or error_mark_node
   4615    if no such function exists.  */
   4616 tree
   4617 builtin_decl (unsigned int code, bool)
   4618 {
   4619   if (code >= vec_safe_length (registered_functions))
   4620     return error_mark_node;
   4621 
   4622   return (*registered_functions)[code]->decl;
   4623 }
   4624 
   4625 /* Attempt to fold STMT, given that it's a call to the RVV function
   4626    with subcode CODE.  Return the new statement on success and null
   4627    on failure.  Insert any other new statements at GSI.  */
   4628 gimple *
   4629 gimple_fold_builtin (unsigned int code, gimple_stmt_iterator *gsi, gcall *stmt)
   4630 {
   4631   registered_function &rfn = *(*registered_functions)[code];
   4632   return gimple_folder (rfn.instance, rfn.decl, gsi, stmt).fold ();
   4633 }
   4634 
   4635 static bool
   4636 validate_instance_type_required_extensions (const rvv_type_info type,
   4637 					    tree exp)
   4638 {
   4639   uint64_t exts = type.required_extensions;
   4640 
   4641   if ((exts & RVV_REQUIRE_ELEN_FP_16) &&
   4642     !TARGET_VECTOR_ELEN_FP_16_P (riscv_vector_elen_flags))
   4643     {
   4644       error_at (EXPR_LOCATION (exp),
   4645 		"built-in function %qE requires the "
   4646 		"zvfhmin or zvfh ISA extension",
   4647 		exp);
   4648       return false;
   4649     }
   4650 
   4651   if ((exts & RVV_REQUIRE_ELEN_FP_32) &&
   4652     !TARGET_VECTOR_ELEN_FP_32_P (riscv_vector_elen_flags))
   4653     {
   4654       error_at (EXPR_LOCATION (exp),
   4655 		"built-in function %qE requires the "
   4656 		"zve32f, zve64f, zve64d or v ISA extension",
   4657 		exp);
   4658       return false;
   4659     }
   4660 
   4661   if ((exts & RVV_REQUIRE_ELEN_FP_64) &&
   4662     !TARGET_VECTOR_ELEN_FP_64_P (riscv_vector_elen_flags))
   4663     {
   4664       error_at (EXPR_LOCATION (exp),
   4665 		"built-in function %qE requires the zve64d or v ISA extension",
   4666 		exp);
   4667       return false;
   4668     }
   4669 
   4670   if ((exts & RVV_REQUIRE_ELEN_64) &&
   4671     !TARGET_VECTOR_ELEN_64_P (riscv_vector_elen_flags))
   4672     {
   4673       error_at (EXPR_LOCATION (exp),
   4674 		"built-in function %qE requires the "
   4675 		"zve64x, zve64f, zve64d or v ISA extension",
   4676 		exp);
   4677       return false;
   4678     }
   4679 
   4680   return true;
   4681 }
   4682 
   4683 /* Expand a call to the RVV function with subcode CODE.  EXP is the call
   4684    expression and TARGET is the preferred location for the result.
   4685    Return the value of the lhs.  */
   4686 rtx
   4687 expand_builtin (unsigned int code, tree exp, rtx target)
   4688 {
   4689   registered_function &rfn = *(*registered_functions)[code];
   4690 
   4691   if (!required_extensions_specified (rfn.required))
   4692     {
   4693       error_at (EXPR_LOCATION (exp),
   4694 		"built-in function %qE requires the %qs ISA extension",
   4695 		exp,
   4696 		reqired_ext_to_isa_name (rfn.required));
   4697       return target;
   4698     }
   4699 
   4700   if (!validate_instance_type_required_extensions (rfn.instance.type, exp))
   4701     return target;
   4702 
   4703   return function_expander (rfn.instance, rfn.decl, exp, target).expand ();
   4704 }
   4705 
   4706 /* Perform any semantic checks needed for a call to the RVV function
   4707    with subcode CODE, such as testing for integer constant expressions.
   4708    The call occurs at location LOCATION and has NARGS arguments,
   4709    given by ARGS.  FNDECL is the original function decl, before
   4710    overload resolution.
   4711 
   4712    Return true if the call is valid, otherwise report a suitable error.  */
   4713 bool
   4714 check_builtin_call (location_t location, vec<location_t>, unsigned int code,
   4715 		    tree fndecl, unsigned int nargs, tree *args)
   4716 {
   4717   const registered_function &rfn = *(*registered_functions)[code];
   4718   return function_checker (location, rfn.instance, fndecl,
   4719 			   TREE_TYPE (rfn.decl), nargs, args).check ();
   4720 }
   4721 
   4722 tree
   4723 resolve_overloaded_builtin (location_t loc, unsigned int code, tree fndecl,
   4724 			    vec<tree, va_gc> *arglist)
   4725 {
   4726   if (code >= vec_safe_length (registered_functions))
   4727     return NULL_TREE;
   4728 
   4729   registered_function *rfun = (*registered_functions)[code];
   4730 
   4731   if (!rfun || !rfun->overloaded_p)
   4732     return NULL_TREE;
   4733 
   4734   /* According to the rvv intrinisc doc, we have no such overloaded function
   4735      with empty args.  Unfortunately, we register the empty args function as
   4736      overloaded for avoiding conflict.  Thus, there will actual one register
   4737      function after return NULL_TREE back to the middle-end, and finally result
   4738      in ICE when expanding.  For example:
   4739 
   4740      1. First we registered void __riscv_vfredmax () as the overloaded function.
   4741      2. Then resolve_overloaded_builtin (this func) return NULL_TREE.
   4742      3. The functions register in step 1 bypass the args check as empty args.
   4743      4. Finally, fall into expand_builtin with empty args and meet ICE.
   4744 
   4745      Here we report error when overloaded function with empty args.  */
   4746   if (rfun->overloaded_p && arglist->length () == 0)
   4747     error_at (loc, "no matching function call to %qE with empty arguments",
   4748 	      fndecl);
   4749 
   4750   hashval_t hash = rfun->overloaded_hash (*arglist);
   4751   registered_function *rfn
   4752     = non_overloaded_function_table->find_with_hash (rfun, hash);
   4753 
   4754   return rfn ? rfn->decl : NULL_TREE;
   4755 }
   4756 
   4757 function_instance
   4758 get_read_vl_instance (void)
   4759 {
   4760   return function_instance ("read_vl", bases::read_vl, shapes::read_vl,
   4761 			    none_ops[0], PRED_TYPE_none, &p_none_void_ops);
   4762 }
   4763 
   4764 tree
   4765 get_read_vl_decl (void)
   4766 {
   4767   function_instance instance = get_read_vl_instance ();
   4768   hashval_t hash = instance.hash ();
   4769   registered_function *rfn = function_table->find_with_hash (instance, hash);
   4770   gcc_assert (rfn);
   4771   return rfn->decl;
   4772 }
   4773 
   4774 } // end namespace riscv_vector
   4775 
   4776 inline void
   4777 gt_ggc_mx (function_instance *)
   4778 {}
   4779 
   4780 inline void
   4781 gt_pch_nx (function_instance *)
   4782 {}
   4783 
   4784 inline void
   4785 gt_pch_nx (function_instance *, gt_pointer_operator, void *)
   4786 {}
   4787 
   4788 #include "gt-riscv-vector-builtins.h"
   4789