Extend the x86_64 libmvec table in VecFuncs.def to the modern glibc set
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
Disclaimer: I way out of my dept re LLVM internals, so let me know how off-mark I am.
On x86_64, `-fveclib=libmvec` only vectorizes `sin cos tan pow exp log`. Everything else that glibc's libmvec exports (`exp2 log2 log10 expm1 log1p tanh sinh cosh asin acos atan cbrt …`) stays scalar, even though the host `libmvec.so` ships the kernel.
The small set is just the original MVP from https://github.com/llvm/llvm-project/commit/57cdc52c4df0 (sin/cos/exp/pow/log).
I think this was not a deliberate cap? AArch64 (#143696) and RISC-V (#119844) recently got the full glibc-2.40 set, so x86 now lags both its own glibc, AMDLIBM-on-x86, and libmvec-on-other-arches
Best regards!
Contributor guide
Research direction
Start with VecFuncs.def and inspect the existing x86_64 libmvec entries. Compare the table with the glibc-2.40 functions listed in the issue, then verify that the additional functions are selected for vectorization rather than remaining scalar; done means the modern libmvec set is represented for x86_64.
Written by the indexing model from the issue text.
Assessment
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100