[PATCH] D116879: [llvm] Allow auto-vectorization of sincos() using libmvec
Tim Schmielau via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Jan 9 00:53:03 PST 2022
tim.schmielau added a comment.
Of the two reproducers linked in https://bugs.llvm.org/show_bug.cgi?id=51530, the `sincos_simd.cpp` now auto-vectorizes when compiling with `clang++ -fopenmp -fveclib=libmvec -O2 -march=core-avx2 sincos_simd.cpp`, even when the `#pragma omp simd` annotation is left out in the source.
On the templated example `sincos_simd_template.cpp` a helping hand from the user is needed by annotating the loop with `#pragma omp simd` and adding `-fopenmp` to the compiler flags, but at least vectorization is now possible without the user having to manually substitute function calls.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D116879/new/
https://reviews.llvm.org/D116879
More information about the llvm-commits
mailing list