[llvm-commits] [llvm] r162175 - /llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp
Benjamin Kramer
benny.kra at googlemail.com
Sat Aug 18 13:24:19 PDT 2012
Author: d0k
Date: Sat Aug 18 15:24:19 2012
New Revision: 162175
URL: http://llvm.org/viewvc/llvm-project?rev=162175&view=rev
Log:
Remove overly conservative hasOneUse check, this always expands into a single IR instruction.
Modified:
llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp
Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp?rev=162175&r1=162174&r2=162175&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp (original)
+++ llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp Sat Aug 18 15:24:19 2012
@@ -2990,7 +2990,7 @@
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 ||
More information about the llvm-commits
mailing list