[InstCombine] Remove hasOneUse check for pow(C,x) -> exp2(log2(C)*x)
authorJay Foad <jay.foad@amd.com>
Tue, 5 May 2020 10:35:23 +0000 (11:35 +0100)
committerJay Foad <jay.foad@amd.com>
Tue, 5 May 2020 13:46:08 +0000 (14:46 +0100)
commitfa2783d79a233468ac8630361d9b75512c0cb2bd
treeb0dd14090d60fc1742ea444c7a7cd61f5c747963
parent17a53a14fc14a9e0992aff625d026d2b4bcf9c06
[InstCombine] Remove hasOneUse check for pow(C,x) -> exp2(log2(C)*x)

I don't think there's any good reason not to do this transformation when
the pow has multiple uses.

Differential Revision: https://reviews.llvm.org/D79407
llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
llvm/test/Transforms/InstCombine/pow-exp.ll