From patchwork Mon Oct 31 11:58:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tamar Christina X-Patchwork-Id: 13242 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2268188wru; Mon, 31 Oct 2022 05:01:31 -0700 (PDT) X-Google-Smtp-Source: AMsMyM67NneMKkBogQd7NlTdBEm1Ze8arrzpMkME2FprCwBvEPnKcoZFUHmUbu5wq3qnlrpvRwmu X-Received: by 2002:a50:c302:0:b0:463:26d6:25fb with SMTP id a2-20020a50c302000000b0046326d625fbmr8450415edb.204.1667217691007; Mon, 31 Oct 2022 05:01:31 -0700 (PDT) Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id g18-20020a1709065d1200b0078e27ef9501si8300769ejt.750.2022.10.31.05.01.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Oct 2022 05:01:31 -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=l6LlUo2o; 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 0945F382DE21 for ; Mon, 31 Oct 2022 11:59:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0945F382DE21 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1667217593; bh=2cWYoTPz9RrOqsM99wuLiq1THCAJ1UmpU2Eavf5Xll8=; h=Date:To:Subject:In-Reply-To:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:From; b=l6LlUo2oRq0PQ4haCO/EGYkg9oQHi6ST1EIwDCS8n0QewXZsXmQQ3Q9XIfnD1KM58 v1sGMKvkkR5ZuPNaCqQt1zJPXcOiRQDUZM22JfH4uYeIWFGQuKkno//QAdF7izTxNU tCCjDHuw6FeIiMqFYm6bcWPR5xJHIoi6tDV5EJvw= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR02-AM0-obe.outbound.protection.outlook.com (mail-am0eur02on2084.outbound.protection.outlook.com [40.107.247.84]) by sourceware.org (Postfix) with ESMTPS id AF1F7385483B for ; Mon, 31 Oct 2022 11:58:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org AF1F7385483B ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=EVVR3bm+uum24EmGqIE21KOttfbql1gWS2G6j1eDTaBhSOOhtHpefb+ERiez9nQA20VO1zdBt05PqIlAC/IyRT9sJHlK4qQMQ+/N2L8cXhXSgMa0fqqXrE9E0+HQj8KR8SQdnqzjxo3JYgYG8quEncu10yxDI0+AhqDqworNIpsE8NKeerzafjj5yf07GJgFyfDNKhsnf4blty4DXVN/39zUDhyF1eqeIQWCPJVLU2wHf6KopIH4axsMy4L8WYE7BpyZO1Jf01i/WOWOAx62M1SphqmdMOsHeocBxILMWu96qWIYD7gdxpNqZgVexmOrL1OmKMY/rSy+3E6BLJfNKw== ARC-Message-Signature: i=2; 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=2cWYoTPz9RrOqsM99wuLiq1THCAJ1UmpU2Eavf5Xll8=; b=RnF1MecwAvvTkGhm2uqEtFjREMgk9zkMh5D6WwN46oVPfEyy12RKUAQajBoAncVuCeVi7V/CCUQfd27W2A7Ib6M8KWg48DhPUlkTACZDMK5sjSKRbd8cWHc6jj/T4ym5vj1XP/qKprCrF8ioQsirfiPsZHta9gif0tfcPUOYJaB/HdWfEZWpdxJ/KGbqECENfLTvwvcwAKzeLSQa8FBJ9VeiFi/b4CZ2dRIFQRckhfQiGY39E/rz8xxadmeEJ+9qvfHO2pIK3A8uLy0oaxeQA0v3BZunayGOq5ZUcan3xbt8Yjo9lwkN4/RA9i/U03kcB4pcviB4v72P/VSXRIPSgg== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=gcc.gnu.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com]) Received: from DB9PR02CA0019.eurprd02.prod.outlook.com (2603:10a6:10:1d9::24) by GVXPR08MB7728.eurprd08.prod.outlook.com (2603:10a6:150:6a::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5769.19; Mon, 31 Oct 2022 11:58:20 +0000 Received: from DBAEUR03FT023.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:1d9:cafe::42) by DB9PR02CA0019.outlook.office365.com (2603:10a6:10:1d9::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5769.15 via Frontend Transport; Mon, 31 Oct 2022 11:58:20 +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 DBAEUR03FT023.mail.protection.outlook.com (100.127.142.253) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5769.14 via Frontend Transport; Mon, 31 Oct 2022 11:58:20 +0000 Received: ("Tessian outbound 6c699027a257:v130"); Mon, 31 Oct 2022 11:58:20 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 70de9d9dc337fd6f X-CR-MTA-TID: 64aa7808 Received: from bf87c50e828e.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 415339F3-1947-48EE-9AF7-87E54FEBE504.1; Mon, 31 Oct 2022 11:58:13 +0000 Received: from EUR05-DB8-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id bf87c50e828e.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Mon, 31 Oct 2022 11:58:13 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PZeFbwDhSEqJllBizXPtq9W55V35QSG7gzEqBsX6ZfPF1c3Lo35T3eTNukylftmRqxMpfdtBoxb9Z14QTmS4A5edCPWVzkbfE0m3FE1UYFV0rAJOE0zNgjAkpJLuGGIWPe3LpdX7J9ClMa1XU4pTWfANcdr8Sj2h07JJSSMQq+cBhe42bTQWgvxaC3JpSNuMlTlBtCqEbQ812dPcgQhShF1/cU7Dymo7w14M40QDnk5fnCMOheMAAjZxlUc/T/jwYMoqoO0PwU81eIHmPw+5BQ9aM9yGIcnksVmO4m0PgPF7LPuo9kUNIlQraIk4VTEAWf+RBu17FPMhX3pLYqMS3w== 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=2cWYoTPz9RrOqsM99wuLiq1THCAJ1UmpU2Eavf5Xll8=; b=UctEiDRG3XI+HOTVaXxwwKbHobLbTQAreLhFfSgZk5+mxD1Y4SGmTEhzLhvlpbwkiawDMpw0K6t9vMmJZre1on7Yy21NEDyjA5Np6itmm1EmZieboEfToEAIS6wQTwv0wVCXuFM2xI5nCE93sdr3q/tibW8S3xd6WJ+l19soQxtTfdndem1SS915xASM8Ahjg/M6QM6jCgJVVcYWyRvQABdt1S5mqpbQ035Fhxrh50jBBYTywJhhel+JJTPE0/92dWymzZtH9qXDSb8sAIdzNaNxWx338KOn6RFDpbfAygLCqoO5kTrpwxZO8gItlu+otuhw5q4aCMlrdk8y5Tqpmw== 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 DB9PR08MB8385.eurprd08.prod.outlook.com (2603:10a6:10:3da::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5769.16; Mon, 31 Oct 2022 11:58:11 +0000 Received: from VI1PR08MB5325.eurprd08.prod.outlook.com ([fe80::c57d:50c2:3502:a52]) by VI1PR08MB5325.eurprd08.prod.outlook.com ([fe80::c57d:50c2:3502:a52%4]) with mapi id 15.20.5769.019; Mon, 31 Oct 2022 11:58:11 +0000 Date: Mon, 31 Oct 2022 11:58:09 +0000 To: gcc-patches@gcc.gnu.org Subject: [PATCH 4/8]AArch64 aarch64: Implement widening reduction patterns Message-ID: Content-Disposition: inline In-Reply-To: X-ClientProxiedBy: LO4P123CA0323.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:197::22) To VI1PR08MB5325.eurprd08.prod.outlook.com (2603:10a6:803:13e::17) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: VI1PR08MB5325:EE_|DB9PR08MB8385:EE_|DBAEUR03FT023:EE_|GVXPR08MB7728:EE_ X-MS-Office365-Filtering-Correlation-Id: 18863909-ebb8-4201-fea8-08dabb37346f 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: pVAp4GsMDHJ8GhMvyMQfIgULuH6vwOLucx7yK0Ae7yRjHY2TWe6ywp16+HGgoFciLoE02QTzuT6NPFE0QQfL/mMWEyIegeJxWf9ATYc61yfNYTww8AH5N+AAPV0KxufcfQV6VY28xSP0Uan1Dg+L5Xl37rHvZ3eW5evLyIZA0POEax57RrFkgOOg+ojCyjesvxEDiX/dZlGawS6f3wFjnxfdPIfqPAjGb823LCI0skITlB+tH9jHagg61zpL0heLL3ENYuDIPDFzeB+U+Hfe9oxm/CW9RpSTitzFlSMBbBGJ3c+q5Rpitd6RKXqyqx568NloqjAgQnK/N8idXgqBLm5XKJdx3u+PdoZ1jsPSKCslZTiDSJsmX/aYKTMnjI+66RfjXBwDow1qAC+C7eDvkPLA8pkvFh1YkMCiYzUkHLxAgSgJfGPaoVGObcaoQwamTsekVlBfWb7WYl5qOXcYxUKHxtJ5ZkSHRSynXhQp1lyOGGgjLRzNO7/grkCZXQcj6WDipd0cdAvxbdqxv0dMAfyL1qms8Nmn/hAIcgJgjn1jmrNJC1hyWXVs8lwKNzwFDPhPwL1Q3c/RqlXW7jiSEGvniRvPOFSzrCBjteVIs1wIMHLKti8fH7g21a5PXNiX0I6zTxc6zx0TC0xnsVr3Zv4Q/rXEtTHbmQ4qQi/MIUxJtQQ2383gphT9x1hhmAfkyj82pUuuddA8+iiF8jBhnTO28pA0JosCbgxcnee2k01klsvURocF3TBqhhln9CvNFO8ji7bYA1GquI8maWO4DyS1p+tOyAEwFcopb20K0h4= 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)(346002)(366004)(136003)(396003)(39860400002)(376002)(451199015)(36756003)(38100700002)(5660300002)(44832011)(2906002)(235185007)(186003)(86362001)(4326008)(6916009)(4743002)(2616005)(478600001)(8676002)(316002)(6486002)(66476007)(66556008)(66946007)(41300700001)(8936002)(26005)(33964004)(6512007)(44144004)(6506007)(67856001)(2700100001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR08MB8385 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: DBAEUR03FT023.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 4081c3d2-425b-4665-e72a-08dabb372f2e X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: pCFP8OSkA/4gsn/cSjKQAAZHpcm7bj5t3AmLBBVD1zr3ovOUQ2nwzHEXPGfyTJpeuSiVtyr+xADUbjiYj0BTKLRUE7U1Ur3+OApjZXziOveocS6Ye0fvcyRHLxpK4zbrbwpAoIDw0FQr9VcDpzRsgjt8YA94qIuHEOc+PgqzbQUbl89UXxJ/x73KiuGffnwccadaORVpTfsSb2+ko3WgmaC+gSwQUJeTH3Qe6siN0VvyssquhieLvb9VjElLLfT3Qgp2b0DdFkHLhIEzE8zsvujTw+Br9TslzCp6rLlfm0uVHGQuGOBOpIi+7EfIPr9x4LYM9YSBX5RUTna6HK593sNu5fpRpOnqZ60MR5pFob+IlOd+RVY8G8gV27JPgvK+9ZVZz90YRG5+r28STMwhC/D09vCayga5pdqC5XA7HlWx2Z/dVEMbxFdcmFz5yxWm/Hkv7OHjFD41lYoqsFKx9VT2eUH5yjxn7UIBJypGHyIOLMRU1lQ6U2MCPf5OCeVJDTOH1EFE2LGfcudWblgKQzISkA3XmgX+dHuTq8CVtkzSYDw9SWWojpThSnGP26R270Twn8xJl4Xr2tvlVdb+ofOGZARks71dhnLdvQKFQQ+UYLAG7ylJ5h4y4wNkd7qcpynNRmQ7R3YgVNpzWOw4Ls6Enxpfx2oZaUlvyMBwxb4j+maV3pRKOK43Lqa9owK1jdJkM04gJ/267i+5Fz8/RKecJcHRPcL/Rg6SVv6h1PH/uyyn+4JQyfj8ssWdU/8eRhwJ5q15nckbyamnK8XIs5sszrHHZyq2GBNs/qoFqADywQPGJmqF/GoDB7QfbQSbFxrdps4Tkg3v2kkfGQT0Sw== 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)(376002)(346002)(39860400002)(396003)(136003)(451199015)(46966006)(40470700004)(36840700001)(336012)(47076005)(40460700003)(6486002)(2906002)(44832011)(86362001)(81166007)(356005)(36756003)(40480700001)(82740400003)(82310400005)(186003)(4743002)(26005)(6512007)(44144004)(2616005)(33964004)(36860700001)(70586007)(8936002)(316002)(70206006)(478600001)(8676002)(4326008)(6506007)(41300700001)(6916009)(5660300002)(235185007)(67856001)(2700100001); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Oct 2022 11:58:20.3540 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 18863909-ebb8-4201-fea8-08dabb37346f 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: DBAEUR03FT023.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: GVXPR08MB7728 X-Spam-Status: No, score=-12.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, FORGED_SPF_HELO, GIT_PATCH_0, KAM_DMARC_NONE, KAM_LOTSOFHASH, 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 Cc: Richard.Earnshaw@arm.com, nd@arm.com, richard.sandiford@arm.com, Marcus.Shawcroft@arm.com 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?1748204457287832887?= X-GMAIL-MSGID: =?utf-8?q?1748204457287832887?= Hi All, This implements the new widening reduction optab in the backend. Instead of introducing a duplicate definition for the same thing I have renamed the intrinsics defintions to use the same optab. Bootstrapped Regtested on aarch64-none-linux-gnu and no issues. Ok for master? Thanks, Tamar gcc/ChangeLog: * config/aarch64/aarch64-simd-builtins.def (saddlv, uaddlv): Rename to reduc_splus_widen_scal_ and reduc_uplus_widen_scal_ respectively. * config/aarch64/aarch64-simd.md (aarch64_addlv): Renamed to ... (reduc_plus_widen_scal_): ... This. * config/aarch64/arm_neon.h (vaddlv_s8, vaddlv_s16, vaddlv_u8, vaddlv_u16, vaddlvq_s8, vaddlvq_s16, vaddlvq_s32, vaddlvq_u8, vaddlvq_u16, vaddlvq_u32, vaddlv_s32, vaddlv_u32): Use it. --- inline copy of patch -- diff --git a/gcc/config/aarch64/aarch64-simd-builtins.def b/gcc/config/aarch64/aarch64-simd-builtins.def index cf46b31627b84476a25762ffc708fd84a4086e43..a4b21e1495c5699d8557a4bcb9e73ef98ae60b35 100644 --- diff --git a/gcc/config/aarch64/aarch64-simd-builtins.def b/gcc/config/aarch64/aarch64-simd-builtins.def index cf46b31627b84476a25762ffc708fd84a4086e43..a4b21e1495c5699d8557a4bcb9e73ef98ae60b35 100644 --- a/gcc/config/aarch64/aarch64-simd-builtins.def +++ b/gcc/config/aarch64/aarch64-simd-builtins.def @@ -190,9 +190,9 @@ BUILTIN_VDQV_L (UNOP, saddlp, 0, NONE) BUILTIN_VDQV_L (UNOPU, uaddlp, 0, NONE) - /* Implemented by aarch64_addlv. */ - BUILTIN_VDQV_L (UNOP, saddlv, 0, NONE) - BUILTIN_VDQV_L (UNOPU, uaddlv, 0, NONE) + /* Implemented by reduc_plus_widen_scal_. */ + BUILTIN_VDQV_L (UNOP, reduc_splus_widen_scal_, 10, NONE) + BUILTIN_VDQV_L (UNOPU, reduc_uplus_widen_scal_, 10, NONE) /* Implemented by aarch64_abd. */ BUILTIN_VDQ_BHSI (BINOP, sabd, 0, NONE) diff --git a/gcc/config/aarch64/aarch64-simd.md b/gcc/config/aarch64/aarch64-simd.md index cf8c094bd4b76981cef2dd5dd7b8e6be0d56101f..25aed74f8cf939562ed65a578fe32ca76605b58a 100644 --- a/gcc/config/aarch64/aarch64-simd.md +++ b/gcc/config/aarch64/aarch64-simd.md @@ -3455,7 +3455,7 @@ (define_expand "reduc_plus_scal_v4sf" DONE; }) -(define_insn "aarch64_addlv" +(define_insn "reduc_plus_widen_scal_" [(set (match_operand: 0 "register_operand" "=w") (unspec: [(match_operand:VDQV_L 1 "register_operand" "w")] USADDLV))] diff --git a/gcc/config/aarch64/arm_neon.h b/gcc/config/aarch64/arm_neon.h index cf6af728ca99dae1cb6ab647466cfec32f7e913e..7b2c4c016191bcd6c3e075d27810faedb23854b7 100644 --- a/gcc/config/aarch64/arm_neon.h +++ b/gcc/config/aarch64/arm_neon.h @@ -3664,70 +3664,70 @@ __extension__ extern __inline int16_t __attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) vaddlv_s8 (int8x8_t __a) { - return __builtin_aarch64_saddlvv8qi (__a); + return __builtin_aarch64_reduc_splus_widen_scal_v8qi (__a); } __extension__ extern __inline int32_t __attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) vaddlv_s16 (int16x4_t __a) { - return __builtin_aarch64_saddlvv4hi (__a); + return __builtin_aarch64_reduc_splus_widen_scal_v4hi (__a); } __extension__ extern __inline uint16_t __attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) vaddlv_u8 (uint8x8_t __a) { - return __builtin_aarch64_uaddlvv8qi_uu (__a); + return __builtin_aarch64_reduc_uplus_widen_scal_v8qi_uu (__a); } __extension__ extern __inline uint32_t __attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) vaddlv_u16 (uint16x4_t __a) { - return __builtin_aarch64_uaddlvv4hi_uu (__a); + return __builtin_aarch64_reduc_uplus_widen_scal_v4hi_uu (__a); } __extension__ extern __inline int16_t __attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) vaddlvq_s8 (int8x16_t __a) { - return __builtin_aarch64_saddlvv16qi (__a); + return __builtin_aarch64_reduc_splus_widen_scal_v16qi (__a); } __extension__ extern __inline int32_t __attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) vaddlvq_s16 (int16x8_t __a) { - return __builtin_aarch64_saddlvv8hi (__a); + return __builtin_aarch64_reduc_splus_widen_scal_v8hi (__a); } __extension__ extern __inline int64_t __attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) vaddlvq_s32 (int32x4_t __a) { - return __builtin_aarch64_saddlvv4si (__a); + return __builtin_aarch64_reduc_splus_widen_scal_v4si (__a); } __extension__ extern __inline uint16_t __attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) vaddlvq_u8 (uint8x16_t __a) { - return __builtin_aarch64_uaddlvv16qi_uu (__a); + return __builtin_aarch64_reduc_uplus_widen_scal_v16qi_uu (__a); } __extension__ extern __inline uint32_t __attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) vaddlvq_u16 (uint16x8_t __a) { - return __builtin_aarch64_uaddlvv8hi_uu (__a); + return __builtin_aarch64_reduc_uplus_widen_scal_v8hi_uu (__a); } __extension__ extern __inline uint64_t __attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) vaddlvq_u32 (uint32x4_t __a) { - return __builtin_aarch64_uaddlvv4si_uu (__a); + return __builtin_aarch64_reduc_uplus_widen_scal_v4si_uu (__a); } __extension__ extern __inline float32x2_t @@ -6461,14 +6461,14 @@ __extension__ extern __inline int64_t __attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) vaddlv_s32 (int32x2_t __a) { - return __builtin_aarch64_saddlvv2si (__a); + return __builtin_aarch64_reduc_splus_widen_scal_v2si (__a); } __extension__ extern __inline uint64_t __attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) vaddlv_u32 (uint32x2_t __a) { - return __builtin_aarch64_uaddlvv2si_uu (__a); + return __builtin_aarch64_reduc_uplus_widen_scal_v2si_uu (__a); } __extension__ extern __inline int16x4_t --- a/gcc/config/aarch64/aarch64-simd-builtins.def +++ b/gcc/config/aarch64/aarch64-simd-builtins.def @@ -190,9 +190,9 @@ BUILTIN_VDQV_L (UNOP, saddlp, 0, NONE) BUILTIN_VDQV_L (UNOPU, uaddlp, 0, NONE) - /* Implemented by aarch64_addlv. */ - BUILTIN_VDQV_L (UNOP, saddlv, 0, NONE) - BUILTIN_VDQV_L (UNOPU, uaddlv, 0, NONE) + /* Implemented by reduc_plus_widen_scal_. */ + BUILTIN_VDQV_L (UNOP, reduc_splus_widen_scal_, 10, NONE) + BUILTIN_VDQV_L (UNOPU, reduc_uplus_widen_scal_, 10, NONE) /* Implemented by aarch64_abd. */ BUILTIN_VDQ_BHSI (BINOP, sabd, 0, NONE) diff --git a/gcc/config/aarch64/aarch64-simd.md b/gcc/config/aarch64/aarch64-simd.md index cf8c094bd4b76981cef2dd5dd7b8e6be0d56101f..25aed74f8cf939562ed65a578fe32ca76605b58a 100644 --- a/gcc/config/aarch64/aarch64-simd.md +++ b/gcc/config/aarch64/aarch64-simd.md @@ -3455,7 +3455,7 @@ (define_expand "reduc_plus_scal_v4sf" DONE; }) -(define_insn "aarch64_addlv" +(define_insn "reduc_plus_widen_scal_" [(set (match_operand: 0 "register_operand" "=w") (unspec: [(match_operand:VDQV_L 1 "register_operand" "w")] USADDLV))] diff --git a/gcc/config/aarch64/arm_neon.h b/gcc/config/aarch64/arm_neon.h index cf6af728ca99dae1cb6ab647466cfec32f7e913e..7b2c4c016191bcd6c3e075d27810faedb23854b7 100644 --- a/gcc/config/aarch64/arm_neon.h +++ b/gcc/config/aarch64/arm_neon.h @@ -3664,70 +3664,70 @@ __extension__ extern __inline int16_t __attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) vaddlv_s8 (int8x8_t __a) { - return __builtin_aarch64_saddlvv8qi (__a); + return __builtin_aarch64_reduc_splus_widen_scal_v8qi (__a); } __extension__ extern __inline int32_t __attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) vaddlv_s16 (int16x4_t __a) { - return __builtin_aarch64_saddlvv4hi (__a); + return __builtin_aarch64_reduc_splus_widen_scal_v4hi (__a); } __extension__ extern __inline uint16_t __attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) vaddlv_u8 (uint8x8_t __a) { - return __builtin_aarch64_uaddlvv8qi_uu (__a); + return __builtin_aarch64_reduc_uplus_widen_scal_v8qi_uu (__a); } __extension__ extern __inline uint32_t __attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) vaddlv_u16 (uint16x4_t __a) { - return __builtin_aarch64_uaddlvv4hi_uu (__a); + return __builtin_aarch64_reduc_uplus_widen_scal_v4hi_uu (__a); } __extension__ extern __inline int16_t __attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) vaddlvq_s8 (int8x16_t __a) { - return __builtin_aarch64_saddlvv16qi (__a); + return __builtin_aarch64_reduc_splus_widen_scal_v16qi (__a); } __extension__ extern __inline int32_t __attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) vaddlvq_s16 (int16x8_t __a) { - return __builtin_aarch64_saddlvv8hi (__a); + return __builtin_aarch64_reduc_splus_widen_scal_v8hi (__a); } __extension__ extern __inline int64_t __attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) vaddlvq_s32 (int32x4_t __a) { - return __builtin_aarch64_saddlvv4si (__a); + return __builtin_aarch64_reduc_splus_widen_scal_v4si (__a); } __extension__ extern __inline uint16_t __attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) vaddlvq_u8 (uint8x16_t __a) { - return __builtin_aarch64_uaddlvv16qi_uu (__a); + return __builtin_aarch64_reduc_uplus_widen_scal_v16qi_uu (__a); } __extension__ extern __inline uint32_t __attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) vaddlvq_u16 (uint16x8_t __a) { - return __builtin_aarch64_uaddlvv8hi_uu (__a); + return __builtin_aarch64_reduc_uplus_widen_scal_v8hi_uu (__a); } __extension__ extern __inline uint64_t __attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) vaddlvq_u32 (uint32x4_t __a) { - return __builtin_aarch64_uaddlvv4si_uu (__a); + return __builtin_aarch64_reduc_uplus_widen_scal_v4si_uu (__a); } __extension__ extern __inline float32x2_t @@ -6461,14 +6461,14 @@ __extension__ extern __inline int64_t __attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) vaddlv_s32 (int32x2_t __a) { - return __builtin_aarch64_saddlvv2si (__a); + return __builtin_aarch64_reduc_splus_widen_scal_v2si (__a); } __extension__ extern __inline uint64_t __attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) vaddlv_u32 (uint32x2_t __a) { - return __builtin_aarch64_uaddlvv2si_uu (__a); + return __builtin_aarch64_reduc_uplus_widen_scal_v2si_uu (__a); } __extension__ extern __inline int16x4_t