[llvm] r366962 - [InstCombine] Swap order of checks to improve compile time (NFC)
Evandro Menezes via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 24 16:31:04 PDT 2019
Author: evandro
Date: Wed Jul 24 16:31:04 2019
New Revision: 366962
URL: http://llvm.org/viewvc/llvm-project?rev=366962&view=rev
Log:
[InstCombine] Swap order of checks to improve compile time (NFC)
Modified:
llvm/trunk/lib/Transforms/Utils/SimplifyLibCalls.cpp
Modified: llvm/trunk/lib/Transforms/Utils/SimplifyLibCalls.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/SimplifyLibCalls.cpp?rev=366962&r1=366961&r2=366962&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/SimplifyLibCalls.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/SimplifyLibCalls.cpp Wed Jul 24 16:31:04 2019
@@ -939,9 +939,9 @@ Value *LibCallSimplifier::optimizeMemCmp
return V;
// memcmp(x, y, Len) == 0 -> bcmp(x, y, Len) == 0
- // `bcmp` can be more efficient than memcmp because it only has to know that
- // there is a difference, not where it is.
- if (isOnlyUsedInZeroEqualityComparison(CI) && TLI->has(LibFunc_bcmp)) {
+ // bcmp can be more efficient than memcmp because it only has to know that
+ // there is a difference, not how different one is to the other.
+ if (TLI->has(LibFunc_bcmp) && isOnlyUsedInZeroEqualityComparison(CI)) {
Value *LHS = CI->getArgOperand(0);
Value *RHS = CI->getArgOperand(1);
Value *Size = CI->getArgOperand(2);
More information about the llvm-commits
mailing list