Hi Paul-Antoine,

Please find attached a revised version of the patch.

Compared to the previous iteration, I have:
* Rebased on top of Pan's work;
* Updated the cost model;
* Added a second pattern to handle the case where PLUS_MINUS operands are swapped;
* Added compile and run tests.

I bootstrapped and regtested against rv64gcv.

We need to replace all "FR to VR" uses with the new function and IMHO
better done in a separate patch rather than folded into this one.

Also, please add f16 tests still. Not that I expect fallout but just for completeness's sake.

Please CC patchworks...@rivosinc.com for the next version so we have CI
coverage.

+(define_insn_and_split "*<optab>_vf_<mode>" + [(set (match_operand:V_VLSF 0 "register_operand" "=vd") + (plus_minus:V_VLSF + (mult:V_VLSF + (vec_duplicate:V_VLSF + (match_operand:<VEL> 1 "register_operand" " f")) + (match_operand:V_VLSF 2 "register_operand" " 0")) + (match_operand:V_VLSF 3 "register_operand" " vr")))] + "TARGET_VECTOR && can_create_pseudo_p ()"
Nit: The constraints look unaligned here, or is that just my editor?

In the run test params you use

+/* { dg-additional-options "--param=gpr2vr-cost=0" } */

That should rather be fpr2vr-cost=.


Are you going to do the other fma variants in follow ups still?

--
Regards
Robin

Reply via email to