From patchwork Fri Oct 29 11:06:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tamar Christina X-Patchwork-Id: 1548007 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=KOSwf8DG; 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 (server2.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 4Hgfph4NNdz9ssD for ; Fri, 29 Oct 2021 22:10:04 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id DE6D6385782E for ; Fri, 29 Oct 2021 11:10:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DE6D6385782E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1635505800; bh=NSG+Fl+8d1aIoDyI4/96mwZQisaaTevcu/mH5JNAzcA=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=KOSwf8DGkSaeiiZg3/TJmkcyhgqKeG8sLiOIL9PXB9axhP1A2lgl2OWAidWQytdAG BiFplDuqvpE/uTPcwnFG+ZSqfUmcX7ko5t7556SSciWCG5k5vJfeGWPvNTjb7w6VbI 6gZ4RHjBFkApVvUBcHH7tDKHlgzCQOzNN4mbWLGM= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR03-AM5-obe.outbound.protection.outlook.com (mail-eopbgr30040.outbound.protection.outlook.com [40.107.3.40]) by sourceware.org (Postfix) with ESMTPS id A926F3857C72 for ; Fri, 29 Oct 2021 11:07:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A926F3857C72 Received: from AS9PR06CA0300.eurprd06.prod.outlook.com (2603:10a6:20b:45a::7) by PAXPR08MB6670.eurprd08.prod.outlook.com (2603:10a6:102:130::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4649.14; Fri, 29 Oct 2021 11:07:05 +0000 Received: from VE1EUR03FT051.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:45a:cafe::a0) by AS9PR06CA0300.outlook.office365.com (2603:10a6:20b:45a::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4649.15 via Frontend Transport; Fri, 29 Oct 2021 11:07:05 +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 VE1EUR03FT051.mail.protection.outlook.com (10.152.19.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4649.14 via Frontend Transport; Fri, 29 Oct 2021 11:07:04 +0000 Received: ("Tessian outbound c71e1a752bff:v108"); Fri, 29 Oct 2021 11:07:03 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: eb65749259e0d8bb X-CR-MTA-TID: 64aa7808 Received: from 482fa036a757.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id B4EBF22A-903D-4EA2-888B-63EDFBB959D4.1; Fri, 29 Oct 2021 11:06:38 +0000 Received: from EUR04-HE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 482fa036a757.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 29 Oct 2021 11:06:38 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Epxw5s1Jmn7p8suHQPrqG2QgbdqLWoGNZSlLHo/Bfr3yiSx2izYhNNkLN30ylUqKPVFoUsrqwzPkg5UqVRvPR6XfwoJW6huktj+ryffwOiSZpXCJxD0cQvYYU7oEm6M5UdWvm5msorgC81CpPtNMimigpu7pIxWn4KXJeP1Zi0AxqSWyZ3CD2sYTB0Ki2gSCSme0l17GfAuCYZ7iTP7oHtDWZX9j8lIXzLDEqvMv4bkApSjAo+fpcnf3RYZgMKVqXqy5NU+i6nKqz3eyfMcWUUpM/cH3plnMu0NFQZETAwZKacCS4VtIof//XypO+z769Fhwmkpc+udP7boepE9Ejg== 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=NSG+Fl+8d1aIoDyI4/96mwZQisaaTevcu/mH5JNAzcA=; b=AMOL5CCggx5LhVYElmOTOeiZ/QnuXLvIrdCsZQeN2TdKyfk+fW6PM722hoV3z8n9qbnOi8eOLd5RvTtGczzqVKarYtvg/Sp1NYkWzAdPR4Hn59OMTC0BwApA/vZqHfPz9H8IOOjpeciTMqUymO9YsDuzSCMLflY8aRIKR4P3BHhPK/sKzyugTU+qkmSoP7l1BV9LelxbEwFkLdX0qhk4KmVJo3hOJa/BEnt8lhpr/gVtAYC4zgjPaNPbXO4C1DGedj8CTSlrvT+mwkAjbNndTHvlZpwNQyuNRh4vRORzhcYieKbCXBbcyzb3m+TmtdiqirZrUrU1J/yW5jiWuL1sdg== 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 VE1PR08MB5183.eurprd08.prod.outlook.com (2603:10a6:803:10b::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4628.18; Fri, 29 Oct 2021 11:06:35 +0000 Received: from VI1PR08MB5325.eurprd08.prod.outlook.com ([fe80::31cf:ea55:2234:c50b]) by VI1PR08MB5325.eurprd08.prod.outlook.com ([fe80::31cf:ea55:2234:c50b%7]) with mapi id 15.20.4649.015; Fri, 29 Oct 2021 11:06:35 +0000 Date: Fri, 29 Oct 2021 12:06:33 +0100 To: gcc-patches@gcc.gnu.org Subject: [PATCH 1/2]middle-end Update the complex numbers auto-vec detection to the new format of the SLP tree. Message-ID: Content-Disposition: inline User-Agent: Mutt/1.9.4 (2018-02-28) X-ClientProxiedBy: LNXP123CA0010.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:d2::22) To VI1PR08MB5325.eurprd08.prod.outlook.com (2603:10a6:803:13e::17) MIME-Version: 1.0 Received: from arm.com (217.140.106.55) by LNXP123CA0010.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:d2::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4649.15 via Frontend Transport; Fri, 29 Oct 2021 11:06:35 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 12d8dc49-51d9-4a87-26ce-08d99acc3d64 X-MS-TrafficTypeDiagnostic: VE1PR08MB5183:|PAXPR08MB6670: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:10000;OLM:10000; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: 2XhO2Shv0OhIEey7mmgbhiBYm4zG2Z9wyf9LjbLniLK/i8KWaE8LFdwVC2IdFEOLGmvQ2dpRAqMiORIOKaI5rAE9QRkhl0QVZmbqTlKTivQbeY5ZR98RS2IgALRSd6sdj9ati6EzrEyMmO2/dOdjww4nrhPRgsX7rRkPtvYP6+ABTRjT4iOEVUDDntDa22ZjYEr58uGeoU5qC/lVO2FkXJk/ftPh0+Vokf/x4dK9+6EOyloECGQghKDq7FDLa/n5NIeFZ9DdPMwB52BGGODxHgUcV1UtGDXL1lfR6IcJXOGOLHbgtqlsnIPCACxW0nbUF4sik9YAwR3VtqjZPsz3q+k6xxgU+a1uV6VQOWK/+KKhVl95vM/K6yfJuK0MHAg6wrJyocP2gpmCIh12PoOeddz3GglTLSqByILAoh7/rcx3PMCX0FvlhPvxLoUG6+fpyOYdMvyh59zzwHKCwBZVjh+2od3Cq6INGQBgQYik4x176K/BCXjMzK7inWcxhYo3l9S5EVOtn/Kg/wQZxEszjXY/qiXrwC/bUp3Sfo9SW+6kmZVCJbFgluZprYsmVxJ3R4+FqjEkcezZw3Ie6+mZ6zDB+6/qAQ+jxDff27+GfwH1gg3LzceTlg+28uUm8kAqb8fF2XXi/QlMCLEHRiMdHITTCdB+eLkMborNqAO0VE9OIBt/Ye8tJD0nqtsHO09p2heyVO1rOvb9Zf5DnSdlmmEyJ1AmuddKCubPykLXa1iWnVeHhUkjcW8JUWsady+wZhJVFDibuH55zg/yDOc44c0Rnj40m0iJPI3ahb7wmexXvYzkipeVolqykHWKacBE 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)(38100700002)(66556008)(8936002)(2616005)(86362001)(15650500001)(8886007)(186003)(508600001)(7696005)(66476007)(956004)(235185007)(44832011)(316002)(5660300002)(4326008)(66946007)(38350700002)(83380400001)(33964004)(44144004)(26005)(8676002)(6916009)(36756003)(52116002)(30864003)(2906002)(55016002)(4216001)(2700100001)(414714003)(473944003); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR08MB5183 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: VE1EUR03FT051.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 3c4692fe-92ea-4f44-eb7a-08d99acc2c08 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: WHzdAOnvOe0IYjf/Jtn3jG22Z8OV0qMDsZuh4xGl+xaHI9JwBFz5UPxzRwbOz7iQGenWkVHqSuqqMLHOs4mMkkFr2ew8TAkhall7g03zx2vXDnWvwp2nRzKS8Q1YhgTJbGputtficoOGhiREXGKPv/xQWOCJd0jNRL2o+0ZvMotruGG1RwBwGe7QV/ig8m2Ge7tp+aarAgZa0j8FhLm0B6Yz1/KSBWGJf+oHtcEoSJD3EaRrgvQPtjNrrZUc2V1DIxtJl2fbFoRKiaxls2Ro519CXcwmZHRamRnaRVNfmFPz3mOfPL+dGt71LqZ+V2pshUsmkr8Ed4IV1GxW8ggeRc/2/HlpuweUCQdKP2of3/YB6w3ZDBJ+fOWaLQh1i7bmaHnxd2AlxIf2l6adpdhjfbpjxkWpO1xbjVQBwx3SJYhlPSjHlh3E/5udeUH4WbKjZRQIdkO9/3RkWPU6hgmHVePtAMu+72IxFNWCwkONzmCxr4dTV2wAoPS/ITnzX0aahy231/doWXIk2Ct6X1tzXv9jeoYOHC+sJ0OQod/H4Bwt2CkBF3gybvQJUjq7G+Fn/Pos1mIhXXMYm0d/VcNQn5cZP1JFnJCU0+S/CAcoGkWUNAb6MWA4N+tVFWHXCtq5ZF+6dfvWBfFXxRZD/b71YpL1nfUclbCggOoxPeeKOgLTmGqmh50jJRbwYe6rDd6G3nMNfO1Q7y2a2CM5jIYvnubGzGdyQDMmIK9gOsSVk0IrBbdIkS8P5HOHo3NCL9a/x+Aakp5uvf3AANOJPo6xrSr/OzT1u7Kin9N+bufenmDYEU+hQogj6kkW6rEgI/eT 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)(46966006)(36840700001)(316002)(44144004)(70586007)(2616005)(33964004)(956004)(186003)(4326008)(8886007)(6916009)(26005)(7696005)(86362001)(36756003)(15650500001)(235185007)(5660300002)(508600001)(70206006)(55016002)(336012)(2906002)(8936002)(30864003)(83380400001)(82310400003)(356005)(36860700001)(44832011)(47076005)(81166007)(8676002)(107886003)(4216001)(2700100001)(473944003)(414714003); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Oct 2021 11:07:04.2166 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 12d8dc49-51d9-4a87-26ce-08d99acc3d64 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: VE1EUR03FT051.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR08MB6670 X-Spam-Status: No, score=-13.7 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.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: nd@arm.com, rguenther@suse.de Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" Hi All, The layout of the SLP tree has changed in GCC 12 which broke the detection of complex FMA and FMS. This patch updates the detection to the new tree shape and by necessity merges the complex MUL and FMA detection into one. This does not yet address the wrong code-gen PR which I will fix in a different patch as that needs backporting. Regtested on aarch64-none-linux-gnu, x86_64-pc-linux-gnu and no regressions. Ok for master? Thanks, Tamar gcc/ChangeLog: PR tree-optimization/102977 * tree-vect-slp-patterns.c (vect_match_call_p): Remove. (vect_detect_pair_op): Add crosslane check. (vect_match_call_complex_mla): Remove. (class complex_mul_pattern): Update comment. (complex_mul_pattern::matches): Update detection. (class complex_fma_pattern): Remove. (complex_fma_pattern::matches): Remove. (complex_fma_pattern::recognize): Remove. (complex_fma_pattern::build): Remove. (class complex_fms_pattern): Update comment. (complex_fms_pattern::matches): Remove. (complex_operations_pattern::recognize): Remove complex_fma_pattern --- inline copy of patch -- diff --git a/gcc/tree-vect-slp-patterns.c b/gcc/tree-vect-slp-patterns.c index b8d09b7832e29689ede832d555e1b6af2c24ce1e..99dea82aba91a333500bb5ff35bf30b6416c09ca 100644 diff --git a/gcc/tree-vect-slp-patterns.c b/gcc/tree-vect-slp-patterns.c index b8d09b7832e29689ede832d555e1b6af2c24ce1e..99dea82aba91a333500bb5ff35bf30b6416c09ca 100644 --- a/gcc/tree-vect-slp-patterns.c +++ b/gcc/tree-vect-slp-patterns.c @@ -306,24 +306,6 @@ vect_match_expression_p (slp_tree node, tree_code code) return true; } -/* Checks to see if the expression represented by NODE is a call to the internal - function FN. */ - -static inline bool -vect_match_call_p (slp_tree node, internal_fn fn) -{ - if (!node - || !SLP_TREE_REPRESENTATIVE (node)) - return false; - - gimple* expr = STMT_VINFO_STMT (SLP_TREE_REPRESENTATIVE (node)); - if (!expr - || !gimple_call_internal_p (expr, fn)) - return false; - - return true; -} - /* Check if the given lane permute in PERMUTES matches an alternating sequence of {even odd even odd ...}. This to account for unrolled loops. Further mode there resulting permute must be linear. */ @@ -389,6 +371,16 @@ vect_detect_pair_op (slp_tree node1, slp_tree node2, lane_permutation_t &lanes, if (result != CMPLX_NONE && ops != NULL) { + if (two_operands) + { + auto l0node = SLP_TREE_CHILDREN (node1); + auto l1node = SLP_TREE_CHILDREN (node2); + + /* Check if the tree is connected as we expect it. */ + if (!((l0node[0] == l1node[0] && l0node[1] == l1node[1]) + || (l0node[0] == l1node[1] && l0node[1] == l1node[0]))) + return CMPLX_NONE; + } ops->safe_push (node1); ops->safe_push (node2); } @@ -717,27 +709,6 @@ complex_add_pattern::recognize (slp_tree_to_load_perm_map_t *perm_cache, * complex_mul_pattern ******************************************************************************/ -/* Helper function of that looks for a match in the CHILDth child of NODE. The - child used is stored in RES. - - If the match is successful then ARGS will contain the operands matched - and the complex_operation_t type is returned. If match is not successful - then CMPLX_NONE is returned and ARGS is left unmodified. */ - -static inline complex_operation_t -vect_match_call_complex_mla (slp_tree node, unsigned child, - vec *args = NULL, slp_tree *res = NULL) -{ - gcc_assert (child < SLP_TREE_CHILDREN (node).length ()); - - slp_tree data = SLP_TREE_CHILDREN (node)[child]; - - if (res) - *res = data; - - return vect_detect_pair_op (data, false, args); -} - /* Check to see if either of the trees in ARGS are a NEGATE_EXPR. If the first child (args[0]) is a NEGATE_EXPR then NEG_FIRST_P is set to TRUE. @@ -945,9 +916,10 @@ class complex_mul_pattern : public complex_pattern }; -/* Pattern matcher for trying to match complex multiply pattern in SLP tree - If the operation matches then IFN is set to the operation it matched - and the arguments to the two replacement statements are put in m_ops. +/* Pattern matcher for trying to match complex multiply and complex multiply + and accumulate pattern in SLP tree. If the operation matches then IFN + is set to the operation it matched and the arguments to the two + replacement statements are put in m_ops. If no match is found then IFN is set to IFN_LAST and m_ops is unchanged. @@ -972,19 +944,43 @@ complex_mul_pattern::matches (complex_operation_t op, if (op != MINUS_PLUS) return IFN_LAST; - slp_tree root = *node; - /* First two nodes must be a multiply. */ - auto_vec muls; - if (vect_match_call_complex_mla (root, 0) != MULT_MULT - || vect_match_call_complex_mla (root, 1, &muls) != MULT_MULT) + auto childs = *ops; + auto l0node = SLP_TREE_CHILDREN (childs[0]); + auto l1node = SLP_TREE_CHILDREN (childs[1]); + + bool mul0 = vect_match_expression_p (l0node[0], MULT_EXPR); + bool mul1 = vect_match_expression_p (l0node[1], MULT_EXPR); + if (!mul0 && !mul1) return IFN_LAST; /* Now operand2+4 may lead to another expression. */ auto_vec left_op, right_op; - left_op.safe_splice (SLP_TREE_CHILDREN (muls[0])); - right_op.safe_splice (SLP_TREE_CHILDREN (muls[1])); + slp_tree add0 = NULL; + + /* Check if we may be a multiply add. */ + if (!mul0 + && vect_match_expression_p (l0node[0], PLUS_EXPR)) + { + auto vals = SLP_TREE_CHILDREN (l0node[0]); + /* Check if it's a multiply, otherwise no idea what this is. */ + if (!vect_match_expression_p (vals[1], MULT_EXPR)) + return IFN_LAST; + + /* Check if the ADD is linear, otherwise it's not valid complex FMA. */ + if (linear_loads_p (perm_cache, vals[0]) != PERM_EVENODD) + return IFN_LAST; - if (linear_loads_p (perm_cache, left_op[1]) == PERM_ODDEVEN) + left_op.safe_splice (SLP_TREE_CHILDREN (vals[1])); + add0 = vals[0]; + } + else + left_op.safe_splice (SLP_TREE_CHILDREN (l0node[0])); + + right_op.safe_splice (SLP_TREE_CHILDREN (l0node[1])); + + if (left_op.length () != 2 + || right_op.length () != 2 + || linear_loads_p (perm_cache, left_op[1]) == PERM_ODDEVEN) return IFN_LAST; bool neg_first = false; @@ -998,23 +994,32 @@ complex_mul_pattern::matches (complex_operation_t op, if (!vect_validate_multiplication (perm_cache, left_op, PERM_EVENEVEN) || vect_normalize_conj_loc (left_op)) return IFN_LAST; - ifn = IFN_COMPLEX_MUL; + if (!mul0) + ifn = IFN_COMPLEX_FMA; + else + ifn = IFN_COMPLEX_MUL; } - else if (is_neg) + else { if (!vect_validate_multiplication (perm_cache, left_op, right_op, neg_first, &conj_first_operand, false)) return IFN_LAST; - ifn = IFN_COMPLEX_MUL_CONJ; + if(!mul0) + ifn = IFN_COMPLEX_FMA_CONJ; + else + ifn = IFN_COMPLEX_MUL_CONJ; } if (!vect_pattern_validate_optab (ifn, *node)) return IFN_LAST; ops->truncate (0); - ops->create (3); + ops->create (add0 ? 4 : 3); + + if (add0) + ops->quick_push (add0); complex_perm_kinds_t kind = linear_loads_p (perm_cache, left_op[0]); if (kind == PERM_EVENODD) @@ -1070,170 +1075,55 @@ complex_mul_pattern::build (vec_info *vinfo) { slp_tree node; unsigned i; - slp_tree newnode - = vect_build_combine_node (this->m_ops[0], this->m_ops[1], *this->m_node); - SLP_TREE_REF_COUNT (this->m_ops[2])++; - - FOR_EACH_VEC_ELT (SLP_TREE_CHILDREN (*this->m_node), i, node) - vect_free_slp_tree (node); - - /* First re-arrange the children. */ - SLP_TREE_CHILDREN (*this->m_node).reserve_exact (2); - SLP_TREE_CHILDREN (*this->m_node)[0] = this->m_ops[2]; - SLP_TREE_CHILDREN (*this->m_node)[1] = newnode; + switch (this->m_ifn) + { + case IFN_COMPLEX_MUL: + case IFN_COMPLEX_MUL_CONJ: + { + slp_tree newnode + = vect_build_combine_node (this->m_ops[0], this->m_ops[1], + *this->m_node); + SLP_TREE_REF_COUNT (this->m_ops[2])++; + + FOR_EACH_VEC_ELT (SLP_TREE_CHILDREN (*this->m_node), i, node) + vect_free_slp_tree (node); + + /* First re-arrange the children. */ + SLP_TREE_CHILDREN (*this->m_node).reserve_exact (2); + SLP_TREE_CHILDREN (*this->m_node)[0] = this->m_ops[2]; + SLP_TREE_CHILDREN (*this->m_node)[1] = newnode; + break; + } + case IFN_COMPLEX_FMA: + case IFN_COMPLEX_FMA_CONJ: + { + SLP_TREE_REF_COUNT (this->m_ops[0])++; + slp_tree newnode + = vect_build_combine_node (this->m_ops[1], this->m_ops[2], + *this->m_node); + SLP_TREE_REF_COUNT (this->m_ops[3])++; + + FOR_EACH_VEC_ELT (SLP_TREE_CHILDREN (*this->m_node), i, node) + vect_free_slp_tree (node); + + /* First re-arrange the children. */ + SLP_TREE_CHILDREN (*this->m_node).safe_grow (3); + SLP_TREE_CHILDREN (*this->m_node)[0] = this->m_ops[0]; + SLP_TREE_CHILDREN (*this->m_node)[1] = this->m_ops[3]; + SLP_TREE_CHILDREN (*this->m_node)[2] = newnode; + + /* Tell the builder to expect an extra argument. */ + this->m_num_args++; + break; + } + default: + gcc_unreachable (); + } /* And then rewrite the node itself. */ complex_pattern::build (vinfo); } -/******************************************************************************* - * complex_fma_pattern class - ******************************************************************************/ - -class complex_fma_pattern : public complex_pattern -{ - protected: - complex_fma_pattern (slp_tree *node, vec *m_ops, internal_fn ifn) - : complex_pattern (node, m_ops, ifn) - { - this->m_num_args = 3; - } - - 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 *); - - static vect_pattern* - mkInstance (slp_tree *node, vec *m_ops, internal_fn ifn) - { - return new complex_fma_pattern (node, m_ops, ifn); - } -}; - -/* Pattern matcher for trying to match complex multiply and accumulate - and multiply and subtract patterns in SLP tree. - If the operation matches then IFN is set to the operation it matched and - the arguments to the two replacement statements are put in m_ops. - - If no match is found then IFN is set to IFN_LAST and m_ops is unchanged. - - This function matches the patterns shaped as: - - double ax = (b[i+1] * a[i]) + (b[i] * a[i]); - double bx = (a[i+1] * b[i]) - (a[i+1] * b[i+1]); - - c[i] = c[i] - ax; - c[i+1] = c[i+1] + bx; - - If a match occurred then TRUE is returned, else FALSE. The match is - performed after COMPLEX_MUL which would have done the majority of the work. - This function merely matches an ADD with a COMPLEX_MUL IFN. The initial - match is expected to be in OP1 and the initial match operands in args0. */ - -internal_fn -complex_fma_pattern::matches (complex_operation_t op, - slp_tree_to_load_perm_map_t * /* perm_cache */, - slp_tree *ref_node, vec *ops) -{ - internal_fn ifn = IFN_LAST; - - /* Find the two components. We match Complex MUL first which reduces the - amount of work this pattern has to do. After that we just match the - head node and we're done.: - - * FMA: + +. - - We need to ignore the two_operands nodes that may also match. - For that we can check if they have any scalar statements and also - check that it's not a permute node as we're looking for a normal - PLUS_EXPR operation. */ - if (op != CMPLX_NONE) - return IFN_LAST; - - /* Find the two components. We match Complex MUL first which reduces the - amount of work this pattern has to do. After that we just match the - head node and we're done.: - - * FMA: + + on a non-two_operands node. */ - slp_tree vnode = *ref_node; - if (SLP_TREE_LANE_PERMUTATION (vnode).exists () - || !SLP_TREE_CHILDREN (vnode).exists () - || !vect_match_expression_p (vnode, PLUS_EXPR)) - return IFN_LAST; - - slp_tree node = SLP_TREE_CHILDREN (vnode)[1]; - - if (vect_match_call_p (node, IFN_COMPLEX_MUL)) - ifn = IFN_COMPLEX_FMA; - else if (vect_match_call_p (node, IFN_COMPLEX_MUL_CONJ)) - ifn = IFN_COMPLEX_FMA_CONJ; - else - return IFN_LAST; - - if (!vect_pattern_validate_optab (ifn, vnode)) - return IFN_LAST; - - ops->truncate (0); - ops->create (3); - - if (ifn == IFN_COMPLEX_FMA) - { - ops->quick_push (SLP_TREE_CHILDREN (vnode)[0]); - ops->quick_push (SLP_TREE_CHILDREN (node)[1]); - ops->quick_push (SLP_TREE_CHILDREN (node)[0]); - } - else - { - ops->quick_push (SLP_TREE_CHILDREN (vnode)[0]); - ops->quick_push (SLP_TREE_CHILDREN (node)[0]); - ops->quick_push (SLP_TREE_CHILDREN (node)[1]); - } - - return ifn; -} - -/* Attempt to recognize a complex mul pattern. */ - -vect_pattern* -complex_fma_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 - = complex_fma_pattern::matches (op, perm_cache, node, &ops); - if (ifn == IFN_LAST) - return NULL; - - return new complex_fma_pattern (node, &ops, ifn); -} - -/* Perform a replacement of the detected complex mul pattern with the new - instruction sequences. */ - -void -complex_fma_pattern::build (vec_info *vinfo) -{ - slp_tree node = SLP_TREE_CHILDREN (*this->m_node)[1]; - - SLP_TREE_CHILDREN (*this->m_node).release (); - SLP_TREE_CHILDREN (*this->m_node).create (3); - SLP_TREE_CHILDREN (*this->m_node).safe_splice (this->m_ops); - - SLP_TREE_REF_COUNT (this->m_ops[1])++; - SLP_TREE_REF_COUNT (this->m_ops[2])++; - - vect_free_slp_tree (node); - - complex_pattern::build (vinfo); -} - /******************************************************************************* * complex_fms_pattern class ******************************************************************************/ @@ -1264,10 +1154,10 @@ class complex_fms_pattern : public complex_pattern }; -/* Pattern matcher for trying to match complex multiply and accumulate - and multiply and subtract patterns in SLP tree. - If the operation matches then IFN is set to the operation it matched and - the arguments to the two replacement statements are put in m_ops. +/* Pattern matcher for trying to match complex multiply and subtract pattern + in SLP tree. If the operation matches then IFN is set to the operation + it matched and the arguments to the two replacement statements are put in + m_ops. If no match is found then IFN is set to IFN_LAST and m_ops is unchanged. @@ -1289,38 +1179,33 @@ complex_fms_pattern::matches (complex_operation_t op, { internal_fn ifn = IFN_LAST; - /* Find the two components. We match Complex MUL first which reduces the - amount of work this pattern has to do. After that we just match the - head node and we're done.: - - * FMS: - +. */ - slp_tree child = NULL; - /* We need to ignore the two_operands nodes that may also match, for that we can check if they have any scalar statements and also check that it's not a permute node as we're looking for a normal - PLUS_EXPR operation. */ - if (op != PLUS_MINUS) + MINUS_EXPR operation. */ + if (op != CMPLX_NONE) return IFN_LAST; - child = SLP_TREE_CHILDREN ((*ops)[1])[1]; - if (vect_detect_pair_op (child) != MINUS_PLUS) + slp_tree root = *ref_node; + if (!vect_match_expression_p (root, MINUS_EXPR)) return IFN_LAST; - /* First two nodes must be a multiply. */ - auto_vec muls; - if (vect_match_call_complex_mla (child, 0) != MULT_MULT - || vect_match_call_complex_mla (child, 1, &muls) != MULT_MULT) + auto nodes = SLP_TREE_CHILDREN (root); + if (!vect_match_expression_p (nodes[1], MULT_EXPR) + || vect_detect_pair_op (nodes[0]) != PLUS_MINUS) return IFN_LAST; + auto childs = SLP_TREE_CHILDREN (nodes[0]); + auto l0node = SLP_TREE_CHILDREN (childs[0]); + auto l1node = SLP_TREE_CHILDREN (childs[1]); + /* Now operand2+4 may lead to another expression. */ auto_vec left_op, right_op; - left_op.safe_splice (SLP_TREE_CHILDREN (muls[0])); - right_op.safe_splice (SLP_TREE_CHILDREN (muls[1])); + left_op.safe_splice (SLP_TREE_CHILDREN (l0node[1])); + right_op.safe_splice (SLP_TREE_CHILDREN (nodes[1])); bool is_neg = vect_normalize_conj_loc (left_op); - child = SLP_TREE_CHILDREN ((*ops)[1])[0]; bool conj_first_operand = false; if (!vect_validate_multiplication (perm_cache, right_op, left_op, false, &conj_first_operand, true)) @@ -1340,28 +1225,28 @@ complex_fms_pattern::matches (complex_operation_t op, complex_perm_kinds_t kind = linear_loads_p (perm_cache, right_op[0]); if (kind == PERM_EVENODD) { - ops->quick_push (child); + ops->quick_push (l0node[0]); ops->quick_push (right_op[0]); ops->quick_push (right_op[1]); ops->quick_push (left_op[1]); } else if (kind == PERM_TOP) { - ops->quick_push (child); + ops->quick_push (l0node[0]); ops->quick_push (right_op[1]); ops->quick_push (right_op[0]); ops->quick_push (left_op[0]); } else if (kind == PERM_EVENEVEN && !is_neg) { - ops->quick_push (child); + ops->quick_push (l0node[0]); ops->quick_push (right_op[1]); ops->quick_push (right_op[0]); ops->quick_push (left_op[0]); } else { - ops->quick_push (child); + ops->quick_push (l0node[0]); ops->quick_push (right_op[1]); ops->quick_push (right_op[0]); ops->quick_push (left_op[1]); @@ -1473,10 +1358,6 @@ complex_operations_pattern::recognize (slp_tree_to_load_perm_map_t *perm_cache, 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); From patchwork Fri Oct 29 11:06:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tamar Christina X-Patchwork-Id: 1548008 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=nL5tEPxo; dkim-atps=neutral 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+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) 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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4Hgfr63Y34z9sRK for ; Fri, 29 Oct 2021 22:11:18 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2AC9A385741C for ; Fri, 29 Oct 2021 11:11:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2AC9A385741C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1635505876; bh=DXGZiBuwgIYkzPk/jvdEMCtZNLRzHhPZ6HSrYdnQGM0=; 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=nL5tEPxoLyu71naKhsjm9VsOluB5GwZv2C/HEiAN9q/1MAh4feywElOlDXLNENvNf OIGCrmhsA3uFRAXK3bjXnkDed+FKT5QO6up+kPudy7Hm0Lh/Q6yHcLNcNtoE12qDRB 9IFM0jfYCiJfkQ7YzefRHw0FNhAWhpaypMn/gDT4= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-eopbgr60043.outbound.protection.outlook.com [40.107.6.43]) by sourceware.org (Postfix) with ESMTPS id 627BA3857C6F for ; Fri, 29 Oct 2021 11:07:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 627BA3857C6F Received: from AS8PR04CA0134.eurprd04.prod.outlook.com (2603:10a6:20b:127::19) by AM5PR0802MB2452.eurprd08.prod.outlook.com (2603:10a6:203:9f::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4628.20; Fri, 29 Oct 2021 11:07:06 +0000 Received: from VE1EUR03FT013.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:127:cafe::96) by AS8PR04CA0134.outlook.office365.com (2603:10a6:20b:127::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4649.15 via Frontend Transport; Fri, 29 Oct 2021 11:07:06 +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 VE1EUR03FT013.mail.protection.outlook.com (10.152.19.37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4649.14 via Frontend Transport; Fri, 29 Oct 2021 11:07:06 +0000 Received: ("Tessian outbound 7b0bcc4a550a:v108"); Fri, 29 Oct 2021 11:07:06 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 4950f1233e0254f7 X-CR-MTA-TID: 64aa7808 Received: from 905e9f2013c6.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id D33D249C-EECF-4F5B-BB2D-BAA85A448C19.1; Fri, 29 Oct 2021 11:06:58 +0000 Received: from EUR05-DB8-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 905e9f2013c6.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 29 Oct 2021 11:06:58 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UFRxEAKID1RiDE43OMVcQZQjNfIpHM0R633dnaYlxay5qPBTuBBceHwmMcrUsTjJ+dfpZQEeqpp0eWg5xnAhCtNKNoSo8pWygCxOQ5lnON3xc7ug1iBBdKuDimWrE/FUYAknJptuRP0XpKwy1Z4a5iW9t+KmDjvc5Jd8ICROJSns80TESklX44muNHKhLJiWXAZrK9QKqzcJczv4Stoooax+R/ePkmIuAP3qrh7y2yhvnCW377/5DZzKjurgLEJyjOBKsZucW+B1mszjvDSBWEEa6dEHn4O/wIksQK95uZRDhWmm4sCeKYD1W52BByCa30xis4klLIythRvE0yl+eQ== 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=DXGZiBuwgIYkzPk/jvdEMCtZNLRzHhPZ6HSrYdnQGM0=; b=PsijtPdehM8hScGj0J0OMHWEfpdS1SO9JI3xroQ6xFImK9mbyUsEIPV206FXH3lWdALn4iNEZWsrJbIbO1S2UI9GWukydjv/uaBU1V9h31QQppFaLOmdDaVu4W6bTIeDocPl3TBv9ni+riSUOG3iUoB7tb1mYK4HiNWJyJb3dfzpv/Siu3fujbmraf51hyFv6dv4PJ6H9K3aw717o6WbdewciKQ+YgeWH0VF0MNcZ9RPAKWU0LdyktXlldP7NAsneWOxIYJNGrWrAF2SveYh6RoLzp90sbMo62fQn1Zw1230CTpUSdd3SUsTY6SSHSud6wOQAJ5zRHmAHtVW+DkbCw== 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 VE1PR08MB5183.eurprd08.prod.outlook.com (2603:10a6:803:10b::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4628.18; Fri, 29 Oct 2021 11:06:54 +0000 Received: from VI1PR08MB5325.eurprd08.prod.outlook.com ([fe80::31cf:ea55:2234:c50b]) by VI1PR08MB5325.eurprd08.prod.outlook.com ([fe80::31cf:ea55:2234:c50b%7]) with mapi id 15.20.4649.015; Fri, 29 Oct 2021 11:06:54 +0000 Date: Fri, 29 Oct 2021 12:06:50 +0100 To: gcc-patches@gcc.gnu.org Subject: [PATCH 2/2]middle-end Add target independent tests for complex numbers vectorization. Message-ID: <20211029110648.GA30105@arm.com> Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) X-ClientProxiedBy: LO2P265CA0244.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:8a::16) To VI1PR08MB5325.eurprd08.prod.outlook.com (2603:10a6:803:13e::17) MIME-Version: 1.0 Received: from arm.com (217.140.106.55) by LO2P265CA0244.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:8a::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4649.15 via Frontend Transport; Fri, 29 Oct 2021 11:06:53 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 1e723efd-4363-4465-98f1-08d99acc3eac X-MS-TrafficTypeDiagnostic: VE1PR08MB5183:|AM5PR0802MB2452: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:8882;OLM:8882; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: fZ92MzU5te2GXTc5JwbxOZdLnVH+7WP9r2dtL3jN5P5dPiaUTcJlOZ90Cban/OGqwMACKxfA1CSeoz7x66jDS0KuPbgYxzsFaArqZT+53tcmQeC5aJHzIv3mhA6vhixkXn/6XQS8Uo+JKvSAp2EGVGn2qEDqLJEA9VvzmXcOQDpv8I0iH+eb+qwcbxmnQo+sryZxnUVFOK9k6aWJQwecWJZJxJxX11PR8Zztjg7q8YVPULE8wScXQ7Ua/CErpRIPoHvt04Hg/hp1yFVXTwwPk3EfutqaOG2/UFlGCyHCSNPOE7hCDJrnmvIUu8CN9WA6vggkNQB80vl9t8/iGlmV/t6UAm3NzqGCuvCa4G/pyHkHkFEf2ed1ysXrg4sw40Lzx4DoCY696QWSmPm/JKz7pZ1kdlrZI+UuJJ/Syt6tT3jsSVK+Ni1XXI44IcXTDwciNJJF/KepcwJeCTBTvPRDHHpbqLwd7b1spgkVGZS7g7QhWJeSQB2EW+UGhy/J0KxkjCb6Ons++cY0eyQcvQuWJbW9UUX2olMgYpyEkaH7Zz5GS4FWEd/yJJPPh4YykRLmCHrOY785qPslS8j6bvSvbivot2ZrymaxWODIA1H3oEIqbdGWPYQXmYscHy2CnoNC0bxDQSYr/kFdkFj8J+sHOTf8+nshpqh1c/GGOIQY7zHm9UKvkByv4REKVb/YN9b0NnSqwbHKt86+Tk1KsnBoy41Gu8DC/03VKXiZOCG+nB6KdjRX+zbXxhF1u1v6CczPCFJE2F7lma3o7UIceJ998ABoyuxpTvT4sgf87ZNjDPBUOhjcV7T4wvKs6vrPRIicgi2ZonaIB2LRPmVNmVoBiMc1ErKDRFT/7r6UZOGHk1U= 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)(38100700002)(1076003)(66556008)(8936002)(2616005)(86362001)(8886007)(186003)(508600001)(7696005)(66476007)(956004)(235185007)(44832011)(316002)(5660300002)(4326008)(66946007)(38350700002)(83380400001)(33964004)(44144004)(33656002)(26005)(8676002)(6916009)(36756003)(52116002)(30864003)(2906002)(55016002)(2700100001)(579004)(559001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR08MB5183 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: VE1EUR03FT013.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 975b07b0-213c-4d52-93fe-08d99acc3748 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: YcYErsi8EGJ/MDpdI40PSlWR4J/4wsLc3kOZ+BWJC6TcBhkEGvohBxYMzWLE6RyMNKoO9S9Rep1JXsZYyt++GB5AYYidlF5OlvVOrRaYQrzHlFI5X8a5CClFp3qaID1oXTcEwAQfrawzkKRrzl/NtwVXsvJLQGpSkTCfpytUZ4cxK4Ljo63ZiNo04GscHBcqZMUXyMIJfDewWyQjN2ydpi06sOYrd6I13rJmgyC87xujwPrehoOjg4SVrZBMJDzx19Molai9YF1ljrw+bSm2sm6bNMCDSewgtfMM5sx7RkR5w6gKYPpDnUBSeo0AZ6Fr5AI57I1Q2JI8+RATsF+CSFqCsqnlYHoqONMZpblbTF29Hp5TTMjjJbpF7Cf1YAQTAz10bylasiiTKvAUljynNfoQLQb97lLw3lFRdDMUHcYb1EM30lprk21H+hJE9c7sLscEI3LrPYmtjvyVWlFK8rvZoJApRUhKBgg4PHZNfgllBxB2T2WZB+Q1CLcLvIoFfwFxoKVl/Ew7bBXBmLlmI6j+/UcdWm7fgWIJyH4SflTQj3TekvGmr0nVQ+QnFBz0xPIvBh0LJGbLK5qfI4J6UMfdLqaidQiaFtwIME0rxH6Buh+E2xDbZWLtIwEwF0U3lW9CuirlJx4eKr2tb28i14wBZux1rapvDwqjlOSQQZtyCbRfTtM2xTvhItZEB/vGQlbKT8oLVnMyEdknMOsNzXDhW8/QUerEGXmYPQM1W1vifzAcLVW+1l/mLZX8ABUsPMQ+RwHKBYJcEjPndDy5++gDdas0SNAXBvvE46HSlOPK2/6d6k2frnJipm64QTxmtIBvUweDwkKt6XF2Bro0z54H5CBvWzgnr1oSI77eHKw= 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)(47076005)(26005)(44832011)(86362001)(33656002)(6916009)(956004)(7696005)(2906002)(186003)(508600001)(81166007)(36756003)(356005)(1076003)(107886003)(8936002)(2616005)(8676002)(44144004)(83380400001)(55016002)(82310400003)(8886007)(70206006)(316002)(5660300002)(4326008)(235185007)(70586007)(33964004)(336012)(36860700001)(30864003)(2700100001)(579004)(559001); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Oct 2021 11:07:06.3751 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1e723efd-4363-4465-98f1-08d99acc3eac 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: VE1EUR03FT013.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0802MB2452 X-Spam-Status: No, score=-13.5 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.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: nd@arm.com, rguenther@suse.de Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" Hi All, This beefs up the complex numbers vectorization testsuite and adds target independent checks next to the target dependent ones. This allows regressions to the detection code to be found when running on any target, not just aarch64. Regtested on aarch64-none-linux-gnu, x86_64-pc-linux-gnu and no regressions. Ok for master? Thanks, Tamar gcc/testsuite/ChangeLog: PR tree-optimization/102977 * gcc.dg/vect/complex/bb-slp-complex-add-pattern-int.c: Updated. * gcc.dg/vect/complex/bb-slp-complex-add-pattern-long.c: Updated. * gcc.dg/vect/complex/bb-slp-complex-add-pattern-short.c: Updated. * gcc.dg/vect/complex/bb-slp-complex-add-pattern-unsigned-int.c: Updated. * gcc.dg/vect/complex/bb-slp-complex-add-pattern-unsigned-long.c: Updated. * gcc.dg/vect/complex/bb-slp-complex-add-pattern-unsigned-short.c: Updated. * gcc.dg/vect/complex/fast-math-bb-slp-complex-add-double.c: * gcc.dg/vect/complex/fast-math-bb-slp-complex-add-float.c: Updated. * gcc.dg/vect/complex/fast-math-bb-slp-complex-add-half-float.c: Updated. * gcc.dg/vect/complex/fast-math-bb-slp-complex-add-pattern-double.c: Updated. * gcc.dg/vect/complex/fast-math-bb-slp-complex-add-pattern-float.c: Updated. * gcc.dg/vect/complex/fast-math-bb-slp-complex-add-pattern-half-float.c: Updated. * gcc.dg/vect/complex/fast-math-bb-slp-complex-mla-double.c: Updated. * gcc.dg/vect/complex/fast-math-bb-slp-complex-mla-float.c: Updated. * gcc.dg/vect/complex/fast-math-bb-slp-complex-mla-half-float.c: Updated. * gcc.dg/vect/complex/fast-math-bb-slp-complex-mls-double.c: Updated. * gcc.dg/vect/complex/fast-math-bb-slp-complex-mls-float.c: Updated. * gcc.dg/vect/complex/fast-math-bb-slp-complex-mls-half-float.c: Updated. * gcc.dg/vect/complex/fast-math-bb-slp-complex-mul-double.c: Updated. * gcc.dg/vect/complex/fast-math-bb-slp-complex-mul-float.c: Updated. * gcc.dg/vect/complex/fast-math-bb-slp-complex-mul-half-float.c: Updated. * gcc.dg/vect/complex/fast-math-complex-add-double.c: Updated. * gcc.dg/vect/complex/fast-math-complex-add-float.c: Updated. * gcc.dg/vect/complex/fast-math-complex-add-half-float.c: Updated. * gcc.dg/vect/complex/fast-math-complex-add-pattern-double.c: Updated. * gcc.dg/vect/complex/fast-math-complex-add-pattern-float.c: Updated. * gcc.dg/vect/complex/fast-math-complex-add-pattern-half-float.c: Updated. * gcc.dg/vect/complex/fast-math-complex-mla-double.c: Updated. * gcc.dg/vect/complex/fast-math-complex-mla-float.c: Updated. * gcc.dg/vect/complex/fast-math-complex-mla-half-float.c: Updated. * gcc.dg/vect/complex/fast-math-complex-mls-double.c: Updated. * gcc.dg/vect/complex/fast-math-complex-mls-float.c: Updated. * gcc.dg/vect/complex/fast-math-complex-mls-half-float.c: Updated. * gcc.dg/vect/complex/fast-math-complex-mul-double.c: Updated. * gcc.dg/vect/complex/fast-math-complex-mul-float.c: Updated. * gcc.dg/vect/complex/fast-math-complex-mul-half-float.c: Updated. * gcc.dg/vect/complex/vect-complex-add-pattern-byte.c: Updated. * gcc.dg/vect/complex/vect-complex-add-pattern-int.c: Updated. * gcc.dg/vect/complex/vect-complex-add-pattern-long.c: Updated. * gcc.dg/vect/complex/vect-complex-add-pattern-short.c: Updated. * gcc.dg/vect/complex/vect-complex-add-pattern-unsigned-byte.c: Updated. * gcc.dg/vect/complex/vect-complex-add-pattern-unsigned-int.c: Updated. * gcc.dg/vect/complex/vect-complex-add-pattern-unsigned-long.c: Updated. * gcc.dg/vect/complex/vect-complex-add-pattern-unsigned-short.c: Updated. * gcc.dg/vect/complex/bb-slp-complex-add-pattern-byte.c: Removed. * gcc.dg/vect/complex/bb-slp-complex-add-pattern-unsigned-byte.c: Removed. --- inline copy of patch -- diff --git a/gcc/testsuite/gcc.dg/vect/complex/bb-slp-complex-add-pattern-byte.c b/gcc/testsuite/gcc.dg/vect/complex/bb-slp-complex-add-pattern-byte.c deleted file mode 100644 index aadee7f86fa42895ffc6bec481a95a2b185bf86d..0000000000000000000000000000000000000000 diff --git a/gcc/testsuite/gcc.dg/vect/complex/bb-slp-complex-add-pattern-byte.c b/gcc/testsuite/gcc.dg/vect/complex/bb-slp-complex-add-pattern-byte.c deleted file mode 100644 index aadee7f86fa42895ffc6bec481a95a2b185bf86d..0000000000000000000000000000000000000000 --- a/gcc/testsuite/gcc.dg/vect/complex/bb-slp-complex-add-pattern-byte.c +++ /dev/null @@ -1,12 +0,0 @@ -/* { dg-do compile } */ -/* { dg-require-effective-target vect_complex_add_byte } */ -/* { dg-require-effective-target stdint_types } */ -/* { dg-add-options arm_v8_1m_mve_fp } */ - -#define TYPE int8_t -#define N 16 -#include -#include "complex-add-pattern-template.c" - -/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 1 "slp1" { xfail aarch64_sve2 } } } */ -/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 1 "slp1" { xfail aarch64_sve2 } } } */ diff --git a/gcc/testsuite/gcc.dg/vect/complex/bb-slp-complex-add-pattern-int.c b/gcc/testsuite/gcc.dg/vect/complex/bb-slp-complex-add-pattern-int.c index 8eba24dc187895150ee3515d5bd2a35b46528388..0f01efb49b544c4f849057b0cecbc42b3acea41b 100644 --- a/gcc/testsuite/gcc.dg/vect/complex/bb-slp-complex-add-pattern-int.c +++ b/gcc/testsuite/gcc.dg/vect/complex/bb-slp-complex-add-pattern-int.c @@ -1,12 +1,14 @@ /* { dg-do compile } */ -/* { dg-require-effective-target vect_complex_add_int } */ /* { dg-require-effective-target stdint_types } */ /* { dg-add-options arm_v8_1m_mve_fp } */ +/* { dg-additional-options "-fno-tree-loop-vectorize" } */ #define TYPE int32_t #define N 16 #include #include "complex-add-pattern-template.c" -/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 1 "slp1" } } */ -/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 1 "slp1" { xfail aarch64_sve2 } } } */ +/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 1 "slp1" { target { vect_complex_add_byte } } } } */ +/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 1 "slp1" { target { vect_complex_add_int && !arch64_sve2 } } } } */ +/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT270" "slp1" } } */ +/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT90" "slp1" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/complex/bb-slp-complex-add-pattern-long.c b/gcc/testsuite/gcc.dg/vect/complex/bb-slp-complex-add-pattern-long.c index 9275ff12e0cc4fd643c3d60d1a5ce51cd3550833..ccf165176cad5a13b7cdee78ab4a30830eb492f5 100644 --- a/gcc/testsuite/gcc.dg/vect/complex/bb-slp-complex-add-pattern-long.c +++ b/gcc/testsuite/gcc.dg/vect/complex/bb-slp-complex-add-pattern-long.c @@ -8,5 +8,8 @@ #include #include "complex-add-pattern-template.c" -/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 1 "slp1" } } */ -/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 1 "slp1" { xfail aarch64_sve2 } } } */ +/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 1 "slp1" { target { vect_complex_add_long } } } } */ +/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 1 "slp1" { target { vect_complex_add_long && !arch64_sve2 } } } } */ +/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT270" "slp1" } } */ +/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT90" "slp1" } } */ +/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT90" "slp1" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/complex/bb-slp-complex-add-pattern-short.c b/gcc/testsuite/gcc.dg/vect/complex/bb-slp-complex-add-pattern-short.c index 8cbbdb825ddb616cc9c3ac7c0b62ad53e0e54045..3aaa70b23b67f53d3614ecb34bf8e6eb0f206b6d 100644 --- a/gcc/testsuite/gcc.dg/vect/complex/bb-slp-complex-add-pattern-short.c +++ b/gcc/testsuite/gcc.dg/vect/complex/bb-slp-complex-add-pattern-short.c @@ -1,6 +1,6 @@ /* { dg-do compile } */ -/* { dg-require-effective-target vect_complex_add_short } */ /* { dg-require-effective-target stdint_types } */ +/* { dg-additional-options "-fno-tree-loop-vectorize" } */ /* { dg-add-options arm_v8_1m_mve_fp } */ #define TYPE int16_t @@ -8,5 +8,7 @@ #include #include "complex-add-pattern-template.c" -/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 1 "slp1" } } */ -/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 1 "slp1" { xfail aarch64_sve2 } } } */ +/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 1 "slp1" { target { vect_complex_add_short } } } } */ +/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 1 "slp1" { target { vect_complex_add_short && !arch64_sve2 } } } } */ +/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT270" "slp1" } } */ +/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT90" "slp1" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/complex/bb-slp-complex-add-pattern-unsigned-byte.c b/gcc/testsuite/gcc.dg/vect/complex/bb-slp-complex-add-pattern-unsigned-byte.c deleted file mode 100644 index b753914bea73189f90a6caf50c881d72800085e6..0000000000000000000000000000000000000000 --- a/gcc/testsuite/gcc.dg/vect/complex/bb-slp-complex-add-pattern-unsigned-byte.c +++ /dev/null @@ -1,12 +0,0 @@ -/* { dg-do compile } */ -/* { dg-require-effective-target vect_complex_add_byte } */ -/* { dg-require-effective-target stdint_types } */ -/* { dg-add-options arm_v8_1m_mve_fp } */ - -#define TYPE uint8_t -#define N 16 -#include -#include "complex-add-pattern-template.c" - -/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 1 "slp1" { xfail aarch64_sve2 } } } */ -/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 1 "slp1" { xfail aarch64_sve2 } } } */ diff --git a/gcc/testsuite/gcc.dg/vect/complex/bb-slp-complex-add-pattern-unsigned-int.c b/gcc/testsuite/gcc.dg/vect/complex/bb-slp-complex-add-pattern-unsigned-int.c index 270c49efbf95ffbc21ff5c3b7ae34280fa1b6059..a6fd31d967b372328792d07aa52ae1f684132fa0 100644 --- a/gcc/testsuite/gcc.dg/vect/complex/bb-slp-complex-add-pattern-unsigned-int.c +++ b/gcc/testsuite/gcc.dg/vect/complex/bb-slp-complex-add-pattern-unsigned-int.c @@ -1,6 +1,6 @@ /* { dg-do compile } */ -/* { dg-require-effective-target vect_complex_add_int } */ /* { dg-require-effective-target stdint_types } */ +/* { dg-additional-options "-fno-tree-loop-vectorize" } */ /* { dg-add-options arm_v8_1m_mve_fp } */ #define TYPE uint32_t @@ -8,5 +8,7 @@ #include #include "complex-add-pattern-template.c" -/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 1 "slp1" } } */ -/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 1 "slp1" { xfail aarch64_sve2 } } } */ +/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 1 "slp1" { target { vect_complex_add_int } } } } */ +/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 1 "slp1" { target { vect_complex_add_int && !arch64_sve2 } } } } */ +/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT270" "slp1" } } */ +/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT90" "slp1" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/complex/bb-slp-complex-add-pattern-unsigned-long.c b/gcc/testsuite/gcc.dg/vect/complex/bb-slp-complex-add-pattern-unsigned-long.c index 88144e52014d86842b16520b0940123d5448459c..a2a1b7a7e40408752dc03dfeccf2c263f39a91a0 100644 --- a/gcc/testsuite/gcc.dg/vect/complex/bb-slp-complex-add-pattern-unsigned-long.c +++ b/gcc/testsuite/gcc.dg/vect/complex/bb-slp-complex-add-pattern-unsigned-long.c @@ -1,6 +1,6 @@ /* { dg-do compile } */ -/* { dg-require-effective-target vect_complex_add_long } */ /* { dg-require-effective-target stdint_types } */ +/* { dg-additional-options "-fno-tree-loop-vectorize" } */ /* { dg-add-options arm_v8_1m_mve_fp } */ #define TYPE uint64_t @@ -8,5 +8,7 @@ #include #include "complex-add-pattern-template.c" -/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 1 "slp1" } } */ -/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 1 "slp1" { xfail aarch64_sve2 } } } */ +/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 1 "slp1" { target { vect_complex_add_long } } } } */ +/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 1 "slp1" { target { vect_complex_add_long && !arch64_sve2 } } } } */ +/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT270" "slp1" } } */ +/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT90" "slp1" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/complex/bb-slp-complex-add-pattern-unsigned-short.c b/gcc/testsuite/gcc.dg/vect/complex/bb-slp-complex-add-pattern-unsigned-short.c index 445af3943d318c4daa69334fa6c1095592e2dec0..938f9f7d1350ab7d8f5c45994f1486d8e793f2a6 100644 --- a/gcc/testsuite/gcc.dg/vect/complex/bb-slp-complex-add-pattern-unsigned-short.c +++ b/gcc/testsuite/gcc.dg/vect/complex/bb-slp-complex-add-pattern-unsigned-short.c @@ -1,6 +1,6 @@ /* { dg-do compile } */ -/* { dg-require-effective-target vect_complex_add_short } */ /* { dg-require-effective-target stdint_types } */ +/* { dg-additional-options "-fno-tree-loop-vectorize" } */ /* { dg-add-options arm_v8_1m_mve_fp } */ #define TYPE uint16_t @@ -8,5 +8,7 @@ #include #include "complex-add-pattern-template.c" -/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 1 "slp1" } } */ -/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 1 "slp1" { xfail aarch64_sve2 } } } */ +/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 1 "slp1" { target { vect_complex_add_short } } } } */ +/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 1 "slp1" { target { vect_complex_add_short && !arch64_sve2 } } } } */ +/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT270" "slp1" } } */ +/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT90" "slp1" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-add-double.c b/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-add-double.c index 7bbb61adfab06a89ac36a66f848746033158c41c..4445119fc9d2c7dafe6abb5f7fb741c7794144a2 100644 --- a/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-add-double.c +++ b/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-add-double.c @@ -1,12 +1,14 @@ /* { dg-do compile } */ -/* { dg-require-effective-target vect_complex_add_double } */ /* { dg-add-options arm_v8_3a_complex_neon } */ +/* { dg-additional-options "-fno-tree-loop-vectorize" } */ /* { dg-add-options arm_v8_1m_mve_fp } */ #define TYPE double #define N 16 #include "complex-add-template.c" -/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 1 "slp1" } } */ -/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 1 "slp1" } } */ +/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 1 "slp1" { target { vect_complex_add_double } } } } */ +/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 1 "slp1" { target { vect_complex_add_double } } } } */ +/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT270" "slp1" } } */ +/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT90" "slp1" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-add-float.c b/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-add-float.c index cf99f1de31056bbaca3fe8885643289b770ad76d..ff53719d1a895a7161ebcc6fba4903fc3de9095f 100644 --- a/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-add-float.c +++ b/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-add-float.c @@ -1,11 +1,13 @@ /* { dg-do compile } */ -/* { dg-require-effective-target vect_complex_add_float } */ /* { dg-add-options arm_v8_3a_complex_neon } */ +/* { dg-additional-options "-fno-tree-loop-vectorize" } */ /* { dg-add-options arm_v8_1m_mve_fp } */ #define TYPE float #define N 16 #include "complex-add-template.c" -/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 1 "slp1" } } */ -/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 1 "slp1" } } */ +/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 1 "slp1" { target { vect_complex_add_float } } } } */ +/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 1 "slp1" { target { vect_complex_add_float } } } } */ +/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT270" "slp1" } } */ +/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT90" "slp1" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-add-half-float.c b/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-add-half-float.c index 9f535dde7c0d131c1a35e5b6b1d27530faaea88f..dc8c6bd6d0882c7fccde71c323b8bde89c2410af 100644 --- a/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-add-half-float.c +++ b/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-add-half-float.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-require-effective-target vect_complex_add_half } */ +/* { dg-additional-options "-fno-tree-loop-vectorize" } */ /* { dg-add-options arm_v8_3a_fp16_complex_neon } */ /* { dg-add-options arm_v8_1m_mve_fp } */ diff --git a/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-add-pattern-double.c b/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-add-pattern-double.c index e121113320ec153a732fe8e1c0b25d06929c126b..c79cc3b7365d8ad4a33366df275f9c8adddd1c97 100644 --- a/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-add-pattern-double.c +++ b/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-add-pattern-double.c @@ -1,11 +1,13 @@ /* { dg-do compile } */ -/* { dg-require-effective-target vect_complex_add_double } */ /* { dg-add-options arm_v8_3a_complex_neon } */ +/* { dg-additional-options "-fno-tree-loop-vectorize" } */ /* { dg-add-options arm_v8_1m_mve_fp } */ #define TYPE double #define N 16 #include "complex-add-pattern-template.c" -/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 1 "slp1" } } */ -/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 1 "slp1" } } */ +/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 1 "slp1" { target { vect_complex_add_double } } } } */ +/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 1 "slp1" { target { vect_complex_add_double } } } } */ +/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT270" "slp1" } } */ +/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT90" "slp1" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-add-pattern-float.c b/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-add-pattern-float.c index 8565833887f026b732b86d2c42c3a3d7a883b8d8..8bc7117565e79a0e93a22d2b28a32e9c5ddfe4d3 100644 --- a/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-add-pattern-float.c +++ b/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-add-pattern-float.c @@ -1,11 +1,13 @@ /* { dg-do compile } */ -/* { dg-require-effective-target vect_complex_add_float } */ /* { dg-add-options arm_v8_3a_complex_neon } */ +/* { dg-additional-options "-fno-tree-loop-vectorize" } */ /* { dg-add-options arm_v8_1m_mve_fp } */ #define TYPE float #define N 16 #include "complex-add-pattern-template.c" -/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 1 "slp1" } } */ -/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 1 "slp1" } } */ +/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 1 "slp1" { target { vect_complex_add_float } } } } */ +/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 1 "slp1" { target { vect_complex_add_float } } } } */ +/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT270" "slp1" } } */ +/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT90" "slp1" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-add-pattern-half-float.c b/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-add-pattern-half-float.c index 857ee9de6b48407ebb1c6974d4b05cd661cd4f16..80e0f5d5412318d05883813a81dc4a2d9a62f234 100644 --- a/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-add-pattern-half-float.c +++ b/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-add-pattern-half-float.c @@ -1,11 +1,13 @@ /* { dg-do compile } */ -/* { dg-require-effective-target vect_complex_add_half } */ /* { dg-add-options arm_v8_3a_fp16_complex_neon } */ +/* { dg-additional-options "-fno-tree-loop-vectorize" } */ /* { dg-add-options arm_v8_1m_mve_fp } */ #define TYPE _Float16 #define N 16 #include "complex-add-pattern-template.c" -/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 1 "slp1" } } */ -/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 1 "slp1" { xfail arm*-*-* } } } */ +/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 1 "slp1" { target { vect_complex_add_half } } } } */ +/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 1 "slp1" { target { vect_complex_add_byte } && ! target { arm*-*-* } } } } */ +/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT270" "slp1" { xfail *-*-* } } } */ +/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT90" "slp1" } } */ 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 index d9d13c29578f905e793e5d80f08ec7b758d09c5f..99f0a5e67994f112e36a01918ac50670d302e063 100644 --- 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 @@ -7,3 +7,5 @@ #define N 16 #include "complex-mla-template.c" +/* { dg-final { scan-tree-dump "Found COMPLEX_FMA_CONJ" "slp1" } } */ +/* { dg-final { scan-tree-dump "Found COMPLEX_FMA" "slp1" } } */ 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 index ac680cbca81b3b0bc3a51555236faa7f702e5082..bc84cedb80129d0e0a99caa3ea463d26a7511c17 100644 --- 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 @@ -1,8 +1,11 @@ /* { dg-do compile } */ /* { dg-require-effective-target vect_complex_add_float } */ -/* { dg-add-options arm_v8_3a_complex_neon } */ +/* { dg-additional-options "-fno-tree-loop-vectorize" } */ +/* { dg-add-options arm_v8_3a_fp16_complex_neon } */ /* { dg-add-options arm_v8_1m_mve_fp } */ #define TYPE float #define N 16 #include "complex-mla-template.c" +/* { dg-final { scan-tree-dump "Found COMPLEX_FMA_CONJ" "slp1" { xfail *-*-* } } } */ +/* { dg-final { scan-tree-dump "Found COMPLEX_FMA" "slp1" { xfail *-*-* } } } */ 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 index d0a48d007178a7464ae2e4d00720bb3b3abca18a..0fbd9172c2f3f1efb2dae2307292b5d1a7f6d80a 100644 --- 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 @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-require-effective-target vect_complex_add_half } */ +/* { dg-additional-options "-fno-tree-loop-vectorize" } */ /* { dg-add-options arm_v8_3a_fp16_complex_neon } */ /* { dg-add-options arm_v8_1m_mve_fp } */ @@ -7,3 +8,5 @@ #define N 16 #include "complex-mla-template.c" +/* { dg-final { scan-tree-dump "Found COMPLEX_FMA_CONJ" "slp1" { xfail *-*-* } } } */ +/* { dg-final { scan-tree-dump "Found COMPLEX_FMA" "slp1" { xfail *-*-* } } } */ 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 index d9d13c29578f905e793e5d80f08ec7b758d09c5f..b74ed8e1f64b3051ae423ae367b36759605ca5a6 100644 --- 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 @@ -5,5 +5,9 @@ #define TYPE double #define N 16 -#include "complex-mla-template.c" +#include "complex-mls-template.c" +/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT270" "slp1" } } */ +/* { dg-final { scan-tree-dump "Found COMPLEX_FMA" "slp1" } } */ +/* { dg-final { scan-tree-dump "Found COMPLEX_FMS_CONJ" "slp1" } } */ +/* { dg-final { scan-tree-dump "Found COMPLEX_FMS" "slp1" } } */ 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 index ac680cbca81b3b0bc3a51555236faa7f702e5082..0ae3b7ee4e40cba72820d5161fa8d5b907e7799b 100644 --- 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 @@ -1,8 +1,12 @@ /* { dg-do compile } */ /* { dg-require-effective-target vect_complex_add_float } */ +/* { dg-additional-options "-fno-tree-loop-vectorize" } */ /* { 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" +#include "complex-mls-template.c" + +/* { dg-final { scan-tree-dump "Found COMPLEX_FMS_CONJ" "slp1" { xfail *-*-* } } } */ +/* { dg-final { scan-tree-dump "Found COMPLEX_FMS" "slp1" { xfail *-*-* } } } */ 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 index d0a48d007178a7464ae2e4d00720bb3b3abca18a..727bae51778ca175eb6134f3823e6716002d315e 100644 --- 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 @@ -1,9 +1,12 @@ /* { dg-do compile } */ /* { dg-require-effective-target vect_complex_add_half } */ +/* { dg-additional-options "-fno-tree-loop-vectorize" } */ /* { 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" +#include "complex-mls-template.c" +/* { dg-final { scan-tree-dump "Found COMPLEX_FMS_CONJ" "slp1" { xfail *-*-* } } } */ +/* { dg-final { scan-tree-dump "Found COMPLEX_FMS" "slp1" { xfail *-*-* } } } */ 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 index ab8313f01226bfb96b2e304ff7f275cffb665b06..33f194b309501ae00f6f970fa8e8e04d618b3f75 100644 --- 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 @@ -7,3 +7,5 @@ #define N 16 #include "complex-mul-template.c" +/* { dg-final { scan-tree-dump "Found COMPLEX_MUL_CONJ" "slp1" } } */ +/* { dg-final { scan-tree-dump "Found COMPLEX_MUL" slp1" } } */ 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 index 49bf961c7a17d266d45b9112383a89ac406a705c..020336649364526142bf1d59673cc82903858871 100644 --- 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 @@ -1,8 +1,12 @@ /* { dg-do compile } */ /* { dg-require-effective-target vect_complex_add_float } */ +/* { dg-additional-options "-fno-tree-loop-vectorize" } */ /* { 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" + +/* { dg-final { scan-tree-dump "Found COMPLEX_MUL_CONJ" "slp1" { xfail *-*-* } } } */ +/* { dg-final { scan-tree-dump "Found COMPLEX_MUL" "slp1" { xfail *-*-* } } } */ 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 index f5c23fbe20d67e88f870417d9a4bde63c169e301..332cc51e70287ee4c51e7c91f6373f13c0e4d9cc 100644 --- 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 @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-require-effective-target vect_complex_add_half } */ +/* { dg-additional-options "-fno-tree-loop-vectorize" } */ /* { dg-add-options arm_v8_3a_fp16_complex_neon } */ /* { dg-add-options arm_v8_1m_mve_fp } */ @@ -7,3 +8,5 @@ #define N 16 #include "complex-mul-template.c" +/* { dg-final { scan-tree-dump "Found COMPLEX_MUL_CONJ" "slp1" { xfail *-*-* } } } */ +/* { dg-final { scan-tree-dump "Found COMPLEX_MUL" "slp1" { xfail *-*-* } } } */ diff --git a/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-add-double.c b/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-add-double.c index 0d4d3ce8869cde8e3020b93456421cc268fb8263..5c51d232d791b987930a30583f0f4b7645e1865f 100644 --- a/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-add-double.c +++ b/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-add-double.c @@ -1,5 +1,4 @@ /* { 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 } */ @@ -7,5 +6,7 @@ #define N 200 #include "complex-add-template.c" -/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 2 "vect" } } */ -/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 2 "vect" } } */ \ No newline at end of file +/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 2 "vect" { target { vect_complex_add_double } } } } */ +/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 2 "vect" { target { vect_complex_add_double } } } } */ +/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT270" "vect" } } */ +/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT90" "vect" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-add-float.c b/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-add-float.c index b9866966be37ed2e2c5210a06f04474171e0d4f3..2850aca29ee54d67af2f3e723798124f3e109adc 100644 --- a/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-add-float.c +++ b/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-add-float.c @@ -1,5 +1,4 @@ /* { 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 } */ @@ -7,5 +6,7 @@ #define N 200 #include "complex-add-template.c" -/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 2 "vect" } } */ -/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 2 "vect" } } */ \ No newline at end of file +/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 2 "vect" { target { vect_complex_add_float } } } } */ +/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 2 "vect" { target { vect_complex_add_float } } } } */ +/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT270" "vect" } } */ +/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT90" "vect" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-add-half-float.c b/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-add-half-float.c index c3dca57b4f49932acf28b19ad86774f171072576..d2de8501493be432252d52acc87165451082c570 100644 --- a/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-add-half-float.c +++ b/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-add-half-float.c @@ -1,5 +1,4 @@ /* { 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 } */ @@ -7,5 +6,5 @@ #define N 200 #include "complex-add-template.c" -/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 2 "vect" } } */ -/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 2 "vect" } } */ \ No newline at end of file +/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 2 "vect" { target { vect_complex_add_half } } } } */ +/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 2 "vect" { target { vect_complex_add_half } } } } */ diff --git a/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-add-pattern-double.c b/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-add-pattern-double.c index df4d3f671f40663d779598dcb5b1f94260c6d7e3..c2365045d771a191686f698efc8fca26574c9ec3 100644 --- a/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-add-pattern-double.c +++ b/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-add-pattern-double.c @@ -1,5 +1,4 @@ /* { 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 } */ @@ -7,5 +6,8 @@ #define N 200 #include "complex-add-pattern-template.c" -/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 4 "vect" } } */ -/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 1 "vect" } } */ +/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 4 "vect" { target { vect_complex_add_double } } } } */ +/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 1 "vect" { target { vect_complex_add_double } } } } */ +/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT270" "vect" } } */ +/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT90" "slp1" } } */ +/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT90" "vect" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-add-pattern-float.c b/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-add-pattern-float.c index 6df5c6d18309723d81734429f9034e3f6b10f7fc..2db785195acc86dc377bd61ea46b415ab940690b 100644 --- a/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-add-pattern-float.c +++ b/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-add-pattern-float.c @@ -1,5 +1,4 @@ /* { 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 } */ @@ -7,5 +6,8 @@ #define N 200 #include "complex-add-pattern-template.c" -/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 4 "vect" } } */ -/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 1 "vect" } } */ +/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 4 "vect" { target { vect_complex_add_float } } } } */ +/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 1 "vect" { target { vect_complex_add_float } } } } */ +/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT270" "vect" } } */ +/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT90" "slp1" } } */ +/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT90" "vect" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-add-pattern-half-float.c b/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-add-pattern-half-float.c index a72511262784b942d51fad9d0da423890bc3cd92..094aecd959e117d7530c01db4eb4c3de5255ca6c 100644 --- a/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-add-pattern-half-float.c +++ b/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-add-pattern-half-float.c @@ -1,5 +1,4 @@ /* { 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 } */ @@ -7,6 +6,10 @@ #define N 200 #include "complex-add-pattern-template.c" -/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 4 "vect" } } */ -/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 1 "vect" } } */ +/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 4 "vect" { target { vect_complex_add_half } } } } */ +/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 1 "vect" { target { vect_complex_add_half } } } } */ +/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT270" "slp1" } } */ +/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT270" "vect" } } */ +/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT90" "slp1" } } */ +/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT90" "vect" } } */ 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 index c85ff07a6cc432051b8dfc70456a31b8e485e024..8fe90fe0c0e27c5794222d566611ac6cca75bd23 100644 --- 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 @@ -6,3 +6,5 @@ #define TYPE double #define N 200 #include "complex-mla-template.c" +/* { dg-final { scan-tree-dump "Found COMPLEX_FMA_CONJ" "vect" } } */ +/* { dg-final { scan-tree-dump "Found COMPLEX_FMA" "vect" } } */ 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 index a17b91b1bd4bb0a26107e973ca1b06f7a9e4c24c..d8ef7068887c89099aca4e2a5cac2078a1edfdb6 100644 --- 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 @@ -6,3 +6,5 @@ #define TYPE float #define N 200 #include "complex-mla-template.c" +/* { dg-final { scan-tree-dump "Found COMPLEX_FMA_CONJ" "vect" } } */ +/* { dg-final { scan-tree-dump "Found COMPLEX_FMA" "vect" } } */ 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 index fa81985b9085ef760737b471591065388d59aed0..7fa5150df022890330644c0be58471480364abac 100644 --- 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 @@ -1,8 +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 200 #include "complex-mla-template.c" +/* { dg-final { scan-tree-dump "Found COMPLEX_FMA_CONJ" "vect" } } */ +/* { dg-final { scan-tree-dump "Found COMPLEX_FMA" "vect" } } */ 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 index c85ff07a6cc432051b8dfc70456a31b8e485e024..2648e7874ab2b0ea3cf8c6f2f5957badf04595ad 100644 --- 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 @@ -1,8 +1,11 @@ /* { 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" +#include "complex-mls-template.c" +/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT270" "vect" } } */ +/* { dg-final { scan-tree-dump "Found COMPLEX_FMA" "vect" } } */ +/* { dg-final { scan-tree-dump "Found COMPLEX_FMS_CONJ" "vect" } } */ +/* { dg-final { scan-tree-dump "Found COMPLEX_FMS" "vect" } } */ 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 index a17b91b1bd4bb0a26107e973ca1b06f7a9e4c24c..f9e285c2b92e507ab192ef82e6de1023a3254c95 100644 --- 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 @@ -1,8 +1,11 @@ /* { 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" +#include "complex-mls-template.c" +/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT270" "vect" } } */ +/* { dg-final { scan-tree-dump "Found COMPLEX_FMA" "vect" } } */ +/* { dg-final { scan-tree-dump "Found COMPLEX_FMS_CONJ" "vect" } } */ +/* { dg-final { scan-tree-dump "Found COMPLEX_FMS" "vect" } } */ 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 index fa81985b9085ef760737b471591065388d59aed0..88f8215e7a42e916bd1f33d310603c3c926844ec 100644 --- 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 @@ -1,8 +1,10 @@ /* { 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" +#include "complex-mls-template.c" +/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT270" "vect" } } */ +/* { dg-final { scan-tree-dump "Found COMPLEX_FMS_CONJ" "vect" } } */ +/* { dg-final { scan-tree-dump "Found COMPLEX_FMS" "vect" } } */ 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 index 77c01a82bb25d62d1fcf56d5015d21d8e3417963..67d1acf340c5ac59fd86b2b039f82da50c76cfe1 100644 --- 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 @@ -1,8 +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 200 #include "complex-mul-template.c" +/* { dg-final { scan-tree-dump "Found COMPLEX_MUL_CONJ" "vect" } } */ +/* { dg-final { scan-tree-dump "Found COMPLEX_MUL" "vect" } } */ 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 index a8b44f2069877d354572148acf2d8efbccdf89c6..05740f23758c8852b4894ddffa4a256c29a41e78 100644 --- 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 @@ -1,8 +1,9 @@ /* { 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" +/* { dg-final { scan-tree-dump "Found COMPLEX_MUL_CONJ" "vect" } } */ +/* { dg-final { scan-tree-dump "Found COMPLEX_MUL" "vect" } } */ 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 index d57df82808d5a08b52ed905048d7a0b46af41a4b..3d8f6851faa478f8c1a09816f34b09e863e59668 100644 --- 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 @@ -1,8 +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 200 #include "complex-mul-template.c" +/* { dg-final { scan-tree-dump "Found COMPLEX_MUL_CONJ" "vect" } } */ +/* { dg-final { scan-tree-dump "Found COMPLEX_MUL" "vect" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/complex/vect-complex-add-pattern-byte.c b/gcc/testsuite/gcc.dg/vect/complex/vect-complex-add-pattern-byte.c index 438d2192723a7b15261c346a290ccb0d9e0e02b6..de065150325c2dbf6dc87434ca504f072626a08e 100644 --- a/gcc/testsuite/gcc.dg/vect/complex/vect-complex-add-pattern-byte.c +++ b/gcc/testsuite/gcc.dg/vect/complex/vect-complex-add-pattern-byte.c @@ -1,5 +1,4 @@ /* { dg-do compile } */ -/* { dg-require-effective-target vect_complex_add_byte } */ /* { dg-require-effective-target stdint_types } */ /* { dg-add-options arm_v8_1m_mve_fp } */ @@ -8,5 +7,7 @@ #include #include "complex-add-pattern-template.c" -/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 1 "vect" } } */ -/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 1 "vect" } } */ +/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 1 "vect" { target { vect_complex_add_byte } } } } */ +/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 1 "vect" { target { vect_complex_add_byte } } } } */ +/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT270" "vect" } } */ +/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT90" "vect" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/complex/vect-complex-add-pattern-int.c b/gcc/testsuite/gcc.dg/vect/complex/vect-complex-add-pattern-int.c index 04c27dcf4102e4d53f2cc4f2aebb55a10d1fe5b1..2b10bab8a5ae6036e55044f7e611a1e1bfde2a3f 100644 --- a/gcc/testsuite/gcc.dg/vect/complex/vect-complex-add-pattern-int.c +++ b/gcc/testsuite/gcc.dg/vect/complex/vect-complex-add-pattern-int.c @@ -1,5 +1,4 @@ /* { dg-do compile } */ -/* { dg-require-effective-target vect_complex_add_int } */ /* { dg-require-effective-target stdint_types } */ /* { dg-add-options arm_v8_1m_mve_fp } */ @@ -8,5 +7,7 @@ #include #include "complex-add-pattern-template.c" -/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 1 "vect" } } */ -/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 1 "vect" } } */ +/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 1 "vect" { target { vect_complex_add_int } } } } */ +/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 1 "vect" { target { vect_complex_add_int } } } } */ +/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT270" "vect" } } */ +/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT90" "vect" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/complex/vect-complex-add-pattern-long.c b/gcc/testsuite/gcc.dg/vect/complex/vect-complex-add-pattern-long.c index 27988ad34233f23b359fa4de56cb1d2182496bcc..ad045b1cf3657db32d7ebb577e57ff4f4692abb0 100644 --- a/gcc/testsuite/gcc.dg/vect/complex/vect-complex-add-pattern-long.c +++ b/gcc/testsuite/gcc.dg/vect/complex/vect-complex-add-pattern-long.c @@ -1,5 +1,4 @@ /* { dg-do compile } */ -/* { dg-require-effective-target vect_complex_add_long } */ /* { dg-require-effective-target stdint_types } */ /* { dg-add-options arm_v8_1m_mve_fp } */ @@ -8,5 +7,7 @@ #include #include "complex-add-pattern-template.c" -/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 1 "vect" } } */ -/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 1 "vect" } } */ +/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 1 "vect" { target { vect_complex_add_long } } } } */ +/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 1 "vect" { target { vect_complex_add_long } } } } */ +/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT270" "vect" } } */ +/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT90" "vect" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/complex/vect-complex-add-pattern-short.c b/gcc/testsuite/gcc.dg/vect/complex/vect-complex-add-pattern-short.c index 88d225d6ff8004eabc679a51b9dc01d69be2c3b0..81f0f7124bf9219a8cab8e56a52766d081039779 100644 --- a/gcc/testsuite/gcc.dg/vect/complex/vect-complex-add-pattern-short.c +++ b/gcc/testsuite/gcc.dg/vect/complex/vect-complex-add-pattern-short.c @@ -1,5 +1,4 @@ /* { dg-do compile } */ -/* { dg-require-effective-target vect_complex_add_short } */ /* { dg-require-effective-target stdint_types } */ /* { dg-add-options arm_v8_1m_mve_fp } */ @@ -8,5 +7,7 @@ #include #include "complex-add-pattern-template.c" -/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 1 "vect" } } */ -/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 1 "vect" } } */ +/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 1 "vect" { target { vect_complex_add_short } } } } */ +/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 1 "vect" { target { vect_complex_add_short } } } } */ +/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT270" "vect" } } */ +/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT90" "vect" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/complex/vect-complex-add-pattern-unsigned-byte.c b/gcc/testsuite/gcc.dg/vect/complex/vect-complex-add-pattern-unsigned-byte.c index 59109c008bb28bf65600e0427ca86935db10b55c..d0a73a18cd54dc3a1b6b701c2a51df08e130e14c 100644 --- a/gcc/testsuite/gcc.dg/vect/complex/vect-complex-add-pattern-unsigned-byte.c +++ b/gcc/testsuite/gcc.dg/vect/complex/vect-complex-add-pattern-unsigned-byte.c @@ -1,5 +1,4 @@ /* { dg-do compile } */ -/* { dg-require-effective-target vect_complex_add_byte } */ /* { dg-require-effective-target stdint_types } */ /* { dg-add-options arm_v8_1m_mve_fp } */ @@ -8,5 +7,7 @@ #include #include "complex-add-pattern-template.c" -/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 1 "vect" } } */ -/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 1 "vect" } } */ +/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 1 "vect" { target { vect_complex_add_byte } } } } */ +/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 1 "vect" { target { vect_complex_add_byte } } } } */ +/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT270" "vect" } } */ +/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT90" "vect" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/complex/vect-complex-add-pattern-unsigned-int.c b/gcc/testsuite/gcc.dg/vect/complex/vect-complex-add-pattern-unsigned-int.c index 44d96354d6071bcd2d7e61d8e5211692560f6cbe..fe7f605503fba66300a871567452b60025accb2c 100644 --- a/gcc/testsuite/gcc.dg/vect/complex/vect-complex-add-pattern-unsigned-int.c +++ b/gcc/testsuite/gcc.dg/vect/complex/vect-complex-add-pattern-unsigned-int.c @@ -1,5 +1,4 @@ /* { dg-do compile } */ -/* { dg-require-effective-target vect_complex_add_int } */ /* { dg-require-effective-target stdint_types } */ /* { dg-add-options arm_v8_1m_mve_fp } */ @@ -8,5 +7,7 @@ #include #include "complex-add-pattern-template.c" -/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 1 "vect" } } */ -/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 1 "vect" } } */ +/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 1 "vect" { target { vect_complex_add_int } } } } */ +/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 1 "vect" { target { vect_complex_add_int } } } } */ +/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT270" "vect" } } */ +/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT90" "vect" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/complex/vect-complex-add-pattern-unsigned-long.c b/gcc/testsuite/gcc.dg/vect/complex/vect-complex-add-pattern-unsigned-long.c index 667145751cd9efbdf8019249cffea7722e1c78e5..f52e7391f8bc4029def1cfc73e478bce2affe44a 100644 --- a/gcc/testsuite/gcc.dg/vect/complex/vect-complex-add-pattern-unsigned-long.c +++ b/gcc/testsuite/gcc.dg/vect/complex/vect-complex-add-pattern-unsigned-long.c @@ -1,5 +1,4 @@ /* { dg-do compile } */ -/* { dg-require-effective-target vect_complex_add_long } */ /* { dg-require-effective-target stdint_types } */ /* { dg-add-options arm_v8_1m_mve_fp } */ @@ -8,5 +7,7 @@ #include #include "complex-add-pattern-template.c" -/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 1 "vect" } } */ -/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 1 "vect" } } */ +/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 1 "vect" { target { vect_complex_add_long } } } } */ +/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 1 "vect" { target { vect_complex_add_long } } } } */ +/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT270" "vect" } } */ +/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT90" "vect" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/complex/vect-complex-add-pattern-unsigned-short.c b/gcc/testsuite/gcc.dg/vect/complex/vect-complex-add-pattern-unsigned-short.c index 841adf830c8e1b2fa9184811b39fb54bfc1af92f..c6794cde224ce989cb2665273d4bf884a065cffa 100644 --- a/gcc/testsuite/gcc.dg/vect/complex/vect-complex-add-pattern-unsigned-short.c +++ b/gcc/testsuite/gcc.dg/vect/complex/vect-complex-add-pattern-unsigned-short.c @@ -1,5 +1,4 @@ /* { dg-do compile } */ -/* { dg-require-effective-target vect_complex_add_short } */ /* { dg-require-effective-target stdint_types } */ /* { dg-add-options arm_v8_1m_mve_fp } */ @@ -8,5 +7,7 @@ #include #include "complex-add-pattern-template.c" -/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 1 "vect" } } */ -/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 1 "vect" } } */ +/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 1 "vect" { target { vect_complex_add_short } } } } */ +/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 1 "vect" { target { vect_complex_add_short } } } } */ +/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT270" "vect" } } */ +/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT90" "vect" } } */