From patchwork Fri Dec 17 15:43:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tamar Christina X-Patchwork-Id: 1570135 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.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=XBkn+rd4; dkim-atps=neutral Authentication-Results: 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=) Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4JFtd336kMz9sR4 for ; Sat, 18 Dec 2021 02:46:31 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 29F38385801E for ; Fri, 17 Dec 2021 15:46:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 29F38385801E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1639755989; bh=NXE1pYyxOq7YkYZydvTZ3DUFgMqLYNbsNhjBrYROuv8=; 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=XBkn+rd4qwXbZbRt8iaw5bskn96AMtQMdsaC+7fRlSNTMgbJqMr9JyJd0wHpXXrKo lHi9c57m8QChLnIRvyOy4kk73JZg/CkrYLQFRwKIdmy9zasDo7e+q0fkh759Z+awVe 4nRg9Z5RZCufiDWkQ8i7mau0vfzvr3x8Mj6iI//8= 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-db8eur05on2054.outbound.protection.outlook.com [40.107.20.54]) by sourceware.org (Postfix) with ESMTPS id B2B773858430 for ; Fri, 17 Dec 2021 15:43:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B2B773858430 Received: from AM6P193CA0039.EURP193.PROD.OUTLOOK.COM (2603:10a6:209:8e::16) by AM9PR08MB6180.eurprd08.prod.outlook.com (2603:10a6:20b:2d4::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4801.14; Fri, 17 Dec 2021 15:43:28 +0000 Received: from VE1EUR03FT055.eop-EUR03.prod.protection.outlook.com (2603:10a6:209:8e:cafe::60) by AM6P193CA0039.outlook.office365.com (2603:10a6:209:8e::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4801.15 via Frontend Transport; Fri, 17 Dec 2021 15:43:28 +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; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by VE1EUR03FT055.mail.protection.outlook.com (10.152.19.158) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4801.14 via Frontend Transport; Fri, 17 Dec 2021 15:43:28 +0000 Received: ("Tessian outbound dbb52aec1fa6:v110"); Fri, 17 Dec 2021 15:43:28 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 97c5e7d8c6398dc6 X-CR-MTA-TID: 64aa7808 Received: from 87bb64d7dda4.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 13A38AC0-4674-4A95-B99E-9065EC7F0D66.1; Fri, 17 Dec 2021 15:43:17 +0000 Received: from EUR04-DB3-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 87bb64d7dda4.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 17 Dec 2021 15:43:17 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lNuzya3v60t9S7bh4QjokCB8QvoOa93VCI+7kzkdVSqVCU0+ES2XYnnX42x35anY87aHYUmBqglnwyTDV+2ZKYTrSGLq0VgUxm87q+Ur40tllML6lbtJhz3YJaL/h0ara7w0bdAhV+rneiL5f3TIKtOeYabAgpFy5HkYqxYjc1iXcYC9bmkxcSytfJkygx8zkXCKvWCXO9Msi+gX/WMhNSnHPHvrUewfrh4uDZcUgc/bJvTtjwICcwWI7uTZhqnm5gLsk77aHcSE37uwtenB93Z6PwR54/vKHvDt8Wa95xE0OJHcIlEh3W5i9GmVEJxn9CZuc/j38ctGKWXdZ9yIeQ== 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=NXE1pYyxOq7YkYZydvTZ3DUFgMqLYNbsNhjBrYROuv8=; b=oGZbZe8ck6iyoY4weRhDfod1IJSaBK1XGPnSVH0N5/rSNzfgOrsNgdMD5UPBxiA9OtfPfVixKB7G90Id1ZdM8Owb9K559PDPbcrgep1JyXlHznz//3hzqOi1kFrp9sUSxzf5n9Sq4Zrt1gk1csifB3xpOQiwbsBaDLhoLqmvDibn+N3P3GnB6z8Lzo5mTpV1VnX0DVnTBgs1YuBJqzVRc0AccQKJO7mMGznBV2Ny/dzwDKPvsaKXPvY2UX5UYu2b7akMHjtGMrn8EcgSz0ZezX+7AnYa4feV3d0t9MgXRYBarxjPe8sbCHWpV8ElbP6lWxfJyAJ1Mn0V73qpiZir/A== 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 VI1PR0802MB2352.eurprd08.prod.outlook.com (2603:10a6:800:9e::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4778.17; Fri, 17 Dec 2021 15:43:15 +0000 Received: from VI1PR08MB5325.eurprd08.prod.outlook.com ([fe80::12a:3d2c:81ff:8fcc]) by VI1PR08MB5325.eurprd08.prod.outlook.com ([fe80::12a:3d2c:81ff:8fcc%8]) with mapi id 15.20.4778.018; Fri, 17 Dec 2021 15:43:15 +0000 Date: Fri, 17 Dec 2021 15:43:12 +0000 To: gcc-patches@gcc.gnu.org Subject: [3/3 PATCH][AArch32] use canonical ordering for complex mul, fma and fms Message-ID: <20211217154310.GA9498@arm.com> Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) X-ClientProxiedBy: LO2P265CA0054.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:60::18) To VI1PR08MB5325.eurprd08.prod.outlook.com (2603:10a6:803:13e::17) MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: eabd1d92-ebfa-42d9-4be1-08d9c173f86b X-MS-TrafficTypeDiagnostic: VI1PR0802MB2352:EE_|VE1EUR03FT055:EE_|AM9PR08MB6180:EE_ X-LD-Processed: f34e5979-57d9-4aaa-ad4d-b122a662184d,ExtAddr X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:4303;OLM:4303; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: NjMILCU5wGRel2CLtEahJGuIqCX01KeI8VDd/zte0q1ldQ++CktRwB77//yrPjtqMlGH2DfLF/FJSp44vv3MZ581+eLv3VGLg8AQsVoXPdux3F236G/Qv3+KFkeNguhv2CzmmFsoM88yWb8NULZP+E0or6FzwIzaFx2Wkd5Z7IeiMW5iHo+EJ7q+hHSuICtjZPz6R57+TpheYs48riyQMo8xTFXS5T9FfAMa/XbzsPfrviSyUylXD6gxi8XBeDxtOm6IDHrEIrRFcKLMMZsHpZY+VMVtQNM45NRTRuK/Lxdhdl5lP/MbH4l8vGTLT1besDRdCk+CE9vIRmkr5HCUvKEhCBmuSWFjD/ZJN0h3X25+sWTgGYfpxr19Z6m536LWesER8ZAHqr6og40r3YSe707+HiXVfpdVtDt5+MT8iByk8cCclxSxvHK0PvkAjgZ2l8Ra81yu7N5+CXVUxzMrhMaVwLQyOGClzh9vPEVEOkWfv+h2OuOs5/wFKU0H3krYZWU/mrbCLwVqTYfdcyubRGAKtcJg9XOQsL2zVEj6el64LMMBlS/+16ht5ePLFwbVH4900UPcNFMOWQe8k1Roj5TZwSHLQr8mZSyTkvE6NstEo7myPQdSzGnT1YRVuCa+mgsP7LkXqmw6tMqRphCtBqFoQWp1wStp5KTS6jf+B8/0rIZ/q6fSjiree9t0YVIOmATGQ5i1AvNF2x8cx/j2gCmEaUbCllc65wPXQjeieUQ= 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)(366004)(66946007)(6512007)(6916009)(316002)(52116002)(8936002)(38350700002)(6666004)(83380400001)(6486002)(4326008)(33656002)(6506007)(4743002)(508600001)(2616005)(66556008)(1076003)(66476007)(2906002)(86362001)(44832011)(235185007)(38100700002)(186003)(36756003)(5660300002)(8676002)(26005)(44144004)(33964004)(2700100001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0802MB2352 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: VE1EUR03FT055.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 4da5c5e0-6809-47a0-0442-08d9c173f09e X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 8bv/xUfFHOdFQYNQ5+lFouvuJ5y63dqb1+W5D9SVDHKXe1C9RAs3ClB1lMJvRPbHH6330wDkR96zNhL6EylchYT8MUyq5xlhJvxbcM8EZb//hUswiaYSR0tKpKiag0McAbmXjfzQ+t8JH8Uq+aB5wyv+al/OWDeYSBCPu2CrEHNurbe72ZFP/QBIuTDjEOoP2I0e0j7yuEQ3ZgEdE8ME6hEoWlSA63o91slZ7cDEHHB9muspfHEIegnayCFKJUgFjEkPvciUtdsACTe9xVlLN7OXXHlk7VjaQ91echJ4PNW9KFV8DIqB/jeiemWZ3ekztqgu34OlQXCpSCxUYx/RXEkmXXt0Wr6y5arqX3ExcnSMzhY50nxrbbf6VXMBVn+C29PQqd/EgStli4ZE99edwl3VeJpxw94l68UFH3sNDFEuARVRhr0bZm68/Ofj2IhytLUrzVp3iKpiS7UjSV82CAqYh5UGl55ENApllspcAG/EEwthOS0Fvg+5LQOzTbfWJ8FUBWtSrr75Y5RKsefHEgNbGmzHAM6RXmmrfwRRmaU00UfhXPNO9B2yqj2sOXVTn5wySrcISdm/w/0rdlXGMfpmpEdu9pf28DPguQerrGhqTvVcn3e9n3FxsQLIbzby1TwOz5I9d4CgzgwwMMdWAUXasAjDDWdvT+m2Vo0YYf4cumuBmYxUl/x7tOyNyDycY2fHsVW7sYQOEdExUDdNrPUt57rhXpqrds72MANEKZSZaUhViP8MjvRZju13tFD6vAcNEKoR9lAAiCsg03wg7gk2WPsrHhhEDxN/oAU0bSk= 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)(36840700001)(46966006)(40470700001)(36756003)(81166007)(70586007)(33656002)(70206006)(26005)(8676002)(6486002)(4326008)(6512007)(336012)(86362001)(316002)(186003)(6916009)(44832011)(36860700001)(235185007)(6506007)(40460700001)(8936002)(508600001)(1076003)(82310400004)(33964004)(2616005)(4743002)(356005)(6666004)(2906002)(83380400001)(44144004)(5660300002)(47076005)(2700100001); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Dec 2021 15:43:28.1410 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: eabd1d92-ebfa-42d9-4be1-08d9c173f86b 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: VE1EUR03FT055.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR08MB6180 X-Spam-Status: No, score=-13.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, KAM_LOTSOFHASH, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_PASS, TXREP, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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, Ramana.Radhakrishnan@arm.com Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" Hi All, After the first patch in the series this updates the optabs to expect the canonical sequence. Bootstrapped Regtested on arm-none-linux-gnueabihf and no issues. Ok for master? and backport along with the first patch? Thanks, Tamar gcc/ChangeLog: PR tree-optimization/102819 PR tree-optimization/103169 * config/arm/neon.md (cmul3): Use canon order. * config/arm/vec-common.md (cmul3, cml4): Likewise. --- inline copy of patch -- diff --git a/gcc/config/arm/neon.md b/gcc/config/arm/neon.md index 8b0a396947cc8e7345f178b926128d7224fb218a..2b6ae67a7ec6bef505c2eaef0ec495d14c656495 100644 diff --git a/gcc/config/arm/neon.md b/gcc/config/arm/neon.md index 8b0a396947cc8e7345f178b926128d7224fb218a..2b6ae67a7ec6bef505c2eaef0ec495d14c656495 100644 --- a/gcc/config/arm/neon.md +++ b/gcc/config/arm/neon.md @@ -2859,9 +2859,9 @@ (define_expand "cmul3" rtx res1 = gen_reg_rtx (mode); rtx tmp = force_reg (mode, CONST0_RTX (mode)); emit_insn (gen_neon_vcmla (res1, tmp, - operands[2], operands[1])); + operands[1], operands[2])); emit_insn (gen_neon_vcmla (operands[0], res1, - operands[2], operands[1])); + operands[1], operands[2])); DONE; }) diff --git a/gcc/config/arm/vec-common.md b/gcc/config/arm/vec-common.md index e71d9b3811fde62159f5c21944fef9fe3f97b4bd..0940e987de53e191f4abdd248c654aed69f016f7 100644 --- a/gcc/config/arm/vec-common.md +++ b/gcc/config/arm/vec-common.md @@ -239,14 +239,14 @@ (define_expand "cmul3" { rtx tmp = force_reg (mode, CONST0_RTX (mode)); emit_insn (gen_arm_vcmla (res1, tmp, - operands[2], operands[1])); + operands[1], operands[2])); } else emit_insn (gen_arm_vcmla (res1, CONST0_RTX (mode), - operands[2], operands[1])); + operands[1], operands[2])); emit_insn (gen_arm_vcmla (operands[0], res1, - operands[2], operands[1])); + operands[1], operands[2])); DONE; }) @@ -265,18 +265,18 @@ (define_expand "arm_vcmla" ;; remainder. Because of this, expand early. (define_expand "cml4" [(set (match_operand:VF 0 "register_operand") - (plus:VF (match_operand:VF 1 "register_operand") - (unspec:VF [(match_operand:VF 2 "register_operand") - (match_operand:VF 3 "register_operand")] - VCMLA_OP)))] + (plus:VF (unspec:VF [(match_operand:VF 1 "register_operand") + (match_operand:VF 2 "register_operand")] + VCMLA_OP) + (match_operand:VF 3 "register_operand")))] "(TARGET_COMPLEX || (TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT && ARM_HAVE__ARITH)) && !BYTES_BIG_ENDIAN" { rtx tmp = gen_reg_rtx (mode); - emit_insn (gen_arm_vcmla (tmp, operands[1], - operands[3], operands[2])); + emit_insn (gen_arm_vcmla (tmp, operands[3], + operands[1], operands[2])); emit_insn (gen_arm_vcmla (operands[0], tmp, - operands[3], operands[2])); + operands[1], operands[2])); DONE; })