[PATCH] D50036: [SLC] Expand the simplification of pow(x, 0.5) to sqrt(x)

Evandro Menezes via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 14 08:56:27 PDT 2018


evandro added inline comments.


================
Comment at: llvm/test/Transforms/InstCombine/pow-sqrt.ll:8-9
 ;
-  %pow = call fast double @llvm.pow.f64(double %x, double 5.000000e-01)
-  ret double %pow
+  %pow = call fast float @llvm.pow.f32(float %x, float 5.0e-01)
+  ret float %pow
 }
----------------
lebedev.ri wrote:
> evandro wrote:
> > spatel wrote:
> > > Why change the data types?
> > In order to increase test coverage.  Otherwise, it virtually tested for `double` only.
> Tests are cheap. Couldn't you just *add* the additional test coverage with `float`s?
> Changing existing tests is not always the best way..
Yes, you're right.


https://reviews.llvm.org/D50036





More information about the llvm-commits mailing list