From: Benjamin Kramer Date: Sat, 18 Aug 2012 20:24:19 +0000 (+0000) Subject: Remove overly conservative hasOneUse check, this always expands into a single IR... X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=c279ecd23c7902fbc6b436cfd8b7957607711281;p=oota-llvm.git 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 --- diff --git a/lib/Transforms/InstCombine/InstCombineCompares.cpp b/lib/Transforms/InstCombine/InstCombineCompares.cpp index 3fc1357eae0..c43fb71c2dd 100644 --- a/lib/Transforms/InstCombine/InstCombineCompares.cpp +++ b/lib/Transforms/InstCombine/InstCombineCompares.cpp @@ -2990,7 +2990,7 @@ Instruction *InstCombiner::visitFCmpInst(FCmpInst &I) { CallInst *CI = cast(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 ||