[InstCombine] Expand the simplification of pow(x, 0.5) to sqrt(x)
authorEvandro Menezes <e.menezes@samsung.com>
Thu, 16 Aug 2018 15:58:08 +0000 (15:58 +0000)
committerEvandro Menezes <e.menezes@samsung.com>
Thu, 16 Aug 2018 15:58:08 +0000 (15:58 +0000)
commitc05c7e11bb1e1b25c1c05a0e2d6cb00d777eb943
tree24c4caa37475e5f7ec51e8d5661a3eacf334375d
parent0a1e2f9f7eb7c46c1cc60a68c5c7eb1692b40a98
[InstCombine] Expand the simplification of pow(x, 0.5) to sqrt(x)

Expand the number of cases when `pow(x, 0.5)` is simplified into `sqrt(x)`
by considering the math semantics with more granularity.

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

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