[llvm] 46c2b41 - [InstCombine] Remove dead code (NFC)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 21 06:54:03 PDT 2022
Author: Nikita Popov
Date: 2022-04-21T15:53:53+02:00
New Revision: 46c2b41d02e385acfbfeba64e76d6f448fb0b275
URL: https://github.com/llvm/llvm-project/commit/46c2b41d02e385acfbfeba64e76d6f448fb0b275
DIFF: https://github.com/llvm/llvm-project/commit/46c2b41d02e385acfbfeba64e76d6f448fb0b275.diff
LOG: [InstCombine] Remove dead code (NFC)
This was a leftover condition without code.
Added:
Modified:
llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp b/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
index d9a8b3726fe2d..1de861ea979bf 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
@@ -1115,13 +1115,6 @@ Instruction *InstCombinerImpl::visitCallInst(CallInst &CI) {
if (Constant *NumBytes = dyn_cast<Constant>(MI->getLength())) {
if (NumBytes->isNullValue())
return eraseInstFromFunction(CI);
-
- if (ConstantInt *CI = dyn_cast<ConstantInt>(NumBytes))
- if (CI->getZExtValue() == 1) {
- // Replace the instruction with just byte operations. We would
- // transform other cases to loads/stores, but we don't know if
- // alignment is sufficient.
- }
}
// No other transformations apply to volatile transfers.
More information about the llvm-commits
mailing list