[PATCH] D67199: [InstCombine] Expand the simplification of log()
Evandro Menezes via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 4 16:24:56 PDT 2019
evandro marked 3 inline comments as done.
evandro added inline comments.
================
Comment at: llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp:1710
+ if (UnsafeFPShrink && hasFloatVersion(LogNm))
+ Ret = optimizeUnaryDoubleFP(Log, B, true);
----------------
efriedma wrote:
> Does this do the right thing for non-double libcalls?
Apparently so.
================
Comment at: llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp:2888
case Intrinsic::log:
+ case Intrinsic::log2:
return optimizeLog(CI, Builder);
----------------
efriedma wrote:
> not Intrinsic::log10?
We don't have one yet.
================
Comment at: llvm/test/Transforms/InstCombine/log-pow.ll:93
%exp = call fast float @exp2f(float %x)
- %log = call fast float @log10f(float %exp)
ret float %log
----------------
efriedma wrote:
> I'm not sure why you want to remove test coverage for log10f?
`log10g()` is actually tested elsewhere and this results in a more radical simplification.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D67199/new/
https://reviews.llvm.org/D67199
More information about the llvm-commits
mailing list