diff options
| author | Evandro Menezes <e.menezes@samsung.com> | 2019-07-24 23:31:04 +0000 | 
|---|---|---|
| committer | Evandro Menezes <e.menezes@samsung.com> | 2019-07-24 23:31:04 +0000 | 
| commit | 5cd5f9b65ddb6c1f3b79fd76df3ba6f2c182f004 (patch) | |
| tree | 60c751d36f0273ea1558974d505a10e7487b083c /llvm/lib/Transforms | |
| parent | 904494944b916c48a17e7ba622d83469cc6bb37d (diff) | |
| download | bcm5719-llvm-5cd5f9b65ddb6c1f3b79fd76df3ba6f2c182f004.tar.gz bcm5719-llvm-5cd5f9b65ddb6c1f3b79fd76df3ba6f2c182f004.zip | |
[InstCombine] Swap order of checks to improve compile time (NFC)
llvm-svn: 366962
Diffstat (limited to 'llvm/lib/Transforms')
| -rw-r--r-- | llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp | 6 | 
1 files changed, 3 insertions, 3 deletions
| diff --git a/llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp b/llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp index e0def81d5ee..2d218d6e28d 100644 --- a/llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp +++ b/llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp @@ -939,9 +939,9 @@ Value *LibCallSimplifier::optimizeMemCmp(CallInst *CI, IRBuilder<> &B) {      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); | 

