[PATCH] D98235: [InstCombine][SimplifyLibCalls] An extra sqrtf was produced because of transformations in optimizePow function

Daniil Seredkin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 9 21:42:44 PST 2021


vdsered added inline comments.


================
Comment at: llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp:1818
+      hasFloatVersion(Name))
+    Shrunk = optimizeBinaryDoubleFP(Pow, B, true);
+
----------------
spatel wrote:
> We can localize "Shrunk" to make this clearer:
>   if (Value *Shrunk = optimizeBinaryDoubleFP(Pow, B, true))
>     return Shrunk;
> 
> (and remove the declaration at line 1707).
Fixed.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D98235



More information about the llvm-commits mailing list