Alexandre Bique via llvm-dev
2020-Sep-01 06:46 UTC
[llvm-dev] Vectorization of math function failed?
I've tried to do: clang++ -O3 -march=native -mtune=native \ -Rpass=loop-vectorize,slp-vectorize -Rpass-missed=loop-vectorize,slp-vectorize -Rpass-analysis=loop-vectorize,slp-vectorize \ -ffast-math -ffp-model=fast -ffp-exception-behavior=ignore -ffp-contract=fast \ -c -o vec.o vec.cc But I've got no feedback. -- Alexandre Bique
Venkataramanan Kumar via llvm-dev
2020-Sep-01 07:07 UTC
[llvm-dev] Vectorization of math function failed?
Hi Alexandre,
I am not sure if we can generate vector calls to GlibC libmvec.
I can see the following vector math libraries supported.
---Snip llvm/lib/Analysis/TargetLibraryInfo.cpp--
static cl::opt<TargetLibraryInfoImpl::VectorLibrary> ClVectorLibrary(
"vector-library", cl::Hidden, cl::desc("Vector functions
library"),
cl::init(TargetLibraryInfoImpl::NoLibrary),
cl::values(clEnumValN(TargetLibraryInfoImpl::NoLibrary, "none",
"No vector functions library"),
clEnumValN(TargetLibraryInfoImpl::Accelerate,
"Accelerate",
"Accelerate framework"),
clEnumValN(TargetLibraryInfoImpl::MASSV, "MASSV",
"IBM MASS vector library"),
clEnumValN(TargetLibraryInfoImpl::SVML, "SVML",
"Intel SVML library")));
---Snip--
./clang --autocomplete=-fveclibAccelerate
MASSV
none
SVML
For SVML (Intel vector math library ), you need to use -mllvm
-vector-library=SVML or -fveclib=SVML.
regards,
Venkat.
On Tue, 1 Sep 2020 at 12:16, Alexandre Bique via llvm-dev <
llvm-dev at lists.llvm.org> wrote:
> I've tried to do:
>
> clang++ -O3 -march=native -mtune=native \
> -Rpass=loop-vectorize,slp-vectorize
> -Rpass-missed=loop-vectorize,slp-vectorize
> -Rpass-analysis=loop-vectorize,slp-vectorize \
> -ffast-math -ffp-model=fast -ffp-exception-behavior=ignore
> -ffp-contract=fast \
> -c -o vec.o vec.cc
>
> But I've got no feedback.
>
> --
> Alexandre Bique
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.llvm.org/pipermail/llvm-dev/attachments/20200901/1aa6a1fb/attachment.html>
Alexandre Bique via llvm-dev
2020-Sep-01 08:51 UTC
[llvm-dev] Vectorization of math function failed?
On Tue, Sep 1, 2020 at 9:07 AM Venkataramanan Kumar <venkataramanan.kumar.llvm at gmail.com> wrote:> Hi Alexandre,Hi Venkataramanan,> I am not sure if we can generate vector calls to GlibC libmvec.Is the support for libmvec on the roadmap? If not how to add it?> ./clang --autocomplete=-fveclibThis is amazing, thank you! I think it should be documented in clangauto vectorization documentation. Thank you very much, -- Alexandre BIQUE