From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x62a.google.com (mail-pl1-x62a.google.com [IPv6:2607:f8b0:4864:20::62a]) by sourceware.org (Postfix) with ESMTPS id 226793858D28 for ; Tue, 1 Aug 2023 23:27:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 226793858D28 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-pl1-x62a.google.com with SMTP id d9443c01a7336-1bb9e6c2a90so49505185ad.1 for ; Tue, 01 Aug 2023 16:27:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1690932439; x=1691537239; 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=JQx0cPZBxiKh3QfNc5D/iDYpJ1AhvT0isPUNzCx8Rsk=; b=MZzvYd0Cf/yNYTKlrVu4EmNA/1iEq5opsEEuwK8nHX82SlNGZfU75UEASUZD3X3nZe BtvXNVwbvXBuk6MV9otBgZ2YFaRGn9px1ylGqb8oVpTEgIw9FCd24E0Hoif8BiM9RTh4 XfEfSu4mnPEREPx3K+RbIRSlhby5JmIytB9UvdCMsBToNMqIR/xAmYMTR30jVo6oJyVx mcOI+aYoHEfW33mIUZEDVdc00ticx0wLqTYVCFGEps5y/o01j+BzaH4keJ7ThbP71s6O hbOsGYoE+D+8CRTttRrgkctlt14xPRu87wb5yY56YXk/KmDsn46JqbSBArt3c6KxhzSC e8NQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690932439; x=1691537239; 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=JQx0cPZBxiKh3QfNc5D/iDYpJ1AhvT0isPUNzCx8Rsk=; b=b2tyDdqmMyvAzMSv7SGxU7qV0NWm8Bh2Kp3mi7BWO4Do9FkholNLPL/CuA9MHjScnw tt0hvqP9b9OIPKLO3NcSVqFufC2+gL90LB4+82dMq94azHH3/CNEhrsM1KhmmTB1kgqL PvEa94LYvjCvEG2tVY4KUJr7aUusD/SatpzgOTD6CcO+QoSex3dIhekzySkC+DSCl29x JHwHEKJzmk8r9yx0TT58tmF+EmfR4nok5fb3IjS1ycropdqp9I6BDpzbw/oaLG4uTlnB MWguNDudfX5mScgK9idEtIJvDCg3N6Uh9yrcWULls5lOmDoU2QWKmPQERhIciPmigon3 3sAQ== X-Gm-Message-State: ABy/qLYbsdmgJfcpiTfqrzqst2CIUCilvnsFKGzpCnbZeqBBDIfBNhJq rY7n7Qtjkom/aYNLq4/HhvD2zmYWK1i9lg== X-Google-Smtp-Source: APBJJlHAYSVN3f5ZczgD5KlXAohV0sxQ+pUvzqtqf5DINCS7MfLfpCEQVDrTNUiC8WnXeKFzIKbmiw== X-Received: by 2002:a17:903:11d2:b0:1b8:7e53:704 with SMTP id q18-20020a17090311d200b001b87e530704mr16039047plh.27.1690932439178; Tue, 01 Aug 2023 16:27:19 -0700 (PDT) Received: from [172.31.0.109] ([136.36.130.248]) by smtp.gmail.com with ESMTPSA id c10-20020a170902c1ca00b001bc18e579aesm3930576plc.101.2023.08.01.16.27.18 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 01 Aug 2023 16:27:18 -0700 (PDT) Message-ID: <40176a5c-382d-809d-a4b1-06c6541c3670@gmail.com> Date: Tue, 1 Aug 2023 17:27: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 Cc: Manolis Tsamis , 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: 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:13, Vineet Gupta wrote: > > On 8/1/23 16:06, Philipp Tomsich wrote: >> Very helpful! Looks as if regprop for stack_pointer is now either too >> conservative — or one of our patches is missing in everyone's test >> setup; we'll take a closer look. > > FWIW, all 5 of them involve a SH2ADD have SP as source in the fold FP > case which f-m-o seems to be generating a MV for. To clarify f-m-o isn't generating the mv. It's simplifying a sequence by pushing the constant in an addi instruction into the memory reference. As a result the addi simplifies into a sp->reg copy that is supposed to then be propagated away. Also note that getting FP out of the shift-add sequences is the other key goal of Jivan's work. FP elimination always results in a spill/reload if we have a shift-add insn where one operand is FP. jeff