f 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
> >
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
On 3/15/23 00:37, juzhe.zh...@rivai.ai wrote:
From: Ju-Zhe Zhong
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
From: Ju-Zhe Zhong
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-accu
From: Ju-Zhe Zhong
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-accu
On 3/13/23 20:37, Kito Cheng via Gcc-patches wrote:
IIRC the canonical form of (plus (op) (mult (op) (op))) is (plus
(mult (op) (op) (op)), so using the first form might not friendly for
the combine pass.
You're correct. The other form shouldn't be used at all and should not
appear in the M
IIRC the canonical form of (plus (op) (mult (op) (op))) is (plus
(mult (op) (op) (op)), so using the first form might not friendly for
the combine pass.
On Tue, Mar 14, 2023 at 10:24 AM wrote:
>
> From: Ju-Zhe Zhong
>
> Co-authored-by: kito-cheng
> Co-authored-by: kito-cheng
>
> This patch is
From: Ju-Zhe Zhong
Co-authored-by: kito-cheng
Co-authored-by: kito-cheng
This patch is fixing the bugs reported by @kito.
// vnmsub.vx vd, rs1, vs2, vm# vd[i] = -(x[rs1] * vd[i]) + vs2[i]
// vd = -(vb * a) + vc
//= -(3 * 1) + 10
//= 7
// GCC wrongly optmize this pattern