[libc-commits] [libc] [libc] Add support for string/memory_utils functions for AArch64 without HW FP/SIMD (PR #137592)
via libc-commits
libc-commits at lists.llvm.org
Mon Apr 28 02:15:11 PDT 2025
saturn691 wrote:
Would something like this be preferable?
```cpp
// Guard both these functions, or let the compiler optimise it out?
// Seems like you want it guarded but then this is quite a small change- it is already guarded.
#ifdef __ARM_NEON
inline_bcmp_aarch64_with_fp(...) { ... }
#else
inline_bcmp_aarch64_no_fp(...) { ... }
#endif
inline_bcmp_aarch64_dispatch(...) {
#ifdef __ARM_NEON
return inline_bcmp_aarch64_with_fp(...);
#else
return inline_bcmp_aarch64_no_fp(...);
#endif
}
inline_bcmp_aarch64(...) {
// Shared logic here.
return inline_bcmp_aarch64_dispatch(...);
}
```
https://github.com/llvm/llvm-project/pull/137592
More information about the libc-commits
mailing list