[PATCH] D50113: [SLC] Fix shrinking of pow()
Evandro Menezes via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 31 16:07:22 PDT 2018
evandro added inline comments.
================
Comment at: llvm/test/Transforms/InstCombine/double-float-shrink-1.ll:363
+; CHECK-NEXT: [[TMP1:%.*]] = fpext float [[POWF]] to double
+; CHECK-NEXT: ret double [[TMP1]]
;
----------------
evandro wrote:
> efriedma wrote:
> > It looks like optimizeBinaryDoubleFP doesn't do all the same checks optimizeUnaryDoubleFP does? optimizeUnaryDoubleFP intentionally chooses not to optimize operations where the result isn't truncated because the extra bits might actually be useful.
> Arguably, this should not shrink.
Besides here, `optimizeBinaryDoubleFP()` is also used for `f{min,max}()` and `copysign()`. Neither of the latter functions need the extra bits in the result.
Repository:
rL LLVM
https://reviews.llvm.org/D50113
More information about the llvm-commits
mailing list