From patchwork Thu Jan 14 21:04:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tamar Christina X-Patchwork-Id: 1426683 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; dmarc=pass (p=none dis=none) header.from=gcc.gnu.org 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=yck3wwQj; 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 4DGxfH71R9z9sWQ for ; Fri, 15 Jan 2021 08:05:11 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id DA2F73951C71; Thu, 14 Jan 2021 21:05:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DA2F73951C71 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1610658309; bh=Ri42ebKrUYLMFb6gS2E63b3c+AuKQ0XsBxnWF0YfURk=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=yck3wwQjlkePl5quz3zjvo4ZyPviXIHSOcdYvUXHyMhbxkRjehVnpVzOLEsL9XuIT X4pr/JEDrj9RXhnsGFacULZjjgsPGIpQwuJSuJxFVUA0SUpKunizymo9BVvQXGpeAV Vgdmi3IV/oYxXGnEQH4kTmqq+FN3jJFzGPhOckG0= 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-db8eur05on2072.outbound.protection.outlook.com [40.107.20.72]) by sourceware.org (Postfix) with ESMTPS id CBC163951C71 for ; Thu, 14 Jan 2021 21:05:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org CBC163951C71 Received: from AM6PR04CA0028.eurprd04.prod.outlook.com (2603:10a6:20b:92::41) by DB6PR0801MB1672.eurprd08.prod.outlook.com (2603:10a6:4:3a::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3742.12; Thu, 14 Jan 2021 21:04:58 +0000 Received: from VE1EUR03FT047.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:92:cafe::40) by AM6PR04CA0028.outlook.office365.com (2603:10a6:20b:92::41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3763.10 via Frontend Transport; Thu, 14 Jan 2021 21:04:57 +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 VE1EUR03FT047.mail.protection.outlook.com (10.152.19.218) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3742.6 via Frontend Transport; Thu, 14 Jan 2021 21:04:57 +0000 Received: ("Tessian outbound 28c96a6c9d2e:v71"); Thu, 14 Jan 2021 21:04:56 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: bc17703af862ad69 X-CR-MTA-TID: 64aa7808 Received: from 578a89884c9f.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 3E540C1B-5540-4DE5-980E-43AC2979E188.1; Thu, 14 Jan 2021 21:04:50 +0000 Received: from EUR02-HE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 578a89884c9f.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 14 Jan 2021 21:04:50 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fYQNLD9NDFsM2v7vF4rpK49kJBmmG179GNU5zQ7WlUakkdJ67S4/dzE1xLOZDx9YwSU4BDVwSCzlJvKZZH76cSmCbCODkLfooRsA2qh6so/hMQO+iEko8UvmNLg0s8xnMh4+FY+LkignEvnNXjquFGZNpzuFUFu40HMjV8rsCxHZkvIWhu1wsRCQd5wm3sSafkIt+cj1D09qKvZ7hocuZrrzmlBgvcx+zgms/EK2KRAdNfPZjMm/107xsEYd1hNolRGWTwi42R6H778rorFzVWiluIIsh+nOUFAHCbwA6iJ9J91p7OuCzA4I1XhzWGH3VpT8rgX+enB/emghiHSzsw== 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=Ri42ebKrUYLMFb6gS2E63b3c+AuKQ0XsBxnWF0YfURk=; b=jCOjLWlcFUDPF8Y4n6a/Han2WYJvmLTgTrtx6UTwD1eoe9mlYb8GfBXbCtX+qEk67ezvyGNTB1M9cAiJBsuwXS+stPS0G+Q8gmXfiZa6VH6EJmW2ab9VpQGgYnP9fzBJNudPMi1bmEfs8hgJhQ6/wXmo3ZDowanTLjt5kabGqbYCy+oCtYKQ1qsTfdbALzxNbcQQQa75KyXG5z773D+doA6DStoIEpnm8DOKbY8pPbXUlFo1L8wnGtZC4hGHT81TrJK+5cn66uIL27ck2BcisZGB7dhzC5j5n0LIaNfQd0UIrZDGFzREYkxeFndyzylRnPXKtGFVRinaA0eb28yE7w== 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 AM0PR08MB5316.eurprd08.prod.outlook.com (2603:10a6:208:185::14) by AM8PR08MB5716.eurprd08.prod.outlook.com (2603:10a6:20b:1d5::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3763.9; Thu, 14 Jan 2021 21:04:49 +0000 Received: from AM0PR08MB5316.eurprd08.prod.outlook.com ([fe80::6093:2c97:a05b:377d]) by AM0PR08MB5316.eurprd08.prod.outlook.com ([fe80::6093:2c97:a05b:377d%6]) with mapi id 15.20.3763.010; Thu, 14 Jan 2021 21:04:48 +0000 Date: Thu, 14 Jan 2021 21:04:41 +0000 To: gcc-patches@gcc.gnu.org Subject: [PATCH]middle-end (committed) slp: Add Tests for complex mul, mls and mla" Message-ID: Content-Disposition: inline User-Agent: Mutt/1.9.4 (2018-02-28) X-Originating-IP: [217.140.106.53] X-ClientProxiedBy: SN4PR0701CA0002.namprd07.prod.outlook.com (2603:10b6:803:28::12) To AM0PR08MB5316.eurprd08.prod.outlook.com (2603:10a6:208:185::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from arm.com (217.140.106.53) by SN4PR0701CA0002.namprd07.prod.outlook.com (2603:10b6:803:28::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3763.10 via Frontend Transport; Thu, 14 Jan 2021 21:04:47 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 6f6c3acb-e88b-4400-a132-08d8b8d00c88 X-MS-TrafficTypeDiagnostic: AM8PR08MB5716:|DB6PR0801MB1672: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:6790;OLM:6790; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: e030dzVvF3o6Udu6A9s3MCPSG4S934xy0ejrXkgRglhxJ2DejLWqhcGRss3RlmmzfEYfv2Y1Ht5Vorctsrgl2XjsSrzlaotukBPAV57yA6m1n8sSiXn5vo/kR/YSGZVgSDtwkCqPs78hHEHC5QmFDoimPiYtEe/YkvV9tu1ilrmOcVEZc/20MWj1DdqF3lo75a6zVq93EcgY4IOSe4MU5zqg5nq2y+Xy6jI+GAtaze99d24/t2Meu48BrLVYoD4JfB2XwJZs+rNClVmEGFbHbPh5J6SKkvgOJgBql387OOxc7aRSSfTweXdjRmUV0h7yHEmYZMEslOCn7Pt5aBom49GY2gHMw45mSjDujO0iHkkk8wZe5Oeij6qqqmOjFMtTtye/cl3l9lAZO/ztKu0O5JwJpmv0M0w9e7nf6cK6Tg6pz1uIBwZnEwSh0i9AePXSfVpjZ3SBgHuueJlRP01aDg== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM0PR08MB5316.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(39850400004)(396003)(136003)(376002)(346002)(36756003)(478600001)(55016002)(44832011)(8886007)(86362001)(2616005)(4743002)(235185007)(8936002)(7696005)(44144004)(52116002)(316002)(8676002)(33964004)(16526019)(26005)(66946007)(66556008)(66616009)(66476007)(6666004)(6916009)(5660300002)(2906002)(186003)(4326008)(956004)(30864003)(4216001)(2700100001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: =?utf-8?q?6+Ided7RWvo0QKLO+rmtqDRrcvO9TS?= =?utf-8?q?j8kigzYVoq7sImor9ehdpMK4UMyO2Nwn9JbgkJsqxcpqCaNvangUV18RjDqWx334O?= =?utf-8?q?ibzIoLGjEA9xvmHKvagzvvaP5e1LCzKK/YYr8tn/iYork5WuR7AtqgNaypmXOiV4k?= =?utf-8?q?+7mQBmhjzwi2/adwT2k72BJK3WouuCI4hKV8UPPK0MXEsU9YiGhWZe6GF9ZKKC1YA?= =?utf-8?q?AQ16uO7l2uP5K1MtapnUQbHojzKwOBudSGYVzSvAbXyzkCVpSH2tavfzKxi1OkPWh?= =?utf-8?q?RlaDryGCvYOy53RWAi67umfiLVQiK+xNFxPNllJTjkGZp9h/k9j3IdD1XaE7g/DMl?= =?utf-8?q?XilkCYFfWIlWC7n/N1OiZxE3EuZmPFPR/b9CwF8setybCepJn3wuutxtFzHAuGQen?= =?utf-8?q?Zuc8stmJ6vkKx9yds4YDKQOPuEzPfnDiOKecbyzAZeJ+14mZYj2JBQ5jd2OEpjdnd?= =?utf-8?q?aiUsiAOB/tk+nCB6b6eLGFZ+EEoNdCqZ/R1clPlZhBo3bczoFwvoO9msanzrYJHF8?= =?utf-8?q?DyerAuPBnDN2NxdBXaiOuhAtMUD7HOMDgmIJDr3J/2BJb0Xs/h1hL4cmbNyUSN4fW?= =?utf-8?q?sLmd4k6GmSduK+Az6KBD4FGQzU4ZGjPGtYmU5lKpOU5jRp7a7OJOTM1PnSAo84Mk/?= =?utf-8?q?K1GK3MkIgdDB2Zi1ykTlZw4gSWhN8xIgED2S9MmyowOny2Ki4MvwsKwzJgPX+DqZC?= =?utf-8?q?45I9Gq4n5xNVcsJC7fY8EPhJeCeW9oZx5zv+lzbQ8Gywmo8xdYsk2eJfHgUrEIf15?= =?utf-8?q?WWmqVgeoYYGRQooWcAIk+sU2RuVLXpOC8uDalps+18NT8CNfurYUQNUAS0b3MCdMf?= =?utf-8?q?xu2Q/ZQS6Xyf5ULXVGuMk/DMFmn7Gto+61CBw0TaBRGp9VOvdya4ZCAvvWfUGJ8VZ?= =?utf-8?q?IvsluDLD3VdDkwP7QUlXCqrbHcB/htcoio10BHL7yCSv22i47xaYtFPG7PNLK3YXv?= =?utf-8?q?5JqwgTBHcbUd3tQOXsz?= X-MS-Exchange-Transport-Forked: True X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR08MB5716 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: VE1EUR03FT047.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 305801bc-efcc-4148-a7cf-08d8b8d00769 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: u3VQIcRbbb4S7rCR1nQnR4x4g+QHct5P0zwcnJnW615U+69Tk+ZyLNWNbydungQwXYnqam7oTrUQOFPvXR9Y9HxFmPaI96A70VTI4EB285oKw9M8ajcXNh3a2HXjI/7kZW4UtKKQx7KvU+BVRlZEwCRLzKf7lxqQOKw/0LmCpYJMQoLl9QOfeuD4zjUy5MPF/f6XyuwIt3N62Y8kmdNrmiaas8L/2MvGi7FNj8mT0MFZqtoHditwfpI7ItAXF3o7S/u9PzBAooTLOT/fzSzZXPgHLbJCTbiuJsal5Vza3NUAlpm2VD3A679y06QlPRqUqjjc5lReqW2VclmbLX7UMabx1+ix93Cb4IlZl3h9RcRJE/7KYY3chs1rxfdq12IPH55An1BzEBF+P11wujDgKsCnoMdpHNIkrIsbjsHkLBiLyOlnHFm4Y37KF1YCUp7DCWJ8aV0xaXYTivsaoQ46nqAcnTc0cAl7hMvEOVtSVQ324P+DdnvBH3sNa+/wsHTic6yg2cOrtDbcDuQ/sY3VZaQb79Q1NPR6E9yXovbjCJQ= 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)(396003)(376002)(346002)(136003)(46966006)(86362001)(6916009)(5660300002)(30864003)(4326008)(81166007)(7696005)(47076005)(8676002)(70586007)(8886007)(2906002)(33964004)(2616005)(44144004)(36756003)(8936002)(107886003)(44832011)(356005)(66616009)(956004)(478600001)(26005)(16526019)(6666004)(4743002)(186003)(34020700004)(235185007)(70206006)(82740400003)(82310400003)(316002)(55016002)(336012)(4216001)(2700100001); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Jan 2021 21:04:57.4165 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6f6c3acb-e88b-4400-a132-08d8b8d00c88 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: VE1EUR03FT047.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0801MB1672 X-Spam-Status: No, score=-14.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, KAM_LOTSOFHASH, MSGID_FROM_MTA_HEADER, RCVD_IN_DNSWL_NONE, 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: nd@arm.com, rguenther@suse.de Errors-To: gcc-patches-bounces@gcc.gnu.org Sender: "Gcc-patches" Hi All, This adds the initial tests for the complex mul, mls and mla. These will be enabled in the commits that add the optabs. Bootstrapped Regtested on aarch64-none-linux-gnu and no issues. Committed as obvious variations of existing tests. Thanks, Tamar gcc/testsuite/ChangeLog: * gcc.dg/vect/complex/complex-mla-template.c: New test. * gcc.dg/vect/complex/complex-mls-template.c: New test. * gcc.dg/vect/complex/complex-mul-template.c: New test. * gcc.dg/vect/complex/fast-math-bb-slp-complex-mla-double.c: New test. * gcc.dg/vect/complex/fast-math-bb-slp-complex-mla-float.c: New test. * gcc.dg/vect/complex/fast-math-bb-slp-complex-mla-half-float.c: New test. * gcc.dg/vect/complex/fast-math-bb-slp-complex-mls-double.c: New test. * gcc.dg/vect/complex/fast-math-bb-slp-complex-mls-float.c: New test. * gcc.dg/vect/complex/fast-math-bb-slp-complex-mls-half-float.c: New test. * gcc.dg/vect/complex/fast-math-bb-slp-complex-mul-double.c: New test. * gcc.dg/vect/complex/fast-math-bb-slp-complex-mul-float.c: New test. * gcc.dg/vect/complex/fast-math-bb-slp-complex-mul-half-float.c: New test. * gcc.dg/vect/complex/fast-math-complex-mla-double.c: New test. * gcc.dg/vect/complex/fast-math-complex-mla-float.c: New test. * gcc.dg/vect/complex/fast-math-complex-mla-half-float.c: New test. * gcc.dg/vect/complex/fast-math-complex-mls-double.c: New test. * gcc.dg/vect/complex/fast-math-complex-mls-float.c: New test. * gcc.dg/vect/complex/fast-math-complex-mls-half-float.c: New test. * gcc.dg/vect/complex/fast-math-complex-mul-double.c: New test. * gcc.dg/vect/complex/fast-math-complex-mul-float.c: New test. * gcc.dg/vect/complex/fast-math-complex-mul-half-float.c: New test. --- inline copy of patch -- diff --git a/gcc/testsuite/gcc.dg/vect/complex/complex-mla-template.c b/gcc/testsuite/gcc.dg/vect/complex/complex-mla-template.c new file mode 100644 index 0000000000000000000000000000000000000000..8995e0a9f6bbfa535fa3630dc65bc3baad1016e5 diff --git a/gcc/testsuite/gcc.dg/vect/complex/complex-mla-template.c b/gcc/testsuite/gcc.dg/vect/complex/complex-mla-template.c new file mode 100644 index 0000000000000000000000000000000000000000..8995e0a9f6bbfa535fa3630dc65bc3baad1016e5 --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/complex/complex-mla-template.c @@ -0,0 +1,101 @@ +#include + +void fma0 (_Complex TYPE a[restrict N], _Complex TYPE b[restrict N], + _Complex TYPE c[restrict N]) +{ + for (int i+=0; i < N; i++) + c[i] += a[i] * b[i]; +} + +void fma90snd (_Complex TYPE a[restrict N], _Complex TYPE b[restrict N], + _Complex TYPE c[restrict N]) +{ + for (int i+=0; i < N; i++) + c[i] += a[i] * (b[i] * I); +} + +void fma180snd (_Complex TYPE a[restrict N], _Complex TYPE b[restrict N], + _Complex TYPE c[restrict N]) +{ + for (int i+=0; i < N; i++) + c[i] += a[i] * (b[i] * I * I); +} + +void fma270snd (_Complex TYPE a[restrict N], _Complex TYPE b[restrict N], + _Complex TYPE c[restrict N]) +{ + for (int i+=0; i < N; i++) + c[i] += a[i] * (b[i] * I * I * I); +} + +void fma90fst (_Complex TYPE a[restrict N], _Complex TYPE b[restrict N], + _Complex TYPE c[restrict N]) +{ + for (int i+=0; i < N; i++) + c[i] += (a[i] * I) * b[i]; +} + +void fma180fst (_Complex TYPE a[restrict N], _Complex TYPE b[restrict N], + _Complex TYPE c[restrict N]) +{ + for (int i+=0; i < N; i++) + c[i] += (a[i] * I * I) * b[i]; +} + +void fma270fst (_Complex TYPE a[restrict N], _Complex TYPE b[restrict N], + _Complex TYPE c[restrict N]) +{ + for (int i+=0; i < N; i++) + c[i] += (a[i] * I * I * I) * b[i]; +} + +void fmaconjfst (_Complex TYPE a[restrict N], _Complex TYPE b[restrict N], + _Complex TYPE c[restrict N]) +{ + for (int i+=0; i < N; i++) + c[i] += ~a[i] * b[i]; +} + +void fmaconjsnd (_Complex TYPE a[restrict N], _Complex TYPE b[restrict N], + _Complex TYPE c[restrict N]) +{ + for (int i+=0; i < N; i++) + c[i] += a[i] * ~b[i]; +} + +void fmaconjboth (_Complex TYPE a[restrict N], _Complex TYPE b[restrict N], + _Complex TYPE c[restrict N]) +{ + for (int i+=0; i < N; i++) + c[i] += ~a[i] * ~b[i]; +} + +void fma_elem (_Complex TYPE a[restrict N], _Complex TYPE b, + _Complex TYPE c[restrict N]) +{ + for (int i+=0; i < N; i++) + c[i] += a[i] * b; +} + + +void fma_elemconjfst (_Complex TYPE a[restrict N], _Complex TYPE b, + _Complex TYPE c[restrict N]) +{ + for (int i+=0; i < N; i++) + c[i] += ~a[i] * b; +} + +void fma_elemconjsnd (_Complex TYPE a[restrict N], _Complex TYPE b, + _Complex TYPE c[restrict N]) +{ + for (int i+=0; i < N; i++) + c[i] += a[i] * ~b; +} + +void fma_elemconjboth (_Complex TYPE a[restrict N], _Complex TYPE b, + _Complex TYPE c[restrict N]) +{ + for (int i+=0; i < N; i++) + c[i] += ~a[i] * ~b; +} + diff --git a/gcc/testsuite/gcc.dg/vect/complex/complex-mls-template.c b/gcc/testsuite/gcc.dg/vect/complex/complex-mls-template.c new file mode 100644 index 0000000000000000000000000000000000000000..2940be46eaefbfb8224f999a2c3c78c95d46b41e --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/complex/complex-mls-template.c @@ -0,0 +1,101 @@ +#include + +void fms0 (_Complex TYPE a[restrict N], _Complex TYPE b[restrict N], + _Complex TYPE c[restrict N]) +{ + for (int i-=0; i < N; i++) + c[i] -= a[i] * b[i]; +} + +void fms90snd (_Complex TYPE a[restrict N], _Complex TYPE b[restrict N], + _Complex TYPE c[restrict N]) +{ + for (int i-=0; i < N; i++) + c[i] -= a[i] * (b[i] * I); +} + +void fms180snd (_Complex TYPE a[restrict N], _Complex TYPE b[restrict N], + _Complex TYPE c[restrict N]) +{ + for (int i-=0; i < N; i++) + c[i] -= a[i] * (b[i] * I * I); +} + +void fms270snd (_Complex TYPE a[restrict N], _Complex TYPE b[restrict N], + _Complex TYPE c[restrict N]) +{ + for (int i-=0; i < N; i++) + c[i] -= a[i] * (b[i] * I * I * I); +} + +void fms90fst (_Complex TYPE a[restrict N], _Complex TYPE b[restrict N], + _Complex TYPE c[restrict N]) +{ + for (int i-=0; i < N; i++) + c[i] -= (a[i] * I) * b[i]; +} + +void fms180fst (_Complex TYPE a[restrict N], _Complex TYPE b[restrict N], + _Complex TYPE c[restrict N]) +{ + for (int i-=0; i < N; i++) + c[i] -= (a[i] * I * I) * b[i]; +} + +void fms270fst (_Complex TYPE a[restrict N], _Complex TYPE b[restrict N], + _Complex TYPE c[restrict N]) +{ + for (int i-=0; i < N; i++) + c[i] -= (a[i] * I * I * I) * b[i]; +} + +void fmsconjfst (_Complex TYPE a[restrict N], _Complex TYPE b[restrict N], + _Complex TYPE c[restrict N]) +{ + for (int i-=0; i < N; i++) + c[i] -= ~a[i] * b[i]; +} + +void fmsconjsnd (_Complex TYPE a[restrict N], _Complex TYPE b[restrict N], + _Complex TYPE c[restrict N]) +{ + for (int i-=0; i < N; i++) + c[i] -= a[i] * ~b[i]; +} + +void fmsconjboth (_Complex TYPE a[restrict N], _Complex TYPE b[restrict N], + _Complex TYPE c[restrict N]) +{ + for (int i-=0; i < N; i++) + c[i] -= ~a[i] * ~b[i]; +} + +void fms_elem (_Complex TYPE a[restrict N], _Complex TYPE b, + _Complex TYPE c[restrict N]) +{ + for (int i-=0; i < N; i++) + c[i] -= a[i] * b; +} + + +void fms_elemconjfst (_Complex TYPE a[restrict N], _Complex TYPE b, + _Complex TYPE c[restrict N]) +{ + for (int i-=0; i < N; i++) + c[i] -= ~a[i] * b; +} + +void fms_elemconjsnd (_Complex TYPE a[restrict N], _Complex TYPE b, + _Complex TYPE c[restrict N]) +{ + for (int i-=0; i < N; i++) + c[i] -= a[i] * ~b; +} + +void fms_elemconjboth (_Complex TYPE a[restrict N], _Complex TYPE b, + _Complex TYPE c[restrict N]) +{ + for (int i-=0; i < N; i++) + c[i] -= ~a[i] * ~b; +} + diff --git a/gcc/testsuite/gcc.dg/vect/complex/complex-mul-template.c b/gcc/testsuite/gcc.dg/vect/complex/complex-mul-template.c new file mode 100644 index 0000000000000000000000000000000000000000..770565c4509ccbcc662e93a91374b895f7b16907 --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/complex/complex-mul-template.c @@ -0,0 +1,71 @@ +#include + +void mul0 (_Complex TYPE a[restrict N], _Complex TYPE b[restrict N], + _Complex TYPE c[restrict N]) +{ + for (int i=0; i < N; i++) + c[i] = a[i] * b[i]; +} + +void mul90snd (_Complex TYPE a[restrict N], _Complex TYPE b[restrict N], + _Complex TYPE c[restrict N]) +{ + for (int i=0; i < N; i++) + c[i] = a[i] * (b[i] * I); +} + +void mul180snd (_Complex TYPE a[restrict N], _Complex TYPE b[restrict N], + _Complex TYPE c[restrict N]) +{ + for (int i=0; i < N; i++) + c[i] = a[i] * (b[i] * I * I); +} + +void mul270snd (_Complex TYPE a[restrict N], _Complex TYPE b[restrict N], + _Complex TYPE c[restrict N]) +{ + for (int i=0; i < N; i++) + c[i] = a[i] * (b[i] * I * I * I); +} + +void mul90fst (_Complex TYPE a[restrict N], _Complex TYPE b[restrict N], + _Complex TYPE c[restrict N]) +{ + for (int i=0; i < N; i++) + c[i] = (a[i] * I) * b[i]; +} + +void mul180fst (_Complex TYPE a[restrict N], _Complex TYPE b[restrict N], + _Complex TYPE c[restrict N]) +{ + for (int i=0; i < N; i++) + c[i] = (a[i] * I * I) * b[i]; +} + +void mul270fst (_Complex TYPE a[restrict N], _Complex TYPE b[restrict N], + _Complex TYPE c[restrict N]) +{ + for (int i=0; i < N; i++) + c[i] = (a[i] * I * I * I) * b[i]; +} + +void mulconjfst (_Complex TYPE a[restrict N], _Complex TYPE b[restrict N], + _Complex TYPE c[restrict N]) +{ + for (int i=0; i < N; i++) + c[i] = ~a[i] * b[i]; +} + +void mulconjsnd (_Complex TYPE a[restrict N], _Complex TYPE b[restrict N], + _Complex TYPE c[restrict N]) +{ + for (int i=0; i < N; i++) + c[i] = a[i] * ~b[i]; +} + +void mulconjboth (_Complex TYPE a[restrict N], _Complex TYPE b[restrict N], + _Complex TYPE c[restrict N]) +{ + for (int i=0; i < N; i++) + c[i] = ~a[i] * ~b[i]; +} diff --git a/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-mla-double.c b/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-mla-double.c new file mode 100644 index 0000000000000000000000000000000000000000..d9d13c29578f905e793e5d80f08ec7b758d09c5f --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-mla-double.c @@ -0,0 +1,9 @@ +/* { dg-do compile } */ +/* { dg-require-effective-target vect_complex_add_double } */ +/* { dg-add-options arm_v8_3a_complex_neon } */ +/* { dg-add-options arm_v8_1m_mve_fp } */ + +#define TYPE double +#define N 16 +#include "complex-mla-template.c" + diff --git a/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-mla-float.c b/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-mla-float.c new file mode 100644 index 0000000000000000000000000000000000000000..ac680cbca81b3b0bc3a51555236faa7f702e5082 --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-mla-float.c @@ -0,0 +1,8 @@ +/* { dg-do compile } */ +/* { dg-require-effective-target vect_complex_add_float } */ +/* { dg-add-options arm_v8_3a_complex_neon } */ +/* { dg-add-options arm_v8_1m_mve_fp } */ + +#define TYPE float +#define N 16 +#include "complex-mla-template.c" diff --git a/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-mla-half-float.c b/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-mla-half-float.c new file mode 100644 index 0000000000000000000000000000000000000000..d0a48d007178a7464ae2e4d00720bb3b3abca18a --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-mla-half-float.c @@ -0,0 +1,9 @@ +/* { dg-do compile } */ +/* { dg-require-effective-target vect_complex_add_half } */ +/* { dg-add-options arm_v8_3a_fp16_complex_neon } */ +/* { dg-add-options arm_v8_1m_mve_fp } */ + +#define TYPE _Float16 +#define N 16 +#include "complex-mla-template.c" + diff --git a/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-mls-double.c b/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-mls-double.c new file mode 100644 index 0000000000000000000000000000000000000000..d9d13c29578f905e793e5d80f08ec7b758d09c5f --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-mls-double.c @@ -0,0 +1,9 @@ +/* { dg-do compile } */ +/* { dg-require-effective-target vect_complex_add_double } */ +/* { dg-add-options arm_v8_3a_complex_neon } */ +/* { dg-add-options arm_v8_1m_mve_fp } */ + +#define TYPE double +#define N 16 +#include "complex-mla-template.c" + diff --git a/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-mls-float.c b/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-mls-float.c new file mode 100644 index 0000000000000000000000000000000000000000..ac680cbca81b3b0bc3a51555236faa7f702e5082 --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-mls-float.c @@ -0,0 +1,8 @@ +/* { dg-do compile } */ +/* { dg-require-effective-target vect_complex_add_float } */ +/* { dg-add-options arm_v8_3a_complex_neon } */ +/* { dg-add-options arm_v8_1m_mve_fp } */ + +#define TYPE float +#define N 16 +#include "complex-mla-template.c" diff --git a/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-mls-half-float.c b/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-mls-half-float.c new file mode 100644 index 0000000000000000000000000000000000000000..d0a48d007178a7464ae2e4d00720bb3b3abca18a --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-mls-half-float.c @@ -0,0 +1,9 @@ +/* { dg-do compile } */ +/* { dg-require-effective-target vect_complex_add_half } */ +/* { dg-add-options arm_v8_3a_fp16_complex_neon } */ +/* { dg-add-options arm_v8_1m_mve_fp } */ + +#define TYPE _Float16 +#define N 16 +#include "complex-mla-template.c" + diff --git a/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-mul-double.c b/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-mul-double.c new file mode 100644 index 0000000000000000000000000000000000000000..ab8313f01226bfb96b2e304ff7f275cffb665b06 --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-mul-double.c @@ -0,0 +1,9 @@ +/* { dg-do compile } */ +/* { dg-require-effective-target vect_complex_add_double } */ +/* { dg-add-options arm_v8_3a_complex_neon } */ +/* { dg-add-options arm_v8_1m_mve_fp } */ + +#define TYPE double +#define N 16 +#include "complex-mul-template.c" + diff --git a/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-mul-float.c b/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-mul-float.c new file mode 100644 index 0000000000000000000000000000000000000000..49bf961c7a17d266d45b9112383a89ac406a705c --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-mul-float.c @@ -0,0 +1,8 @@ +/* { dg-do compile } */ +/* { dg-require-effective-target vect_complex_add_float } */ +/* { dg-add-options arm_v8_3a_complex_neon } */ +/* { dg-add-options arm_v8_1m_mve_fp } */ + +#define TYPE float +#define N 16 +#include "complex-mul-template.c" diff --git a/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-mul-half-float.c b/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-mul-half-float.c new file mode 100644 index 0000000000000000000000000000000000000000..f5c23fbe20d67e88f870417d9a4bde63c169e301 --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-mul-half-float.c @@ -0,0 +1,9 @@ +/* { dg-do compile } */ +/* { dg-require-effective-target vect_complex_add_half } */ +/* { dg-add-options arm_v8_3a_fp16_complex_neon } */ +/* { dg-add-options arm_v8_1m_mve_fp } */ + +#define TYPE _Float16 +#define N 16 +#include "complex-mul-template.c" + diff --git a/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-mla-double.c b/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-mla-double.c new file mode 100644 index 0000000000000000000000000000000000000000..c85ff07a6cc432051b8dfc70456a31b8e485e024 --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-mla-double.c @@ -0,0 +1,8 @@ +/* { dg-do compile } */ +/* { dg-require-effective-target vect_complex_add_double } */ +/* { dg-add-options arm_v8_3a_complex_neon } */ +/* { dg-add-options arm_v8_1m_mve_fp } */ + +#define TYPE double +#define N 200 +#include "complex-mla-template.c" diff --git a/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-mla-float.c b/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-mla-float.c new file mode 100644 index 0000000000000000000000000000000000000000..a17b91b1bd4bb0a26107e973ca1b06f7a9e4c24c --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-mla-float.c @@ -0,0 +1,8 @@ +/* { dg-do compile } */ +/* { dg-require-effective-target vect_complex_add_float } */ +/* { dg-add-options arm_v8_3a_complex_neon } */ +/* { dg-add-options arm_v8_1m_mve_fp } */ + +#define TYPE float +#define N 200 +#include "complex-mla-template.c" diff --git a/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-mla-half-float.c b/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-mla-half-float.c new file mode 100644 index 0000000000000000000000000000000000000000..fa81985b9085ef760737b471591065388d59aed0 --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-mla-half-float.c @@ -0,0 +1,8 @@ +/* { dg-do compile } */ +/* { dg-require-effective-target vect_complex_add_half } */ +/* { dg-add-options arm_v8_3a_fp16_complex_neon } */ +/* { dg-add-options arm_v8_1m_mve_fp } */ + +#define TYPE _Float16 +#define N 200 +#include "complex-mla-template.c" diff --git a/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-mls-double.c b/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-mls-double.c new file mode 100644 index 0000000000000000000000000000000000000000..c85ff07a6cc432051b8dfc70456a31b8e485e024 --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-mls-double.c @@ -0,0 +1,8 @@ +/* { dg-do compile } */ +/* { dg-require-effective-target vect_complex_add_double } */ +/* { dg-add-options arm_v8_3a_complex_neon } */ +/* { dg-add-options arm_v8_1m_mve_fp } */ + +#define TYPE double +#define N 200 +#include "complex-mla-template.c" diff --git a/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-mls-float.c b/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-mls-float.c new file mode 100644 index 0000000000000000000000000000000000000000..a17b91b1bd4bb0a26107e973ca1b06f7a9e4c24c --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-mls-float.c @@ -0,0 +1,8 @@ +/* { dg-do compile } */ +/* { dg-require-effective-target vect_complex_add_float } */ +/* { dg-add-options arm_v8_3a_complex_neon } */ +/* { dg-add-options arm_v8_1m_mve_fp } */ + +#define TYPE float +#define N 200 +#include "complex-mla-template.c" diff --git a/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-mls-half-float.c b/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-mls-half-float.c new file mode 100644 index 0000000000000000000000000000000000000000..fa81985b9085ef760737b471591065388d59aed0 --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-mls-half-float.c @@ -0,0 +1,8 @@ +/* { dg-do compile } */ +/* { dg-require-effective-target vect_complex_add_half } */ +/* { dg-add-options arm_v8_3a_fp16_complex_neon } */ +/* { dg-add-options arm_v8_1m_mve_fp } */ + +#define TYPE _Float16 +#define N 200 +#include "complex-mla-template.c" diff --git a/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-mul-double.c b/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-mul-double.c new file mode 100644 index 0000000000000000000000000000000000000000..77c01a82bb25d62d1fcf56d5015d21d8e3417963 --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-mul-double.c @@ -0,0 +1,8 @@ +/* { dg-do compile } */ +/* { dg-require-effective-target vect_complex_add_double } */ +/* { dg-add-options arm_v8_3a_complex_neon } */ +/* { dg-add-options arm_v8_1m_mve_fp } */ + +#define TYPE double +#define N 200 +#include "complex-mul-template.c" diff --git a/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-mul-float.c b/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-mul-float.c new file mode 100644 index 0000000000000000000000000000000000000000..a8b44f2069877d354572148acf2d8efbccdf89c6 --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-mul-float.c @@ -0,0 +1,8 @@ +/* { dg-do compile } */ +/* { dg-require-effective-target vect_complex_add_float } */ +/* { dg-add-options arm_v8_3a_complex_neon } */ +/* { dg-add-options arm_v8_1m_mve_fp } */ + +#define TYPE float +#define N 200 +#include "complex-mul-template.c" diff --git a/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-mul-half-float.c b/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-mul-half-float.c new file mode 100644 index 0000000000000000000000000000000000000000..d57df82808d5a08b52ed905048d7a0b46af41a4b --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-mul-half-float.c @@ -0,0 +1,8 @@ +/* { dg-do compile } */ +/* { dg-require-effective-target vect_complex_add_half } */ +/* { dg-add-options arm_v8_3a_fp16_complex_neon } */ +/* { dg-add-options arm_v8_1m_mve_fp } */ + +#define TYPE _Float16 +#define N 200 +#include "complex-mul-template.c"