Add mapping from exp2 math functions
to corresponding SVML calls.
This is a follow up and extension for llvm diff
https://reviews.llvm.org/D19544
Test Plan:
- update test case and run ninja check.
- run tests locally
Paths
| Differential D77114
Handle exp2 with proper vectorization and lowering to SVML calls ClosedPublic Authored by lsakka on Mar 30 2020, 7:39 PM.
Details Summary Add mapping from exp2 math functions This is a follow up and extension for llvm diff Test Plan:
Diff Detail
Event TimelineThis revision is now accepted and ready to land.Mar 31 2020, 10:34 AM Closed by commit rGa0983ed3d2c8: Handle exp2 with proper vectorization and lowering to SVML calls (authored by laith sakka <laith.s.sakka@gmail.com>, committed by wenlei). · Explain WhyApr 2 2020, 9:41 PM This revision was automatically updated to reflect the committed changes. Comment Actions Is there a publicly available SVML library that is usable with LLVM that uses these function names? The Intel library that comes with icc uses these names but uses a non-standard calling convention that LLVM doesn't implement. The other library I'm aware of is some SVML functions embedded in libgcc or libm(not sure which), but they don't use the same names as the Intel library as far as I know. Comment Actions
I'm not aware of a publicly available SVML library. We've been targeting the Intel one. By standard calling convention do you mean the x86_64 System V calling convention where vector parameters are passed through XMM0 to XMM7 and returned in XMM0 and XMM1? Comment Actions
I guess it does sort of match the SystemV calling convention. The SVML library does treat some of the vector registers as callee saved which is different than SystemV. But if LLVM thinks they are all clobbered that probably doesn't cause an issue. There are masked versions for 512-bit that take the mask in a k-register which LLVM wouldn't know how to do. Comment Actions
That's a good point. That might be why the masked AVX 512 versions are not supported if you at the VecFuncs.def file.
Revision Contents
Diff 253771 llvm/include/llvm/Analysis/VecFuncs.def
llvm/test/Transforms/LoopVectorize/X86/svml-calls.ll
|