[clang] [OpenMP][CodeGen] Preserve libcalls for declare simd redecls (PR #193881)

via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 28 00:20:08 PDT 2026


wpcwzy wrote:

Thanks @anun333 for testing!

1. About the AVX/AVX2 choice: the mappings are now sorted from the most capable ISA class, so on an AVX2 target `_ZGVdN4v_sin` comes before `_ZGVcN4v_sin` and the vectorizer picks `_ZGVd`.

2. About prefer-vector-width: when building the mappings, clang now skips variants wider than `-mprefer-vector-width`, so with `-march=x86-64-v4 -mprefer-vector-width=256` only the 256-bit variants are offered and the float-to-double loop uses `_ZGVdN4v_sin` (all `<4 x double>`) instead of `_ZGVeN8v_sin`. I did it on the clang side because the mapping list is built there, if you think the general fix belongs to the vectorizer (for the TLI tables in #223817 too), I can do that as a follow-up.

https://github.com/llvm/llvm-project/pull/193881


More information about the cfe-commits mailing list