[PATCH] D80744: DAGCombiner optimization for pow(x, 0.75) even in case massv function is asked

Masoud Ataei via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 4 11:33:33 PDT 2020


masoud.ataei updated this revision to Diff 268538.
masoud.ataei added a comment.

@steven.zhang 
I think I had done a terrible mistake. When I tested with my `c` code, I didn't have `if (ClVectorLibrary == TargetLibraryInfoImpl::MASSV)` on

  if (ClVectorLibrary == TargetLibraryInfoImpl::MASSV)
    setOperationAction(ISD::FPOW, MVT::v4f32, Custom);

and for some reason if I move this check inside the function `LowerFPOWMASSV` it works good. So I am updating the patch. Thank you for catching it.

Although, this fix is not ideal. In case we want to use other vector libraries like `Accelerate` or `SVML` on PowerPC in future, this code is preventing them to generate accurate libcall for them. Any idea how to fix this issue?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D80744

Files:
  llvm/lib/Analysis/TargetLibraryInfo.cpp
  llvm/lib/Target/PowerPC/PPCISelLowering.cpp
  llvm/lib/Target/PowerPC/PPCISelLowering.h
  llvm/test/CodeGen/PowerPC/pow_massv_0.75exp.ll
  llvm/test/Transforms/LoopVectorize/PowerPC/massv-calls.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D80744.268538.patch
Type: text/x-patch
Size: 10413 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200604/3c7729b8/attachment.bin>


More information about the llvm-commits mailing list