[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 09:28:18 PDT 2018


evandro added inline comments.


================
Comment at: llvm/test/Transforms/InstCombine/pow-sqrt.ll:20
 ;
   %pow = call afn <2 x double> @llvm.pow.v2f64(<2 x double> %x, <2 x double> <double 5.0e-01, double 5.0e-01>)
   ret <2 x double> %pow
----------------
spatel wrote:
> evandro wrote:
> > spatel wrote:
> > > The minimal test for this case requires no FMF?
> > IIUC, not all of them, just AFN.
> 'afn' means this transform can diverge from the original code in some way, but I don't think that's true here. Ie, sqrt(x) should be the same as pow(x, 0.5) for all values other than -0.0 and -INFINITY.
> Not sure if that is specified by any standard though? (cc @scanon)
The test originally had AFN, so I aimed at preserving it.  


https://reviews.llvm.org/D50036





More information about the llvm-commits mailing list