[llvm-dev] Vectorization of math function failed?
Venkataramanan Kumar via llvm-dev
llvm-dev at lists.llvm.org
Tue Sep 1 00:07:43 PDT 2020
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=-fveclib=
Accelerate
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>
More information about the llvm-dev
mailing list