[PATCH] D14045: [SimplifyLibCalls] Add a new transform: pow(exp(x), y) -> exp(x*y)

Davide Italiano via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 29 11:30:26 PDT 2015


davide updated this revision to Diff 38752.
davide added a comment.

Addressed Stephen's comments. Thank you for the explanation.
I added also some tests to ensure it's handled correctly with and without fast-math. I included a case for exp2, but not exp10 as it doesn't seem to be available on FreeBSD (GNU extension). I think we can leave that for a subsequent patch.


http://reviews.llvm.org/D14045

Files:
  lib/Transforms/Utils/SimplifyLibCalls.cpp
  test/Transforms/InstCombine/pow-exp-nofastmath.ll
  test/Transforms/InstCombine/pow-exp.ll
  test/Transforms/InstCombine/pow-exp2.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D14045.38752.patch
Type: text/x-patch
Size: 4608 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151029/0bde03c3/attachment.bin>


More information about the llvm-commits mailing list