@@ -551,6 +551,12 @@ static const rvv_type_info qmacc_ops[] = {
551551#include " riscv-vector-builtins-types.def"
552552 {NUM_VECTOR_TYPES, 0 }};
553553
554+ /* A list of signed integer will be registered for intrinsic functions. */
555+ static const rvv_type_info xfqf_ops[] = {
556+ #define DEF_RVV_XFQF_OPS (TYPE, REQUIRE ) {VECTOR_TYPE_##TYPE, REQUIRE},
557+ #include " riscv-vector-builtins-types.def"
558+ {NUM_VECTOR_TYPES, 0 }};
559+
554560static CONSTEXPR const rvv_arg_type_info rvv_arg_type_info_end
555561 = rvv_arg_type_info (NUM_BASE_TYPES);
556562
@@ -720,7 +726,8 @@ static CONSTEXPR const rvv_arg_type_info shift_wv_args[]
720726 rvv_arg_type_info_end};
721727
722728static CONSTEXPR const rvv_arg_type_info clip_args[]
723- = {rvv_arg_type_info (RVV_BASE_vector), rvv_arg_type_info (RVV_BASE_scalar),
729+ = {rvv_arg_type_info (RVV_BASE_xfqf_vector),
730+ rvv_arg_type_info (RVV_BASE_xfqf_float),
724731 rvv_arg_type_info_end};
725732
726733/* A list of args for vector_type func (vector_type) function. */
@@ -2549,17 +2556,17 @@ static CONSTEXPR const rvv_op_info i_narrow_shift_vwx_ops
25492556/* A static operand information for double demote type func (vector_type,
25502557 * shift_type) function registration. */
25512558static CONSTEXPR const rvv_op_info u_clip_qf_ops
2552- = {f32_ops , /* Types */
2559+ = {xfqf_ops , /* Types */
25532560 OP_TYPE_none, /* Suffix */
2554- rvv_arg_type_info (RVV_BASE_eew8_index ), /* Return type */
2561+ rvv_arg_type_info (RVV_BASE_unsigned_vector ), /* Return type */
25552562 clip_args /* Args */ };
25562563
25572564/* A static operand information for double demote type func (vector_type,
25582565 * shift_type) function registration. */
25592566static CONSTEXPR const rvv_op_info i_clip_qf_ops
2560- = {f32_ops , /* Types */
2567+ = {xfqf_ops , /* Types */
25612568 OP_TYPE_none, /* Suffix */
2562- rvv_arg_type_info (RVV_BASE_signed_eew8_index ), /* Return type */
2569+ rvv_arg_type_info (RVV_BASE_vector ), /* Return type */
25632570 clip_args /* Args */ };
25642571
25652572/* A static operand information for double demote type func (vector_type,
@@ -3008,7 +3015,7 @@ static CONSTEXPR const function_type_info function_types[] = {
30083015 QUAD_FIX_UNSIGNED, OCT_TRUNC, DOUBLE_TRUNC_SCALAR, DOUBLE_TRUNC_SIGNED, \
30093016 DOUBLE_TRUNC_UNSIGNED, DOUBLE_TRUNC_UNSIGNED_SCALAR, \
30103017 DOUBLE_TRUNC_BFLOAT_SCALAR, DOUBLE_TRUNC_BFLOAT, DOUBLE_TRUNC_FLOAT, FLOAT, \
3011- LMUL1, WLMUL1, QLMUL1, QLMUL1_SIGNED, QLMUL1_UNSIGNED, EEW8_INTERPRET, \
3018+ LMUL1, WLMUL1, QLMUL1, QLMUL1_SIGNED, QLMUL1_UNSIGNED, XFQF, EEW8_INTERPRET, \
30123019 EEW16_INTERPRET, EEW32_INTERPRET, EEW64_INTERPRET, BOOL1_INTERPRET, \
30133020 BOOL2_INTERPRET, BOOL4_INTERPRET, BOOL8_INTERPRET, BOOL16_INTERPRET, \
30143021 BOOL32_INTERPRET, BOOL64_INTERPRET, SIGNED_EEW8_LMUL1_INTERPRET, \
@@ -3060,6 +3067,7 @@ static CONSTEXPR const function_type_info function_types[] = {
30603067 VECTOR_TYPE_##QLMUL1, \
30613068 VECTOR_TYPE_##QLMUL1_SIGNED, \
30623069 VECTOR_TYPE_##QLMUL1_UNSIGNED, \
3070+ VECTOR_TYPE_##XFQF, \
30633071 VECTOR_TYPE_##EEW8_INTERPRET, \
30643072 VECTOR_TYPE_##EEW16_INTERPRET, \
30653073 VECTOR_TYPE_##EEW32_INTERPRET, \
@@ -3579,6 +3587,19 @@ rvv_arg_type_info::get_scalar_const_ptr_type (vector_type_index type_idx) const
35793587 return builtin_types[type_idx].scalar_const_ptr ;
35803588}
35813589
3590+ tree
3591+ rvv_arg_type_info::get_xfqf_float_type (vector_type_index type_idx) const
3592+ {
3593+ /* Convert vint8 types into float types.
3594+ Note:
3595+ - According to riscv-vector-builtins-types.def, the index of an unsigned
3596+ type is always one greater than its corresponding signed type. */
3597+ if (type_idx >= VECTOR_TYPE_vint8mf8_t && type_idx <= VECTOR_TYPE_vuint8m2_t)
3598+ return builtin_types[VECTOR_TYPE_vfloat32m1_t].scalar ;
3599+ else
3600+ return NULL_TREE;
3601+ }
3602+
35823603vector_type_index
35833604rvv_arg_type_info::get_function_type_index (vector_type_index type_idx) const
35843605{
0 commit comments