[PATCH] D49040: [SLC] Simplify pow(x, 0.333...) to cbrt(x)
Evandro Menezes via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 9 12:11:48 PDT 2018
evandro marked 2 inline comments as done.
evandro added inline comments.
================
Comment at: llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp:1138-1139
+
+ const APFloat SPPlusThird(1.0f / 3.0f), SPMinusThird(-1.0f / 3.0f),
+ DPPlusThird(1.0 / 3.0), DPMinusThird(-1.0 / 3.0);
+ bool isPlusThird = Arg2C->isExactlyValue((TyID == Type::FloatTyID)
----------------
evandro wrote:
> lebedev.ri wrote:
> > There seems to be two variants: https://godbolt.org/g/Rw1Gxt
> > Can you output the value that doesn't match?
> Please, see any example using `float` in the test case below.
My bad. I crafted the test case using the IEEE754 bits for SP instead of the bits for DP truncated for `float`.
https://reviews.llvm.org/D49040
More information about the llvm-commits
mailing list