public inbox for glibc-bugs@sourceware.org help / color / mirror / Atom feed
From: "aurelien at aurel32 dot net" <sourceware-bugzilla@sourceware.org> To: glibc-bugs@sourceware.org Subject: [Bug string/29611] Optimized AVX2 string functions unconditionally use BMI2 instructions Date: Sat, 01 Oct 2022 16:52:50 +0000 [thread overview] Message-ID: <bug-29611-131-L6QLXHCoBC@http.sourceware.org/bugzilla/> (raw) In-Reply-To: <bug-29611-131@http.sourceware.org/bugzilla/> https://sourceware.org/bugzilla/show_bug.cgi?id=29611 --- Comment #31 from Aurelien Jarno <aurelien at aurel32 dot net> --- (In reply to Noah Goldstein from comment #12) > (In reply to Aurelien Jarno from comment #11) > > Before trying to fix that in older branches, we should start by fixing > > master. 3 groups of functions are using BMI2: memchr, strchr and strlen. > > * strchr is fixed by this commit: > > > > commit 83c5b368226c34a2f0a5287df40fc290b2b34359 > > Author: H.J. Lu <hjl.tools@gmail.com> > > Date: Mon Apr 19 10:45:07 2021 -0700 > > > > x86-64: Require BMI2 for strchr-avx2.S > > > > * strlen is fixed by this commit: > > > > commit aaa23c35071537e2dcf5807e956802ed215210aa > > Author: Noah Goldstein <goldstein.w.n@gmail.com> > > Date: Mon Apr 19 19:36:07 2021 -0400 > > > > x86: Optimize strlen-avx2.S > > > > * memchr is not yet fixed in master > memchr should be fine in master. It is not see: https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/x86_64/multiarch/ifunc-impl-list.c;h=a71444eccb3cb7cf59775408b3b2524397aaa2ec;hb=HEAD#l71 There are many more issues on master, so I am reopening the bug. I'll send a patch series fixing the issues. Once this is fixed in master, we can proceed with fixing the stable branches.(In reply to Noah Goldstein from comment #30) > (In reply to Noah Goldstein from comment #29) > > (In reply to Aurelien Jarno from comment #28) > > > (In reply to Noah Goldstein from comment #12) > > > > (In reply to Aurelien Jarno from comment #11) > > > > > Before trying to fix that in older branches, we should start by fixing > > > > > master. 3 groups of functions are using BMI2: memchr, strchr and strlen. > > > > > * strchr is fixed by this commit: > > > > > > > > > > commit 83c5b368226c34a2f0a5287df40fc290b2b34359 > > > > > Author: H.J. Lu <hjl.tools@gmail.com> > > > > > Date: Mon Apr 19 10:45:07 2021 -0700 > > > > > > > > > > x86-64: Require BMI2 for strchr-avx2.S > > > > > > > > > > * strlen is fixed by this commit: > > > > > > > > > > commit aaa23c35071537e2dcf5807e956802ed215210aa > > > > > Author: Noah Goldstein <goldstein.w.n@gmail.com> > > > > > Date: Mon Apr 19 19:36:07 2021 -0400 > > > > > > > > > > x86: Optimize strlen-avx2.S > > > > > > > > > > * memchr is not yet fixed in master > > > > memchr should be fine in master. > > > > > > It is not see: > > > > > > https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/x86_64/multiarch/ > > > ifunc-impl-list.c;h=a71444eccb3cb7cf59775408b3b2524397aaa2ec;hb=HEAD#l71 > > > > > > There are many more issues on master, so I am reopening the bug. I'll send a > > > patch series fixing the issues. Once this is fixed in master, we can proceed > > > with fixing the stable branches. > > > > That will break the internal test suite of GLIBC but the ifunc-impl-list > > isn't actually used for selecting which function version is used. > > > > In memchr's case it uses ifunc-evex.h: > > https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/x86_64/multiarch/ > > memchr.c;h=0c1555dd00f93777f7575f2a959171352b2ec845;hb=HEAD#l27 > > > > WHich does have a BMI2 check for avx2: > > https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/x86_64/multiarch/ > > ifunc-evex.h;h=310cfd269f5e4a4a94e96ab971201ae55a41b0b8;hb=HEAD#l38 > > > strcmp-avx2.S also has this bug. Yes and there are more, I am preparing a patchset. -- You are receiving this mail because: You are on the CC list for the bug.
next prev parent reply other threads:[~2022-10-01 16:52 UTC|newest] Thread overview: 69+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-09-25 8:17 [Bug string/29611] New: " aurelien at aurel32 dot net 2022-09-25 11:40 ` [Bug string/29611] " aurelien at aurel32 dot net 2022-09-25 13:57 ` goldstein.w.n at gmail dot com 2022-09-25 14:09 ` goldstein.w.n at gmail dot com 2022-09-25 14:11 ` goldstein.w.n at gmail dot com 2022-09-26 5:18 ` aurelien at aurel32 dot net 2022-09-26 5:19 ` aurelien at aurel32 dot net 2022-09-26 14:05 ` goldstein.w.n at gmail dot com 2022-09-26 17:52 ` hjl.tools at gmail dot com 2022-09-28 14:01 ` skpgkp2 at gmail dot com 2022-09-28 14:01 ` skpgkp2 at gmail dot com 2022-09-28 15:01 ` goldstein.w.n at gmail dot com 2022-09-28 15:10 ` aurelien at aurel32 dot net 2022-09-28 15:52 ` goldstein.w.n at gmail dot com 2022-09-28 15:57 ` skpgkp2 at gmail dot com 2022-09-28 23:14 ` skpgkp2 at gmail dot com 2022-09-28 23:15 ` skpgkp2 at gmail dot com 2022-09-29 1:26 ` hjl.tools at gmail dot com 2022-09-29 1:59 ` cvs-commit at gcc dot gnu.org 2022-09-29 1:59 ` cvs-commit at gcc dot gnu.org 2022-09-29 2:00 ` cvs-commit at gcc dot gnu.org 2022-09-29 2:00 ` cvs-commit at gcc dot gnu.org 2022-09-29 2:34 ` cvs-commit at gcc dot gnu.org 2022-09-29 2:34 ` cvs-commit at gcc dot gnu.org 2022-09-29 2:35 ` cvs-commit at gcc dot gnu.org 2022-09-29 2:36 ` cvs-commit at gcc dot gnu.org 2022-09-29 2:36 ` cvs-commit at gcc dot gnu.org 2022-09-29 3:11 ` cvs-commit at gcc dot gnu.org 2022-09-29 3:11 ` cvs-commit at gcc dot gnu.org 2022-09-29 23:26 ` sam at gentoo dot org 2022-09-30 20:02 ` hjl.tools at gmail dot com 2022-10-01 15:23 ` aurelien at aurel32 dot net 2022-10-01 16:24 ` goldstein.w.n at gmail dot com 2022-10-01 16:51 ` goldstein.w.n at gmail dot com 2022-10-01 16:52 ` aurelien at aurel32 dot net [this message] 2022-10-03 21:46 ` cvs-commit at gcc dot gnu.org 2022-10-03 21:46 ` cvs-commit at gcc dot gnu.org 2022-10-03 21:47 ` cvs-commit at gcc dot gnu.org 2022-10-03 21:47 ` cvs-commit at gcc dot gnu.org 2022-10-03 21:47 ` cvs-commit at gcc dot gnu.org 2022-10-03 21:47 ` cvs-commit at gcc dot gnu.org 2022-10-03 21:47 ` cvs-commit at gcc dot gnu.org 2022-10-03 21:51 ` cvs-commit at gcc dot gnu.org 2022-10-03 21:51 ` cvs-commit at gcc dot gnu.org 2022-10-03 21:51 ` cvs-commit at gcc dot gnu.org 2022-10-03 21:51 ` cvs-commit at gcc dot gnu.org 2022-10-03 21:51 ` cvs-commit at gcc dot gnu.org 2022-10-03 21:51 ` cvs-commit at gcc dot gnu.org 2022-10-03 21:51 ` cvs-commit at gcc dot gnu.org 2022-10-03 21:55 ` cvs-commit at gcc dot gnu.org 2022-10-03 21:55 ` cvs-commit at gcc dot gnu.org 2022-10-03 21:55 ` cvs-commit at gcc dot gnu.org 2022-10-03 21:56 ` cvs-commit at gcc dot gnu.org 2022-10-03 21:56 ` cvs-commit at gcc dot gnu.org 2022-10-03 21:56 ` cvs-commit at gcc dot gnu.org 2022-10-03 22:02 ` cvs-commit at gcc dot gnu.org 2022-10-03 22:02 ` cvs-commit at gcc dot gnu.org 2022-10-03 22:02 ` cvs-commit at gcc dot gnu.org 2022-10-03 22:02 ` cvs-commit at gcc dot gnu.org 2022-10-03 22:02 ` cvs-commit at gcc dot gnu.org 2022-10-03 22:02 ` cvs-commit at gcc dot gnu.org 2022-10-03 22:02 ` cvs-commit at gcc dot gnu.org 2022-10-03 22:05 ` cvs-commit at gcc dot gnu.org 2022-10-03 22:05 ` cvs-commit at gcc dot gnu.org 2022-10-03 22:05 ` cvs-commit at gcc dot gnu.org 2022-10-03 22:05 ` cvs-commit at gcc dot gnu.org 2022-10-03 22:05 ` cvs-commit at gcc dot gnu.org 2022-10-03 22:05 ` cvs-commit at gcc dot gnu.org 2022-10-04 5:05 ` aurelien at aurel32 dot net
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-29611-131-L6QLXHCoBC@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=glibc-bugs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).