From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) by sourceware.org (Postfix) with ESMTPS id 0B4433858D20 for ; Thu, 10 Nov 2022 19:46:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 0B4433858D20 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=googlemail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=googlemail.com Received: by mail-wr1-x434.google.com with SMTP id w14so3747019wru.8 for ; Thu, 10 Nov 2022 11:46:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=ETKGFSy/Ql2S3P6dXMqUCrL25dRTBNc9q6cWKih71pw=; b=eGdRwZ1gnbDjeh11wV0WcuKGq6S5k+VsHohzjYe/IV6Gd4W70fNxD3JDcMxlK8vsRr 4Xjp5vkQQJzZNoedn5WJojTiflGG2XJxNN5m1ouNndu4IvjMXhGfH6y1OkZfZ2m5K2iK /jKh888SHgJHmNKc6p62DE5sTeJFZMBAtflodS6HvIExIdAK4SatnQoad/jbpbHlpeQj XCC2dZa2EZm+7Up0ygQF1sB5MD+gr5Y6WTAk52g82pGSjin2bYHdNGIgc+wsZddozgtX Js6lUhfQX/xSEHDnlmAL0TyXpv/inQokjwY4hPDcMn3nalN9NOw6LdSEoO9+4gIYZR6Z qZBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ETKGFSy/Ql2S3P6dXMqUCrL25dRTBNc9q6cWKih71pw=; b=RTxHVMqjVW6Hv6Y5Z1RBHn2O6qETEJ7ixdWHLaET1PiuiTYPu0vrPO4ylcAoaXDSg8 HwyIAUhlChuZExQ1oCsHiyhXY6QdmlvDHt5o7fKkq0VG7vyzw2Q12Pa0DlMJo4BtFje8 ctkG9hpG9ISsO9oU32Wh4NNcmfnVuMeZhKBkVpJLyR0qXXovdgRNtOQrB5njT5KA7eGY oKorIIL2DzdzLaL07t/vtbWHMPSVRx0dtOJUd+iDmUAqwgT6q86s4+Rr5lNpslSw3mu3 b0iHtxgpidNLT/BXBhfQ6qqcdRfbSYGi8eptXGuHurURFm6Uj5LNg56i5WL+qMpWAtru urRA== X-Gm-Message-State: ACrzQf1TMFj9zylVWp6EBgz/OjCXHd2TNvWZAjS+tVlHH5HqFXT3TfFt +4pqVEs31HLQ1ntADbcChWse4f2OuoiRfUbChBw= X-Google-Smtp-Source: AMsMyM7nme1ijUCmNF+fKaOV9AmEvIxMGaL3pN4q9lwErqeuICaY/76Z3iOHXb1RoKnSVI5CtZ5Ma4QxPhx+yaNw9yg= X-Received: by 2002:adf:e510:0:b0:235:de50:72ff with SMTP id j16-20020adfe510000000b00235de5072ffmr40496549wrm.100.1668109600523; Thu, 10 Nov 2022 11:46:40 -0800 (PST) MIME-Version: 1.0 References: <4119381e-5b4e-5132-8822-e88f8fbb8fc1@foss.arm.com> In-Reply-To: From: Ramana Radhakrishnan Date: Thu, 10 Nov 2022 19:46:29 +0000 Message-ID: Subject: Re: [Patch Arm] Fix PR 92999 To: Richard Earnshaw Cc: gcc-patches , Richard Earnshaw , Alex Coplan Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,KAM_NUMSUBJECT,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,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 Thu, Nov 10, 2022 at 6:03 PM Richard Earnshaw wrote: > > > > 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. Ooh interesting, thanks for taking a look and poking at the AAPCS and that's a good catch. BF16 should also have the same behaviour as FP16 , I suspect ? > > > > So perhaps the bug is that we try to treat this as a homogeneous > > aggregate at all. Yep I agree - I'll take a look again tomorrow and see if I can get a fix. (And thanks Alex for the test run, I might trouble you again while I still (slowly) get some of my boards back up) regards, Ramana > > R.