[llvm] 2dac2c4 - [SimplifyLibCalls] Drop duplicate check (NFC)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 15 00:37:21 PDT 2022
Author: Nikita Popov
Date: 2022-06-15T09:37:09+02:00
New Revision: 2dac2c4f762f12735987eef6b7c73e984141d0c2
URL: https://github.com/llvm/llvm-project/commit/2dac2c4f762f12735987eef6b7c73e984141d0c2
DIFF: https://github.com/llvm/llvm-project/commit/2dac2c4f762f12735987eef6b7c73e984141d0c2.diff
LOG: [SimplifyLibCalls] Drop duplicate check (NFC)
The same condition already exists inside optimizeMemCmpConstantSize().
Added:
Modified:
llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp b/llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
index 7fa49559d6275..ed695c8351c69 100644
--- a/llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
+++ b/llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
@@ -1233,10 +1233,6 @@ Value *LibCallSimplifier::optimizeMemCmpBCmpCommon(CallInst *CI,
if (!LenC)
return nullptr;
- // memcmp(d,s,0) -> 0
- if (LenC->getZExtValue() == 0)
- return Constant::getNullValue(CI->getType());
-
if (Value *Res =
optimizeMemCmpConstantSize(CI, LHS, RHS, LenC->getZExtValue(), B, DL))
return Res;
More information about the llvm-commits
mailing list