From patchwork Wed Jul 31 12:21:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wilco Dijkstra X-Patchwork-Id: 1967077 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=C/j6Mkre; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=C/j6Mkre; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=libc-alpha-bounces~incoming=patchwork.ozlabs.org@sourceware.org; receiver=patchwork.ozlabs.org) Received: from server2.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 ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WYrnj2Yckz1ybV for ; Wed, 31 Jul 2024 22:22:17 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 27FC13858424 for ; Wed, 31 Jul 2024 12:22:15 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2089.outbound.protection.outlook.com [40.107.22.89]) by sourceware.org (Postfix) with ESMTPS id 026153858C33 for ; Wed, 31 Jul 2024 12:21:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 026153858C33 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 026153858C33 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=40.107.22.89 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1722428517; cv=pass; b=AjLU2MGgSj9kjDckNfZt65Lnfvk9u4TaDL5ZZqyO15dzk//g3cyeT/SteLZA4xFzDp2BOpshjbtPbTao4fi6QOa8WRP3Sqyn2Lw0xmLzrN1r9dHygGUy16IuPkoZ64RvwscTcLknS70IaqyNcGKGZTK+Gn2giI5KCOGJzil7SNE= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1722428517; c=relaxed/simple; bh=ySRcXOvJeS0hgkOXkNsaEtyRz213+MoivzjzDGW/TEk=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-ID: MIME-Version; b=Ezpx2kWxtppHtrNn6uDqMIOlI4P3AOIaqfL/M085dwH3lcqXjn0EJxpN2MWsLC5wLxL8pu8kDXNGVTQHSppV9ghYdswC7+6kWmGeL801IYTh9ovU18PPvftRCbOrIEaEWaua0ErgU7RqNglJbYEdgV3Fgd6z+uZxYPSr9MKmcR0= ARC-Authentication-Results: i=3; server2.sourceware.org ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=QcsHjYSmdrr29aANUIcma8a+uCrmCYvrFYTCKwN5L2WeBIpgiCV8Pz3fM87YFHQfurrGqE4lVZ8vNbuh9Uz2LN2yrxQcuYvrHzvhHzQUsZ2+uSz0HooxQAOeIKua4tumSohoTeZfCAFl4n6GiG7jOyZuE8bX4DnKw1hawLdidtqAcI6mdNhmZ366DxBn1VjBd4u9QkwGs2X45a68jiow6PjvS2yWsjb12aaoGr6bCD5/mVbRvi3UpwRrDEobyv3/B1DpFjoGYinSsXrAC+OkHGXR3KgLFTi0XtPMBEOLSA8Hra3hy+0ERtKQPnGcdgNFDOTIbxUKfP1cSVgE55HnZg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=8datRPN3aNCj+ifcLTSHVU1LVL6FYNqLKLI9jlfYNnk=; b=mWFr/boN5ZCFZAR08uL6sLOm2taIoUMwggQdhtrwtmdpkzO/quGHGq1uPDfLZefS/0FczC4DEWjBaIp7vCpoBEGHsbh+68+IZdqmaCqX6BboTWNOyqM8k5QCYw3pR4pOQwmEx4SoYKeK2k314T/vyrGWHE07ihgkPfu++kg5FIyD8OSOmTdkFSW+z1UL6skdQx11Z4FFXHFjaXIos5gzrAiQ+hz15174PkXBE4rrmqCAKa0b688vVz4TVfyaHIYf8DASNDkqzqfeclOhxkTJMNvT/TueKfGwupz4WflbKlCxPyUv2RyM36lysBuOxh90VHQCgZUl6wgvqJ+cJOYnmw== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=sourceware.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=arm.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=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=8datRPN3aNCj+ifcLTSHVU1LVL6FYNqLKLI9jlfYNnk=; b=C/j6MkreEZaj4QInsK9n5DniCjCUpuUph/BmeJF56ECy9S2abulmz7lkzPWeUYUM6dEB0A8aiRLuA1AazmFw6RrK5JipWkn4TfZZlcJZ03ysjQ9TXdtmVrSQQ48UQhHfLzM4hipl5RuKPBmD4DPxKg+DKwTeV/1cQYVS1Lpw3+Y= Received: from AS9PR06CA0153.eurprd06.prod.outlook.com (2603:10a6:20b:45c::17) by DBBPR08MB5929.eurprd08.prod.outlook.com (2603:10a6:10:208::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7828.19; Wed, 31 Jul 2024 12:21:53 +0000 Received: from AMS0EPF0000019D.eurprd05.prod.outlook.com (2603:10a6:20b:45c:cafe::a5) by AS9PR06CA0153.outlook.office365.com (2603:10a6:20b:45c::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.34 via Frontend Transport; Wed, 31 Jul 2024 12:21:53 +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=arm.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 AMS0EPF0000019D.mail.protection.outlook.com (10.167.16.249) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.7828.19 via Frontend Transport; Wed, 31 Jul 2024 12:21:51 +0000 Received: ("Tessian outbound de9676d3a70f:v365"); Wed, 31 Jul 2024 12:21:51 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: f6cd2496b6e1cb60 X-CR-MTA-TID: 64aa7808 Received: from L3d8f6850234d.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 8B989A83-F464-43E6-A50B-D8778B493464.1; Wed, 31 Jul 2024 12:21:45 +0000 Received: from EUR05-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id L3d8f6850234d.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 31 Jul 2024 12:21:45 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=xC+r1bAOvWihY35g4a0iZKZoKNKnr71wOWBBCYatvI/QZoSy3d5DM8KUBNfe5A4CHzhQ1iQyEFIWYBLiaNT9mdaV36rBoImOd/vKc7XEyzidaWWrMIciZH9T8EVuzqHzKO6pJKLCoxrwMCkd2tyuyalLnwBAjc8MZcpe0BeaZ9SWoyx/uRX2ch6AbYbx2xWZCsAtYGoIOXlpyPbJz4rZNbAPMU2jI/cJ58pGEjc4lgoaXjyjNead5zBWqc9vekHTmiKB4oHEs1ZpICTRLyRKSxpSE4UdP+VGxev7j+xi462bPh4ZCZgrRup6ux9T0EaDNDSV1ZSPd5sRGXV5Dm/Bpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=8datRPN3aNCj+ifcLTSHVU1LVL6FYNqLKLI9jlfYNnk=; b=HyBfzqXOjjYfEHxVlDb+6Q6L3ZMEqk9mNMCYvo19HtkN2hggrI0yzJQJomVVGufUiF2s07QFJfTsrXc1k60+SGSXf+9y69a6brC+EitzypU691SwyG4Pr6A5KAHvhIECxtfdFAUtqVOi35nIvwG4xYR1odDlme+KT/JdvM6ui+H5n11dt7Tg4Y4tDr0PUqdcIXzjLKliKUnOUD6qG4inszUqB5SwMwQLWKoq38eqQhqlwNnJuy15qyLQH9UIrLh8KR1AJ/GdAzfZwDkejZkWaSu9ZJGCu/k3BgyPACzip8LmHuozjP66wiVms9wesMORVCv9MH0LUcslC/le02rDQA== 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=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=8datRPN3aNCj+ifcLTSHVU1LVL6FYNqLKLI9jlfYNnk=; b=C/j6MkreEZaj4QInsK9n5DniCjCUpuUph/BmeJF56ECy9S2abulmz7lkzPWeUYUM6dEB0A8aiRLuA1AazmFw6RrK5JipWkn4TfZZlcJZ03ysjQ9TXdtmVrSQQ48UQhHfLzM4hipl5RuKPBmD4DPxKg+DKwTeV/1cQYVS1Lpw3+Y= Received: from PAWPR08MB8982.eurprd08.prod.outlook.com (2603:10a6:102:33f::20) by DU0PR08MB9324.eurprd08.prod.outlook.com (2603:10a6:10:41f::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7807.28; Wed, 31 Jul 2024 12:21:42 +0000 Received: from PAWPR08MB8982.eurprd08.prod.outlook.com ([fe80::b366:6358:236e:352d]) by PAWPR08MB8982.eurprd08.prod.outlook.com ([fe80::b366:6358:236e:352d%6]) with mapi id 15.20.7807.026; Wed, 31 Jul 2024 12:21:42 +0000 From: Wilco Dijkstra To: 'GNU C Library' Subject: [PATCH] AArch64: Improve generic strlen Thread-Topic: [PATCH] AArch64: Improve generic strlen Thread-Index: AQHa40P32mvRTEnLEUGZuneo9Mpk5Q== Date: Wed, 31 Jul 2024 12:21:42 +0000 Message-ID: Accept-Language: en-GB, en-US Content-Language: en-GB X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; x-ms-traffictypediagnostic: PAWPR08MB8982:EE_|DU0PR08MB9324:EE_|AMS0EPF0000019D:EE_|DBBPR08MB5929:EE_ X-MS-Office365-Filtering-Correlation-Id: 955a519a-0f84-49ad-c042-08dcb15b5bc3 x-checkrecipientrouted: true nodisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; ARA:13230040|366016|1800799024|376014|38070700018; X-Microsoft-Antispam-Message-Info-Original: =?iso-8859-1?q?MrADDxDxSxdu/L6JQ?= =?iso-8859-1?q?deAqp6Jcm1PCFcxMn/s0Ua3fmbrpsL2tiC+byygydnYrkJF7X5hfPnQGrozm?= =?iso-8859-1?q?iysfiaW6VEY6w6sxTFbHEM3VKWK+pBj6mOJZczGkYdpJbEpaJvbYLQEqi//G?= =?iso-8859-1?q?gl77a2eZQG+/PcfTaQUTOQht4dAs7yv7vKmOQOOrLGe+GK0zUdErD2gJULiK?= =?iso-8859-1?q?Q42+o9G0NQI8CsX3G7sIq4rLXdddjtz98MvgwRiQR3NLMPkhlMJC10gdTyiC?= =?iso-8859-1?q?siYysWVlsThLYWj3nux6IJnqBkV2/PlD1rQTjRlzF9RNab/AxMFWUPM4w7sy?= =?iso-8859-1?q?XvKNd+veD7Nf5qTfAp661duUkF2+BmwlBj4XcCfSxnGsKXLhl+PmJKBz/id2?= =?iso-8859-1?q?uTtHTRXpWI9KuI3C5kGuhxMwQjZt2WsLKD3NeVkHuluPoPCNSAQD8bIvOHdY?= =?iso-8859-1?q?OgTvWpiwqu4UPc27C9zGmpg0o2aGJcRjpaKDjtq5UMogXKbMfrfibS5q/jGo?= =?iso-8859-1?q?2t6nEvPOlv0XWBK8CFnZqImT1gPjoc1ROuN+fWlLXRj9qLOC0sEwQ0EsInJw?= =?iso-8859-1?q?qyh3XMGQ2PWYIUExijPTnHMl4ua0RLeOCuG7tpwa65kmTg9yI6YZU0UqZXzo?= =?iso-8859-1?q?Wh7Zr9VkTvT64z4zPXzD/xdI8ArZEXbHjCMzGzquRAAYJGcKMUyM5BuIO4dA?= =?iso-8859-1?q?J7sEUj5rdRkcmMHzHruLG0MHTOQF2JJ5fn1c8j36W/lR6rHpJdhEqIbuPjFd?= =?iso-8859-1?q?QCaQwAdYg3TdaHU4RzL7DNESwX3GwQS5+vuu/rx+s0yf8rfrr1cdW/4SbP8j?= =?iso-8859-1?q?qNcK9r5tnIdWZpm2y5A230PnPh40yF9lHMdwgzS3imoQ0k1kVxRWNZb74wGC?= =?iso-8859-1?q?clMEHj6lGKlkjLBIl5r0bwKSvnuK5Jdy6PEX2v4c/L6bCg0f6pHc0ptOZRUs?= =?iso-8859-1?q?xC0g7QPT/tiHYqwackquF7lcthd4JJStxyBH3xCdWm0dFiUYHJAEc1ts4s+a?= =?iso-8859-1?q?ATWlbr/t72JZHJyh/YKLBd0lbKSSXiYhUpo7PTH7qCal96o5FYYQI7xaP657?= =?iso-8859-1?q?/odhmVBfbYGVBOASlC1aanDN3kUJRVmaJpFcpEF/P7h94qup5t1Ms589HHMa?= =?iso-8859-1?q?INlk4E66pLb/YdNe7gRppuKiaGZtr/qQsrOce51qUVY2GPY4JJjjNT43hQ/N?= =?iso-8859-1?q?MsTKkEr0HjtBhg1FhQA/pIjrQ/EDxcfX3yVVWPvYCps+hRgqDASDy93TE8hV?= =?iso-8859-1?q?JwJvVKywfcw3ebFUA/o1jE/Xxx1v6cOWg9kFvCBVEVGwr70ZgA6FEfqx239S?= =?iso-8859-1?q?M622FtxiR2/62vwyPOnmmQSrny1iGQ4INBkMYXKOHdE+inuEpfnHDntAZPv3?= =?iso-8859-1?q?G/nRI2+SDQ3SLnejNACRPx5vdc+4slj0WAyqHeK4iX/yFqc2qyRn8+oQ+FNt?= =?iso-8859-1?q?g1h6PtcdQN7OSN+u0rCkr7vnMWqnPi4Xg=3D=3D?= X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PAWPR08MB8982.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(366016)(1800799024)(376014)(38070700018); DIR:OUT; SFP:1101; MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR08MB9324 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-SkipListedInternetSender: ip=[2603:10a6:102:33f::20]; domain=PAWPR08MB8982.eurprd08.prod.outlook.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: AMS0EPF0000019D.eurprd05.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 46b32ace-d77f-4929-b217-08dcb15b564d X-Microsoft-Antispam: BCL:0; ARA:13230040|35042699022|82310400026|36860700013|376014|1800799024; X-Microsoft-Antispam-Message-Info: =?iso-8859-1?q?pjfk3Ac/2H1n1Ebk6Rgh9+kd3O?= =?iso-8859-1?q?K3O/t2GICzD7nqo2SC5Im/UBJQfg5SXT2iX/YsaycQ/bBVB46MM24wsGFvAl?= =?iso-8859-1?q?rpwFHgT9uMxJAXvLpXxc1uF8lA9BArGN8fLSaLo2F89dYeSieEWCZIlG6xwk?= =?iso-8859-1?q?4k+FGbGfbE3AiymHJVfA1sBwglG3Hz9liQJKy5fEKOgp7pYRntvda47tJrxm?= =?iso-8859-1?q?/ACtodTsTqYHiQH4HyevMOI5CMTns/hW0e1EZIVq+gGgkYmC5FPZmAkoTcKW?= =?iso-8859-1?q?wPEWOjxB3Vl/oQBkP8W/3EJoL5gpwGr+2EeHIYgiAdOwRdTa5a0WIsnlPtol?= =?iso-8859-1?q?gZD+RHBU064jWu8/PJjCctuEpEmVnuRLTsXKJnyCOtEzAPP0h9JmsDm1K2wp?= =?iso-8859-1?q?5MRbOTlc0qM5Gpr4NoUlIcvyVUCK/b3DFEwFpGugr1YE0gXLSwUcyK6LXWi0?= =?iso-8859-1?q?RyHPzuehbj3WcSFFgA9lD+CvN4ISMKm34A/SZX5LhTTBCNg6hA53ahKioioq?= =?iso-8859-1?q?HzHPju59aSOE3chU7j9y4c6psO9Nio8dOwQACjy4qK5/9P4h3jhdaQ3oilM7?= =?iso-8859-1?q?zbgYJBgoNNkbA01/udjv8VhwWESVid+6F/FpptE2/IIBQVdnShrIPcgocLdI?= =?iso-8859-1?q?jFbqmkLEz79Q3H1ulEGkO7j4s4Xj5ZUvvwXfRJ0vgxj5LQ0YKRh9nC2t6J6K?= =?iso-8859-1?q?inwbN86S85wETWtqophvaHJsK0IeFGFDJ/CC+LPM6aupWIlLxQc5pygxpCza?= =?iso-8859-1?q?q8Q3G8aMsMDX5LzRvgy2EFUmHQa5/nC4VSaHsbzNZX1jI5eDSqvRjr8Jm5cq?= =?iso-8859-1?q?ASHN2fLmy+doFSjVu0HljcMmPh3zp03U7XlDi7r0D9CcxWCSc8ivxJWV30Vy?= =?iso-8859-1?q?YNcejFfKkG254IK5Tll6U/mJMTrEdbRSf3bw/y9hxLkrWcDm6BiGketAySfl?= =?iso-8859-1?q?6EbpNfF6LCun+z6iljoju6tw+KadWz9qXnRbG3ggMZOVQbdxYCPTapbps0jk?= =?iso-8859-1?q?LBHIzGXO8jCIiHZl/jV3/wuZpIKh7CzneQU2qJFo86KDFzW7kI/3NHVB5uLG?= =?iso-8859-1?q?DittMFMTfCwExrzpQyV540km2bZOUwHvk8pXTPSCcwVwn4+syDTaMV/SEKoT?= =?iso-8859-1?q?D/crQ6M4I7kvxXleS78BPkP40H9xT3WAyQY1b5SYEKCtJAbJZAZtaBpXz8fX?= =?iso-8859-1?q?o99KzZqTWXlZtSHaIF/DuvLaRGYzk8W5I7m4y01tRl8UoPQ1lSdmYIXvUiob?= =?iso-8859-1?q?XdaC62XasaANbRCzeG+JyHfytcYErFZgtfgPBgI4N9OhnfG9IRjlq3VQaVxr?= =?iso-8859-1?q?4JVUElZG+PLvEGD0gHsP9rc9rkPttmMZ+7csWL+96tceWaA+5dZ94r+Gm6XF?= =?iso-8859-1?q?t4xFAOaPVzUqBKAi8PbGiZzabvSIRvk/BRdHPXqxmJ/JE3SAMA1uFYHQlkzj?= =?iso-8859-1?q?VFqgEZQqb1JA19jmwYe/LK7i4Cg2ok/gIiM3BZpFZtgGNufbf9gGqLZswEZe?= =?iso-8859-1?q?NdJ+LB?= 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:(13230040)(35042699022)(82310400026)(36860700013)(376014)(1800799024); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Jul 2024 12:21:51.8994 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 955a519a-0f84-49ad-c042-08dcb15b5bc3 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: AMS0EPF0000019D.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR08MB5929 X-Spam-Status: No, score=-11.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FORGED_SPF_HELO, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_NONE, TXREP, 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: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~incoming=patchwork.ozlabs.org@sourceware.org Improve performance by handling another 16 bytes before entering the loop. Use ADDHN in the loop to avoid SHRN+FMOV when it terminates. Change final size computation to avoid increasing latency. On Neoverse V1 performance of the random strlen benchmark improves by 4.6%. OK for commit? Reviewed-by: Adhemerval Zanella diff --git a/sysdeps/aarch64/strlen.S b/sysdeps/aarch64/strlen.S index ab2a576cdb5665e596b791299af3f4abecb73c0e..352fb40d3abbb44bc1cc604cfd1c86fdc8f8e251 100644 --- a/sysdeps/aarch64/strlen.S +++ b/sysdeps/aarch64/strlen.S @@ -1,4 +1,5 @@ -/* Copyright (C) 2012-2024 Free Software Foundation, Inc. +/* Generic optimized strlen using SIMD. + Copyright (C) 2012-2024 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -56,36 +57,50 @@ ENTRY (STRLEN) shrn vend.8b, vhas_nul.8h, 4 /* 128->64 */ fmov synd, dend lsr synd, synd, shift - cbz synd, L(loop) + cbz synd, L(next16) rbit synd, synd clz result, synd lsr result, result, 2 ret +L(next16): + ldr data, [src, 16] + cmeq vhas_nul.16b, vdata.16b, 0 + shrn vend.8b, vhas_nul.8h, 4 /* 128->64 */ + fmov synd, dend + cbz synd, L(loop) + add src, src, 16 +#ifndef __AARCH64EB__ + rbit synd, synd +#endif + sub result, src, srcin + clz tmp, synd + add result, result, tmp, lsr 2 + ret + .p2align 5 L(loop): - ldr data, [src, 16] + ldr data, [src, 32]! cmeq vhas_nul.16b, vdata.16b, 0 - umaxp vend.16b, vhas_nul.16b, vhas_nul.16b + addhn vend.8b, vhas_nul.8h, vhas_nul.8h fmov synd, dend cbnz synd, L(loop_end) - ldr data, [src, 32]! + ldr data, [src, 16] cmeq vhas_nul.16b, vdata.16b, 0 - umaxp vend.16b, vhas_nul.16b, vhas_nul.16b + addhn vend.8b, vhas_nul.8h, vhas_nul.8h fmov synd, dend cbz synd, L(loop) - sub src, src, 16 + add src, src, 16 L(loop_end): - shrn vend.8b, vhas_nul.8h, 4 /* 128->64 */ - sub result, src, srcin - fmov synd, dend + sub result, shift, src, lsl 2 /* (srcin - src) << 2. */ #ifndef __AARCH64EB__ rbit synd, synd + sub result, result, 3 #endif - add result, result, 16 clz tmp, synd - add result, result, tmp, lsr 2 + sub result, tmp, result + lsr result, result, 2 ret END (STRLEN)