[llvm] [TLI] Add glibc 2.35 libmvec vector functions to the x86 table (PR #223817)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 28 04:09:32 PDT 2026
anun333 wrote:
A data point for the choice between the two forms. I counted how many of
glibc 2.35's 52 x86 libmvec functions (26, in float and double) clang
vectorizes to a libmvec call in a plain loop (`y[i] = f(x[i])`, or
`f(x[i], z[i])`, over restrict pointers), with `-O2 -fveclib=libmvec
-fno-math-errno`:
- clang 18.1.3: 10, at `-msse2`, `-mavx2` and `-mavx512f`
- main at 60dd6268b: 28 at each
- this PR's current head (262200e9d, `_ZGVb` rows only): 52 at each. At
`-mavx2`, though, the 24 functions it adds are called only through their
128-bit `_ZGVb` entry points (e.g. `_ZGVbN4v_exp2f`), while the 28 that
main already had get 256-bit `_ZGVd` calls (e.g. `_ZGVdN8v_expf`)
- the full row set (the branch as of 4de284694): 52 at each, and all 52
get `_ZGVd` calls at `-mavx2`
So the `_ZGVb`-only form gives full coverage now, at half the vector
width on AVX2 for the new functions until #162239 lets their `_ZGVd` rows
in. Every emitted name resolved in a libmvec that exports glibc 2.35's
full set (https://github.com/anun333/crmvec).
(Measured and written with AI assistance (Claude); I checked the figures
before posting.)
https://github.com/llvm/llvm-project/pull/223817
More information about the llvm-commits
mailing list