From patchwork Tue May 25 14:59:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tamar Christina X-Patchwork-Id: 1483482 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=gcc-patches-bounces@gcc.gnu.org; receiver=) Authentication-Results: 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=YD7zWiO8; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FqHL85DsKz9sRN for ; Wed, 26 May 2021 00:59:44 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 27563393C033; Tue, 25 May 2021 14:59:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 27563393C033 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1621954782; bh=nKibDsha7WCpT4U4HP+8xRf3ca2KUTsEicsFWD7UTOM=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=YD7zWiO8o5fmzvDwZvVQZdhylEBvJ2kvlgCe11DWj2ZHOkuG48+WuSNGnSt1dYKmf CLS/sCNZnvzdrrrKUZsChwSSpEzpVrn1U+U1EI1gLtUG0nfuoGIAaqdOg29eXhI13m agO6PeBlJvsoKsv8wRrufl55qOS8ilFnoSD1gIic= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2058.outbound.protection.outlook.com [40.107.20.58]) by sourceware.org (Postfix) with ESMTPS id 1A700386101C for ; Tue, 25 May 2021 14:59:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 1A700386101C Received: from AM5PR0202CA0023.eurprd02.prod.outlook.com (2603:10a6:203:69::33) by AS8PR08MB6710.eurprd08.prod.outlook.com (2603:10a6:20b:397::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4150.26; Tue, 25 May 2021 14:59:35 +0000 Received: from AM5EUR03FT019.eop-EUR03.prod.protection.outlook.com (2603:10a6:203:69:cafe::96) by AM5PR0202CA0023.outlook.office365.com (2603:10a6:203:69::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4173.20 via Frontend Transport; Tue, 25 May 2021 14:59:35 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; gcc.gnu.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;gcc.gnu.org; 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; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM5EUR03FT019.mail.protection.outlook.com (10.152.16.104) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4129.25 via Frontend Transport; Tue, 25 May 2021 14:59:35 +0000 Received: ("Tessian outbound ea2c9a942a09:v92"); Tue, 25 May 2021 14:59:35 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 6dd6a28a3ce571dc X-CR-MTA-TID: 64aa7808 Received: from ae1704cb8212.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 128C6969-C430-4B1F-B6D6-98039B09E96C.1; Tue, 25 May 2021 14:59:08 +0000 Received: from EUR05-DB8-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id ae1704cb8212.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 25 May 2021 14:59:08 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WK2RVUQsFBTABBzwRrqZMT/8WdNPnO6MUDHQa9IyzO6Hq7iU2zX8CA8aY1aNw4rz0nqXfvCQE+2kwC0Oq/KmhzdORSiTOpLSiJ22S/dh6EM24jUFhf7dkgPmDTXUwbMtKf2+6RH6Vm4g85tml+pvt4Z22PO9KYxJQFr0GVELelm8foDpMGKYuvsCsbIgH1WaLetl2ZRIbuux3DquXWHW/0BAuFRqrJjR+FULfUP9UWqdJvUPwRsKK2q/Fcw0EvDUh4DLO7fVdBjnUa1QGHWjqDHYTPyz37sBhUyLhKcH7lNz7eENerkLsbdlF1Eh2k35DdI6tewpgsPWUHAYshzPVA== 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-SenderADCheck; bh=nKibDsha7WCpT4U4HP+8xRf3ca2KUTsEicsFWD7UTOM=; b=lKbeZYAyM/bq6/cKb3Lq5ZersKMc2l7O4ibw4La8r5haTYnTkmQl7l7kiC1gJIYQPpervIHtFD7kcGyh65XIG1M9TljdVGh7yRTdiDQwnq5f/7+/lm4XTWqaiGNh5xZjIUMdO1JectjSdICpa5RlWK9/ZM7gnKjFT/0cqT9RZLFchW3WzWqr7/VVrSHpTvZ5aC8Sn5bDVPntmtI2UK3yGk911ZD2OZPI6pYTzaApWeUsYX9w0xdfCC5cjiV1kdQj0VJMdG4rbdiG9c5FU5fjufDruBE4pZ/L5+yvpCv4BwLoQLIuprGY6bthuO2zcVCJ3qB/HV8SAUzaeqmraEfH5A== 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: gcc.gnu.org; dkim=none (message not signed) header.d=none;gcc.gnu.org; dmarc=none action=none header.from=arm.com; Received: from VI1PR08MB5325.eurprd08.prod.outlook.com (2603:10a6:803:13e::17) by VI1PR0802MB2576.eurprd08.prod.outlook.com (2603:10a6:800:b4::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4129.26; Tue, 25 May 2021 14:59:06 +0000 Received: from VI1PR08MB5325.eurprd08.prod.outlook.com ([fe80::f557:1fb2:62cc:5243]) by VI1PR08MB5325.eurprd08.prod.outlook.com ([fe80::f557:1fb2:62cc:5243%9]) with mapi id 15.20.4150.027; Tue, 25 May 2021 14:59:06 +0000 Date: Tue, 25 May 2021 15:59:04 +0100 To: gcc-patches@gcc.gnu.org Subject: [PATCH]AArch64: Correct dot-product auto-vect optab RTL Message-ID: Content-Disposition: inline User-Agent: Mutt/1.9.4 (2018-02-28) X-Originating-IP: [217.140.106.51] X-ClientProxiedBy: LO4P123CA0446.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:1a9::19) To VI1PR08MB5325.eurprd08.prod.outlook.com (2603:10a6:803:13e::17) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from arm.com (217.140.106.51) by LO4P123CA0446.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:1a9::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4173.20 via Frontend Transport; Tue, 25 May 2021 14:59:05 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 757095ea-b147-44a5-ed86-08d91f8db609 X-MS-TrafficTypeDiagnostic: VI1PR0802MB2576:|AS8PR08MB6710: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:8882;OLM:8882; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: 0NjKh9UnLB0JWjTdUWS4dUKe3HZnxy13BtN44lylfklrQ9LA+hzSJA02BwiW7eoOf6f1pyRIxwGcA8fdUOAQKJYi7SSToFfjWSmS6ynZ6qNscGZkdQ5lNsuEr7++MqhTKTLa9o3kg4WGiJYMtcPnsvNtJUBfnPC+ABa4EkgyDo+5+WrlkE3F3xAie6Mo3WGFiM4iPCcVZVigZQn3Sv+UrhwKvtJbmAoFtj0uzl9vrBy+GQF5C9MLKYY7Bh5v4jImm8Lsbtq7+zjFKkDtKefHZiZzOkLjxh1yTff5Q1OM03LyLmoEQ6qPo4jcuEK2PWbRWXf6CdPipOaBEtE5XS5Me/0v2NZEIJyYfeVMrfO4pgbthgnWkfDlBrJ7xHudOUf7tLtSuS0YKCRvO9wwsxtxm94dKb3wpvOkZSI1SejEsc8d2DJHRV320q+Am62bxjCDY96dkHKKr2GvtYjhxdDyiUsyfshJabCBrRAhHPET1Su8ncuZowbroUzMq89qvbdSV7wkwwAXyl2SmlBFsNboR/LnjpdUorCK1/49TB5g5Bis3sLTKQbAVPKyPhAUv0/9XOluK9wv9KA2qYIKMmlR5CJa946tP3AAmLXJvlLEetdxqNdVVec+NGzOenRxXsOYhQLqVPKPfS2iAnY0BLf7PijxAEkB36aPpYNo+MTNkHboWa5nG/GOXjOOUZPtRO47nc821hUGMVGm7EDLTm/4MQ== 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:(4636009)(39860400002)(346002)(376002)(396003)(136003)(366004)(6916009)(478600001)(38100700002)(8886007)(186003)(38350700002)(16526019)(2616005)(66556008)(66946007)(66476007)(66616009)(956004)(44832011)(2906002)(4326008)(83380400001)(55016002)(52116002)(7696005)(4743002)(86362001)(33964004)(5660300002)(8936002)(8676002)(235185007)(44144004)(36756003)(26005)(316002)(4216001)(2700100001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: =?utf-8?q?jCgtoVU6YMWLDHymwt/cK8zWJEKD7c?= =?utf-8?q?HhKWo78+I3yj+5V2NzRI+ZW+CdV0/Xq5oJhMH+vHwTbWE/wM0a854/u3G6c5o8T75?= =?utf-8?q?gnzjlGAHvFUT21ke1kSnPeRwZtMZ+k0J9dzWOgpIP4ISZHQM0lfEGntwr9Iwid2ry?= =?utf-8?q?OYXCxpAcO8AGqEsgMng4qwYdA42ag9qvcl1miJhofnUX742+xIM4xqtHK5YnYzOU3?= =?utf-8?q?WRgWm5SZkV4JAymmXYvhqvuE8WkJehX8hZoypVaK8SAwPkj/7vkzImuqY3Jw6Hmf2?= =?utf-8?q?N9wT+iqxPUzTkqsT+wyROH8VWOXonNpGGuxyffgkrRL0KRSpkKcVWPZZRyCRVP9+Z?= =?utf-8?q?LszrzqIfLC/g9tyKX1h+pux1nh/SryDSNpWkDQg2qSEpt9vsE95RqbgVdbIIYoyfo?= =?utf-8?q?GgrgXy12Mc0WuIxL/ikv0mTT7E/3Sktrh2hOcON3vJMQ+AX0FLj3sJb9r1xc7Q3Vf?= =?utf-8?q?MarnmIng75KNr2zi3y1slqAVd5X8iK/saF9o0bIDZyaNkwan+TtXPulnIM1jWQLrH?= =?utf-8?q?QFNxknLKRLXq6pTAP1+yibHLgoXV7wfNjBKnWZjjbnu6RygM2fDfuyk7B2uFQ+btY?= =?utf-8?q?0/tYP0LLqSfL5kE1pGgekN5r3XJRZwiRYOROa1X2hhezUvbybgkSJeaHfiu9pEHsM?= =?utf-8?q?nm7LCkw7oVs10Ew07bRrVBCwL023O3fUiSvgagBaGeuwH0WIDnRgL+opl34sxJhCs?= =?utf-8?q?JDen70vDO4cuK0PpwG59/vuqjD8gU6nGtIapebgKda7hjKGHZPh6h3TZVjNQ57yKf?= =?utf-8?q?lsFgscwz6O8WiGUWX+t/ZFk8wNy8uugKV3QciJfPiybRuI1ymXk7ckfGhpFNnJ+wh?= =?utf-8?q?JiWjWAz7AMZppjdNKqZED7xLNTgS2G3PwHWtpskSedg/hQmSH4+lD6EC851ADxVJE?= =?utf-8?q?bEF7MXUSNTmnUBpAM4yvNxfzxK53mwVoNX7Q5Cagwl1xWdLczdhFV7NdgYDE3CVoo?= =?utf-8?q?KFV3rHikWgulJoktcHYDITc+Sp0gwv933xFwnRAgiKRGYeGagaRI5a3od6jkTehMI?= =?utf-8?q?1/D9qJNKdeQ8JuHuPBKTsADo+zV1myid6ZedKLRmRhIpy6g6D1PF/dEpX2/7IpDVm?= =?utf-8?q?3BUEzRFqkL4Mkbbaz5JECOS5EX8cPCOH3fEbAjUqiu5RPjOcdYO68WvmT9J+CE1JN?= =?utf-8?q?YxZTHAGL5kn6J3X03b5A6v9eEvtIxDVIUkT9623Q7DcyBZoX+itdlDHZpBzSJDL/r?= =?utf-8?q?P4Btu/a5NOH+ymIJTOpJcuXDfMW6lk4lHxiHjShB7g4jwSSjw3/M2WTLGPQMQyq9V?= =?utf-8?q?Q20Xwdxs8wUDJt?= X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0802MB2576 Original-Authentication-Results: gcc.gnu.org; dkim=none (message not signed) header.d=none;gcc.gnu.org; dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT019.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 4ccbe970-baaa-438f-68ef-08d91f8da48c X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: mMUokLRbFS2pzGVXq4CjJrcuZGHnFYtIywYNWt8j9BxMPqXQtNfGkLQCaY8exBRrK7+yNcYbtsy0hYGq1qapPjZsE7iE8xVPgNfbkU0cgOSDyIyNxDUjszc30DqSElBnbSy96FmMbZIo+L6LXkS3JZNmjM/770U5KtDo29d2YONIywVVVyqlvyH0uQN6BCEQr1KeVfTC8b9Bc1dXNwxkRAdNGvDpM4ecs1oCm/QV06dppjGm7O3Ffem6Z/hRJL/ZrGlokX1a5o0OBfsuLOqTdv5ep4sMYzLCo9mT8xsB0Sqba/TGtn0lfNmhdu9Tvn7P9WDz3+NpSwE0rg6mm02pcSbJ/SmL/1w4DGrh1EGnP4esWq061Hm1TyjhTgDmQEFPV1FGKPGuBOzyIOT3WvVkfiSPTRtTs3D6i9fjkoP5T2gOKFM0AtJIkLlTcySeT9deo1+dep97mLGdxM3F/zz0QJKoU2P7G/XZ5oaFBboU7QAGKrJyb4Tp70L7qLzxsLLTG5qLNhry+6TBeQIna/2u5PhH3riVKYgPGtnWp/Y58EibgRWNkz8/8fG5skS3tMUM6uodmBStoxqiJmnOnJpchEbIwjeaDmzhE2weAT09DZQFsw8KTMpUu6kmbT2rKBjHnKOGjZG5mbfNz22AYcAJO9wTwK/n3Kp+qiCNUZyl4ep08owAcQxJv1vrQbCn7YZb2sIm+y1usFnATPnSYQHpJg== 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:(4636009)(39860400002)(376002)(396003)(136003)(346002)(36840700001)(46966006)(5660300002)(235185007)(83380400001)(70206006)(70586007)(82310400003)(8886007)(6916009)(66616009)(2906002)(4326008)(81166007)(26005)(86362001)(44144004)(8676002)(956004)(4743002)(7696005)(33964004)(8936002)(356005)(36860700001)(478600001)(336012)(36756003)(82740400003)(316002)(44832011)(47076005)(186003)(55016002)(2616005)(16526019)(4216001)(2700100001); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 May 2021 14:59:35.3899 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 757095ea-b147-44a5-ed86-08d91f8db609 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: AM5EUR03FT019.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB6710 X-Spam-Status: No, score=-14.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, KAM_LOTSOFHASH, MSGID_FROM_MTA_HEADER, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_PASS, TXREP, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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@gcc.gnu.org Sender: "Gcc-patches" Hi All, The current RTL for the vectorizer patterns for dot-product are incorrect. Operand3 isn't an output parameter so we can't write to it. This fixes this issue and reduces the number of RTL. Bootstrapped Regtested on aarch64-none-linux-gnu and no issues. Ok for master? And backport to GCC 11, 10, 9? Thanks, Tamar gcc/ChangeLog: * config/aarch64/aarch64-simd-builtins.def (udot, sdot): Rename to... (sdot_prod, udot_prod): ...These. * config/aarch64/aarch64-simd.md (dot_prod): Remove. ((aarch64_dot): Rename to... (dot_prod): ...This. * config/aarch64/arm_neon.h (vdot_u32, vdotq_u32, vdot_s32, vdotq_s32): Update builtins. --- inline copy of patch -- diff --git a/gcc/config/aarch64/aarch64-simd-builtins.def b/gcc/config/aarch64/aarch64-simd-builtins.def index c869ed9a6ab7d63f0e3d5fe393a93c1cc9142e78..fa3bb7b96710122957933b5c0b0b276256892a4c 100644 diff --git a/gcc/config/aarch64/aarch64-simd-builtins.def b/gcc/config/aarch64/aarch64-simd-builtins.def index c869ed9a6ab7d63f0e3d5fe393a93c1cc9142e78..fa3bb7b96710122957933b5c0b0b276256892a4c 100644 --- a/gcc/config/aarch64/aarch64-simd-builtins.def +++ b/gcc/config/aarch64/aarch64-simd-builtins.def @@ -362,8 +362,8 @@ BUILTIN_VSDQ_I_DI (BINOP_UUS, urshl, 0, NONE) /* Implemented by _prod. */ - BUILTIN_VB (TERNOP, sdot, 0, NONE) - BUILTIN_VB (TERNOPU, udot, 0, NONE) + BUILTIN_VB (TERNOP, sdot_prod, 10, NONE) + BUILTIN_VB (TERNOPU, udot_prod, 10, NONE) BUILTIN_VB (TERNOP_SSUS, usdot_prod, 10, NONE) /* Implemented by aarch64__lane{q}. */ BUILTIN_VB (QUADOP_LANE, sdot_lane, 0, NONE) diff --git a/gcc/config/aarch64/aarch64-simd.md b/gcc/config/aarch64/aarch64-simd.md index 253ddbe25d3a86af4b40b056132e6a86a0392ea6..638e2d103bcba0af2292b16efd02046d1195095b 100644 --- a/gcc/config/aarch64/aarch64-simd.md +++ b/gcc/config/aarch64/aarch64-simd.md @@ -587,8 +587,28 @@ (define_expand "cmul3" DONE; }) -;; These instructions map to the __builtins for the Dot Product operations. -(define_insn "aarch64_dot" +;; These expands map to the Dot Product optab the vectorizer checks for +;; and to the intrinsics patttern. +;; The auto-vectorizer expects a dot product builtin that also does an +;; accumulation into the provided register. +;; Given the following pattern +;; +;; for (i=0; idot_prod" [(set (match_operand:VS 0 "register_operand" "=w") (plus:VS (match_operand:VS 1 "register_operand" "0") (unspec:VS [(match_operand: 2 "register_operand" "w") @@ -613,41 +633,6 @@ (define_insn "usdot_prod" [(set_attr "type" "neon_dot")] ) -;; These expands map to the Dot Product optab the vectorizer checks for. -;; The auto-vectorizer expects a dot product builtin that also does an -;; accumulation into the provided register. -;; Given the following pattern -;; -;; for (i=0; idot_prod" - [(set (match_operand:VS 0 "register_operand") - (plus:VS (unspec:VS [(match_operand: 1 "register_operand") - (match_operand: 2 "register_operand")] - DOTPROD) - (match_operand:VS 3 "register_operand")))] - "TARGET_DOTPROD" -{ - emit_insn ( - gen_aarch64_dot (operands[3], operands[3], operands[1], - operands[2])); - emit_insn (gen_rtx_SET (operands[0], operands[3])); - DONE; -}) - ;; These instructions map to the __builtins for the Dot Product ;; indexed operations. (define_insn "aarch64_dot_lane" @@ -944,8 +929,7 @@ (define_expand "sadv16qi" rtx ones = force_reg (V16QImode, CONST1_RTX (V16QImode)); rtx abd = gen_reg_rtx (V16QImode); emit_insn (gen_aarch64_abdv16qi (abd, operands[1], operands[2])); - emit_insn (gen_aarch64_udotv16qi (operands[0], operands[3], - abd, ones)); + emit_insn (gen_udot_prodv16qi (operands[0], operands[3], abd, ones)); DONE; } rtx reduc = gen_reg_rtx (V8HImode); diff --git a/gcc/config/aarch64/arm_neon.h b/gcc/config/aarch64/arm_neon.h index 373f06a24ea6ce686d7e0cdf53dd364041c61092..90770411f177f05b4f1bdbd83890734612c31dc3 100644 --- a/gcc/config/aarch64/arm_neon.h +++ b/gcc/config/aarch64/arm_neon.h @@ -32112,28 +32112,28 @@ __extension__ extern __inline uint32x2_t __attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) vdot_u32 (uint32x2_t __r, uint8x8_t __a, uint8x8_t __b) { - return __builtin_aarch64_udotv8qi_uuuu (__r, __a, __b); + return __builtin_aarch64_udot_prodv8qi_uuuu (__r, __a, __b); } __extension__ extern __inline uint32x4_t __attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) vdotq_u32 (uint32x4_t __r, uint8x16_t __a, uint8x16_t __b) { - return __builtin_aarch64_udotv16qi_uuuu (__r, __a, __b); + return __builtin_aarch64_udot_prodv16qi_uuuu (__r, __a, __b); } __extension__ extern __inline int32x2_t __attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) vdot_s32 (int32x2_t __r, int8x8_t __a, int8x8_t __b) { - return __builtin_aarch64_sdotv8qi (__r, __a, __b); + return __builtin_aarch64_sdot_prodv8qi (__r, __a, __b); } __extension__ extern __inline int32x4_t __attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) vdotq_s32 (int32x4_t __r, int8x16_t __a, int8x16_t __b) { - return __builtin_aarch64_sdotv16qi (__r, __a, __b); + return __builtin_aarch64_sdot_prodv16qi (__r, __a, __b); } __extension__ extern __inline uint32x2_t