Remove overly conservative hasOneUse check, this always expands into a single IR instruction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162175 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Benjamin Kramer 2012-08-18 20:24:19 +00:00
parent 00abcd3da0
commit c279ecd23c

View File

@ -2990,7 +2990,7 @@ Instruction *InstCombiner::visitFCmpInst(FCmpInst &I) {
CallInst *CI = cast<CallInst>(LHSI);
LibFunc::Func Func;
// Various optimization for fabs compared with zero.
if (RHSC->isNullValue() && CI->hasOneUse() &&
if (RHSC->isNullValue() &&
TLI->getLibFunc(CI->getCalledFunction()->getName(), Func) &&
TLI->has(Func)) {
if (Func == LibFunc::fabs || Func == LibFunc::fabsf ||