[PATCH] D51435: [SLC] Support expanding pow(x, n+0.5) to x * x * ... * sqrt(x)

Evandro Menezes via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 30 09:09:35 PDT 2018


evandro added a comment.

Yes, it makes sense.



================
Comment at: lib/Transforms/Utils/SimplifyLibCalls.cpp:1383
+    // If the exponent is an integer+0.5 we generate a call to sqrt and an
+    // additional fmul.
+    // TODO: This whole transformation should be backend specific (e.g. some
----------------
I wonder if the additional multiplication and the `sqrt()` should be counted towards this limit, as arbitrary as it is.


https://reviews.llvm.org/D51435





More information about the llvm-commits mailing list