diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2012-08-18 20:24:19 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2012-08-18 20:24:19 +0000 |
commit | c279ecd23c7902fbc6b436cfd8b7957607711281 (patch) | |
tree | 0df8e71eca39754b63d3facc9cf2ed87fd32b615 /lib | |
parent | 00abcd3da0f36a88fb3c73586a59d782c35e17a6 (diff) | |
download | external_llvm-c279ecd23c7902fbc6b436cfd8b7957607711281.zip external_llvm-c279ecd23c7902fbc6b436cfd8b7957607711281.tar.gz external_llvm-c279ecd23c7902fbc6b436cfd8b7957607711281.tar.bz2 |
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
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Transforms/InstCombine/InstCombineCompares.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/InstCombine/InstCombineCompares.cpp b/lib/Transforms/InstCombine/InstCombineCompares.cpp index 3fc1357..c43fb71 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<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 || |