From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg1-x52f.google.com (mail-pg1-x52f.google.com [IPv6:2607:f8b0:4864:20::52f]) by sourceware.org (Postfix) with ESMTPS id 769AF3858422 for ; Fri, 30 Jun 2023 01:27:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 769AF3858422 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-pg1-x52f.google.com with SMTP id 41be03b00d2f7-5533c545786so825291a12.1 for ; Thu, 29 Jun 2023 18:27:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1688088422; x=1690680422; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=+QE5sQJbU0l5PnkvF+GX4vWkn69ZBCt42W3GsmhxCHc=; b=kPvIN86BGCafnAChWg7YS9VBVG10BakuGpPDhZPVGrgVbJrBnqHtNsvWP+ncgUWBKU 8KlnSqu2Rsoc6czwHOOBT2xS3AEyQQxXLFkwHcAgBMwp6b4wGt1SYWz2ZItmlxUl+X22 DQj5puFrMDaE4O4Y3Sl4FEw+n5hrVMr3oThdJ1rBOUW3K5LI8qKPQ5PW93+PAvEWYdEr 7OK0tjK6munpvSPZKt2vi69U3VZpaiQrmrVkbaeMr0kctoDJ8Yr2QQcjD2q4mWidaP8J 7qat+Uiu4OetaBwoXrky5+A4yxiXjIhnSQOTUvvkOR39FgjMw7OjO4w311J5yGPiC55E majw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688088422; x=1690680422; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=+QE5sQJbU0l5PnkvF+GX4vWkn69ZBCt42W3GsmhxCHc=; b=iqWQZ2LxnoMPrCF74GAEv/c5eud9gs1C3uAXcA0DUugCKIrtdQ7m/Xv+q7l0/gB+xt poBGFI8GKzGNzRq6BWmpXxzqKMUc/GtVRN0tgwFfhacHIh5oirHXTMLadteGTNgH3BXG ypdCr5EQeAHctJFXugsgJi0twcYIREOOBvksAp/7qJeGL/S2MxVXpElAJqJwh7ULF9rS Rd1UQHab+4fsbFbs+EF8e2dNa0jOxfzKdXAi6dWwGsUdSMyTyHB0iEJztO2MzHvgOzwU LONWMPtkGub1WJZ1e9dyhBKhjm7lPB/QHEpDhfAvNlTn1XjUBJDeswSI992wvBePpPf/ O2nw== X-Gm-Message-State: AC+VfDwEX6WHAP+emjtLkjV1zeFj2MW06cTS78h/8kjsoKCcQFVd4MMR qa0voITTJCZdKifGxjD8YE0= X-Google-Smtp-Source: ACHHUZ5s8PYSHbApfZTWzH58yFLYvi2mlgbNB+A6BqPJEEjX+iJ788mGgDeCu6kBl9pmZ3TgF2GjnA== X-Received: by 2002:a05:6a21:339d:b0:128:ffb7:dcfe with SMTP id yy29-20020a056a21339d00b00128ffb7dcfemr2403844pzb.1.1688088422038; Thu, 29 Jun 2023 18:27:02 -0700 (PDT) Received: from [172.31.0.109] ([136.36.130.248]) by smtp.gmail.com with ESMTPSA id m18-20020aa79012000000b0064fc715b380sm9165695pfo.176.2023.06.29.18.27.00 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 29 Jun 2023 18:27:01 -0700 (PDT) Message-ID: <893f627d-386b-06cf-4a02-fd1ae8226619@gmail.com> Date: Thu, 29 Jun 2023 19:26:59 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [PATCH] RISC-V: Support vfwnmacc/vfwmsac/vfwnmsac combine lowering Content-Language: en-US To: "juzhe.zhong@rivai.ai" , gcc-patches Cc: "kito.cheng" , "Kito.cheng" , palmer , palmer , Robin Dapp References: <20230628115559.116166-1-juzhe.zhong@rivai.ai> <2abb91f5-36e0-5024-9b15-a45f8c40b4fe@gmail.com> <7A18980BD9E65F8A+202306290610400062820@rivai.ai> <38937362-3401-b92e-cb9c-268e52451af7@gmail.com> <112442211B5DB13A+2023063009144147545779@rivai.ai> From: Jeff Law In-Reply-To: <112442211B5DB13A+2023063009144147545779@rivai.ai> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE 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: On 6/29/23 19:14, juzhe.zhong@rivai.ai wrote: > No, reduction patterns won't help. > As I said in vfwmul patch. You should make sure your environment is > working then try again. I've triple checked this already. I checked it again and your patch does not impact behavior, nor should it. I checked it on top of these trunk commits: 14bfda6084eaca07c842566a34316974907958e2 e714af12e3bee0032d8d226f87d92c9bc46f0269 I checked it with the code from the godbolt links you suggested with the options shown in those links. More importantly, your explanation of what the pattern is supposed to do shows a misunderstanding of what combine's capabilities actually are. A bridge or intermediate pattern is not needed here, combine can substitute multiple sources in combination attempts as can be clearly seen from the dump fragments I posted. The only reason I didn't reject the patch at the outset was the possibility that maybe we were trying to combine more than 4 instructions or that possibility something about the number of operands, unspecs, whatever were getting in the way. This patch is not needed and does not affect code generation. I would strongly suggest looking at a dependency height reduction pattern if you want to optimize that code further. Jeff