[llvm] 701ec45 - [InstCombine] Fix a comment. (#79422)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 26 20:10:23 PST 2024
Author: Mikhail Gudim
Date: 2024-01-26T23:10:19-05:00
New Revision: 701ec45f2fc026d97c3a6262ea0ae6ba6734b304
URL: https://github.com/llvm/llvm-project/commit/701ec45f2fc026d97c3a6262ea0ae6ba6734b304
DIFF: https://github.com/llvm/llvm-project/commit/701ec45f2fc026d97c3a6262ea0ae6ba6734b304.diff
LOG: [InstCombine] Fix a comment. (#79422)
Added:
Modified:
llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp b/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
index 8c0fd6622551306..eab2c8bd8efde3c 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
@@ -1848,8 +1848,8 @@ Instruction *InstCombinerImpl::foldICmpAndConstant(ICmpInst &Cmp,
auto NewPred = TrueIfNeg ? CmpInst::ICMP_EQ : CmpInst::ICMP_NE;
return new ICmpInst(NewPred, X, ConstantInt::getNullValue(X->getType()));
}
- // (X & X) < 0 --> X == MinSignedC
- // (X & X) > -1 --> X != MinSignedC
+ // (X & -X) < 0 --> X == MinSignedC
+ // (X & -X) > -1 --> X != MinSignedC
if (match(And, m_c_And(m_Neg(m_Value(X)), m_Deferred(X)))) {
Constant *MinSignedC = ConstantInt::get(
X->getType(),
More information about the llvm-commits
mailing list