[PATCH] D110288: Move pow transformations to sqrt/cbrt to earlier in the compiler pipeline
Masoud Ataei via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 22 13:27:28 PDT 2021
masoud.ataei created this revision.
masoud.ataei added reviewers: bmahjour, efriedma, spatel, PowerPC.
masoud.ataei added a project: LLVM.
Herald added subscribers: steven.zhang, pengfei, hiraditya, jgravelle-google, sbc100, nemanjai, dschuff.
masoud.ataei requested review of this revision.
Herald added subscribers: llvm-commits, aheejin.
All pow(x, a) transformations (where a = 0.5, 0.25, 0.75, 1/3 or 2/3) to sqrt/cbrt calls are done in `DAGCombine` except `pow(x,0.5) --> sqrt(x)`. The last transformation is implemented `LibCallSimplifier::optimizePow`.
This patch is proposing to move the rest off the pow(x, a) transformations to `LibCallSimplifier::optimizePow`. That will move these transformations to earlier step in compiler pipeline.
The motivation for that was this patch https://reviews.llvm.org/D101759 (MASS call transformation for PPC machines). So that we will get these transformations before reaching to MASS scalar pass.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D110288
Files:
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
llvm/test/CodeGen/AArch64/pow.75.ll
llvm/test/CodeGen/AArch64/pow.ll
llvm/test/CodeGen/AArch64/pow.third.ll
llvm/test/CodeGen/ARM/pow.75.ll
llvm/test/CodeGen/ARM/pow.ll
llvm/test/CodeGen/PowerPC/pow.75.ll
llvm/test/CodeGen/PowerPC/pow.ll
llvm/test/CodeGen/WebAssembly/libcalls.ll
llvm/test/CodeGen/X86/pow.75.ll
llvm/test/CodeGen/X86/pow.ll
llvm/test/Transforms/InstCombine/pow-cbrt.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D110288.374344.patch
Type: text/x-patch
Size: 84055 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210922/5d0f03f9/attachment.bin>
More information about the llvm-commits
mailing list