From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by sourceware.org (Postfix) with ESMTP id 0185A3858CDA for ; Thu, 10 Nov 2022 18:03:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 0185A3858CDA Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=foss.arm.com Authentication-Results: sourceware.org; spf=none smtp.mailfrom=foss.arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 8BD0A1FB; Thu, 10 Nov 2022 10:03:17 -0800 (PST) Received: from [10.57.4.189] (unknown [10.57.4.189]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 8FAEA3F73D; Thu, 10 Nov 2022 10:03:10 -0800 (PST) Message-ID: Date: Thu, 10 Nov 2022 18:03:09 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Subject: Re: [Patch Arm] Fix PR 92999 Content-Language: en-GB To: Ramana Radhakrishnan , gcc-patches Cc: Richard Earnshaw References: <4119381e-5b4e-5132-8822-e88f8fbb8fc1@foss.arm.com> From: Richard Earnshaw In-Reply-To: <4119381e-5b4e-5132-8822-e88f8fbb8fc1@foss.arm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3489.7 required=5.0 tests=BAYES_00,KAM_DMARC_STATUS,KAM_LAZY_DOMAIN_SECURITY,KAM_NUMSUBJECT,KAM_SHORT,NICE_REPLY_A,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=no 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 10/11/2022 17:21, Richard Earnshaw via Gcc-patches wrote: > > > On 08/11/2022 18:20, Ramana Radhakrishnan via Gcc-patches wrote: >> PR92999 is a case where the VFP calling convention does not allocate >> enough FP registers for a homogenous aggregate containing FP16 values. >> I believe this is the complete fix but would appreciate another set of >> eyes on this. >> >> Could I get a hand with a regression test run on an armhf environment >> while I fix my environment ? >> >> gcc/ChangeLog: >> >> PR target/92999 >> *  config/arm/arm.c (aapcs_vfp_allocate_return_reg): Adjust to handle >> aggregates with elements smaller than SFmode. >> >> gcc/testsuite/ChangeLog: >> >> * gcc.target/arm/pr92999.c: New test. >> >> >> Thanks, >> Ramana >> >> Signed-off-by: Ramana Radhakrishnan > > I'm not sure about this.  The AAPCS does not mention a base type of a > half-precision FP type as an appropriate homogeneous aggregate for using > VFP registers for either calling or returning. > > So perhaps the bug is that we try to treat this as a homogeneous > aggregate at all. > > R. And clang seems to agree with my opinion: https://godbolt.org/z/ncaYfzebM R.