From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ln01.mxout.alfaservers.com (ln01.mxout.alfaservers.com [85.17.185.57]) by sourceware.org (Postfix) with ESMTPS id ACE923840C0C for ; Thu, 4 Feb 2021 10:53:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org ACE923840C0C Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=blueice.be Authentication-Results: sourceware.org; spf=none smtp.mailfrom=henri.cloetens@blueice.be Received: from [109.136.127.188] (port=40044 helo=[192.168.250.29]) by ln01.alfaservers.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from ) id 1l7cGB-00014g-6a for gcc-help@gcc.gnu.org; Thu, 04 Feb 2021 11:53:15 +0100 To: gcc-help From: Henri Cloetens Subject: Issue with frame pointer elimination Message-ID: Date: Thu, 4 Feb 2021 11:54:09 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - ln01.alfaservers.com X-AntiAbuse: Original Domain - gcc.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - blueice.be X-Get-Message-Sender-Via: ln01.alfaservers.com: authenticated_id: henri.cloetens@blueice.be X-Authenticated-Sender: ln01.alfaservers.com: henri.cloetens@blueice.be X-Source: X-Source-Args: X-Source-Dir: X-Spam-Status: No, score=-3.3 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-help@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-help mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2021 10:53:17 -0000 Hello, I am working on a custom gcc.9.2.0 back end, and have an issue with frame pointer elimination. - the result is OK till step '276 : ira (register allocation) - the result is NG from step '277 onward (reload) What it did: It used R19 for the frame pointer. This register is call-clobbered, but is not used for   argument passing. Some way, it assumed to be free, but it is not. So, the frame pointer is put in it, it is call-clobbered, and the result is incorrect. If the compile flag -fomit-frame-pointer is used, the issue goes away. Has anybody any idea where to look ?. Best Regards, Henri.