[PATCH] D19544: Pass for translating math intrinsics to math library calls.

Sanjay Patel via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 19 11:10:13 PDT 2016


spatel added a subscriber: davide.
spatel added a comment.

In https://reviews.llvm.org/D19544#488589, @mmasten wrote:

> In the process of writing test cases, I noticed that a loop with a call to llvm.log.f32 was not getting vectorized due to cost modeling. When forcing vectorization on the loop and throwing -fveclib=SVML, the loop was vectorized with a widened intrinsic instead of the svml call. Is this correct? I would have expected to get the svml call. In light of this, wouldn't it be better to represent the math calls with vector intrinsics and let CodeGenPrepare or the backends decide how to lower them?


I don't know the answer, but I'm curious about this too for an unrelated change in LibCallSimplifier (cc @davide).

The LangRef has this boilerplate for all target-independent math intrinsics:
"Not all targets support all types however."

Is that only intended for the weird types (x86_fp80, ppc_fp128, fp128?), or does it mean that we shouldn't create these intrinsics for vectors with standard FP types (eg, v4f32)?


https://reviews.llvm.org/D19544





More information about the cfe-commits mailing list