llvm / llvm/llvm-project

[TLI][Darwin] Darwin_libsystem_m veclib table omits many exported simd functions

Open
#223,283 2 comments 0 reactions 0 assignees View on GitHub
llvm:analysis platform:macos
Dominant language
LLVM
Stars
40.5k
Forks
18.7k
PR merge metrics
PR metrics pending

Description

I noticed that the `Darwin_libsystem_m` veclib table is missing several stems exported by `$(xcrun --show-sdk-path)/usr/lib/system/libsystem_m.dylib`. Is there a reason for this?

Concretely: consider `_simd_log_f4` (missing) and `_simd_exp_f4` (mapped). Take
```c
// vl.c
#include
void f_log(float *restrict o, float *restrict a, int n){ for(int i=0;i

Contributor guide

Open the contributing guide

Research direction

Start in VecFuncs.def, specifically the TLI_DEFINE_DARWIN_LIBSYSTEM_M_VECFUNCS section, and reproduce the issue with the provided vl.c example and clang -O2 -fveclib=Darwin_libsystem_m -S command. Compare the listed stems with libsystem_m.dylib and add focused test cases for the missing functions; done means the relevant functions are mapped and the vectorization output covers them.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
compilers
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
76/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.