{"id":2222682,"url":"http://patchwork.ozlabs.org/api/1.2/patches/2222682/?format=json","web_url":"http://patchwork.ozlabs.org/project/glibc/patch/20260413123702.254-1-yeweihong@huawei.com/","project":{"id":41,"url":"http://patchwork.ozlabs.org/api/1.2/projects/41/?format=json","name":"GNU C Library","link_name":"glibc","list_id":"libc-alpha.sourceware.org","list_email":"libc-alpha@sourceware.org","web_url":"","scm_url":"","webscm_url":"","list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<20260413123702.254-1-yeweihong@huawei.com>","list_archive_url":null,"date":"2026-04-13T12:36:57","name":"aarch64: Optimize memcmp for Kunpeng 950 with SVE","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"9159148ec86c5a15cc300bdea6514d573bc99aaa","submitter":{"id":92549,"url":"http://patchwork.ozlabs.org/api/1.2/people/92549/?format=json","name":"Weihong Ye","email":"yeweihong@huawei.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/glibc/patch/20260413123702.254-1-yeweihong@huawei.com/mbox/","series":[{"id":499694,"url":"http://patchwork.ozlabs.org/api/1.2/series/499694/?format=json","web_url":"http://patchwork.ozlabs.org/project/glibc/list/?series=499694","date":"2026-04-13T12:36:57","name":"aarch64: Optimize memcmp for Kunpeng 950 with SVE","version":1,"mbox":"http://patchwork.ozlabs.org/series/499694/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/2222682/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2222682/checks/","tags":{},"related":[],"headers":{"Return-Path":"<libc-alpha-bounces~incoming=patchwork.ozlabs.org@sourceware.org>","X-Original-To":["incoming@patchwork.ozlabs.org","libc-alpha@sourceware.org"],"Delivered-To":["patchwork-incoming@legolas.ozlabs.org","libc-alpha@sourceware.org"],"Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=huawei.com header.i=@huawei.com header.a=rsa-sha256\n header.s=dkim header.b=URV7b88I;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org\n (client-ip=38.145.34.32; helo=vm01.sourceware.org;\n envelope-from=libc-alpha-bounces~incoming=patchwork.ozlabs.org@sourceware.org;\n receiver=patchwork.ozlabs.org)","sourceware.org;\n\tdkim=pass (1024-bit key,\n unprotected) header.d=huawei.com header.i=@huawei.com header.a=rsa-sha256\n header.s=dkim header.b=URV7b88I","sourceware.org; dmarc=pass (p=quarantine dis=none)\n header.from=huawei.com","sourceware.org; spf=pass smtp.mailfrom=huawei.com","server2.sourceware.org;\n arc=none smtp.remote-ip=113.46.200.224"],"Received":["from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fvRlP28h0z1yDF\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 13 Apr 2026 22:38:09 +1000 (AEST)","from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id 22F114BA2E15\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 13 Apr 2026 12:38:07 +0000 (GMT)","from canpmsgout09.his.huawei.com (canpmsgout09.his.huawei.com\n [113.46.200.224])\n by sourceware.org (Postfix) with ESMTPS id E3E644BA2E06\n for <libc-alpha@sourceware.org>; Mon, 13 Apr 2026 12:37:11 +0000 (GMT)","from mail.maildlp.com (unknown [172.19.162.92])\n by canpmsgout09.his.huawei.com (SkyGuard) with ESMTPS id 4fvRZx1wWrz1cyQc;\n Mon, 13 Apr 2026 20:30:49 +0800 (CST)","from kwepemh100005.china.huawei.com (unknown [7.202.181.88])\n by mail.maildlp.com (Postfix) with ESMTPS id A067B40562;\n Mon, 13 Apr 2026 20:37:05 +0800 (CST)","from huawei.com (100.105.34.199) by kwepemh100005.china.huawei.com\n (7.202.181.88) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.36; Mon, 13 Apr\n 2026 20:37:04 +0800"],"DKIM-Filter":["OpenDKIM Filter v2.11.0 sourceware.org 22F114BA2E15","OpenDKIM Filter v2.11.0 sourceware.org E3E644BA2E06"],"DMARC-Filter":"OpenDMARC Filter v1.4.2 sourceware.org E3E644BA2E06","ARC-Filter":"OpenARC Filter v1.0.0 sourceware.org E3E644BA2E06","ARC-Seal":"i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1776083833; cv=none;\n b=YuiBH7zNRVn1lhaHQIiSATccLT5NxOqsJY1+Ladmpoj0DVqLdWNKKs7E79sqd/XW2A54/paoSSMrUPpwX8TkSFQo9v7Apzme++2b3VlnF/ZMo0x+rbtWNT6Iaz7Jli//riAj0tXm16Ayqrtjekvs1RAknEnkcoIuID3CM2pWygY=","ARC-Message-Signature":"i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1776083833; c=relaxed/simple;\n bh=UzCrQEPBB9Rsa87wDbK7r1yGNFR5y9WapCUECP52MDI=;\n h=dkim-signature:From:To:Subject:Date:Message-ID:MIME-Version;\n b=f5pH91361bOnHZWPRsufzvsOHRVg/GxwwnxycGBdXs33TUHITnVZ9UNUTzO8EEb2BJ1f3yNLuA2J5ciubS5hOaU5uxRdTYzVGEYJu7IhOP326YBGT5I/QCjT/2M7EMT4lUNxwWV6bLcFNY2SjBGlM0+yeMFFdM5HJnB68iXHuEg=","ARC-Authentication-Results":"i=1; server2.sourceware.org","dkim-signature":"v=1; a=rsa-sha256; d=huawei.com; s=dkim;\n c=relaxed/relaxed; q=dns/txt; h=From;\n bh=C/v0OPbuSBwBjU1gbizcRKF0iXLGF2C33VplquXdBc4=;\n b=URV7b88Izmq/mZZx+a5uMq3ggUp00Z0a6C1CAATTO853i9kPUIiIxEQ23C702f43szZ5dpq8Q\n jQ9rYRzz3P+AaTltUvaG7Aa+rJgMlEOMWVVInPEGISPR6Oke/JCoFe5qCAQDmS0aPWmA44GnmVn\n fo8WGhpunEd7DYjoEhuzB6c=","From":"Weihong Ye <yeweihong@huawei.com>","To":"<libc-alpha@sourceware.org>","CC":"<wilco.dijkstra@arm.com>, <weihong_ye@foxmail.com>,\n <fanzhenhao@huawei.com>, <liuyang645@huawei.com>","Subject":"[PATCH] aarch64: Optimize memcmp for Kunpeng 950 with SVE","Date":"Mon, 13 Apr 2026 20:36:57 +0800","Message-ID":"<20260413123702.254-1-yeweihong@huawei.com>","X-Mailer":"git-send-email 2.50.1.windows.1","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Content-Type":"text/plain","X-Originating-IP":"[100.105.34.199]","X-ClientProxiedBy":"kwepems500002.china.huawei.com (7.221.188.17) To\n kwepemh100005.china.huawei.com (7.202.181.88)","X-BeenThere":"libc-alpha@sourceware.org","X-Mailman-Version":"2.1.30","Precedence":"list","List-Id":"Libc-alpha mailing list <libc-alpha.sourceware.org>","List-Unsubscribe":"<https://sourceware.org/mailman/options/libc-alpha>,\n <mailto:libc-alpha-request@sourceware.org?subject=unsubscribe>","List-Archive":"<https://sourceware.org/pipermail/libc-alpha/>","List-Post":"<mailto:libc-alpha@sourceware.org>","List-Help":"<mailto:libc-alpha-request@sourceware.org?subject=help>","List-Subscribe":"<https://sourceware.org/mailman/listinfo/libc-alpha>,\n <mailto:libc-alpha-request@sourceware.org?subject=subscribe>","Errors-To":"libc-alpha-bounces~incoming=patchwork.ozlabs.org@sourceware.org"},"content":"Key optimizations:\n- Use predicate registers for branch-free handling of short inputs and tails\n- Use 4-way loop unrolling to maximize pipeline utilization\n- Optimize mismatch detection with early exit logic\n\nBenchmark (bench-memcmp, generic -> this patch):\n- Small (0-128B): 15% - 50% speedup\n- Medium (128-1024B): 21% - 50% speedup\n- Large (2048-8192B): 28% - 60% speedup\n\nNote: regressions may be observed in edge cases where offsets\nare near 4K boundaries. These instances are rare and the overall\nperformance gain remains significantly positive.\n\nAlso add IFUNC support for memcmp and correct the first-line\ncomment in memcpy_kunpeng950.S.\n---\n sysdeps/aarch64/memcmp.S                      |  13 +-\n sysdeps/aarch64/multiarch/Makefile            |   2 +\n sysdeps/aarch64/multiarch/ifunc-impl-list.c   |   5 +-\n sysdeps/aarch64/multiarch/memcmp.c            |  54 +++++\n sysdeps/aarch64/multiarch/memcmp_generic.S    |  42 ++++\n sysdeps/aarch64/multiarch/memcmp_kunpeng950.S | 195 ++++++++++++++++++\n sysdeps/aarch64/multiarch/memcpy_kunpeng950.S |   2 +-\n 7 files changed, 306 insertions(+), 7 deletions(-)\n create mode 100644 sysdeps/aarch64/multiarch/memcmp.c\n create mode 100644 sysdeps/aarch64/multiarch/memcmp_generic.S\n create mode 100644 sysdeps/aarch64/multiarch/memcmp_kunpeng950.S","diff":"diff --git a/sysdeps/aarch64/memcmp.S b/sysdeps/aarch64/memcmp.S\nindex f177520d63..e33086b4eb 100644\n--- a/sysdeps/aarch64/memcmp.S\n+++ b/sysdeps/aarch64/memcmp.S\n@@ -42,8 +42,11 @@\n #define src1end\tx7\n #define src2end\tx8\n \n+#ifndef MEMCMP\n+# define MEMCMP memcmp\n+#endif\n \n-ENTRY (memcmp)\n+ENTRY (MEMCMP)\n \tcmp\tlimit, 16\n \tb.lo\tL(less16)\n \tldp\tdata1, data3, [src1]\n@@ -197,10 +200,10 @@ L(loop64):\n \tcneg\tresult, result, lo\n \tret\n \n-END (memcmp)\n+END (MEMCMP)\n #undef bcmp\n-weak_alias (memcmp, bcmp)\n+weak_alias (MEMCMP, bcmp)\n #undef __memcmpeq\n-strong_alias (memcmp, __memcmpeq)\n-libc_hidden_builtin_def (memcmp)\n+strong_alias (MEMCMP, __memcmpeq)\n+libc_hidden_builtin_def (MEMCMP)\n libc_hidden_def (__memcmpeq)\ndiff --git a/sysdeps/aarch64/multiarch/Makefile b/sysdeps/aarch64/multiarch/Makefile\nindex 988f7cec25..38952655b1 100644\n--- a/sysdeps/aarch64/multiarch/Makefile\n+++ b/sysdeps/aarch64/multiarch/Makefile\n@@ -1,5 +1,7 @@\n ifeq ($(subdir),string)\n sysdep_routines += \\\n+  memcmp_generic \\\n+  memcmp_kunpeng950 \\\n   memcpy_a64fx \\\n   memcpy_generic \\\n   memcpy_kunpeng950 \\\ndiff --git a/sysdeps/aarch64/multiarch/ifunc-impl-list.c b/sysdeps/aarch64/multiarch/ifunc-impl-list.c\nindex ea5f5853c3..d43f6b58ee 100644\n--- a/sysdeps/aarch64/multiarch/ifunc-impl-list.c\n+++ b/sysdeps/aarch64/multiarch/ifunc-impl-list.c\n@@ -33,7 +33,10 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array,\n \n   INIT_ARCH ();\n \n-  /* Support sysdeps/aarch64/multiarch/memcpy.c, memmove.c and memset.c.  */\n+  /* Support sysdeps/aarch64/multiarch/memcmp.c, memcpy.c, memmove.c and memset.c.  */\n+  IFUNC_IMPL (i, name, memcmp,\n+\t      IFUNC_IMPL_ADD (array, i, memcmp, sve, __memcmp_kunpeng950)\n+\t      IFUNC_IMPL_ADD (array, i, memcmp, 1, __memcmp_generic))\n   IFUNC_IMPL (i, name, memcpy,\n \t      IFUNC_IMPL_ADD (array, i, memcpy, 1, __memcpy_oryon1)\n \t      IFUNC_IMPL_ADD (array, i, memcpy, sve, __memcpy_a64fx)\ndiff --git a/sysdeps/aarch64/multiarch/memcmp.c b/sysdeps/aarch64/multiarch/memcmp.c\nnew file mode 100644\nindex 0000000000..5c3dc63068\n--- /dev/null\n+++ b/sysdeps/aarch64/multiarch/memcmp.c\n@@ -0,0 +1,54 @@\n+/* Multiple versions of memcmp. AARCH64 version.\n+   Copyright (C) 2026 Free Software Foundation, Inc.\n+   Copyright The GNU Toolchain Authors.\n+   This file is part of the GNU C Library.\n+\n+   The GNU C Library is free software; you can redistribute it and/or\n+   modify it under the terms of the GNU Lesser General Public\n+   License as published by the Free Software Foundation; either\n+   version 2.1 of the License, or (at your option) any later version.\n+\n+   The GNU C Library is distributed in the hope that it will be useful,\n+   but WITHOUT ANY WARRANTY; without even the implied warranty of\n+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n+   Lesser General Public License for more details.\n+\n+   You should have received a copy of the GNU Lesser General Public\n+   License along with the GNU C Library; if not, see\n+   <https://www.gnu.org/licenses/>.  */\n+\n+/* Define multiple versions only for the definition in libc.  */\n+\n+#if IS_IN (libc)\n+/* Redefine memcmp so that the compiler won't complain about the type\n+   mismatch with the IFUNC selector in strong_alias, below.  */\n+# undef memcmp\n+# define memcmp __redirect_memcmp\n+# include <string.h>\n+# include <init-arch.h>\n+\n+extern __typeof (__redirect_memcmp) __libc_memcmp;\n+\n+extern __typeof (__redirect_memcmp) __memcmp_generic attribute_hidden;\n+extern __typeof (__redirect_memcmp) __memcmp_kunpeng950 attribute_hidden;\n+\n+static inline __typeof (__redirect_memcmp) *\n+select_memcmp_ifunc (void)\n+{\n+  INIT_ARCH ();\n+\n+  if (sve)\n+  {\n+    if (IS_KUNPENG950 (midr))\n+    {\n+      return __memcmp_kunpeng950;\n+    }\n+  }\n+  return __memcmp_generic;\n+}\n+\n+libc_ifunc (__libc_memcmp, select_memcmp_ifunc ());\n+\n+# undef memcmp\n+strong_alias (__libc_memcmp, memcmp);\n+#endif\ndiff --git a/sysdeps/aarch64/multiarch/memcmp_generic.S b/sysdeps/aarch64/multiarch/memcmp_generic.S\nnew file mode 100644\nindex 0000000000..9b24610814\n--- /dev/null\n+++ b/sysdeps/aarch64/multiarch/memcmp_generic.S\n@@ -0,0 +1,42 @@\n+/* A Generic Optimized memcmp implementation for AARCH64.\n+   Copyright (C) 2026 Free Software Foundation, Inc.\n+   This file is part of the GNU C Library.\n+\n+   The GNU C Library is free software; you can redistribute it and/or\n+   modify it under the terms of the GNU Lesser General Public\n+   License as published by the Free Software Foundation; either\n+   version 2.1 of the License, or (at your option) any later version.\n+\n+   The GNU C Library is distributed in the hope that it will be useful,\n+   but WITHOUT ANY WARRANTY; without even the implied warranty of\n+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n+   Lesser General Public License for more details.\n+\n+   You should have received a copy of the GNU Lesser General Public\n+   License along with the GNU C Library; if not, see\n+   <https://www.gnu.org/licenses/>.  */\n+\n+/* The actual memcmp code is in ../memcmp.S.  If we are\n+   building libc this file defines __memcmp_generic. Otherwise\n+   the include of ../memcmp.S will define the normal __memcmp\n+   entry points.  */\n+\n+#include <sysdep.h>\n+\n+#if IS_IN (libc)\n+\n+# define MEMCMP __memcmp_generic\n+\n+/* Do not hide the generic versions of memcmp, we use them\n+   internally.  */\n+# undef libc_hidden_builtin_def\n+# define libc_hidden_builtin_def(name)\n+\n+# ifdef SHARED\n+/* It doesn't make sense to send libc-internal memcmp calls through a PLT. */\n+\t.globl __GI_memcmp; __GI_memcmp = __memcmp_generic\n+# endif\n+\n+#endif\n+\n+#include \"../memcmp.S\"\ndiff --git a/sysdeps/aarch64/multiarch/memcmp_kunpeng950.S b/sysdeps/aarch64/multiarch/memcmp_kunpeng950.S\nnew file mode 100644\nindex 0000000000..5271fd7961\n--- /dev/null\n+++ b/sysdeps/aarch64/multiarch/memcmp_kunpeng950.S\n@@ -0,0 +1,195 @@\n+/* Optimized memcmp for Huawei Kunpeng 950 processor.\n+   Copyright (C) 2026 Free Software Foundation, Inc.\n+\n+   This file is part of the GNU C Library.\n+\n+   The GNU C Library is free software; you can redistribute it and/or\n+   modify it under the terms of the GNU Lesser General Public\n+   License as published by the Free Software Foundation; either\n+   version 2.1 of the License, or (at your option) any later version.\n+\n+   The GNU C Library is distributed in the hope that it will be useful,\n+   but WITHOUT ANY WARRANTY; without even the implied warranty of\n+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n+   Lesser General Public License for more details.\n+\n+   You should have received a copy of the GNU Lesser General Public\n+   License along with the GNU C Library.  If not, see\n+   <https://www.gnu.org/licenses/>.  */\n+\n+#include <sysdep.h>\n+\n+/* Assumptions:\n+ *\n+ * ARMv8.2-a, AArch64, Advanced SIMD, SVE, unaligned accesses\n+ *\n+ */\n+\n+.arch armv8.2-a+sve\n+\n+#define src1    x0\n+#define src2    x1\n+#define cnt     x2\n+#define current x3\n+#define safe_limit  x4\n+#define off_vl      x5\n+#define off_vlx2    x6\n+#define off_vlx3    x7\n+\n+ENTRY (__memcmp_kunpeng950)\n+    whilelo p0.b, xzr, cnt\n+    b.none  L(equal)\n+    rdvl    off_vl, #1\n+\n+    ld1b    z0.b, p0/z, [src1]\n+    ld1b    z1.b, p0/z, [src2]\n+    cmpne   p1.b, p0/z, z0.b, z1.b\n+    b.any   L(mismatch0)\n+\n+    whilelo p2.b, off_vl, cnt\n+    b.none  L(equal)\n+    rdvl    off_vlx2, #2\n+    ld1b    z2.b, p2/z, [src1, off_vl]\n+    ld1b    z3.b, p2/z, [src2, off_vl]\n+    cmpne   p3.b, p2/z, z2.b, z3.b\n+    b.any   L(mismatch1)\n+\n+    whilelo p4.b, off_vlx2, cnt\n+    b.none  L(equal)\n+    rdvl    off_vlx3, #3\n+    ld1b    z6.b, p4/z, [src1, off_vlx2]\n+    ld1b    z7.b, p4/z, [src2, off_vlx2]\n+    cmpne   p5.b, p4/z, z6.b, z7.b\n+    b.any   L(mismatch2)\n+\n+    whilelo p6.b, off_vlx3, cnt\n+    b.none  L(equal)\n+    rdvl    current, #4\n+    ld1b    z16.b, p6/z, [src1, off_vlx3]\n+    ld1b    z17.b, p6/z, [src2, off_vlx3]\n+    cmpne   p7.b, p6/z, z16.b, z17.b\n+    b.any   L(mismatch3)\n+\n+    subs    safe_limit, cnt, current\n+    csel    safe_limit, safe_limit, xzr, hs // Saturate to 0 if cnt < 4VL to prevent unsigned underflow\n+    cmp     current, safe_limit\n+    b.hi    L(tail_4xvl)\n+\n+    ptrue   p0.b\n+    .p2align 4\n+L(loop_full):\n+    addvl   off_vl, current, #1\n+    addvl   off_vlx2, current, #2\n+    addvl   off_vlx3, current, #3\n+\n+    ld1b    z0.b, p0/z, [src1, current]\n+    ld1b    z1.b, p0/z, [src2, current]\n+    cmpne   p1.b, p0/z, z0.b, z1.b\n+    b.any   L(mismatch0)\n+\n+    ld1b    z2.b, p0/z, [src1, off_vl]\n+    ld1b    z3.b, p0/z, [src2, off_vl]\n+    cmpne   p3.b, p0/z, z2.b, z3.b\n+    b.any   L(mismatch1_full)\n+\n+    ld1b    z6.b, p0/z, [src1, off_vlx2]\n+    ld1b    z7.b, p0/z, [src2, off_vlx2]\n+    cmpne   p5.b, p0/z, z6.b, z7.b\n+    b.any   L(mismatch2_full)\n+\n+    ld1b    z16.b, p0/z, [src1, off_vlx3]\n+    ld1b    z17.b, p0/z, [src2, off_vlx3]\n+    cmpne   p7.b, p0/z, z16.b, z17.b\n+    b.any   L(mismatch3_full)\n+\n+    addvl   current, current, #4\n+    cmp     current, safe_limit\n+    b.le    L(loop_full)\n+\n+L(tail_4xvl):\n+    whilelo p0.b, current, cnt\n+    b.none  L(equal)\n+    addvl   off_vl, current, #1\n+    ld1b    z0.b, p0/z, [src1, current]\n+    ld1b    z1.b, p0/z, [src2, current]\n+    cmpne   p1.b, p0/z, z0.b, z1.b\n+    b.any   L(mismatch0)\n+\n+    whilelo p2.b, off_vl, cnt\n+    b.none  L(equal)\n+    addvl   off_vlx2, current, #2\n+    ld1b    z2.b, p2/z, [src1, off_vl]\n+    ld1b    z3.b, p2/z, [src2, off_vl]\n+    cmpne   p3.b, p2/z, z2.b, z3.b\n+    b.any   L(mismatch1)\n+\n+    whilelo p4.b, off_vlx2, cnt\n+    b.none  L(equal)\n+    addvl   off_vlx3, current, #3\n+    ld1b    z6.b, p4/z, [src1, off_vlx2]\n+    ld1b    z7.b, p4/z, [src2, off_vlx2]\n+    cmpne   p5.b, p4/z, z6.b, z7.b\n+    b.any   L(mismatch2)\n+\n+    whilelo p6.b, off_vlx3, cnt\n+    b.none  L(equal)\n+    ld1b    z16.b, p6/z, [src1, off_vlx3]\n+    ld1b    z17.b, p6/z, [src2, off_vlx3]\n+    cmpne   p7.b, p6/z, z16.b, z17.b\n+    b.any   L(mismatch3)\n+\n+    b   L(equal)\n+\n+L(mismatch1_full):\n+    brkb    p2.b, p0/z, p3.b\n+    lasta   w0, p2, z2.b\n+    lasta   w1, p2, z3.b\n+    sub     x0, x0, x1\n+    ret\n+\n+L(mismatch2_full):\n+    brkb    p2.b, p0/z, p5.b\n+    lasta   w0, p2, z6.b\n+    lasta   w1, p2, z7.b\n+    sub     x0, x0, x1\n+    ret\n+\n+L(mismatch3_full):\n+    brkb    p2.b, p0/z, p7.b\n+    lasta   w0, p2, z16.b\n+    lasta   w1, p2, z17.b\n+    sub     x0, x0, x1\n+    ret\n+\n+L(mismatch0):\n+    brkb    p2.b, p0/z, p1.b\n+    lasta   w0, p2, z0.b\n+    lasta   w1, p2, z1.b\n+    sub     x0, x0, x1\n+    ret\n+\n+L(mismatch1):\n+    brkb    p0.b, p2/z, p3.b\n+    lasta   w0, p0, z2.b\n+    lasta   w1, p0, z3.b\n+    sub     x0, x0, x1\n+    ret\n+\n+L(mismatch2):\n+    brkb    p6.b, p4/z, p5.b\n+    lasta   w0, p6, z6.b\n+    lasta   w1, p6, z7.b\n+    sub     x0, x0, x1\n+    ret\n+\n+L(mismatch3):\n+    brkb    p4.b, p6/z, p7.b\n+    lasta   w0, p4, z16.b\n+    lasta   w1, p4, z17.b\n+    sub     x0, x0, x1\n+    ret\n+\n+L(equal):\n+    mov x0, #0\n+    ret\n+END (__memcmp_kunpeng950)\ndiff --git a/sysdeps/aarch64/multiarch/memcpy_kunpeng950.S b/sysdeps/aarch64/multiarch/memcpy_kunpeng950.S\nindex 82534f9c18..38a56303de 100644\n--- a/sysdeps/aarch64/multiarch/memcpy_kunpeng950.S\n+++ b/sysdeps/aarch64/multiarch/memcpy_kunpeng950.S\n@@ -1,4 +1,4 @@\n-/* Optimized memcpy for Huawei Kupeng 950 processor.\n+/* Optimized memcpy for Huawei Kunpeng 950 processor.\n    Copyright (C) 2026 Free Software Foundation, Inc.\n \n    This file is part of the GNU C Library.\n","prefixes":[]}