From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x436.google.com (mail-pf1-x436.google.com [IPv6:2607:f8b0:4864:20::436]) by sourceware.org (Postfix) with ESMTPS id AA7FB3858D28 for ; Tue, 1 Aug 2023 23:21:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org AA7FB3858D28 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-pf1-x436.google.com with SMTP id d2e1a72fcca58-686efdeabaeso4180339b3a.3 for ; Tue, 01 Aug 2023 16:21:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1690932079; x=1691536879; 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=HIi0My+hS2G+gv6CR55XzCEUiPmdv+kPd52vZqhRM80=; b=pvnJu42iC4qy40s98ctIm6/aBnZjrFPcjR8VUHg9gJLEhoTxNc9j6oO0viP5nZ3diQ qVDFR4tGMi1hfAyhPxQf2Is7wo/AYlp+AZTb0pSuuFgYhgPGRzcMA5gEEYkVOrq5/8mt T30bFr0XJpqyB7gK7f6bgtCExrf6VardZ/yvRphZ+e1jQNSTPT6HBX1u9DUENe/n7qGu /o2CCbF7jrpxGB2kP7Dq2M4qmXLsufhA4gw099UhjnApKnJAAIsyhP3AkgE6qxcvLwnD Enj6CCBKSpS6HkxDrM9AUvlPXqQx5SDMB2JxMlNLi5DdQtsXD0p6fiQp+HnwqVCmPtQT uNYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690932079; x=1691536879; 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=HIi0My+hS2G+gv6CR55XzCEUiPmdv+kPd52vZqhRM80=; b=Sy3SkysMVvxgeZrHafbWhMSxNRfj6lPQ8owmgK3I6grA2cqsO4F16ZLAVNORn9hy5A xITjRIhb6NDabhWfpAJFJDbC9y//PagF88Tb3e5qKlrCLUCF+USds1BMmLaTNXmc8vsZ Ctjn/3nkwaxDOJIJPqzvRtUXn7DgE1ln11Yxk1I2FsP5ma37Ik9yeoanMB40uZO72XMo Bi8/MCqWUPkn4PqYpnLDF2XB+W3h7RQSEoD1uSZRevJCArgclx0vlmySZhMkL3veO98a d2C51UHgwXAw1IrOvm+i6EaDirjsWoTV9tYvT910tf3fOG46MywS92V3tJj7Ak5ew7RU P/Tg== X-Gm-Message-State: ABy/qLYNXchmeHpdo7MgEUgTu38YNdxrSvpDJ28CQIOrSHzUX5gXOPYf F92d3oLT94HzbjmMRGoLUp8= X-Google-Smtp-Source: APBJJlGLbfsINMxVFExt8uM4MRGWbJGBRtVb4cNAvur9K/S+6o97OOF8gBauyP6+eB8mkmVS89spnA== X-Received: by 2002:a05:6a00:2d84:b0:66a:613f:87e1 with SMTP id fb4-20020a056a002d8400b0066a613f87e1mr14979263pfb.8.1690932079409; Tue, 01 Aug 2023 16:21:19 -0700 (PDT) Received: from [172.31.0.109] ([136.36.130.248]) by smtp.gmail.com with ESMTPSA id x3-20020aa79183000000b00686ed095681sm9773194pfa.191.2023.08.01.16.21.18 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 01 Aug 2023 16:21:18 -0700 (PDT) Message-ID: <4b45fa88-3736-9a92-90cf-a0f1b832c485@gmail.com> Date: Tue, 1 Aug 2023 17:21:17 -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: RISC-V: Folding memory for FP + constant case Content-Language: en-US To: Vineet Gupta , Philipp Tomsich , Manolis Tsamis Cc: Jivan Hakobyan , gcc-patches@gcc.gnu.org References: <3c1f0f8a-34ed-abb2-8a49-3083a2cc55d2@gmail.com> <61c9b9c2-f52e-2b4e-6d02-62c991603c39@gmail.com> <64233838-fe5e-458d-1eaf-3025b5448d85@rivosinc.com> <91c12503-c288-5b81-8941-cc62bab2ee98@gmail.com> <73dc8b97-7a7b-d9a0-2e8e-b4a5aaa3ee93@rivosinc.com> From: Jeff Law In-Reply-To: <73dc8b97-7a7b-d9a0-2e8e-b4a5aaa3ee93@rivosinc.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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,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 8/1/23 17:03, Vineet Gupta wrote: > > > On 8/1/23 15:07, Philipp Tomsich wrote: >> +Manolis Tsamis >> >> On Tue, 1 Aug 2023 at 23:56, Jeff Law via Gcc-patches >> wrote: >>> >>> >>> On 8/1/23 13:14, Vineet Gupta wrote: >>> >>>> I have some numbers for f-m-o v3 vs this. Attached here (vs. inline to >>>> avoid the Thunderbird mangling the test formatting) >>> Thanks.  Of particular importance is the leela change.  My recollection >>> was that the f-m-o work also picked up that case.  But if my memory is >>> faulty (always a possibility), then that shows a clear case where >>> Jivan's work picks up a case not handled by Manolis's work. >> f-m-o originally targeted (and benefited) the leela-case.  I wonder if >> other optimizations/changes over the last year interfere with this and >> what needs to be changed to accomodate this... looks like we need to >> revisit against trunk. >> >> Philipp. >> >>> And on the other direction we can see that deepsjeng isn't helped by >>> Jivan's work, but is helped by Manolis's new pass. >>> >>> I'd always hoped/expected we'd have cases where one patch clearly helped >>> over the other.  While the .25% to .37% improvements for the three most >>> impacted benchmarks doesn't move the needle much across the whole suite >>> they do add up over time. >>> >>> Jeff > > I took a quick look at Leela, the significant difference is from > additional insns with SP not getting propagated. > > e.g. > >    231b6:    mv    a4,sp >    231b8:    sh2add    a5,a5,a4 > > vs. > >    1e824:    sh2add    a5,a5,sp > > There are 5 such instances which more or less make up for the delta. ACK. Jivan and I have seen similar things with some other work in this space. What's weird is the bits of Manolis's work that went in a month or so ago are supposed to address this exact issue in the post-reload const/copy propagation pass. Jeff