[PATCH] D67199: [InstCombine] Expand the simplification of log()

Dávid Bolvanský via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Sep 15 10:11:05 PDT 2019


xbolva00 added a comment.

Please also clang format the parts you modified, otherwise this looks ok.



================
Comment at: llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp:1807
+    Value *MulY = B.CreateFMul(Arg->getArgOperand(1), LogX, "mul");
+    // Since pow() may have side effects, e.g. errno,
+    // dead code elimination may not be trusted to remove it.
----------------
evandro wrote:
> xbolva00 wrote:
> > Can you extract this code and comment to helper function?
> > 
> > Can be used also a few lines below.
> Can do, using the existing `LibCallSimplifier::replaceAllUsesWith()` for this purpose.
Thanks


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

https://reviews.llvm.org/D67199





More information about the llvm-commits mailing list