[PATCH] D143578: [VP] Add vp.powi and a pass for expanding vp.powi before DAG.

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 15 15:23:32 PDT 2023


reames added a comment.

In D143578#4197800 <https://reviews.llvm.org/D143578#4197800>, @craig.topper wrote:

>> Even then, I'm not convinced that inlining this loop is profitable over generating a runtime call to a new routine.
>
> I want to mention that powi is weird and does not correspond to a real math routine. It's a fast math optimization for pow with an integer argument. The scalar version of powi is provided in libgcc/compiler-rt while pow itself is in libm. This almost makes it a compiler implementation detail. Should a vector math library provide this function?

One of the options which was mentioned in the recent compiler-rt thread on discourse was to have a weak definition defined in each object file so that the linker could pick one (including the runtime libs if available).  I'd lean towards something like that.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D143578



More information about the llvm-commits mailing list