-
Notifications
You must be signed in to change notification settings - Fork 12
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
base: sifive-rvv-intrinsic-temp
Are you sure you want to change the base?
Sifive rvv intrinsic temp #6
Conversation
da24b1c
to
16f13a0
Compare
2c9c076
to
1f32394
Compare
/* vop_v --> vop_v_<type>. */ | ||
b.append_name (type_suffixes[instance.type.index].vector); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indent
/* 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); */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Drop comment out code
if (overloaded_p && (instance.pred == PRED_TYPE_tu || instance.pred == PRED_TYPE_mu || | ||
instance.pred == PRED_TYPE_tumu)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indent
/* Return true if intrinsics maybe require qfrm operand. */ | ||
virtual bool may_require_qfrm_p () const; | ||
|
There was a problem hiding this comment.
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
/* 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; | ||
} | ||
|
There was a problem hiding this comment.
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
[(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")))] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indent
#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); | ||
} |
There was a problem hiding this comment.
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); | ||
} |
There was a problem hiding this comment.
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")]) |
There was a problem hiding this comment.
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")]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same
Add testcase of vqmacc and vfnrclip.