[PATCH] D95373: Replace vector intrinsics with call to vector library

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 25 09:40:59 PST 2021


lebedev.ri added a comment.

In D95373#2520314 <https://reviews.llvm.org/D95373#2520314>, @LukasSommerTu wrote:

> In D95373#2520302 <https://reviews.llvm.org/D95373#2520302>, @lebedev.ri wrote:
>
>> What's the intended use-case of this pass?
>
> Some frontends or in my case MLIR, generate calls to LLVM intrinsics operating on vector operands, e.g.:
> `%call = call <4 x double> @llvm.exp.v4f64(<4 x double> %in)`
>
> Those calls are currently not replaced with calls to vector libraries (e.g., libmvec, SVML), because this replacement only happens for scalar calls in the Loop-/SLP-vectorizer.
>
> With the pass, it is now possible to replace the calls for improved performance, resulting in the following for SVML & the example above:
> `%call = call <4 x double> @__svml_exp4(<4 x double> %in)`

I understand what transformation this performs, that wasn't my question.

What i mean is that this is the opposite of the transformation
i'd expect to happen for middle-end IR optimizations, 
and this lowering should be happening somewhere in backend part
of the compilation pipeline. So i'm mainly asking where this is intended to be run


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D95373/new/

https://reviews.llvm.org/D95373



More information about the llvm-commits mailing list