From patchwork Mon Nov 6 07:43:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tamar Christina X-Patchwork-Id: 161855 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:8f47:0:b0:403:3b70:6f57 with SMTP id j7csp2497475vqu; Sun, 5 Nov 2023 23:44:48 -0800 (PST) X-Google-Smtp-Source: AGHT+IEAFV7PaQCLRmdurC4yBCMf3TTEsacMn8OHC4cXhuqxP6c18gFAsqYT1nF2XIMW2GiygAMU X-Received: by 2002:a05:620a:280a:b0:77a:55b2:a134 with SMTP id f10-20020a05620a280a00b0077a55b2a134mr14097037qkp.51.1699256688366; Sun, 05 Nov 2023 23:44:48 -0800 (PST) ARC-Seal: i=4; a=rsa-sha256; t=1699256688; cv=pass; d=google.com; s=arc-20160816; b=X7Ux6s4bdlQ/bgBF6BqxvLUSMqFedSA4Wfx2xCaTwySN35Q7ewAHxfXahsl7Ud81q4 SZEG7MWBipNe/yZgTRRcQPlOA/CbuwomENXywoOClCycRJn6IuC1vg6cV460skpQkQlh EqiP2SVS0LGF7eXwyZUvMY4h5sQe2MDLG++8dy1Sj5v5Jiiv1EDygV0MptUNxnLkwn/D i4PUMJZQRGNLxJqowMKm1meuEHdw5dNdUe9vbYZ97oY7+vepXkjQikEd7amk9CMCkBQ+ 9l+HlEo2DLjDPXM3jVXf94+BhCTAc+pHFBFXxjHU3Mh9Q2Vew6+mZYlaM5t3Yebmoc1V YGDQ== ARC-Message-Signature: i=4; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:original-authentication-results :nodisclaimer:mime-version:in-reply-to:content-disposition :message-id:subject:cc:to:from:date:authentication-results-original :dkim-signature:dkim-signature:arc-filter:dmarc-filter:delivered-to; bh=scYkYjbIcQQsQ9Z/654hyB4cwbb/H/5ZmnhslqoLWeo=; fh=Yt1FGz6RyV7+RqQlNAyvJO9M2CgMZgoxOe6Taq+wFaM=; b=KlOL2hoL0UQB7O0ip83EuENQv5xoscVDBqZQ0j+4u3hQaJfsbn9r55ZzzT7KDcmIPl kZy0N4fJmVC3bamNKmxJ5tdtJcI6z886Zhdp/kOPCbumhDTqXOjq+gHACvvXQ2tDqJSr LfDMYEIViC3yC+zjbDRv0NMygNGGEy9eMVL4Q8OfgTFO3oawehxgvbEoFOftP1ACPad1 uz5FMO+2Cx6bKmhAoXpFQ5GRUP0Lw1bOt4EyZyw1J5GKhBqfKWwqlwXJRAykHK2dzXHA 2mJjUiFeKJK9XjiHwy8i9SaaKJhdHJWIaa6ST7Wd4p3txoB3/tr0A+cXhpkuPqaKF/v7 SJEQ== ARC-Authentication-Results: i=4; mx.google.com; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=D+TlOqSE; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=D+TlOqSE; arc=pass (i=3); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id j12-20020a05620a000c00b00779eb01838asi5248889qki.743.2023.11.05.23.44.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Nov 2023 23:44:48 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=D+TlOqSE; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=D+TlOqSE; arc=pass (i=3); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id DD3CD3882ADF for ; Mon, 6 Nov 2023 07:43:47 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-vi1eur04on2044.outbound.protection.outlook.com [40.107.8.44]) by sourceware.org (Postfix) with ESMTPS id 361433875DC7 for ; Mon, 6 Nov 2023 07:43:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 361433875DC7 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 361433875DC7 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=40.107.8.44 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1699256601; cv=pass; b=sIk4t/dUeFJUop9QjBOkbXUP+JvhNL8zhpn72JMjSBDvNp8m0yiLaspDbe5qa7YbJgfm0cXSJPXpmUxqKbyLUFY26EEmepq1j6rfUkmRJC1olAqkCYgVk48jcTXD5k+N0X3eji9ySIBDG7W8YZtcnumy64rZaogez3h0VzydODM= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1699256601; c=relaxed/simple; bh=kukGwO0TtrBwTAY2QA0MtGtlMXBaXA7gyxIMC9lChFo=; h=DKIM-Signature:DKIM-Signature:Date:From:To:Subject:Message-ID: MIME-Version; b=hh6f++/zqMOMIIK9bs7dZ+bAML501b0tr4Xh9YHzyczMe7OveBqyDPuA5/i2HNzJlYqkcVZAnKBZ3oORAa4U6unv1gh7uZimvOkqOVrpxUezjbe+v2MpRSs1DuYBvnX2imNsS/RQC45kgoCC094yJkjc9Ftqw4UVJCAdaW4ZUTk= ARC-Authentication-Results: i=3; server2.sourceware.org ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=IrZP1ZdzGC2gB0RYBFihk3IWwm/d/oI9QJM3eGepwLiTrAOBRHxESi767XOYwBlpWb/6nHdCmY0st4ThKl5GdWPJ9cFTe4JmvdVOSKlaWgiRM/KRqUg2doKSgTTSAQd+LE5z4WiEBWnThb4dwW4/G1+a4QIkniAjPZ7GnhoeN4J7YSi7mhGnAQCHCMdWUSSXuDegrw4GWuxi/DaAywEq1NdU1uWy/T+odfq0lBhTEYCVo8m5OW+9KvAKcS4TgNShQ63NH2MJuH5kVZTDuYZAGj4lfdCPJG16Gd98kf0MlfOHk+Z5kMWe+r8d99MaubUr2z+0BHOTSC9cGaePbAoDvg== ARC-Message-Signature: i=2; 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=scYkYjbIcQQsQ9Z/654hyB4cwbb/H/5ZmnhslqoLWeo=; b=U+0Cqcw5Da5GXH23ymc8fG9X3S4H4pNrLa0RK4ojhchVUZMS3LyXuKkkVpTe9iSCR7rPXS/+0/BpGV7cw9hg/MIQ3zvJKTB6mgq2bjGp/Tc9r51Qz9NH55vk4VFFKLq2WXR9aSCkVFKZq8PIVU0I/KAmCOH+7OkkcJoLgEoQ4LjdzFzSYW4R6P3GH4Yl/9OWB61WjgWuNFLQTC69Rs3O8DeHBld/pMG4w54AXute6dDHR4YYk59cwH0LAINvz/Wd+b4ArXiCF3qkuaeT4M2I9pquiRwaYDkf8yrW2i5gD4QjPLtqMP1nGdo7iDZQJbc4QcKEqssyC4K7x2rF3tMT6w== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=gcc.gnu.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=scYkYjbIcQQsQ9Z/654hyB4cwbb/H/5ZmnhslqoLWeo=; b=D+TlOqSEieOTDzwYZ7Jxtvu1N/oQ0RDYnRvJ/CXrAz3slCWLHp9ADI52M3CtX36jqCqOmyMY4kZnYcnsTpcB7pXjCpRxKCTaxpgPvo3nnmFZ0sh/qnBA5Elk/Zm6oqfmUo65l8yzp8uZ4TPlKXEVUz4PLk4bpBNX+h6uVsv9894= Received: from AS4P251CA0027.EURP251.PROD.OUTLOOK.COM (2603:10a6:20b:5d3::13) by DU0PR08MB7413.eurprd08.prod.outlook.com (2603:10a6:10:351::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.25; Mon, 6 Nov 2023 07:43:12 +0000 Received: from AM4PEPF00027A5D.eurprd04.prod.outlook.com (2603:10a6:20b:5d3:cafe::d7) by AS4P251CA0027.outlook.office365.com (2603:10a6:20b:5d3::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.28 via Frontend Transport; Mon, 6 Nov 2023 07:43:12 +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; pr=C Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM4PEPF00027A5D.mail.protection.outlook.com (10.167.16.69) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6977.16 via Frontend Transport; Mon, 6 Nov 2023 07:43:12 +0000 Received: ("Tessian outbound 385ad2f98d71:v228"); Mon, 06 Nov 2023 07:43:12 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: db4265bc5cf5fdb5 X-CR-MTA-TID: 64aa7808 Received: from 350c57be11ea.3 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 92D42E29-1F66-4003-BC8C-69F29C1B793E.1; Mon, 06 Nov 2023 07:43:05 +0000 Received: from EUR05-AM6-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 350c57be11ea.3 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Mon, 06 Nov 2023 07:43:05 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XYi9m7CfO9HJc3q/ytrmeuDeAZveEOkyNb8lC66rJhXFdcL+ZVxLC6ZBf9b6OW64ajagafy9Jqqkq80XXn7rtxI92WWzG6S5QzM1MkqNJ14SKNU4DGk8Fi8KxomS8DRfLFaDwBcCRGktePOkiBy923YGNbZpBf8Dc/+y70Y4+M2rwazyV29xuOg9r2snPE/9qKbucU5WbI8YoIGA4hLXiLSEaIGMmo8gNEHRBPGwFMl6n38T6PI/ix6lZNvyLCWGE/kq2+2RwMp0Ww/Q+9UaIgpCUQEXwvBAFW7CCOTQdgfm/iksZW7nJSo7QhrcdgN8sTe5/ASJp7vjFr4VMk9wOQ== 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=scYkYjbIcQQsQ9Z/654hyB4cwbb/H/5ZmnhslqoLWeo=; b=jc/RwRB8VdBgV2lOx8JN6J51dwcBtbTA01IkoM23P84TkuCGEQFBT0ZmKB2KckWuTAJE1VFfO5ZublJ24QDyYTraNXcRh8dqzhVkpTSX0eYQlqHlQ2ssiRwTiZma9dz8JEIWsnRko+TdYVuxd6+5bHEozuHw+hPgqc8t9RGtCZJmJiU8eDAmjk+atpnNPEtkScNCtjSlgpDWQAj5rVR/rPGE7mK5tQfZyUjhDln6Tt4P1d7EjL8IuPyJwId9N0yRd7Q5+CiICiWjgkazdbYVWNy/PcyomWPm4YL7H6oRfDGjzDHff/8vcHkhNFh+oKa0CA6h7pe1R6YVpcLHsx1s3g== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=scYkYjbIcQQsQ9Z/654hyB4cwbb/H/5ZmnhslqoLWeo=; b=D+TlOqSEieOTDzwYZ7Jxtvu1N/oQ0RDYnRvJ/CXrAz3slCWLHp9ADI52M3CtX36jqCqOmyMY4kZnYcnsTpcB7pXjCpRxKCTaxpgPvo3nnmFZ0sh/qnBA5Elk/Zm6oqfmUo65l8yzp8uZ4TPlKXEVUz4PLk4bpBNX+h6uVsv9894= 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 AS8PR08MB6694.eurprd08.prod.outlook.com (2603:10a6:20b:39e::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.28; Mon, 6 Nov 2023 07:43:03 +0000 Received: from VI1PR08MB5325.eurprd08.prod.outlook.com ([fe80::26aa:efdd:a74a:27d0]) by VI1PR08MB5325.eurprd08.prod.outlook.com ([fe80::26aa:efdd:a74a:27d0%5]) with mapi id 15.20.6954.028; Mon, 6 Nov 2023 07:43:03 +0000 Date: Mon, 6 Nov 2023 07:43:00 +0000 From: Tamar Christina To: gcc-patches@gcc.gnu.org Cc: nd@arm.com, Ramana.Radhakrishnan@arm.com, Richard.Earnshaw@arm.com, nickc@redhat.com, Kyrylo.Tkachov@arm.com Subject: [PATCH 21/21]Arm: Add MVE cbranch implementation Message-ID: Content-Disposition: inline In-Reply-To: X-ClientProxiedBy: LO2P123CA0013.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:a6::25) To VI1PR08MB5325.eurprd08.prod.outlook.com (2603:10a6:803:13e::17) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: VI1PR08MB5325:EE_|AS8PR08MB6694:EE_|AM4PEPF00027A5D:EE_|DU0PR08MB7413:EE_ X-MS-Office365-Filtering-Correlation-Id: 535c500c-080f-40eb-7be7-08dbde9c0775 X-LD-Processed: f34e5979-57d9-4aaa-ad4d-b122a662184d,ExtAddr x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: dYvVEX1XeacrSmd77Chwk9OOS0j5lTuIWNg4HNu9k2QlXnpFXrISZyGZwC21DHC0eLPHTmeJ1r9Zgqllm4YkBBW3cNB66m/epEckQ+bPpCDrKq5kIiVVNdTKXgnhccirlkO4XnfSiI/vPYq6695eMIBK7w+cQbH/EN16wXK1DuwjUb0GXiV8ITu3YP16WV8n40uZNN9qHLjCC5BmV+fFPL1JAY9nedsRAUlQnCLXXtjyZ1IsGF1YLeo5LoLAXcHAhgxmMMrRdgv0jKtaMAI5nOSlyYbqgOB/ucTc2/sCZWmbKaq3GSCccOovCV+JY01s91CRMLyFmUSlXThlQPsCIYZe3P6TFN/b2E2mCz7x/yqDR8f/C5vStKaETf//DdGAyxFpzn2J3ff8jjXM6viI5mP1QXPZHwbx8EtdL1Sg8CpdmeogxJz2mU4P1YFpDhAHg27h//ACrRkrzPYA70O/4KVytG2kaC+6gvOLlRl4IQylIFZ7GmGfyx0uUrygHwwHPBYEmER0MWWh3s6M7VprJg6rAL3pHRb9mpOQ/A0sjr4xpC2CNxjqFHKA67dgst8gNAgOBfa4mqo2LVM8q8GzLake4DHkX/vevef9DQpq2a0= 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:(13230031)(39860400002)(366004)(396003)(376002)(136003)(346002)(230922051799003)(64100799003)(451199024)(186009)(1800799009)(2906002)(38100700002)(4326008)(8676002)(8936002)(41300700001)(84970400001)(83380400001)(5660300002)(86362001)(235185007)(4743002)(44832011)(6512007)(2616005)(316002)(66556008)(66476007)(66946007)(6916009)(6506007)(33964004)(44144004)(26005)(6486002)(478600001)(36756003)(2700100001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB6694 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: AM4PEPF00027A5D.eurprd04.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 657f69b9-5983-4dce-bd25-08dbde9c0223 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +hBKHJf/z+9Fzf8ZKnnMLfD3g3P8VWaDJ3gUltTVM5s6nakjaum24gQljoeHlWiA0o8OuuGrbgBYGt+EiHaWZ9txCfyT99di8AhCTbJJBnN22tHM0dbMA8DpWeb3jwtch2UCpM0setOhCmHvF6iCK8a7GrE/SirYuxA56Og8wCIzuHDF8cPDRckLTiEFjEHnotkeDFYuOsymvvjSU8BDdE1enBIGBilw8jJPY00uuC9fOJS5GUY193uPhvaKVnccVWbVwWO1BTSfWyZni2h/GaRPfPmE3JChmrY6rgHUPCZDyd0dUuO2/eXw2CNYh6gC2LPocSnYccJqtXex3Bki3I1DmrPlQi9jg4o4fi4UWf+HvDn4ypnDq5LRTwY5ptm8PobIwsv12ebiS5ubmLsMyIvWje0nBtKZ+ZpaNc17LhrpMZhTwKxkWoayjCbBX6W3D+l1UuexN4Wm/R3h69z4kpC6bDT/uzyuNEdQrm5Kzq54gpDuH8jcYs0JReBm/Wp8EetXZPmFpPXXk/ZLxHV195ucrjvdGC5Pqs7TIfMbTEX/8rg33rvytJntMMMLNPOmWaiSbWsNdSsqO97ALbskoBgLQgnPzO2IgL/DRPqFQ8V60DXqyUDd9C9he0SlPiOlVAZtUnuz8Eve8dUKKLN61qWWYl8zOw9rrCM9UUSHYn2uswaZz5PD3YF0GPopHEwYcvB60zOjqK64dTDYFiVaR0c1QiW2zVGgaPK9EfFIUe+GGKuW8NPuaQsF5/Co8GsNLpFL62eDBRLyOXVPNr7Q+w== 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:(13230031)(4636009)(39860400002)(396003)(346002)(376002)(136003)(230922051799003)(82310400011)(1800799009)(64100799003)(186009)(451199024)(36840700001)(46966006)(40470700004)(40460700003)(2616005)(4743002)(336012)(6512007)(26005)(6506007)(44144004)(33964004)(83380400001)(478600001)(8676002)(47076005)(36860700001)(8936002)(5660300002)(235185007)(2906002)(70586007)(44832011)(6916009)(6486002)(41300700001)(4326008)(316002)(70206006)(81166007)(356005)(82740400003)(86362001)(36756003)(84970400001)(40480700001)(2700100001); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Nov 2023 07:43:12.3680 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 535c500c-080f-40eb-7be7-08dbde9c0775 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: AM4PEPF00027A5D.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR08MB7413 X-Spam-Status: No, score=-12.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, FORGED_SPF_HELO, GIT_PATCH_0, KAM_DMARC_NONE, KAM_LOTSOFHASH, KAM_SHORT, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1769954842429889504 X-GMAIL-MSGID: 1781799781185881875 Hi All, This adds an implementation for conditional branch optab for MVE. Unfortunately MVE has rather limited operations on VPT.P0, we are missing the ability to do P0 comparisons and logical OR on P0. For that reason we can only support cbranch with 0, as for comparing to a 0 predicate we don't need to actually do a comparison, we only have to check that any bit is set within P0. Because we can only do P0 comparisons with 0, the costing of the comparison was reduced in order for the compiler not to try to push 0 to a register thinking it's too expensive. For the cbranch implementation to be safe we must see the constant 0 vector. For the lack of logical OR on P0 we can't really work around. This means MVE can't support cases where the sizes of operands in the comparison don't match, i.e. when one operand has been unpacked. For e.g. void f1 () { for (int i = 0; i < N; i++) { b[i] += a[i]; if (a[i] > 0) break; } } For 128-bit vectors we generate: vcmp.s32 gt, q3, q1 vmrs r3, p0 @ movhi cbnz r3, .L2 MVE does not have 64-bit vector comparisons, as such that is also not supported. Bootstrapped arm-none-linux-gnueabihf and regtested with -march=armv8.1-m.main+mve -mfpu=auto and no issues. Ok for master? Thanks, Tamar gcc/ChangeLog: * config/arm/arm.cc (arm_rtx_costs_internal): Update costs for pred 0 compares. * config/arm/mve.md (cbranch4): New. gcc/testsuite/ChangeLog: * lib/target-supports.exp (vect_early_break): Add MVE. * gcc.target/arm/mve/vect-early-break-cbranch.c: New test. --- inline copy of patch -- diff --git a/gcc/config/arm/arm.cc b/gcc/config/arm/arm.cc index 38f0839de1c75547c259ac3d655fcfc14e7208a2..15e65c15cb3cb6f70161787e84b255a24eb51e32 100644 --- diff --git a/gcc/config/arm/arm.cc b/gcc/config/arm/arm.cc index 38f0839de1c75547c259ac3d655fcfc14e7208a2..15e65c15cb3cb6f70161787e84b255a24eb51e32 100644 --- a/gcc/config/arm/arm.cc +++ b/gcc/config/arm/arm.cc @@ -11883,6 +11883,15 @@ arm_rtx_costs_internal (rtx x, enum rtx_code code, enum rtx_code outer_code, || TARGET_HAVE_MVE) && simd_immediate_valid_for_move (x, mode, NULL, NULL)) *cost = COSTS_N_INSNS (1); + else if (TARGET_HAVE_MVE + && outer_code == COMPARE + && VALID_MVE_PRED_MODE (mode)) + /* MVE allows very limited instructions on VPT.P0, however comparisons + to 0 do not require us to materialze this constant or require a + predicate comparison as we can go through SImode. For that reason + allow P0 CMP 0 as a cheap operation such that the 0 isn't forced to + registers as we can't compare two predicates. */ + *cost = COSTS_N_INSNS (1); else *cost = COSTS_N_INSNS (4); return true; diff --git a/gcc/config/arm/mve.md b/gcc/config/arm/mve.md index 74909ce47e132c22a94f7d9cd3a0921b38e33051..95d40770ecc25f9eb251eba38306dd43cbebfb3f 100644 --- a/gcc/config/arm/mve.md +++ b/gcc/config/arm/mve.md @@ -6880,6 +6880,21 @@ (define_expand "vcond_mask_" DONE; }) +(define_expand "cbranch4" + [(set (pc) (if_then_else + (match_operator 0 "expandable_comparison_operator" + [(match_operand:MVE_7 1 "register_operand") + (match_operand:MVE_7 2 "zero_operand")]) + (label_ref (match_operand 3 "" "")) + (pc)))] + "TARGET_HAVE_MVE" +{ + rtx val = gen_reg_rtx (SImode); + emit_move_insn (val, gen_lowpart (SImode, operands[1])); + emit_jump_insn (gen_cbranchsi4 (operands[0], val, const0_rtx, operands[3])); + DONE; +}) + ;; Reinterpret operand 1 in operand 0's mode, without changing its contents. (define_expand "@arm_mve_reinterpret" [(set (match_operand:MVE_vecs 0 "register_operand") diff --git a/gcc/testsuite/gcc.target/arm/mve/vect-early-break-cbranch.c b/gcc/testsuite/gcc.target/arm/mve/vect-early-break-cbranch.c new file mode 100644 index 0000000000000000000000000000000000000000..c3b8506dca0b2b044e6869a6c8259d663c1ff930 --- /dev/null +++ b/gcc/testsuite/gcc.target/arm/mve/vect-early-break-cbranch.c @@ -0,0 +1,117 @@ +/* { dg-do compile } */ +/* { dg-require-effective-target arm_v8_1m_mve_ok } */ +/* { dg-add-options arm_v8_1m_mve } */ +/* { dg-options "-O3" } */ +/* { dg-final { check-function-bodies "**" "" "" } } */ + +#define N 640 +int a[N] = {0}; +int b[N] = {0}; + +/* +** f1: +** ... +** vcmp.s32 gt, q[0-9]+, q[0-9]+ +** vmrs r[0-9]+, p0 @ movhi +** cbnz r[0-9]+, \.L[0-9]+ +** ... +*/ +void f1 () +{ + for (int i = 0; i < N; i++) + { + b[i] += a[i]; + if (a[i] > 0) + break; + } +} + +/* +** f2: +** ... +** vcmp.s32 ge, q[0-9]+, q[0-9]+ +** vmrs r[0-9]+, p0 @ movhi +** cbnz r[0-9]+, \.L[0-9]+ +** ... +*/ +void f2 () +{ + for (int i = 0; i < N; i++) + { + b[i] += a[i]; + if (a[i] >= 0) + break; + } +} + +/* +** f3: +** ... +** vcmp.i32 eq, q[0-9]+, q[0-9]+ +** vmrs r[0-9]+, p0 @ movhi +** cbnz r[0-9]+, \.L[0-9]+ +** ... +*/ +void f3 () +{ + for (int i = 0; i < N; i++) + { + b[i] += a[i]; + if (a[i] == 0) + break; + } +} + +/* +** f4: +** ... +** vcmp.i32 ne, q[0-9]+, q[0-9]+ +** vmrs r[0-9]+, p0 @ movhi +** cbnz r[0-9]+, \.L[0-9]+ +** ... +*/ +void f4 () +{ + for (int i = 0; i < N; i++) + { + b[i] += a[i]; + if (a[i] != 0) + break; + } +} + +/* +** f5: +** ... +** vcmp.s32 lt, q[0-9]+, q[0-9]+ +** vmrs r[0-9]+, p0 @ movhi +** cbnz r[0-9]+, \.L[0-9]+ +** ... +*/ +void f5 () +{ + for (int i = 0; i < N; i++) + { + b[i] += a[i]; + if (a[i] < 0) + break; + } +} + +/* +** f6: +** ... +** vcmp.s32 le, q[0-9]+, q[0-9]+ +** vmrs r[0-9]+, p0 @ movhi +** cbnz r[0-9]+, \.L[0-9]+ +** ... +*/ +void f6 () +{ + for (int i = 0; i < N; i++) + { + b[i] += a[i]; + if (a[i] <= 0) + break; + } +} diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 8f58671e6cfd3546c6a98e40341fe31c6492594b..1eef764542a782786e27ed935a06243e319ae3fc 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -3785,6 +3785,8 @@ proc check_effective_target_vect_early_break { } { expr { [istarget aarch64*-*-*] || [check_effective_target_arm_neon_ok] + || ([check_effective_target_arm_v8_1m_mve_fp_ok] + && [check_effective_target_arm_little_endian]) }}] } # Return 1 if the target supports hardware vectorization of complex additions of --- a/gcc/config/arm/arm.cc +++ b/gcc/config/arm/arm.cc @@ -11883,6 +11883,15 @@ arm_rtx_costs_internal (rtx x, enum rtx_code code, enum rtx_code outer_code, || TARGET_HAVE_MVE) && simd_immediate_valid_for_move (x, mode, NULL, NULL)) *cost = COSTS_N_INSNS (1); + else if (TARGET_HAVE_MVE + && outer_code == COMPARE + && VALID_MVE_PRED_MODE (mode)) + /* MVE allows very limited instructions on VPT.P0, however comparisons + to 0 do not require us to materialze this constant or require a + predicate comparison as we can go through SImode. For that reason + allow P0 CMP 0 as a cheap operation such that the 0 isn't forced to + registers as we can't compare two predicates. */ + *cost = COSTS_N_INSNS (1); else *cost = COSTS_N_INSNS (4); return true; diff --git a/gcc/config/arm/mve.md b/gcc/config/arm/mve.md index 74909ce47e132c22a94f7d9cd3a0921b38e33051..95d40770ecc25f9eb251eba38306dd43cbebfb3f 100644 --- a/gcc/config/arm/mve.md +++ b/gcc/config/arm/mve.md @@ -6880,6 +6880,21 @@ (define_expand "vcond_mask_" DONE; }) +(define_expand "cbranch4" + [(set (pc) (if_then_else + (match_operator 0 "expandable_comparison_operator" + [(match_operand:MVE_7 1 "register_operand") + (match_operand:MVE_7 2 "zero_operand")]) + (label_ref (match_operand 3 "" "")) + (pc)))] + "TARGET_HAVE_MVE" +{ + rtx val = gen_reg_rtx (SImode); + emit_move_insn (val, gen_lowpart (SImode, operands[1])); + emit_jump_insn (gen_cbranchsi4 (operands[0], val, const0_rtx, operands[3])); + DONE; +}) + ;; Reinterpret operand 1 in operand 0's mode, without changing its contents. (define_expand "@arm_mve_reinterpret" [(set (match_operand:MVE_vecs 0 "register_operand") diff --git a/gcc/testsuite/gcc.target/arm/mve/vect-early-break-cbranch.c b/gcc/testsuite/gcc.target/arm/mve/vect-early-break-cbranch.c new file mode 100644 index 0000000000000000000000000000000000000000..c3b8506dca0b2b044e6869a6c8259d663c1ff930 --- /dev/null +++ b/gcc/testsuite/gcc.target/arm/mve/vect-early-break-cbranch.c @@ -0,0 +1,117 @@ +/* { dg-do compile } */ +/* { dg-require-effective-target arm_v8_1m_mve_ok } */ +/* { dg-add-options arm_v8_1m_mve } */ +/* { dg-options "-O3" } */ +/* { dg-final { check-function-bodies "**" "" "" } } */ + +#define N 640 +int a[N] = {0}; +int b[N] = {0}; + +/* +** f1: +** ... +** vcmp.s32 gt, q[0-9]+, q[0-9]+ +** vmrs r[0-9]+, p0 @ movhi +** cbnz r[0-9]+, \.L[0-9]+ +** ... +*/ +void f1 () +{ + for (int i = 0; i < N; i++) + { + b[i] += a[i]; + if (a[i] > 0) + break; + } +} + +/* +** f2: +** ... +** vcmp.s32 ge, q[0-9]+, q[0-9]+ +** vmrs r[0-9]+, p0 @ movhi +** cbnz r[0-9]+, \.L[0-9]+ +** ... +*/ +void f2 () +{ + for (int i = 0; i < N; i++) + { + b[i] += a[i]; + if (a[i] >= 0) + break; + } +} + +/* +** f3: +** ... +** vcmp.i32 eq, q[0-9]+, q[0-9]+ +** vmrs r[0-9]+, p0 @ movhi +** cbnz r[0-9]+, \.L[0-9]+ +** ... +*/ +void f3 () +{ + for (int i = 0; i < N; i++) + { + b[i] += a[i]; + if (a[i] == 0) + break; + } +} + +/* +** f4: +** ... +** vcmp.i32 ne, q[0-9]+, q[0-9]+ +** vmrs r[0-9]+, p0 @ movhi +** cbnz r[0-9]+, \.L[0-9]+ +** ... +*/ +void f4 () +{ + for (int i = 0; i < N; i++) + { + b[i] += a[i]; + if (a[i] != 0) + break; + } +} + +/* +** f5: +** ... +** vcmp.s32 lt, q[0-9]+, q[0-9]+ +** vmrs r[0-9]+, p0 @ movhi +** cbnz r[0-9]+, \.L[0-9]+ +** ... +*/ +void f5 () +{ + for (int i = 0; i < N; i++) + { + b[i] += a[i]; + if (a[i] < 0) + break; + } +} + +/* +** f6: +** ... +** vcmp.s32 le, q[0-9]+, q[0-9]+ +** vmrs r[0-9]+, p0 @ movhi +** cbnz r[0-9]+, \.L[0-9]+ +** ... +*/ +void f6 () +{ + for (int i = 0; i < N; i++) + { + b[i] += a[i]; + if (a[i] <= 0) + break; + } +} diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 8f58671e6cfd3546c6a98e40341fe31c6492594b..1eef764542a782786e27ed935a06243e319ae3fc 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -3785,6 +3785,8 @@ proc check_effective_target_vect_early_break { } { expr { [istarget aarch64*-*-*] || [check_effective_target_arm_neon_ok] + || ([check_effective_target_arm_v8_1m_mve_fp_ok] + && [check_effective_target_arm_little_endian]) }}] } # Return 1 if the target supports hardware vectorization of complex additions of