The last patch. Kito is still keep testing with pressure tests.


juzhe.zh...@rivai.ai
 
From: Jeff Law
Date: 2023-03-20 01:03
To: juzhe.zhong; gcc-patches
CC: kito.cheng
Subject: Re: [PATCH] RISC-V: Fix bugs of ternary integer and floating-point 
ternary intrinsics.
 
 
On 3/15/23 00:37, juzhe.zh...@rivai.ai wrote:
> From: Ju-Zhe Zhong <juzhe.zh...@rivai.ai>
> 
> Fix bugs of ternary intrinsic pattern:
> 
> interger:
> vnmsac.vv vd, vs1, vs2, vm    # vd[i] = -(vs1[i] * vs2[i]) + vd[i]  (minus 
> op3 (mult op1 op2))
> vnmsac.vx vd, rs1, vs2, vm    # vd[i] = -(x[rs1] * vs2[i]) + vd[i]   (minus 
> op3 (mult op1 op2))
> 
> floating-point:
> # FP multiply-accumulate, overwrites addend
> vfmacc.vv vd, vs1, vs2, vm    # vd[i] = +(vs1[i] * vs2[i]) + vd[i] (plus 
> (mult (op1 op2)) op3)
> vfmacc.vf vd, rs1, vs2, vm    # vd[i] = +(f[rs1] * vs2[i]) + vd[i] (plus 
> (mult (op1 op2)) op3)
> 
> 
> # FP negate-(multiply-accumulate), overwrites subtrahend
> vfnmacc.vv vd, vs1, vs2, vm   # vd[i] = -(vs1[i] * vs2[i]) - vd[i] (minus 
> (neg (mult (op1 op2))) op3))
> vfnmacc.vf vd, rs1, vs2, vm   # vd[i] = -(f[rs1] * vs2[i]) - vd[i] (minus 
> (neg (mult (op1 op2)) op3))
> # FP multiply-subtract-accumulator, overwrites subtrahend
> vfmsac.vv vd, vs1, vs2, vm    # vd[i] = +(vs1[i] * vs2[i]) - vd[i] (minus 
> (mult (op1 op2)) op3)
> vfmsac.vf vd, rs1, vs2, vm    # vd[i] = +(f[rs1] * vs2[i]) - vd[i] (minus 
> (mult (op1 op2)) op3)
> 
> # FP negate-(multiply-subtract-accumulator), overwrites minuend
> vfnmsac.vv vd, vs1, vs2, vm   # vd[i] = -(vs1[i] * vs2[i]) + vd[i] (plus 
> (neg:(mult (op1 op2))) op3)
> vfnmsac.vf vd, rs1, vs2, vm   # vd[i] = -(f[rs1] * vs2[i]) + vd[i] (plus 
> (neg:(mult (op1 op2))) op3)
> 
> gcc/ChangeLog:
> 
>          * config/riscv/riscv-vector-builtins-bases.cc: Fix ternary bug.
>          * config/riscv/vector-iterators.md (nmsac): Ditto.
>          (nmsub): Ditto.
>          (msac): Ditto.
>          (msub): Ditto.
>          (nmadd): Ditto.
>          (nmacc): Ditto.
>          * config/riscv/vector.md (@pred_mul_<optab><mode>): Ditto.
>          (@pred_mul_plus<mode>): Ditto.
>          (*pred_madd<mode>): Ditto.
>          (*pred_macc<mode>): Ditto.
>          (*pred_mul_plus<mode>): Ditto.
>          (@pred_mul_plus<mode>_scalar): Ditto.
>          (*pred_madd<mode>_scalar): Ditto.
>          (*pred_macc<mode>_scalar): Ditto.
>          (*pred_mul_plus<mode>_scalar): Ditto.
>          (*pred_madd<mode>_extended_scalar): Ditto.
>          (*pred_macc<mode>_extended_scalar): Ditto.
>          (*pred_mul_plus<mode>_extended_scalar): Ditto.
>          (@pred_minus_mul<mode>): Ditto.
>          (*pred_<madd_nmsub><mode>): Ditto.
>          (*pred_nmsub<mode>): Ditto.
>          (*pred_<macc_nmsac><mode>): Ditto.
>          (*pred_nmsac<mode>): Ditto.
>          (*pred_mul_<optab><mode>): Ditto.
>          (*pred_minus_mul<mode>): Ditto.
>          (@pred_mul_<optab><mode>_scalar): Ditto.
>          (@pred_minus_mul<mode>_scalar): Ditto.
>          (*pred_<madd_nmsub><mode>_scalar): Ditto.
>          (*pred_nmsub<mode>_scalar): Ditto.
>          (*pred_<macc_nmsac><mode>_scalar): Ditto.
>          (*pred_nmsac<mode>_scalar): Ditto.
>          (*pred_mul_<optab><mode>_scalar): Ditto.
>          (*pred_minus_mul<mode>_scalar): Ditto.
>          (*pred_<madd_nmsub><mode>_extended_scalar): Ditto.
>          (*pred_nmsub<mode>_extended_scalar): Ditto.
>          (*pred_<macc_nmsac><mode>_extended_scalar): Ditto.
>          (*pred_nmsac<mode>_extended_scalar): Ditto.
>          (*pred_mul_<optab><mode>_extended_scalar): Ditto.
>          (*pred_minus_mul<mode>_extended_scalar): Ditto.
>          (*pred_<madd_msub><mode>): Ditto.
>          (*pred_<macc_msac><mode>): Ditto.
>          (*pred_<madd_msub><mode>_scalar): Ditto.
>          (*pred_<macc_msac><mode>_scalar): Ditto.
>          (@pred_neg_mul_<optab><mode>): Ditto.
>          (@pred_mul_neg_<optab><mode>): Ditto.
>          (*pred_<nmadd_msub><mode>): Ditto.
>          (*pred_<nmsub_nmadd><mode>): Ditto.
>          (*pred_<nmacc_msac><mode>): Ditto.
>          (*pred_<nmsac_nmacc><mode>): Ditto.
>          (*pred_neg_mul_<optab><mode>): Ditto.
>          (*pred_mul_neg_<optab><mode>): Ditto.
>          (@pred_neg_mul_<optab><mode>_scalar): Ditto.
>          (@pred_mul_neg_<optab><mode>_scalar): Ditto.
>          (*pred_<nmadd_msub><mode>_scalar): Ditto.
>          (*pred_<nmsub_nmadd><mode>_scalar): Ditto.
>          (*pred_<nmacc_msac><mode>_scalar): Ditto.
>          (*pred_<nmsac_nmacc><mode>_scalar): Ditto.
>          (*pred_neg_mul_<optab><mode>_scalar): Ditto.
>          (*pred_mul_neg_<optab><mode>_scalar): Ditto.
>          (@pred_widen_neg_mul_<optab><mode>): Ditto.
>          (@pred_widen_mul_neg_<optab><mode>): Ditto.
>          (@pred_widen_neg_mul_<optab><mode>_scalar): Ditto.
>          (@pred_widen_mul_neg_<optab><mode>_scalar): Ditto.
It looks like you've got two patches that are almost 100% identical 
except for a few bits in vector.md.  Which is the correct version?
 
One is dated 3/14/23 00:30 the other 3/15/23: 04:07.
 
jeff
 

Reply via email to