Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sifive rvv intrinsic temp #6

Open
wants to merge 10 commits into
base: sifive-rvv-intrinsic-temp
Choose a base branch
from

Conversation

Liaoshihua
Copy link

@Liaoshihua Liaoshihua commented Nov 15, 2024

Add testcase of vqmacc and vfnrclip.

@yulong18 yulong18 force-pushed the sifive-rvv-intrinsic-temp branch 2 times, most recently from da24b1c to 16f13a0 Compare November 21, 2024 07:23
@Liaoshihua Liaoshihua closed this Nov 21, 2024
@Liaoshihua Liaoshihua reopened this Nov 21, 2024
Comment on lines +1338 to +1339
/* vop_v --> vop_v_<type>. */
b.append_name (type_suffixes[instance.type.index].vector);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indent

Comment on lines +1340 to +1343
/* vop_<op> --> vop_<op>_<type>.
vector_type_index ret_type_idx
= instance.op_info->ret.get_function_type_index (instance.type.index);
b.append_name (type_suffixes[ret_type_idx].vector); */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Drop comment out code

Comment on lines +1348 to +1349
if (overloaded_p && (instance.pred == PRED_TYPE_tu || instance.pred == PRED_TYPE_mu ||
instance.pred == PRED_TYPE_tumu))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indent

Comment on lines +580 to +582
/* Return true if intrinsics maybe require qfrm operand. */
virtual bool may_require_qfrm_p () const;

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems unused, plz drop this

Comment on lines +859 to +866
/* We choose to return false by default since most of the intrinsics does
not need qfrm operand. */
inline bool
function_base::may_require_qfrm_p () const
{
return false;
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems unused, plz drop this

Comment on lines +160 to +162
[(match_operand:VWEXTI 3 "register_operand" " vr,vr, vr, vr, 0, 0, vr, vr, 0, 0, vr, vr")
(match_operand:<V_SF_FNRCLIPXFQF> 4 "vector_shift_operand" " 0, 0, 0, 0,vr, vr, vr, vr, vk, vk, vk, vk")] VNCLIP)
(match_operand:<V_SF_FNRCLIPXFQF> 2 "vector_merge_operand" " 0,vu, 0, vu,vu, vu, vu, 0, vu, vu, vu, 0")))]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indent

Comment on lines +1 to +21
#include "riscv_vector.h"

vint8mf8_t test1(float vs1, vfloat32mf2_t vs2, size_t vl) {
return __riscv_sf_vfnrclip_x_f_qf_i8mf8(vs2, vs1, vl);
}

vint8mf4_t test2(float vs1, vfloat32m1_t vs2, size_t vl) {
return __riscv_sf_vfnrclip_x_f_qf_i8mf4(vs2, vs1, vl);
}

vint8mf2_t test2(float vs1, vfloat32m2_t vs2, size_t vl) {
return __riscv_sf_vfnrclip_x_f_qf_i8mf2(vs2, vs1, vl);
}

vint8m1_t test2(float vs1, vfloat32m4_t vs2, size_t vl) {
return __riscv_sf_vfnrclip_x_f_qf_i8m1(vs2, vs1, vl);
}

vint8m2_t test2(float vs1, vfloat32m8_t vs2, size_t vl) {
return __riscv_sf_vfnrclip_x_f_qf_i8m2(vs2, vs1, vl);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Forgot to remove this file?


vint32m8_t test4(vint32m8_t vd, vint8m1_t vs1, vint8m4_t vs2, size_t vl) {
return __riscv_sf_vqmacc_4x8x4_i32m8(vd, vs1, vs2, vl);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Forgot to remove this file?

"sf.vfnrclip.xu.f.qf%o4\t%0,%3,%4%p1"
[(set_attr "type" "vsfclip")
(set_attr "mode" "<V_DOUBLE_TRUNC>")
(set_attr "spec_restriction" "thv,thv,thv,thv,none,none")])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

spec_restriction is used for that should limited to thead vector, and I don't think this is necessary for SiFive stuffs?

"sf.vfnrclip.x.f.qf%o4\t%0,%3,%v4%p1"
[(set_attr "type" "vsfclip")
(set_attr "mode" "<V_SF_FNRCLIPXFQF>")
(set_attr "spec_restriction" "thv,thv,thv,thv,thv,thv,none,none,thv,thv,none,none")])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants