-
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 xsfvcp #7
base: sifive-rvv-intrinsic
Are you sure you want to change the base?
Conversation
e242c05
to
865eb47
Compare
Hi, @kito-cheng : |
865eb47
to
c944e05
Compare
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.
-
I would like to use O[us][0-9][0-9] as a generic immediate operand modifier, so that it can used in other places as well, do you have intestest to post a proposal to riscv-c-api-doc like [RISCV] Inline Assembly: RVC constraint and N modifier llvm/llvm-project#112561
-
could you add vsetvli check in the test case?
-
We don't need X2 here, could you check how wadd.vv and wadd.vx implement? use double_trunc_vector should be work in this case once you adjust the base SEW/LMUL right.
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.
Could you reduce the test files? just one test for each instruction is fine, you don't need put all test into gcc source tree.
e.g. only pick test_sf_vc_v_xvw_u8mf4 and test_sf_vc_v_xvw_se_u16m4 for sf.vc.v.xvw
gcc/config/riscv/sifive-vector.md
Outdated
;; SF_VCP | ||
(define_insn "@sf_vc_x<mode>" | ||
[(set (match_operand:VFULLI 0 "register_operand" "=vd") | ||
(if_then_else:VFULLI | ||
(unspec:<VM> | ||
[(match_operand:<VM> 1 "vector_mask_operand" " Wc1") | ||
(match_operand 7 "vector_length_operand" " rK") | ||
(match_operand 8 "const_int_operand" " i") | ||
(match_operand 9 "const_int_operand" " i") | ||
(match_operand 10 "const_int_operand" " i") | ||
(reg:SI VL_REGNUM) | ||
(reg:SI VTYPE_REGNUM)] UNSPEC_VPREDICATE) | ||
(unspec:VFULLI | ||
[(match_operand:SI 3 "const_int_operand" "B") | ||
(match_operand:SI 4 "const_int_operand" "K") | ||
(match_operand:SI 5 "const_int_operand" "K") | ||
(match_operand:<VEL> 6 "register_operand" "r")] UNSPEC_SF_CV) | ||
(match_operand:VFULLI 2 "vector_merge_operand" "vu")))] | ||
"TARGET_VECTOR && TARGET_XSFVCP" | ||
"sf.vc.x\t %3, %4, %5, %6" | ||
[(set_attr "type" "sf_vc_se") | ||
(set_attr "mode" "<MODE>")]) |
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.
For those instruction without output, you don't really need a dummy output operand there, you just need some thing like
a4b780d
to
2c96c6a
Compare
gcc/ChangeLog: * config/riscv/genrvv-type-indexer.cc (expand_floattype): New func. (main): * config/riscv/riscv-vector-builtins-types.def (DEF_RVV_XFQF_OPS): (vint8mf8_t): (vint8mf4_t): (vint8mf2_t): (vint8m1_t): (vint8m2_t): * config/riscv/riscv-vector-builtins.cc (DEF_RVV_XFQF_OPS): (rvv_arg_type_info::get_xfqf_float_type): * config/riscv/riscv-vector-builtins.def (xfqf_vector): (xfqf_float): * config/riscv/riscv-vector-builtins.h (struct rvv_arg_type_info): * config/riscv/sifive-vector.md: * config/riscv/vector-iterators.md:
2c96c6a
to
bcc379f
Compare
This pr tries add the intrinsics support for Xsfvcp extension.