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 AF8003858D28 for ; Tue, 1 Aug 2023 23:22:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org AF8003858D28 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-1bbf0f36ce4so28666485ad.0 for ; Tue, 01 Aug 2023 16:22:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1690932175; x=1691536975; 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=x2n8Gkr6PZg457BegUDHcq8Dcr3FrXvIKPHFyXBo0fI=; b=jz2PGTBLoYyz9htvLVbNXW3S66B59Oar2LuQTfPxBdm8Hubq4AFxWWnD9YPI+7S1Ge 7x2rJTCMcccRlyHfqH8KDKln4yF3hxzLfvu23+zT4v4xrSWHJYHwNYOHNWnmH9AyXX1M Qn/Sgmmvq001deQqHqtZSoJ0Mlyi1YZF4yl4GRZMr8gPePqbl8SxUiErDStqqWfg2+PT vXzOStJkEX0g2JEVfti6JAtjvNuZA7RBMUp6jXO+0ZgzsjO7L5YySje8Los61pMmef06 IhmLfMwYhkuPykWirtr7Ht7ib42DYYQqTntRWwtLOmGivLLwhfPhnCZ/V22b5hVBlVFw 8H8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690932175; x=1691536975; 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=x2n8Gkr6PZg457BegUDHcq8Dcr3FrXvIKPHFyXBo0fI=; b=Eog+7G4dRQl6GuxZsYvOx9eLXtgECekuCHTNrMSmTac83vuzwHZHYpzJpJ0R9zDgmD 3ypkr0i91OcRMTj4i15rqF0T9FYFMa+QXOsW0griKGDCcGdxfdYT/F5+6bjZLkwXHkAC KUMrkNUm0ch89poC/NXnjM0zlG1sDwemqYVltidwl2ordTcIr7oZspLGLNsr30Npn5xx +k6Db1m3vcWSokHLEceNqkPbIq5L6+b9GixwT5UFKc6Uy9OcoLXhQ2g45+A/+ycODIPQ G62AScTJbUA54XrGyozEJA39Z3zNOehZjU/gIOLDrf4zQG+YCcoYKEKQWwzxE+bPg/H6 sADA== X-Gm-Message-State: ABy/qLYyrtme/Wzi5PZb97B34fWBPs7N+gddWIwdFnInuRv47+10r6S0 gHMgu/kvubvKix0msr7YwjQ= X-Google-Smtp-Source: APBJJlH+WIHVhJ9gguXwbQoV8E7cIpdrhEK9DiCntO1HMPoFhqgcrPjBE5o/Cf5vhCRvvLCxxku2Rw== X-Received: by 2002:a17:902:ce8b:b0:1bb:e74b:39ff with SMTP id f11-20020a170902ce8b00b001bbe74b39ffmr16102038plg.0.1690932175374; Tue, 01 Aug 2023 16:22:55 -0700 (PDT) Received: from [172.31.0.109] ([136.36.130.248]) by smtp.gmail.com with ESMTPSA id p9-20020a170902a40900b001bbaf09ce15sm10926187plq.152.2023.08.01.16.22.54 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 01 Aug 2023 16:22:54 -0700 (PDT) Message-ID: <22456fc3-81f6-6927-7340-7e545f34723f@gmail.com> Date: Tue, 1 Aug 2023 17:22:53 -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: Philipp Tomsich , Vineet Gupta 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: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. They must not be working as expected or folks are using old trees. Manolis's work for regcprop has been on the trunk for about 5-6 weeks ag this point: > commit 893883f2f8f56984209c6ed210ee992ff71a14b0 > Author: Manolis Tsamis > Date: Tue Jun 20 16:23:52 2023 +0200 > > cprop_hardreg: fix ORIGINAL_REGNO/REG_ATTRS/REG_POINTER handling > > Fixes: 6a2e8dcbbd4bab3 > > Propagation for the stack pointer in regcprop was enabled in > 6a2e8dcbbd4bab3, but set ORIGINAL_REGNO/REG_ATTRS/REG_POINTER for > stack_pointer_rtx which caused regression (e.g., PR 110313, PR 110308). > > This fix adds special handling for stack_pointer_rtx in the places > where maybe_mode_change is called. This also adds an check in > maybe_mode_change to return the stack pointer only when the requested > mode matches the mode of stack_pointer_rtx. > > PR debug/110308 > > gcc/ChangeLog: > > * regcprop.cc (maybe_mode_change): Check stack_pointer_rtx mode. > (maybe_copy_reg_attrs): New function. > (find_oldest_value_reg): Use maybe_copy_reg_attrs. > (copyprop_hardreg_forward_1): Ditto. > > gcc/testsuite/ChangeLog: > > * g++.dg/torture/pr110308.C: New test. > > Signed-off-by: Manolis Tsamis > Signed-off-by: Philipp Tomsich > > commit 6a2e8dcbbd4bab374b27abea375bf7a921047800 > Author: Manolis Tsamis > Date: Thu May 25 13:44:41 2023 +0200 > > cprop_hardreg: Enable propagation of the stack pointer if possible > > Propagation of the stack pointer in cprop_hardreg is currenty > forbidden in all cases, due to maybe_mode_change returning NULL. > Relax this restriction and allow propagation when no mode change is > requested. > > gcc/ChangeLog: > > * regcprop.cc (maybe_mode_change): Enable stack pointer > propagation.