[InstCombine] Expand the simplification of pow() into exp2()
authorEvandro Menezes <e.menezes@samsung.com>
Thu, 30 Aug 2018 19:04:51 +0000 (19:04 +0000)
committerEvandro Menezes <e.menezes@samsung.com>
Thu, 30 Aug 2018 19:04:51 +0000 (19:04 +0000)
commit2123ea7d5c722e98ce0f047c8baa3fb3db23e6b3
treec93e4b2f1371be6daca0e61f94a12ad710487349
parent94d3e4dd77f253d728432ce0341f2f3e49a47c05
[InstCombine] Expand the simplification of pow() into exp2()

Generalize the simplification of `pow(2.0, y)` to `pow(2.0 ** n, y)` for all
scalar and vector types.

This improvement helps some benchmarks in SPEC CPU2000 and CPU2006, such as
252.eon, 447.dealII, 453.povray.  Otherwise, no significant regressions on
x86-64 or A64.

Differential revision: https://reviews.llvm.org/D49273

llvm-svn: 341095
llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
llvm/test/Transforms/InstCombine/pow-1.ll