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 B691F3858D32 for ; Thu, 25 May 2023 13:38:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B691F3858D32 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-5144a9c11c7so1417255a12.2 for ; Thu, 25 May 2023 06:38:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685021893; x=1687613893; 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=Aj1v1ACxR4wyZhWWRx2+IBMakYYq+BebFS01fEWqvrk=; b=eGV6ua1I4iLRwEVW9VsxL4lTHIh8OTV3/IZcYnDkGH0fiCgNgOKtcx5Ap1SVsD8oA0 z80l8vOd/CKerVB3buajturli2Bb9gsB7l1Y5RzefJ9o9u1qHQyhcCI7kAuvLVEZ/9Lu MzD0LWHl0znG2kbXVuBBBRDBzxw0E8tSNTqZ/36WSaSTGl2/ZLPvp3frw4rGxEAEzatV lq8HO1EW8z6qvWkZPW+1w4IqtL728CZIdyjM86FhUAOh2BHhtvwY36iY/I+khZncjiHv bccV7l+iYA7Y5WMDVzjjjYSlT9ElnH6GZ3L3oBk4fGyI0xay84tvVPLCidgeLa0jVZb4 ViJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685021893; x=1687613893; 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=Aj1v1ACxR4wyZhWWRx2+IBMakYYq+BebFS01fEWqvrk=; b=e/bOwcV/Fn1c7wZKna8w91MlDFvN0q6gL2/8HsY3WVr7mB8EqlHctLUjuOXSXtanbf hKpTz7DHbVCirS/23vsqGn23k09AYglHsTEyAOqu/o/PT+2ZpfhXgjbGNfpRBa20GHHo jas0gJYcx9p23rqtSeX1hVN5ZcMgDSA3rfbdUJmEY3YF3MnuJs8oK4wlIUoIzURVR5CY 9hR1HcV9erY02B0H/azvmUnT7r8dBnDrcz6DFejlwaUW9EL0Ljs9beNON+IwlP36Qqe+ igHVRM1CZaf1DkmsfBwXZvkrMiXpBne9wRINm3XDlDWwr0Oy47K8kUmSPaJGbxioxBSm Jmbg== X-Gm-Message-State: AC+VfDxEWG3dbCXbA7YufC/OFoddSVQniIFRyTSkgyihhXT3wENF6oPG McW0NhTPFfa2fm1z/lMYa5s= X-Google-Smtp-Source: ACHHUZ4UybAJOM808ATXUvL383Jt+Og1z4bcpVmCdOBSi/yCuh0pnUYFM4eEJal2WOtFnte3S8BRsQ== X-Received: by 2002:a17:902:8498:b0:1ae:762a:b660 with SMTP id c24-20020a170902849800b001ae762ab660mr1388440plo.39.1685021892580; Thu, 25 May 2023 06:38:12 -0700 (PDT) Received: from ?IPV6:2601:681:8d00:265::f0a? ([2601:681:8d00:265::f0a]) by smtp.gmail.com with ESMTPSA id u16-20020a170902e5d000b001a260b5319bsm1436326plf.91.2023.05.25.06.38.11 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 25 May 2023 06:38:12 -0700 (PDT) Message-ID: <46d35ebf-b73a-b60d-4e03-35327f1ce80e@gmail.com> Date: Thu, 25 May 2023 07:38:10 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.1 Subject: Re: [PATCH 2/2] cprop_hardreg: Enable propagation of the stack pointer if possible. Content-Language: en-US To: Manolis Tsamis , gcc-patches@gcc.gnu.org Cc: Richard Biener , Palmer Dabbelt , Philipp Tomsich , Kito Cheng References: <20230525123550.1072506-1-manolis.tsamis@vrull.eu> <20230525123550.1072506-3-manolis.tsamis@vrull.eu> From: Jeff Law In-Reply-To: <20230525123550.1072506-3-manolis.tsamis@vrull.eu> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.5 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 5/25/23 06:35, Manolis Tsamis wrote: > 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. I can't see how this can be correct given the stack pointer equality tests elsewhere in the compiler, particularly the various targets. The problem is if you change the mode then you end up with multiple REG expressions that reference the stack pointer. See rev: d1446456c3fcaa7be628726c9de4a877729490ca and the thread around the change which introduced this code. Jeff