From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-eopbgr130080.outbound.protection.outlook.com [40.107.13.80]) by sourceware.org (Postfix) with ESMTPS id 0CE9438708EF for ; Mon, 28 Dec 2020 13:38:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 0CE9438708EF Received: from AM6PR10CA0057.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:209:80::34) by VI1PR0802MB2429.eurprd08.prod.outlook.com (2603:10a6:800:ba::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3700.27; Mon, 28 Dec 2020 13:38:52 +0000 Received: from AM5EUR03FT012.eop-EUR03.prod.protection.outlook.com (2603:10a6:209:80:cafe::87) by AM6PR10CA0057.outlook.office365.com (2603:10a6:209:80::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3700.27 via Frontend Transport; Mon, 28 Dec 2020 13:38:51 +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 AM5EUR03FT012.mail.protection.outlook.com (10.152.16.161) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3700.27 via Frontend Transport; Mon, 28 Dec 2020 13:38:51 +0000 Received: ("Tessian outbound 8b6e0bb22f1c:v71"); Mon, 28 Dec 2020 13:38:49 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: e8f070a1a666b0b3 X-CR-MTA-TID: 64aa7808 Received: from 0c3cfc369ff4.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id EE41FC34-3F09-4B35-A908-D05A3D2826F6.1; Mon, 28 Dec 2020 13:38:34 +0000 Received: from EUR01-DB5-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 0c3cfc369ff4.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Mon, 28 Dec 2020 13:38:34 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Au0XbLshaHErI4ZKmEK2m4ThAlgleoIxdjEfxtZLFI0H2svqhygo9j2UJHVHyILGw2J02qRoOBiL4eyWLNLtrefpaF2lCGGRyu+HuOxAwH8UEo5l3x7FKyynmP/AXo7ZGmJwPTpVA30jLTs28xmismrssvQ9/voJPOlae56e/5FyLYb8iU+uVwKj2Ha4MqdwDbp1f30isuOaaAHNgdAB862Zo2jMaFEGzmt3uzs0q3mtOkckD4Px9C9J6vCvqoF2ucAiuwGe6sDmTbWNm8aUSImPCDXpamh4InyZTz2jpcdn5txPHfCnQWro8mZbMR3YKWJE2qIa8+/8MjtMo6HlPA== 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=EwFJSrKKvU6RNupfD/GfXcWN12+DDm+5xEaQbooE3dA=; b=dh1Hs6ly74wOTCJPyM60cDLi4zEu066piMAX2D+vkf1ND3G1qeR3afDawf9G5ECfA78hyyM8BA63ybkS+YuFQ6NaymYHlorgRCigwi2aF0hORnfwZUMqcI6LyllCOaResdcpKZugh64/1ewk/Zsm/sdzXjdPJjuxkBkEFQ/X/NGdpMjeGUEgFTFsa6QsBG66F3mwftOCo+q3VHqm3OKeQXcyAfYYe6FakO9YtTBg8Zolan2PioOCKiZQ1sERYm0Zau2UuEWfJ4WpA2Q/aIP4WCSSCYRThMZkubtysuZYAezeHElwesvmf/77FWWnlIeT24jw3XVaSMbDilJUmBY4PQ== 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 VE1PR08MB5135.eurprd08.prod.outlook.com (2603:10a6:803:108::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3700.27; Mon, 28 Dec 2020 13:38:31 +0000 Received: from VI1PR08MB5325.eurprd08.prod.outlook.com ([fe80::f937:5b3:12e1:8297]) by VI1PR08MB5325.eurprd08.prod.outlook.com ([fe80::f937:5b3:12e1:8297%7]) with mapi id 15.20.3700.031; Mon, 28 Dec 2020 13:38:31 +0000 Date: Mon, 28 Dec 2020 13:38:23 +0000 From: Tamar Christina To: gcc-patches@gcc.gnu.org Cc: nd@arm.com, rguenther@suse.de, ook@ucw.cz Subject: [PATCH 8/8 v9]middle-end slp: Add complex operations class to share first match among all matchers Message-ID: <20201228133821.GA2847@arm.com> Content-Type: multipart/mixed; boundary="oyUTqETQ0mS9luUI" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) X-Originating-IP: [217.140.106.53] X-ClientProxiedBy: DM5PR07CA0025.namprd07.prod.outlook.com (2603:10b6:3:16::11) 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.53) by DM5PR07CA0025.namprd07.prod.outlook.com (2603:10b6:3:16::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3700.27 via Frontend Transport; Mon, 28 Dec 2020 13:38:29 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 2cbf745e-d85e-4828-9d38-08d8ab35e9a9 X-MS-TrafficTypeDiagnostic: VE1PR08MB5135:|VI1PR0802MB2429: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:9508;OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: jHwe2zXvtPbHIB6qlS53f4/QF7xmqJ59KiHC3iAc1Y3xzRwBD3M3AJI8Sc0okutJGQfre0kN1xn6o7VNowrkVTShYoPmAhphIqEpjIu38315NBlUSHYgHqseRA/9bNOC9DufUDdIGYppGSbw+HvlKEYscRIFNYyt7BdnCengY89Wz6PmW2e3Rq2Xm1SeXpd3ii60dYeqIgphHPrEx3FnT+FqG7bFHsVr67itkxQR/zWXr0Iyh71fU9Wd0XOjCw5ARKdQSuOaQLrIALjLDOis55BIditpIjSgs/4OL52Y+K9xKqpAqwVFuZPcLZSgeX/bK116G5q3i8WOelz36i+bfxEdpvfkoQ3GEFAsOZbxyr19sfHB0eFU7dBWJF44v6eMuHSqZJ6dpzojUyV1YTFmKvdQoTYltltOulrB6SuQZby3Mp9cgEjjaXct1zThBf8f 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)(39850400004)(396003)(136003)(366004)(346002)(376002)(478600001)(44144004)(956004)(16526019)(186003)(5660300002)(8936002)(6666004)(6916009)(66476007)(66556008)(55016002)(33964004)(66946007)(66616009)(83380400001)(33656002)(2616005)(36756003)(8676002)(4743002)(52116002)(7696005)(235185007)(2906002)(86362001)(26005)(4326008)(316002)(44832011)(8886007)(1076003)(2700100001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: =?utf-8?B?ZEk4V3ZLSUFmUW1LY0tKVmduejA3a2RpaHJ5NzN6b214b2hsUHVLMlMvZi9x?= =?utf-8?B?VlprWGF1OW5PRVR2TVpEWStvUnJEWXZWd3RGRGZMV3IvcDJNb3k3L3ZSNDRp?= =?utf-8?B?VVhiaHhSYWRUZVAyK3U3eWRadEtoNU0rYVYxOFBsMWZwcTVkZkVxblBPcFhD?= =?utf-8?B?MDRXTkp0R2dWckJIS1U0NFZGYlEvV3h3R1NMY3RtSWdqS1ZrNy9Qc1lMUStY?= =?utf-8?B?alg5c0xhWXZCemgyS21Hc2cxdEVwWTMvaUZQTWJ0ekVUSDZVMGs1MG9uTnNz?= =?utf-8?B?QlVPd3BvZGxucERSb0NMN2MyeXZrcjQ1NnFDYVpQNGpvRWVoV1dUUVRGZjll?= =?utf-8?B?SGJPNU54M1R1OTFCL2wxOWpZMEtYYWE5TkEvNGY1VTdIYmxDOW12RXpFVFVt?= =?utf-8?B?OUh4azFIb2lNVWtycUZlRDVzeDBiNTF4TEN4MGU3alNKQk5xdnhLQ2loRHU1?= =?utf-8?B?bGl6dURZSVpVM3psVC94d1hwR1NKK3o1NXhidEc4bUJtTjRHTk12dU50UXg3?= =?utf-8?B?NUFPREpGSGplUEZPVms5RG9Fajk0Q041Y0o1elY2cVZqaTdKajIrQzVvK2FM?= =?utf-8?B?T2V3TTl6NmFSOTEwM3B4bzlPSUVqZmhLbHdrNmZXNElYS3pydGp4MkZNWGZs?= =?utf-8?B?MXJLVHR1eG8za096QVJmbC9jMGVGNXYrQU45Nm5VeHFTOFRWa25BOUQrYVE0?= =?utf-8?B?SDg0ZG0wNmhZLzRMWFJDSzdIRVc0M2JWbHZHMGRCWFIvdmpUL2hnb3BtQmFs?= =?utf-8?B?UW1VTDdGM0JTM0xndDRubm90N0FadjAzL0czVVNTRFlKdFFhQnhHYTRscnR0?= =?utf-8?B?MnJEeXgzZm1DZllidEVXaWQrMHVSN1B2TE9oL0hYZnRncTVmOXowN3ZNNlM3?= =?utf-8?B?SHpKTmlXb2F5SkNweEczR3Y2U1MzdzJ1TlZVNHp1RHJZVjZlRUZUQWNDU1Bq?= =?utf-8?B?V1o3WllrOUM2L1lEYXpYeUpiMVRvVXhob2NQbFl4dzg0L2xIWGFzeVdDMEsv?= =?utf-8?B?dnVTbXc5Tkphem1EaldlS3NNYVEveWNRdmZBUDBqb3pmaUZCcHZLUDlsL0lP?= =?utf-8?B?dDhJM0xYUm5oYTFaY2xVV3F6NG1IeFFvaVF6ZHdkeFRmUXJMcFg1MHF0ZDRO?= =?utf-8?B?UEJVQnVCWllRUVNtbEZicEU0L1dub2hhVUZsTHAxS3dHY2dEcHRVTG5zWEt0?= =?utf-8?B?Y3MvZkQwMEIvTWR3aGYzU2tCU3ZnS1ZKZ29jSGRyVEhuSS8xWjFYQ0VqcUxK?= =?utf-8?B?Ri9VODJBT3ptUEFkSkkyb2RkM2RJcjlJTnp1cnlUTU0yY2pORmN5Y0Z6M1d0?= =?utf-8?Q?NPL0vCzK6MsFdHwV2XsI3RaWoMw/ZMy4To?= X-MS-Exchange-Transport-Forked: True X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR08MB5135 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: AM5EUR03FT012.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 187e527c-3a80-49f8-8517-08d8ab35ddbf X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: P+Wpwe10Ixorn63Z+0w29oyAxmMJchK9AB4wwkWwmp72laWO3vkCGv7quQhwoJlZ5yFa0HKl7SlCKuSsB7qml3Z65Gi5EiTrKQUlrkHIBJ57YLj8ai90x6IsBqcR0/M9j8mLUfqKLE7Pvh3UiCUaEX/Ixi7jViLDrUplkN5Do0jf9ZJRAOIRI5RYtVMn3ukVEkAde3w9gQmoMlmtp8ggtC/qCHO3zW8xkYjQgemRgHd4huUmpJ9xehW7dPEuH/DF0iTEtKMJr8D1S0qnTiyEDcv7hfanWNsf2F9aHmNA2S6UC+VgkTQgN5wtSs3CboDVCkCGSuhxfqH+A8yHftLimY5YUC2IOTzWbz13zVwTg5IlXMRaZFKQnpODDfbLs4Qtey3/1xvHiSCbRNia0mHUlXQdhmxKcGHKGIaZuWRbJlrZxj+fnEKRBZTTAFnAFGsEA3QS8hEGgTZOSGKnytFHlyG1YxVd2yZTF1kitPPEjSiloDnr9PUk7PM6YE+X+7v9 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)(396003)(136003)(376002)(346002)(39850400004)(46966006)(44832011)(44144004)(26005)(70206006)(1076003)(81166007)(478600001)(8936002)(33964004)(956004)(2616005)(82310400003)(36756003)(5660300002)(235185007)(83380400001)(8676002)(82740400003)(6916009)(47076005)(55016002)(8886007)(316002)(16526019)(186003)(2906002)(336012)(356005)(4743002)(6666004)(33656002)(4326008)(66616009)(7696005)(86362001)(70586007)(2700100001); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Dec 2020 13:38:51.4159 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2cbf745e-d85e-4828-9d38-08d8ab35e9a9 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: AM5EUR03FT012.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0802MB2429 X-Spam-Status: No, score=-14.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, 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-List-Received-Date: Mon, 28 Dec 2020 13:38:58 -0000 --oyUTqETQ0mS9luUI Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Hi All, This introduces a common class complex_operations_pattern which encapsulates the complex add, mul, fma and fms pattern in such a way so that the first match is shared. Bootstrapped Regtested on aarch64-none-linux-gnu, x86_64-pc-linux-gnu and no issues. Ok for master? Thanks, Tamar gcc/ChangeLog: * tree-vect-slp-patterns.c (class complex_operations_pattern, complex_operations_pattern::matches, complex_operations_pattern::recognize, complex_operations_pattern::build): New. (slp_patterns): Use it. --- inline copy of patch -- diff --git a/gcc/tree-vect-slp-patterns.c b/gcc/tree-vect-slp-patterns.c index ab6587f0b8522ec5f916f74e7e7401b1f7a35bbb..33d22e657ebf1d0454a134bab4febb2b65581822 100644 --- a/gcc/tree-vect-slp-patterns.c +++ b/gcc/tree-vect-slp-patterns.c @@ -1429,6 +1429,83 @@ complex_fms_pattern::build (vec_info *vinfo) complex_pattern::build (vinfo); } +/******************************************************************************* + * complex_operations_pattern class + ******************************************************************************/ + +/* This function combines all the existing pattern matchers above into one class + that shares the functionality between them. The initial match is shared + between all complex operations. */ + +class complex_operations_pattern : public complex_pattern +{ + protected: + complex_operations_pattern (slp_tree *node, vec *m_ops, + internal_fn ifn) + : complex_pattern (node, m_ops, ifn) + { + this->m_num_args = 0; + } + + public: + void build (vec_info *); + static internal_fn + matches (complex_operation_t op, slp_tree_to_load_perm_map_t *, slp_tree *, + vec *); + + static vect_pattern* + recognize (slp_tree_to_load_perm_map_t *, slp_tree *); +}; + +/* Dummy matches implementation for proxy object. */ + +internal_fn +complex_operations_pattern:: +matches (complex_operation_t /* op */, + slp_tree_to_load_perm_map_t * /* perm_cache */, + slp_tree * /* ref_node */, vec * /* ops */) +{ + return IFN_LAST; +} + +/* Attempt to recognize a complex mul pattern. */ + +vect_pattern* +complex_operations_pattern::recognize (slp_tree_to_load_perm_map_t *perm_cache, + slp_tree *node) +{ + auto_vec ops; + complex_operation_t op + = vect_detect_pair_op (*node, true, &ops); + internal_fn ifn = IFN_LAST; + + ifn = complex_fms_pattern::matches (op, perm_cache, node, &ops); + if (ifn != IFN_LAST) + return complex_fms_pattern::mkInstance (node, &ops, ifn); + + ifn = complex_mul_pattern::matches (op, perm_cache, node, &ops); + if (ifn != IFN_LAST) + return complex_mul_pattern::mkInstance (node, &ops, ifn); + + ifn = complex_fma_pattern::matches (op, perm_cache, node, &ops); + if (ifn != IFN_LAST) + return complex_fma_pattern::mkInstance (node, &ops, ifn); + + ifn = complex_add_pattern::matches (op, perm_cache, node, &ops); + if (ifn != IFN_LAST) + return complex_add_pattern::mkInstance (node, &ops, ifn); + + return NULL; +} + +/* Dummy implementation of build. */ + +void +complex_operations_pattern::build (vec_info * /* vinfo */) +{ + gcc_unreachable (); +} + /******************************************************************************* * Pattern matching definitions ******************************************************************************/ @@ -1440,7 +1517,7 @@ vect_pattern_decl_t slp_patterns[] order patterns from the largest to the smallest. Especially if they overlap in what they can detect. */ - SLP_PATTERN (complex_add_pattern), + SLP_PATTERN (complex_operations_pattern), }; #undef SLP_PATTERN -- --oyUTqETQ0mS9luUI Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="rb13963.patch" diff --git a/gcc/tree-vect-slp-patterns.c b/gcc/tree-vect-slp-patterns.c index ab6587f0b8522ec5f916f74e7e7401b1f7a35bbb..33d22e657ebf1d0454a134bab4febb2b65581822 100644 --- a/gcc/tree-vect-slp-patterns.c +++ b/gcc/tree-vect-slp-patterns.c @@ -1429,6 +1429,83 @@ complex_fms_pattern::build (vec_info *vinfo) complex_pattern::build (vinfo); } +/******************************************************************************* + * complex_operations_pattern class + ******************************************************************************/ + +/* This function combines all the existing pattern matchers above into one class + that shares the functionality between them. The initial match is shared + between all complex operations. */ + +class complex_operations_pattern : public complex_pattern +{ + protected: + complex_operations_pattern (slp_tree *node, vec *m_ops, + internal_fn ifn) + : complex_pattern (node, m_ops, ifn) + { + this->m_num_args = 0; + } + + public: + void build (vec_info *); + static internal_fn + matches (complex_operation_t op, slp_tree_to_load_perm_map_t *, slp_tree *, + vec *); + + static vect_pattern* + recognize (slp_tree_to_load_perm_map_t *, slp_tree *); +}; + +/* Dummy matches implementation for proxy object. */ + +internal_fn +complex_operations_pattern:: +matches (complex_operation_t /* op */, + slp_tree_to_load_perm_map_t * /* perm_cache */, + slp_tree * /* ref_node */, vec * /* ops */) +{ + return IFN_LAST; +} + +/* Attempt to recognize a complex mul pattern. */ + +vect_pattern* +complex_operations_pattern::recognize (slp_tree_to_load_perm_map_t *perm_cache, + slp_tree *node) +{ + auto_vec ops; + complex_operation_t op + = vect_detect_pair_op (*node, true, &ops); + internal_fn ifn = IFN_LAST; + + ifn = complex_fms_pattern::matches (op, perm_cache, node, &ops); + if (ifn != IFN_LAST) + return complex_fms_pattern::mkInstance (node, &ops, ifn); + + ifn = complex_mul_pattern::matches (op, perm_cache, node, &ops); + if (ifn != IFN_LAST) + return complex_mul_pattern::mkInstance (node, &ops, ifn); + + ifn = complex_fma_pattern::matches (op, perm_cache, node, &ops); + if (ifn != IFN_LAST) + return complex_fma_pattern::mkInstance (node, &ops, ifn); + + ifn = complex_add_pattern::matches (op, perm_cache, node, &ops); + if (ifn != IFN_LAST) + return complex_add_pattern::mkInstance (node, &ops, ifn); + + return NULL; +} + +/* Dummy implementation of build. */ + +void +complex_operations_pattern::build (vec_info * /* vinfo */) +{ + gcc_unreachable (); +} + /******************************************************************************* * Pattern matching definitions ******************************************************************************/ @@ -1440,7 +1517,7 @@ vect_pattern_decl_t slp_patterns[] order patterns from the largest to the smallest. Especially if they overlap in what they can detect. */ - SLP_PATTERN (complex_add_pattern), + SLP_PATTERN (complex_operations_pattern), }; #undef SLP_PATTERN --oyUTqETQ0mS9luUI--