From patchwork Tue Dec 20 21:32:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tamar Christina X-Patchwork-Id: 1718044 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=hMTMFOCu; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Nc8v73FbVz23dP for ; Wed, 21 Dec 2022 08:33:07 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 269A838582A3 for ; Tue, 20 Dec 2022 21:33:04 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 269A838582A3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1671571984; bh=LUxhaXmOXD54kV++pOL1KtmwUHGN4puOMCFplbbS84c=; h=Date:To:Cc:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=hMTMFOCurd5Ujls/wmOaUUbxqUB3k+DX5egrAUO+VGcy7f1wlDlO6texQBQKFCLVB mzGjhEuUc6RR6+bea14IJw576voPbf5kW9hAiY0jzoa7Z8rGgpDWJ1Ho7azRqu8Uef yJK0YOy9qzhwALx1UnOimZ5b5dgTGzHTsPd43fKw= 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-vi1eur04on2075.outbound.protection.outlook.com [40.107.8.75]) by sourceware.org (Postfix) with ESMTPS id 61EF83858421 for ; Tue, 20 Dec 2022 21:32:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 61EF83858421 Received: from AS9PR06CA0383.eurprd06.prod.outlook.com (2603:10a6:20b:460::30) by VI1PR08MB10123.eurprd08.prod.outlook.com (2603:10a6:800:1c7::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5924.11; Tue, 20 Dec 2022 21:32:37 +0000 Received: from AM7EUR03FT025.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:460:cafe::b9) by AS9PR06CA0383.outlook.office365.com (2603:10a6:20b:460::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5924.21 via Frontend Transport; Tue, 20 Dec 2022 21:32:37 +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 AM7EUR03FT025.mail.protection.outlook.com (100.127.140.199) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5924.16 via Frontend Transport; Tue, 20 Dec 2022 21:32:36 +0000 Received: ("Tessian outbound 333ca28169fa:v132"); Tue, 20 Dec 2022 21:32:36 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: bae7cc24a4193e83 X-CR-MTA-TID: 64aa7808 Received: from db73c12bd17b.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 707716D2-28C7-44CF-8810-FB184B3D52A8.1; Tue, 20 Dec 2022 21:32:30 +0000 Received: from EUR02-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id db73c12bd17b.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 20 Dec 2022 21:32:30 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fnstSk5ZYAEJh57dOd7bkrJ5iku1KHHPCSWUjDoEFT0+Cj3DsNlOchDnqn6Wur+GOvGOQol0uUFjvY/hDThiB09Khrcs1yNCqK3kjwev0N07jrkME30UaLFkVPbU77xPuju0URo22cC9wp1Cj2w7txNEIyK35l1QbyRnok9Flt9rf97iY5v+mzzLcV28bWS2JRe14VXBW2eyNz8QXDPae47IcnvjLM+9fjHk+23xZF9yOdOJpHqSMNFwoR8gL6QBMxIjDOHyE7vOxrioXHNnQmnOp9LiXYcR7RTyL132HGrglrsDTqs3PZspIpUIeA81P/nBYsBOcSXHlFTbYWg0/A== 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=LUxhaXmOXD54kV++pOL1KtmwUHGN4puOMCFplbbS84c=; b=Ms2363aqye9uyZ1oWbF4KjP9a5C39CN5704hsM+0vBAnvB+TiGLADZcBjxVALZN22nVrd/fSMFfa4ZCBhrR8dzgqQdeDfO3fucVOFu9gW29FakcXdeBYiMzgBCoiUnMf77ts31CHfHSDDOGGdc8U8YMZrmMXeBE/QrUu84aiaZ+axkNknv8I+3exwJF2MHLFCkacGTZY6VNISetnPhMScF9pAi/poaWFFx0gCugFG8Vk03/BJ8FzK0EHF57k65uC1dyuMIyieeJhR3tWOtoEYC77Ix6eNWv7+QAaleSIeMUzbd5xYyfZT7/Aj9tAEAJ7fEMCB+eano4Zt8wuPD6Khw== 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 VI1PR08MB5325.eurprd08.prod.outlook.com (2603:10a6:803:13e::17) by AS2PR08MB9022.eurprd08.prod.outlook.com (2603:10a6:20b:5fc::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5944.6; Tue, 20 Dec 2022 21:32:27 +0000 Received: from VI1PR08MB5325.eurprd08.prod.outlook.com ([fe80::8b7b:e3be:cccb:1936]) by VI1PR08MB5325.eurprd08.prod.outlook.com ([fe80::8b7b:e3be:cccb:1936%6]) with mapi id 15.20.5944.006; Tue, 20 Dec 2022 21:32:27 +0000 Date: Tue, 20 Dec 2022 21:32:19 +0000 To: gcc-patches@gcc.gnu.org Cc: nd@arm.com, Richard.Earnshaw@arm.com, Marcus.Shawcroft@arm.com, Kyrylo.Tkachov@arm.com, richard.sandiford@arm.com Subject: [PATCH]AArch64 relax constraints on FP16 insn PR108172 Message-ID: Content-Disposition: inline X-ClientProxiedBy: SA0PR11CA0174.namprd11.prod.outlook.com (2603:10b6:806:1bb::29) To VI1PR08MB5325.eurprd08.prod.outlook.com (2603:10a6:803:13e::17) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: VI1PR08MB5325:EE_|AS2PR08MB9022:EE_|AM7EUR03FT025:EE_|VI1PR08MB10123:EE_ X-MS-Office365-Filtering-Correlation-Id: 0ad1e07b-cd37-40d6-cf08-08dae2d1b6e3 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: WPe1rD3OcWQD5AVEf9n0Qt3KkY06MG/MoLr2VxoP6i72sdX+O5SfM7U/mHojthiHdEAUrlc5NRNGJr3WhpkzC5XFlrMvG9mhfdZv5NPHJ4KxiXlX00lTaszd+drDT+zRxTIDBpbD6anbMDOWIEZAdp9yI+pDv6EBnxSl1xxFBjvQkNKkZGhGYvCaRsMgbMk6GctGJhplvnNuO7bfM7197WgrqjVOUMYIwRTwqdKiETqMuE8Zo9eqsJjHFluCL6TVuupTjZ3rtQ9HcGEtXwGy93Zn0G2YKH9zC8V4gi1r9E75BRVxFgd6Y/+PfHeBNSfVrmiQFPJArjlhW+LUmgNJHwrcwWWMyoDjWoYyEYuOktHk/amXjDFHU9BzUTEPlNyq2iFNUeTS/OpuyrT/DAfwkn1+UQQEma6U64olRV7YcEiVk8L49PcBFUxU2sVd9W/iNgSx9s/D9tbsP8jhtjwoH4qMlILIy3HTHs2Dd1hjaI5/IgV7vn1smn30PruSUcZTgM4nqSGAfN/a11YD8YxJuDqh39YEqyVx9khztNkwcCleK27KC2Te1wmJ8pfTT/X81e9tTVjR36VjsLcH9+KBFgfVfDJs9PScsYAy41bHyXhvRE8z5Up+ZoY/OBbomhCYAwksnVrs6fSetkyQIE9GzzO0FIwfzFatm/8NWQvPUKmsvz6KSurBry3/mVc8/fh4hx/vpxtOuepeDNjSGS12TiqNaXaM5Ix6f5IIwkZzxX0YForWaU92hE4gpSBdvoVA X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR08MB5325.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(4636009)(376002)(396003)(366004)(346002)(39860400002)(136003)(451199015)(44144004)(26005)(6506007)(84970400001)(4743002)(33964004)(478600001)(316002)(186003)(36756003)(6512007)(6486002)(6666004)(6916009)(5660300002)(83380400001)(38100700002)(41300700001)(86362001)(235185007)(66556008)(2616005)(4326008)(66946007)(2906002)(8676002)(66476007)(44832011)(8936002)(4216001)(2700100001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS2PR08MB9022 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: AM7EUR03FT025.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 7738a280-93c6-4680-c7be-08dae2d1b119 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Gv+EarLACl/oAmT7XoHG2kfOEcsWB7scP0DbdW/DWgBPokmh6PUm4LNpPGTij7Vm4O6RIl+gQx8Kbqq3+w2xp4wVMghguOrfAMbAFNZzphCLco5yOdxi97HIw1WkpS6KtiI2Db9Ru3SRAtrUX0qguaOLjL/IsP5zqVtfvawLgywmmjTf/hw6KJ7se1dOrCTXn6hAm0Xpxfimz9IXQAQoIi+IDi1xtFDYvVcuGv1O2OukWstqejQwNNfo6dd8b4eDtGNq7wsy/GiZQEDu269WKI/4RP208palyOcsMhjIuyu1/PXaq4SwzqYHCsMrxd+Fc3pzTBlQZSe0IQBiKH3bCi3zg5fYzOYqqClYYVeUZqi11bG+z7c3/ZMhSCuCPjsYlgYo8VQ7PFRjfADVfKBgBBA3tYPdAu9FaBtoKZqgGWZir2gDrmW/CtWILxQfZ2U5pNYi4tQ75OXKwNVt/sjomseYPz4BwSGmkQH07P9sTz1dJE8nfdRnnDm0oZ8yTCFjjnFnOLOz9ayYPEb1GtGtjjH+DqBRxX/pM3aErDRPuRPyzPugwQMPMg9jNccDG/Hx8rxHGMAjzWUaumvhCdLB9UHAWsFmOYnfHNAmwy3+Fx1F+xWOOAkDsjB63dciVUBDm1F1FNq97Om83g1XOn/cY/FJ7sb3BBCV0EKKfCTgoFwyt7Z/eqBh1L/z4SYRHI/MWpCwfnmkPpl8etwqV0NM08R9O9g1UIyxbKKHAO7T6AQu+QLkKHOatxmDbWOpvddhuZaShlx0+cMpYi+fa4M4I3lssvMhMp/rSq73iZBASFM= 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:(13230022)(4636009)(396003)(136003)(376002)(346002)(39860400002)(451199015)(46966006)(40470700004)(36840700001)(36860700001)(336012)(47076005)(5660300002)(41300700001)(6666004)(8676002)(6506007)(26005)(81166007)(4743002)(44144004)(6512007)(33964004)(82740400003)(4326008)(186003)(40460700003)(356005)(40480700001)(2616005)(86362001)(44832011)(478600001)(36756003)(2906002)(8936002)(235185007)(70586007)(70206006)(82310400005)(316002)(83380400001)(84970400001)(6916009)(6486002)(4216001)(2700100001); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Dec 2022 21:32:36.9990 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0ad1e07b-cd37-40d6-cf08-08dae2d1b6e3 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: AM7EUR03FT025.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB10123 X-Spam-Status: No, score=-12.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, FORGED_SPF_HELO, GIT_PATCH_0, KAM_DMARC_NONE, KAM_LOTSOFHASH, KAM_NUMSUBJECT, KAM_SHORT, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_NONE, TXREP, 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: Tamar Christina via Gcc-patches From: Tamar Christina Reply-To: Tamar Christina Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" Hi All, The move, load, load, store, dup, basically all the non arithmetic FP16 instructions use baseline armv8-a HF support, and so do not require the Armv8.2-a extensions. This relaxes the instructions. Bootstrapped Regtested on aarch64-none-linux-gnu and no issues. Ok for master? Thanks, Tamar gcc/ChangeLog: PR target/108172 * config/aarch64/aarch64-simd.md (*aarch64_simd_movv2hf): Relax TARGET_SIMD_F16INST to TARGET_SIMD. * config/aarch64/aarch64.cc (aarch64_classify_vector_mode): Re-order. * config/aarch64/iterators.md (VMOVE): Drop TARGET_SIMD_F16INST. gcc/testsuite/ChangeLog: PR target/108172 * gcc.target/aarch64/pr108172.c: New test. --- inline copy of patch -- diff --git a/gcc/config/aarch64/aarch64-simd.md b/gcc/config/aarch64/aarch64-simd.md index a62b6deaf4a57e570074d7d894e6fac13779f6fb..8a9f655d547285ec7bdc173086308d7d44a8d482 100644 --- diff --git a/gcc/config/aarch64/aarch64-simd.md b/gcc/config/aarch64/aarch64-simd.md index a62b6deaf4a57e570074d7d894e6fac13779f6fb..8a9f655d547285ec7bdc173086308d7d44a8d482 100644 --- a/gcc/config/aarch64/aarch64-simd.md +++ b/gcc/config/aarch64/aarch64-simd.md @@ -164,7 +164,7 @@ (define_insn "*aarch64_simd_movv2hf" "=w, m, m, w, ?r, ?w, ?r, w, w") (match_operand:V2HF 1 "general_operand" "m, Dz, w, w, w, r, r, Dz, Dn"))] - "TARGET_SIMD_F16INST + "TARGET_SIMD && (register_operand (operands[0], V2HFmode) || aarch64_simd_reg_or_zero (operands[1], V2HFmode))" "@ diff --git a/gcc/config/aarch64/aarch64.cc b/gcc/config/aarch64/aarch64.cc index 73515c174fa4fe7830527e7eabd91c4648130ff4..d1c0476321b79bc6aded350d24ea5d556c796519 100644 --- a/gcc/config/aarch64/aarch64.cc +++ b/gcc/config/aarch64/aarch64.cc @@ -3616,6 +3616,8 @@ aarch64_classify_vector_mode (machine_mode mode) case E_V4x2DFmode: return TARGET_FLOAT ? VEC_ADVSIMD | VEC_STRUCT : 0; + /* 32-bit Advanced SIMD vectors. */ + case E_V2HFmode: /* 64-bit Advanced SIMD vectors. */ case E_V8QImode: case E_V4HImode: @@ -3634,7 +3636,6 @@ aarch64_classify_vector_mode (machine_mode mode) case E_V8BFmode: case E_V4SFmode: case E_V2DFmode: - case E_V2HFmode: return TARGET_FLOAT ? VEC_ADVSIMD : 0; default: diff --git a/gcc/config/aarch64/iterators.md b/gcc/config/aarch64/iterators.md index a521dbde1ec42c0c442a9ca3dd52c9727d116399..70742520984d30158e62a38c92abea82b2dac059 100644 --- a/gcc/config/aarch64/iterators.md +++ b/gcc/config/aarch64/iterators.md @@ -204,8 +204,7 @@ (define_mode_iterator VALL_F16 [V8QI V16QI V4HI V8HI V2SI V4SI V2DI ;; All Advanced SIMD modes suitable for moving, loading, and storing ;; including V2HF (define_mode_iterator VMOVE [V8QI V16QI V4HI V8HI V2SI V4SI V2DI - V4HF V8HF V4BF V8BF V2SF V4SF V2DF - (V2HF "TARGET_SIMD_F16INST")]) + V2HF V4HF V8HF V4BF V8BF V2SF V4SF V2DF]) ;; The VALL_F16 modes except the 128-bit 2-element ones. diff --git a/gcc/testsuite/gcc.target/aarch64/pr108172.c b/gcc/testsuite/gcc.target/aarch64/pr108172.c new file mode 100644 index 0000000000000000000000000000000000000000..b29054fdb1d6e602755bc93089f1edec4eb53b8e --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/pr108172.c @@ -0,0 +1,30 @@ +/* { dg-do compile } */ +/* { dg-options "-O0" } */ + +typedef _Float16 v4hf __attribute__ ((vector_size (8))); +typedef _Float16 v2hf __attribute__ ((vector_size (4))); + +v4hf +v4hf_abi_1 (v4hf a) +{ + return a; +} + +v4hf +v4hf_abi_3 (v4hf a, v4hf b, v4hf c) +{ + return c; +} + +v4hf +v4hf_abi_4 (v4hf a, v4hf b, v4hf c, v4hf d) +{ + return d; +} + +v2hf +v2hf_test (v2hf a, v2hf b, v2hf c, v2hf d) +{ + return b; +} + --- a/gcc/config/aarch64/aarch64-simd.md +++ b/gcc/config/aarch64/aarch64-simd.md @@ -164,7 +164,7 @@ (define_insn "*aarch64_simd_movv2hf" "=w, m, m, w, ?r, ?w, ?r, w, w") (match_operand:V2HF 1 "general_operand" "m, Dz, w, w, w, r, r, Dz, Dn"))] - "TARGET_SIMD_F16INST + "TARGET_SIMD && (register_operand (operands[0], V2HFmode) || aarch64_simd_reg_or_zero (operands[1], V2HFmode))" "@ diff --git a/gcc/config/aarch64/aarch64.cc b/gcc/config/aarch64/aarch64.cc index 73515c174fa4fe7830527e7eabd91c4648130ff4..d1c0476321b79bc6aded350d24ea5d556c796519 100644 --- a/gcc/config/aarch64/aarch64.cc +++ b/gcc/config/aarch64/aarch64.cc @@ -3616,6 +3616,8 @@ aarch64_classify_vector_mode (machine_mode mode) case E_V4x2DFmode: return TARGET_FLOAT ? VEC_ADVSIMD | VEC_STRUCT : 0; + /* 32-bit Advanced SIMD vectors. */ + case E_V2HFmode: /* 64-bit Advanced SIMD vectors. */ case E_V8QImode: case E_V4HImode: @@ -3634,7 +3636,6 @@ aarch64_classify_vector_mode (machine_mode mode) case E_V8BFmode: case E_V4SFmode: case E_V2DFmode: - case E_V2HFmode: return TARGET_FLOAT ? VEC_ADVSIMD : 0; default: diff --git a/gcc/config/aarch64/iterators.md b/gcc/config/aarch64/iterators.md index a521dbde1ec42c0c442a9ca3dd52c9727d116399..70742520984d30158e62a38c92abea82b2dac059 100644 --- a/gcc/config/aarch64/iterators.md +++ b/gcc/config/aarch64/iterators.md @@ -204,8 +204,7 @@ (define_mode_iterator VALL_F16 [V8QI V16QI V4HI V8HI V2SI V4SI V2DI ;; All Advanced SIMD modes suitable for moving, loading, and storing ;; including V2HF (define_mode_iterator VMOVE [V8QI V16QI V4HI V8HI V2SI V4SI V2DI - V4HF V8HF V4BF V8BF V2SF V4SF V2DF - (V2HF "TARGET_SIMD_F16INST")]) + V2HF V4HF V8HF V4BF V8BF V2SF V4SF V2DF]) ;; The VALL_F16 modes except the 128-bit 2-element ones. diff --git a/gcc/testsuite/gcc.target/aarch64/pr108172.c b/gcc/testsuite/gcc.target/aarch64/pr108172.c new file mode 100644 index 0000000000000000000000000000000000000000..b29054fdb1d6e602755bc93089f1edec4eb53b8e --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/pr108172.c @@ -0,0 +1,30 @@ +/* { dg-do compile } */ +/* { dg-options "-O0" } */ + +typedef _Float16 v4hf __attribute__ ((vector_size (8))); +typedef _Float16 v2hf __attribute__ ((vector_size (4))); + +v4hf +v4hf_abi_1 (v4hf a) +{ + return a; +} + +v4hf +v4hf_abi_3 (v4hf a, v4hf b, v4hf c) +{ + return c; +} + +v4hf +v4hf_abi_4 (v4hf a, v4hf b, v4hf c, v4hf d) +{ + return d; +} + +v2hf +v2hf_test (v2hf a, v2hf b, v2hf c, v2hf d) +{ + return b; +} +