From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ua1-x932.google.com (mail-ua1-x932.google.com [IPv6:2607:f8b0:4864:20::932]) by sourceware.org (Postfix) with ESMTPS id CFDC43850202 for ; Thu, 23 Mar 2023 03:29:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CFDC43850202 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ua1-x932.google.com with SMTP id g9so9624768uam.9 for ; Wed, 22 Mar 2023 20:29:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679542150; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=D6ZlQpsSxyMZVRlmEIP8n4JhFBlB/JHfYg9k0CUA3rs=; b=YaE5plEFat2V4/IDKiANIRM/n3QbhiS/fwmZHhZW3SZoZe5qkgdF4RHkhad1NgmuXS vZk6vbu0F0eIuS7AswAORENbIeHsFZxf0ebBPe//ri+LrDmJcUUdPJ3XKUO1dIKYMcAU 2ECR74F+6ZbCGD46M7VQKGweiUmYPcRi+/Me1l19oqZM03goOuWxFe2cVYuLU44d8S4X 8C3oUZFSSvNygzpsWyeC66/B/xM5ZRwhEZdJ6i+PmvYb3AstCJB5wAbBMguhvdxh1eFn jsrWEL3IiJotKzIfd4Rn5yuU3ouuTFf6Ko5IN6OksbekIgb3+AnfWfe4Mjj5KQYhw3rx gZjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679542150; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=D6ZlQpsSxyMZVRlmEIP8n4JhFBlB/JHfYg9k0CUA3rs=; b=UpDcDUZgoRSLf7tLP+k9ab/W4pJ9250y97/01SouCGd56zMrHdSbjuRGdVPzciJ/uP sdJpD37n3kpk2jiDyULOpDlumySsMJ3DMrqQ7EGSZCaRV8+T/6b8ByPfX59iUPAM7efz FxPDfs4MTe/G5g5rSfDReKJpQiminfpncicdKrIRlFzQly6+Y2kiZOsgVeCXB0N0lVLS Afgdd0fzBmVlSwAW65IYfb/UoiO60BClDsGXcRc4lHLX8m7qduxMk11C1J0HKtxMpOfQ glYEPCAgf0NAbxMTM5cO7nGw9o19kZu++rs6Nlre0bxGr7xjD6pYNN7RshZV0KFZVJzJ oFWA== X-Gm-Message-State: AAQBX9dhGpD3K+eJ1MhjBHyFMnCcD0CmCWAc41sarCvndsVh6ETGt6RP nER13jsYSrkQ0g8fgRh/HsGh7NVE8OchdAp1AiJ1GqNuIbnjKw== X-Google-Smtp-Source: AKy350YnZYRIazVSefez+1ARIjrfTIls56kwnlpJm8QdNSg4k77b/pEEHvLghI0Qg4ZKSFEmsOVnGVjNfE/AvvuM3Q0= X-Received: by 2002:a05:6130:a6:b0:75d:782c:f31b with SMTP id x38-20020a05613000a600b0075d782cf31bmr4471111uaf.0.1679542150040; Wed, 22 Mar 2023 20:29:10 -0700 (PDT) MIME-Version: 1.0 References: <20230315063746.166390-1-juzhe.zhong@rivai.ai> <4d7cbf53-ef94-f504-07d7-be51ede40a03@gmail.com> <6044423573881F46+202303200851012766431@rivai.ai> In-Reply-To: <6044423573881F46+202303200851012766431@rivai.ai> From: Kito Cheng Date: Thu, 23 Mar 2023 11:28:59 +0800 Message-ID: Subject: Re: Re: [PATCH] RISC-V: Fix bugs of ternary integer and floating-point ternary intrinsics. To: "juzhe.zhong@rivai.ai" Cc: jeffreyalaw , gcc-patches Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: committed as https://gcc.gnu.org/git/?p=3Dgcc.git;a=3Dcommit;h=3D0e2715176d= f3787d1470d7b9bde26b1b5e16e1e2 On Mon, Mar 20, 2023 at 8:51=E2=80=AFAM juzhe.zhong@rivai.ai wrote: > > The last patch. Kito is still keep testing with pressure tests. > > > > juzhe.zhong@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-poi= nt ternary intrinsics. > > > On 3/15/23 00:37, juzhe.zhong@rivai.ai wrote: > > From: Ju-Zhe Zhong > > > > Fix bugs of ternary intrinsic pattern: > > > > interger: > > vnmsac.vv vd, vs1, vs2, vm # vd[i] =3D -(vs1[i] * vs2[i]) + vd[i] (= minus op3 (mult op1 op2)) > > vnmsac.vx vd, rs1, vs2, vm # vd[i] =3D -(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] =3D +(vs1[i] * vs2[i]) + vd[i] (p= lus (mult (op1 op2)) op3) > > vfmacc.vf vd, rs1, vs2, vm # vd[i] =3D +(f[rs1] * vs2[i]) + vd[i] (p= lus (mult (op1 op2)) op3) > > > > > > # FP negate-(multiply-accumulate), overwrites subtrahend > > vfnmacc.vv vd, vs1, vs2, vm # vd[i] =3D -(vs1[i] * vs2[i]) - vd[i] (m= inus (neg (mult (op1 op2))) op3)) > > vfnmacc.vf vd, rs1, vs2, vm # vd[i] =3D -(f[rs1] * vs2[i]) - vd[i] (m= inus (neg (mult (op1 op2)) op3)) > > # FP multiply-subtract-accumulator, overwrites subtrahend > > vfmsac.vv vd, vs1, vs2, vm # vd[i] =3D +(vs1[i] * vs2[i]) - vd[i] (m= inus (mult (op1 op2)) op3) > > vfmsac.vf vd, rs1, vs2, vm # vd[i] =3D +(f[rs1] * vs2[i]) - vd[i] (m= inus (mult (op1 op2)) op3) > > > > # FP negate-(multiply-subtract-accumulator), overwrites minuend > > vfnmsac.vv vd, vs1, vs2, vm # vd[i] =3D -(vs1[i] * vs2[i]) + vd[i] (p= lus (neg:(mult (op1 op2))) op3) > > vfnmsac.vf vd, rs1, vs2, vm # vd[i] =3D -(f[rs1] * vs2[i]) + vd[i] (p= lus (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_): Ditto. > > (@pred_mul_plus): Ditto. > > (*pred_madd): Ditto. > > (*pred_macc): Ditto. > > (*pred_mul_plus): Ditto. > > (@pred_mul_plus_scalar): Ditto. > > (*pred_madd_scalar): Ditto. > > (*pred_macc_scalar): Ditto. > > (*pred_mul_plus_scalar): Ditto. > > (*pred_madd_extended_scalar): Ditto. > > (*pred_macc_extended_scalar): Ditto. > > (*pred_mul_plus_extended_scalar): Ditto. > > (@pred_minus_mul): Ditto. > > (*pred_): Ditto. > > (*pred_nmsub): Ditto. > > (*pred_): Ditto. > > (*pred_nmsac): Ditto. > > (*pred_mul_): Ditto. > > (*pred_minus_mul): Ditto. > > (@pred_mul__scalar): Ditto. > > (@pred_minus_mul_scalar): Ditto. > > (*pred__scalar): Ditto. > > (*pred_nmsub_scalar): Ditto. > > (*pred__scalar): Ditto. > > (*pred_nmsac_scalar): Ditto. > > (*pred_mul__scalar): Ditto. > > (*pred_minus_mul_scalar): Ditto. > > (*pred__extended_scalar): Ditto. > > (*pred_nmsub_extended_scalar): Ditto. > > (*pred__extended_scalar): Ditto. > > (*pred_nmsac_extended_scalar): Ditto. > > (*pred_mul__extended_scalar): Ditto. > > (*pred_minus_mul_extended_scalar): Ditto. > > (*pred_): Ditto. > > (*pred_): Ditto. > > (*pred__scalar): Ditto. > > (*pred__scalar): Ditto. > > (@pred_neg_mul_): Ditto. > > (@pred_mul_neg_): Ditto. > > (*pred_): Ditto. > > (*pred_): Ditto. > > (*pred_): Ditto. > > (*pred_): Ditto. > > (*pred_neg_mul_): Ditto. > > (*pred_mul_neg_): Ditto. > > (@pred_neg_mul__scalar): Ditto. > > (@pred_mul_neg__scalar): Ditto. > > (*pred__scalar): Ditto. > > (*pred__scalar): Ditto. > > (*pred__scalar): Ditto. > > (*pred__scalar): Ditto. > > (*pred_neg_mul__scalar): Ditto. > > (*pred_mul_neg__scalar): Ditto. > > (@pred_widen_neg_mul_): Ditto. > > (@pred_widen_mul_neg_): Ditto. > > (@pred_widen_neg_mul__scalar): Ditto. > > (@pred_widen_mul_neg__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 >