From patchwork Mon Jun 26 13:55:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Carlotti X-Patchwork-Id: 112955 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp7500335vqr; Mon, 26 Jun 2023 06:56:59 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4tXWOuU10Q7oyqXLPcQcrYKG0AfZ2TSXuZSx+BWT0v6GdvNweMip7JmKKwZ61kEmAksNQ4 X-Received: by 2002:a17:907:9623:b0:988:9a65:eae6 with SMTP id gb35-20020a170907962300b009889a65eae6mr19706610ejc.38.1687787819767; Mon, 26 Jun 2023 06:56:59 -0700 (PDT) Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id i15-20020a170906850f00b00977e4a1fe32si2960574ejx.539.2023.06.26.06.56.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Jun 2023 06:56:59 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=XMqxRC6n; arc=fail (signature failed); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 0A7293858C2D for ; Mon, 26 Jun 2023 13:56:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0A7293858C2D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1687787817; bh=5KxJuzVK+CDpd3afG7L8UKp2doQDI03F7jO0rK8p/mY=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=XMqxRC6nM1vTEXLZp4b8KC2DpP6TK6SM3qDQYOV55wwLXZ6y+unHn+w07Y2763NCA HgK5jx0YHAG9Ua/kdU6xe4ycjqeZ6M+9PqvQ1o3WHssuWR2rE2i5vYMeMTqiZIE0iE a+nIdNtAyV5LSg9ZOq1VAAr4gnvQ2sDYDijwedUY= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-vi1eur04on2059.outbound.protection.outlook.com [40.107.8.59]) by sourceware.org (Postfix) with ESMTPS id 7C05F3858422 for ; Mon, 26 Jun 2023 13:56:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7C05F3858422 Received: from AM0PR01CA0077.eurprd01.prod.exchangelabs.com (2603:10a6:208:10e::18) by PAXPR08MB7381.eurprd08.prod.outlook.com (2603:10a6:102:22b::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.24; Mon, 26 Jun 2023 13:56:02 +0000 Received: from AM7EUR03FT028.eop-EUR03.prod.protection.outlook.com (2603:10a6:208:10e:cafe::e) by AM0PR01CA0077.outlook.office365.com (2603:10a6:208:10e::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.33 via Frontend Transport; Mon, 26 Jun 2023 13:56:02 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; pr=C Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM7EUR03FT028.mail.protection.outlook.com (100.127.140.192) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6544.15 via Frontend Transport; Mon, 26 Jun 2023 13:56:02 +0000 Received: ("Tessian outbound e2424c13b707:v142"); Mon, 26 Jun 2023 13:56:01 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 299b1cb7c6091add X-CR-MTA-TID: 64aa7808 Received: from 5be98fb860c1.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 75D41767-D774-4307-8784-F445FD4371F2.1; Mon, 26 Jun 2023 13:55:55 +0000 Received: from EUR04-HE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 5be98fb860c1.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Mon, 26 Jun 2023 13:55:55 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PjApb3ehBXpKyyEgyQDnWFJe4Ymt8Rxi7CtVlhqh0DjBWfng7bPbN9D8fksvsFUxYg/Cx/k/DkzH1svpfddeSreXMoqi4w6pfnEwQfBfN/+5kuSq/LsYryptQ2nsp29s9JdSceYpTT8f41I40tsyOxFD7jHOQQ4ZBgWS492hA9USTjB8geoxLj/3ge1+pl4jxGE8fIfjjWjtVTN8qz+Nju2FqZEUSZM6n/zL+OVlwUDt0G2zYze2YQcGmIizobfUVp1o/eEehMwIvTCO2mdrQwwbsDhPaAfevzdRWxWgd9jQxD0CMpgvxp0Uh7FYgKxw2dQISvROTFJtw140kbcjuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=5KxJuzVK+CDpd3afG7L8UKp2doQDI03F7jO0rK8p/mY=; b=U2kVM/qcXCivpgV1BFKMTO60IKjjq7QIzeKRKV4ZqYX3z/newO14Nnc77nkkxFnXL4n+6qy7GQk6kaDDxtZdvBihBAINxE0h8ddZfxddUj/Z/AttzQNGHziGSXbFnu97Pjb1P/57B9MKpIekNbtputZZY70uPsUGa3XfH4Ri8iMN0WI5VHqUqCrOASxfkosMMjTeboOEslBif2a29tdOIpB5GcIDxdKi/JWAqLvZ7/I5L1QJNwhbPTeDws2gbxhMACZEZYdba6VUd89IfU4QinFcDB1iZRwV7y7g3n+PcZPvId3FMJDcpoPX+CRK3pvCO2ozJ7yL0Ii2FKhWDNqeaQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Received: from AS8PR08MB6678.eurprd08.prod.outlook.com (2603:10a6:20b:398::8) by DB9PR08MB9945.eurprd08.prod.outlook.com (2603:10a6:10:3d2::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.24; Mon, 26 Jun 2023 13:55:52 +0000 Received: from AS8PR08MB6678.eurprd08.prod.outlook.com ([fe80::bcf:d5c1:39d2:8c41]) by AS8PR08MB6678.eurprd08.prod.outlook.com ([fe80::bcf:d5c1:39d2:8c41%5]) with mapi id 15.20.6521.026; Mon, 26 Jun 2023 13:55:52 +0000 Date: Mon, 26 Jun 2023 14:55:48 +0100 To: gcc-patches@gcc.gnu.org Subject: [PATCH] aarch64: Remove architecture dependencies from intrinsics Message-ID: <98b3efca-4c1c-7797-022c-0be09087d086@e124511.cambridge.arm.com> Content-Disposition: inline X-ClientProxiedBy: LO4P265CA0183.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:311::6) To AS8PR08MB6678.eurprd08.prod.outlook.com (2603:10a6:20b:398::8) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: AS8PR08MB6678:EE_|DB9PR08MB9945:EE_|AM7EUR03FT028:EE_|PAXPR08MB7381:EE_ X-MS-Office365-Filtering-Correlation-Id: 1b8f377b-3734-4f6f-75f7-08db764d13f7 x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: bm75fU2YiXnxMo07P+iX7MNaplTXNZLDabsUFh6hHrgUh//07c3tmjvaY8Uq4KRCKMUeJ8GnA7+ylMZyLw8GGyUZ89837ORnAdK+04sPpJZcRmrDldQpN3GizPnTULjnIDVFFh1z1hVqk1WD2inoovFa30HXLXQuO0cP3KUlFa489jqigQrnY9YazZekCisTDuDXomcvns2R7n84ahJbm85qJmO2+h+5D8E/ft2K7rJKdhUbk9R5pFrD4oez/8ulZJ1Y1C/OLX2U1V79/fZuXAhAg1LcNeW2RwJB7HVcapM1F4GbTY/Ej8FPtdZzqsLPGDTQTWXhdyUCuyYFhGmL+FxX9iiE7EpNjlZ0Z7mXm25QcnPrapxnKBYAU3EbjVqsLuFCsd71OcRIpy5/97UVE1zDmaBdDMt1mSDFuTAvS+CVVUubFB0rzgMU8XpLeglUfoTI7pxBshcjoXZ/KCzrN1P94I+hoKmwb9MK/Sfa94pMv6x1U3eEoKB6m7E/HGTRbGgm+RqN9YGL83Yc5mZYy5o+EDzG26biZ5l/Hk8azzUuAc3iXcfgYyo2Rmz6kV2f1oaRQx1RRrP3EaxjMSjkYQ== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AS8PR08MB6678.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(376002)(396003)(39860400002)(136003)(366004)(346002)(451199021)(30864003)(2906002)(186003)(26005)(38100700002)(6512007)(6506007)(44832011)(41300700001)(66476007)(66556008)(66946007)(8936002)(8676002)(31696002)(6666004)(6486002)(86362001)(478600001)(6916009)(316002)(5660300002)(31686004)(84970400001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR08MB9945 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM7EUR03FT028.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: d808586d-8ff8-492a-c8e0-08db764d0e48 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 7NoUXpPCOsq7fp+M9+awDUcf3C9ziYCNc6x2wnqC9IL2faaKjrBCUBsDO+KuzVsb9FzZXR+4+PJ2LQRfMl2pcRTrvWI2QDJS8lt30Z8wkrhC7PYjyrv/7waRlcvzXWzp9NAorXD2OmRAZhM7OUzCi+hUVpKmZFdI6ckBWOC721cHRkO6Sk+NVtftro9dDkxKAVVmoU1dmk8ZnVac6HMK5bed/y0dgamj9Wgl7VcjVI1B5gSjzaDxkM4KamVF7oJpQeTy4bTpZGdVRerNsoJNA9QwmaxAmW4TbBSstqIgGVUBWMqs5SNBLlIvzZ3PSv5M8Il3HbkUV//PmmQTdZqFj+0ros8Ih6LEgyeA5d4Bv0jBOtV+2wzB2Si4eo2aTsjgU8IPCf9wIj1YU+YDtG6WHOrvMWYhB4YM+MqOZc+p/ghD8dmzWu9lVd4XPaHiTYsNdKZBEa42EDrdjTDYPlP9Pg+jXojNlQznJvt/nII0LC1eELyDQfceUhP6c/PWafcTv3KgOU9wEhd3rKtmUII+hMeVqzW/MHfLHh4x0AagdapG5zcRggi9dxT/0TiUgWT4fP71ujx6B9iJxuiif40u7/FHPSKdQPzNF7pwvMGePfDJSevy7joYGk3ATUV1OI3pw4bIr9/woONPUfasnuUEqlN5Ig2OUeR/SKkT06MtdDCBKoonvXdOhlSBvboFL/Ci0MPNb0X8s+AG24anXVO/iKSDcmvy6y+mFrj0jyt2cUxj+3FD4pwrxbcg9/bXC5IKaK2NYPOu5X+jBjOB4z3B0g== X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFS:(13230028)(4636009)(396003)(39860400002)(136003)(346002)(376002)(451199021)(36840700001)(40470700004)(46966006)(2906002)(30864003)(40460700003)(6486002)(82310400005)(6666004)(356005)(82740400003)(81166007)(6506007)(26005)(47076005)(186003)(336012)(36860700001)(40480700001)(31696002)(86362001)(41300700001)(478600001)(70206006)(70586007)(6916009)(316002)(8936002)(6512007)(31686004)(44832011)(84970400001)(8676002)(5660300002); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jun 2023 13:56:02.1820 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1b8f377b-3734-4f6f-75f7-08db764d13f7 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: AM7EUR03FT028.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR08MB7381 X-Spam-Status: No, score=-12.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, FORGED_SPF_HELO, GIT_PATCH_0, KAM_DMARC_NONE, KAM_LOTSOFHASH, KAM_SHORT, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Andrew Carlotti via Gcc-patches From: Andrew Carlotti Reply-To: Andrew Carlotti Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1769773800718045912?= X-GMAIL-MSGID: =?utf-8?q?1769773800718045912?= Many intrinsics currently depend on both an architecture version and a feature, despite the corresponding instructions being available within GCC at lower architecture versions. LLVM has already removed these explicit architecture version dependences; this patch does the same for GCC, as well as removing an unecessary simd dependency for the scalar fp16 intrinsics. Binutils does not support all of these architecture+feature combinations yet, but this is an existing problem that is already reachable from GCC. For example, compiling the test gcc.target/aarch64/usadv16qi-dotprod.c with -O3 -march=armv8-a+dotprod has resulted in an assembler error since GCC 10. I intend to patch this in binutils. This patch retains explicit architecture version dependencies for features that do not currently have a separate feature flag. Ok for master, and backport to GCC 13? gcc/ChangeLog: * config/aarch64/aarch64.h (TARGET_MEMTAG): Remove armv8.5 dependency. * config/aarch64/arm_acle.h: Remove unnecessary armv8.x dependencies from target pragmas. * config/aarch64/arm_fp16.h (target): Likewise. * config/aarch64/arm_neon.h (target): Likewise. gcc/testsuite/ChangeLog: * gcc.target/aarch64/feature-bf16-backport.c: New test. * gcc.target/aarch64/feature-dotprod-backport.c: New test. * gcc.target/aarch64/feature-fp16-backport.c: New test. * gcc.target/aarch64/feature-fp16-scalar-backport.c: New test. * gcc.target/aarch64/feature-fp16fml-backport.c: New test. * gcc.target/aarch64/feature-i8mm-backport.c: New test. * gcc.target/aarch64/feature-memtag-backport.c: New test. * gcc.target/aarch64/feature-sha3-backport.c: New test. * gcc.target/aarch64/feature-sm4-backport.c: New test. diff --git a/gcc/config/aarch64/aarch64.h b/gcc/config/aarch64/aarch64.h index 7129ed1ff370d597895b3f46b56b1250da7fa190..cdb664eb8f7db820b6b06b2667bfad6dc14cb7a2 100644 --- a/gcc/config/aarch64/aarch64.h +++ b/gcc/config/aarch64/aarch64.h @@ -292,7 +292,7 @@ enum class aarch64_feature : unsigned char { #define TARGET_RNG (AARCH64_ISA_RNG) /* Memory Tagging instructions optional to Armv8.5 enabled through +memtag. */ -#define TARGET_MEMTAG (AARCH64_ISA_V8_5A && AARCH64_ISA_MEMTAG) +#define TARGET_MEMTAG (AARCH64_ISA_MEMTAG) /* I8MM instructions are enabled through +i8mm. */ #define TARGET_I8MM (AARCH64_ISA_I8MM) diff --git a/gcc/config/aarch64/arm_acle.h b/gcc/config/aarch64/arm_acle.h index e0ac591d2c8d6c4c4c8a074b2d9881c47b1db1ab..87fb42f47c5821adecbb0ea441e0a38c63972e77 100644 --- a/gcc/config/aarch64/arm_acle.h +++ b/gcc/config/aarch64/arm_acle.h @@ -325,7 +325,7 @@ __rndrrs (uint64_t *__res) #pragma GCC pop_options #pragma GCC push_options -#pragma GCC target ("arch=armv8.5-a+memtag") +#pragma GCC target ("+nothing+memtag") #define __arm_mte_create_random_tag(__ptr, __u64_mask) \ __builtin_aarch64_memtag_irg(__ptr, __u64_mask) diff --git a/gcc/config/aarch64/arm_fp16.h b/gcc/config/aarch64/arm_fp16.h index a8fa4dbbdfe1bab4aa604bb311ef66d4e1de18ac..84b2ed66f9ba19fba6ccd8be33940d7239bfa22e 100644 --- a/gcc/config/aarch64/arm_fp16.h +++ b/gcc/config/aarch64/arm_fp16.h @@ -30,7 +30,7 @@ #include #pragma GCC push_options -#pragma GCC target ("arch=armv8.2-a+fp16") +#pragma GCC target ("+nothing+fp16+nosimd") typedef __fp16 float16_t; diff --git a/gcc/config/aarch64/arm_neon.h b/gcc/config/aarch64/arm_neon.h index eeec9f162e223df8cf7803b3227aef22e94227ac..a078674376af121c36bbebef76631c25a6815b1b 100644 --- a/gcc/config/aarch64/arm_neon.h +++ b/gcc/config/aarch64/arm_neon.h @@ -25590,7 +25590,7 @@ __INTERLEAVE_LIST (zip) #include "arm_fp16.h" #pragma GCC push_options -#pragma GCC target ("arch=armv8.2-a+fp16") +#pragma GCC target ("+nothing+fp16") /* ARMv8.2-A FP16 one operand vector intrinsics. */ @@ -26753,7 +26753,7 @@ vminnmvq_f16 (float16x8_t __a) /* AdvSIMD Dot Product intrinsics. */ #pragma GCC push_options -#pragma GCC target ("arch=armv8.2-a+dotprod") +#pragma GCC target ("+nothing+dotprod") __extension__ extern __inline uint32x2_t __attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) @@ -26844,7 +26844,7 @@ vdotq_laneq_s32 (int32x4_t __r, int8x16_t __a, int8x16_t __b, const int __index) #pragma GCC pop_options #pragma GCC push_options -#pragma GCC target ("arch=armv8.2-a+sm4") +#pragma GCC target ("+nothing+sm4") __extension__ extern __inline uint32x4_t __attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) @@ -26911,7 +26911,7 @@ vsm4ekeyq_u32 (uint32x4_t __a, uint32x4_t __b) #pragma GCC pop_options #pragma GCC push_options -#pragma GCC target ("arch=armv8.2-a+sha3") +#pragma GCC target ("+nothing+sha3") __extension__ extern __inline uint64x2_t __attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) @@ -27547,7 +27547,7 @@ vcmlaq_rot270_laneq_f32 (float32x4_t __r, float32x4_t __a, float32x4_t __b, #pragma GCC pop_options #pragma GCC push_options -#pragma GCC target ("arch=armv8.2-a+fp16fml") +#pragma GCC target ("+nothing+fp16fml") __extension__ extern __inline float32x2_t __attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) @@ -27856,7 +27856,7 @@ vrnd64xq_f64 (float64x2_t __a) #include "arm_bf16.h" #pragma GCC push_options -#pragma GCC target ("arch=armv8.2-a+bf16") +#pragma GCC target ("+nothing+bf16") __extension__ extern __inline bfloat16x4_t __attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) @@ -28535,7 +28535,7 @@ vst4q_lane_bf16 (bfloat16_t *__ptr, bfloat16x8x4_t __val, const int __lane) /* AdvSIMD 8-bit Integer Matrix Multiply (I8MM) intrinsics. */ #pragma GCC push_options -#pragma GCC target ("arch=armv8.2-a+i8mm") +#pragma GCC target ("+nothing+i8mm") __extension__ extern __inline int32x2_t __attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) diff --git a/gcc/testsuite/gcc.target/aarch64/feature-bf16-backport.c b/gcc/testsuite/gcc.target/aarch64/feature-bf16-backport.c new file mode 100644 index 0000000000000000000000000000000000000000..3a03255bbb9a3e3da45c9f2ecafaf12685278057 --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/feature-bf16-backport.c @@ -0,0 +1,10 @@ +/* { dg-do compile } */ +/* { dg-additional-options "-march=armv8-a+bf16" } */ + +#include + +float32x4_t bar (float32x4_t r, bfloat16x8_t a, bfloat16x8_t b) { + return vbfmlalbq_f32 (r, a, b); +} + +/* { dg-final { scan-assembler {\tbfmlalb\t} } } */ diff --git a/gcc/testsuite/gcc.target/aarch64/feature-dotprod-backport.c b/gcc/testsuite/gcc.target/aarch64/feature-dotprod-backport.c new file mode 100644 index 0000000000000000000000000000000000000000..5f66fffa5f5b09a9c04da7b861055e3aa89bccec --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/feature-dotprod-backport.c @@ -0,0 +1,10 @@ +/* { dg-do compile } */ +/* { dg-additional-options "-march=armv8-a+dotprod" } */ + +#include + +uint32x4_t bar (uint32x4_t r, uint8x16_t a, uint8x16_t b) { + return vdotq_u32(r, a, b); +} + +/* { dg-final { scan-assembler {\tudot\t} } } */ diff --git a/gcc/testsuite/gcc.target/aarch64/feature-fp16-backport.c b/gcc/testsuite/gcc.target/aarch64/feature-fp16-backport.c new file mode 100644 index 0000000000000000000000000000000000000000..eb94ae060664eef4275023440c0a18b52ae27b42 --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/feature-fp16-backport.c @@ -0,0 +1,10 @@ +/* { dg-do compile } */ +/* { dg-additional-options "-march=armv8-a+fp16" } */ + +#include + +float16x8_t bar (float16x8_t a, float16x8_t b) { + return vaddq_f16(a, b); +} + +/* { dg-final { scan-assembler {\tfadd\t} } } */ diff --git a/gcc/testsuite/gcc.target/aarch64/feature-fp16-scalar-backport.c b/gcc/testsuite/gcc.target/aarch64/feature-fp16-scalar-backport.c new file mode 100644 index 0000000000000000000000000000000000000000..9cde6b5558c2e3699620d0d35ebc3e679fdfe5eb --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/feature-fp16-scalar-backport.c @@ -0,0 +1,10 @@ +/* { dg-do compile } */ +/* { dg-additional-options "-march=armv8-a+fp16+nosimd" } */ + +#include + +float16_t bar (float16_t a, float16_t b) { + return vaddh_f16(a, b); +} + +/* { dg-final { scan-assembler {\tfadd\t} } } */ diff --git a/gcc/testsuite/gcc.target/aarch64/feature-fp16fml-backport.c b/gcc/testsuite/gcc.target/aarch64/feature-fp16fml-backport.c new file mode 100644 index 0000000000000000000000000000000000000000..86c4748b86d9730d433cc206700d7789d996bb6d --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/feature-fp16fml-backport.c @@ -0,0 +1,10 @@ +/* { dg-do compile } */ +/* { dg-additional-options "-march=armv8-a+fp16fml" } */ + +#include + +float32x4_t bar (float32x4_t r, float16x8_t a, float16x8_t b) { + return vfmlalq_high_f16 (r, a, b); +} + +/* { dg-final { scan-assembler {\tfmlal2\t} } } */ diff --git a/gcc/testsuite/gcc.target/aarch64/feature-i8mm-backport.c b/gcc/testsuite/gcc.target/aarch64/feature-i8mm-backport.c new file mode 100644 index 0000000000000000000000000000000000000000..6dd0214faab9d470a4f363252d48ac0de92bfe7b --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/feature-i8mm-backport.c @@ -0,0 +1,10 @@ +/* { dg-do compile } */ +/* { dg-additional-options "-march=armv8-a+i8mm" } */ + +#include + +int32x4_t bar (int32x4_t r, int8x16_t a, int8x16_t b) { + return vmmlaq_s32 (r, a, b); +} + +/* { dg-final { scan-assembler {\tsmmla\t} } } */ diff --git a/gcc/testsuite/gcc.target/aarch64/feature-memtag-backport.c b/gcc/testsuite/gcc.target/aarch64/feature-memtag-backport.c new file mode 100644 index 0000000000000000000000000000000000000000..5cb071b77ccbd11039d4b8ee9e2cd78a708f2fad --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/feature-memtag-backport.c @@ -0,0 +1,10 @@ +/* { dg-do compile } */ +/* { dg-additional-options "-march=armv8-a+memtag" } */ + +#include + +int *bar (int *src) { + return __arm_mte_create_random_tag(src, 2<<16-1); +} + +/* { dg-final { scan-assembler {\tirg\t} } } */ diff --git a/gcc/testsuite/gcc.target/aarch64/feature-sha3-backport.c b/gcc/testsuite/gcc.target/aarch64/feature-sha3-backport.c new file mode 100644 index 0000000000000000000000000000000000000000..e194f1a10ea12439195c8cf1aae08dae26607c14 --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/feature-sha3-backport.c @@ -0,0 +1,10 @@ +/* { dg-do compile } */ +/* { dg-additional-options "-march=armv8-a+sha3" } */ + +#include + +uint64x2_t bar (uint64x2_t a, uint64x2_t b, uint64x2_t c) { + return vsha512hq_u64(a, b, c); +} + +/* { dg-final { scan-assembler {\tsha512h\t} } } */ diff --git a/gcc/testsuite/gcc.target/aarch64/feature-sm4-backport.c b/gcc/testsuite/gcc.target/aarch64/feature-sm4-backport.c new file mode 100644 index 0000000000000000000000000000000000000000..604a58bcb68e5753d2eec661a374b4983ad29088 --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/feature-sm4-backport.c @@ -0,0 +1,10 @@ +/* { dg-do compile } */ +/* { dg-additional-options "-march=armv8-a+sm4" } */ + +#include + +uint32x4_t bar (uint32x4_t a, uint32x4_t b, uint32x4_t c) { + return vsm3tt1aq_u32(a, b, c, 2); +} + +/* { dg-final { scan-assembler {\tsm3tt1a\t} } } */