[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 09:05:49 PDT 2018


evandro marked an inline comment as done.
evandro added a comment.

In https://reviews.llvm.org/D49040#1155206, @spatel wrote:

> Shouldn't this patch use the existing code in replacePowWithSqrt(), so we're not (incompletely) duplicating the logic?
>
> That code also has a TODO comment about choosing the minimal set of FMF to enable the fold. Whatever we decide that predicate will be should be identical for both transforms?


The logic is almost the same, except that `sqrt()` has a corresponding intrinsic and `cbrt()` doesn't.  So. at elast for now, methinks that it's easier to understand and review this change as a separate function.  Then, if needed, both functions could be merged.


Repository:
  rL LLVM

https://reviews.llvm.org/D49040





More information about the llvm-commits mailing list