[PATCH] D49273: [SLC] Expand the simplification of pow({e, 2}, y) to exp{, 2}(y)

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 16 13:45:34 PDT 2018


spatel added a comment.

I think this is ok, but it's hard to tell exactly what all of the diffs are. Please split it up so:

1. All of the new tests are committed first with baseline assertions.
2. Two code improvement pieces: (a) pow(exp(x), y), (b) pow(2.0 ** n, x). (if you can do the refactoring to create the replacePowWithExp() helper as an NFC commit ahead of that, that's even better)



================
Comment at: llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp:1197
+  // pow(exp2(x), y) -> exp2(x * y)
+  // We enable these only with fast-math. Besides rounding differences, the
+  // transformation changes overflow and underflow behavior quite dramatically.
----------------
Please add a TODO comment to loosen the FMF restriction. I'm not sure what the minimal set will be, but it can't be all of the flags.


https://reviews.llvm.org/D49273





More information about the llvm-commits mailing list