[llvm] [InstCombine] Fix a comment. (PR #79422)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 25 00:42:49 PST 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-llvm-transforms
Author: Mikhail Gudim (mgudim)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/79422.diff
1 Files Affected:
- (modified) llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp (+2-2)
``````````diff
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp b/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
index 8c0fd662255130..eab2c8bd8efde3 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(),
``````````
</details>
https://github.com/llvm/llvm-project/pull/79422
More information about the llvm-commits
mailing list