[llvm] 00b47b9 - [NFC] Fix missplaced comment
Andreas Jonson via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 22 11:51:57 PDT 2024
Author: Andreas Jonson
Date: 2024-10-22T20:51:46+02:00
New Revision: 00b47b98d45da4822dc0ef81ea0d1d91bf56d1e6
URL: https://github.com/llvm/llvm-project/commit/00b47b98d45da4822dc0ef81ea0d1d91bf56d1e6
DIFF: https://github.com/llvm/llvm-project/commit/00b47b98d45da4822dc0ef81ea0d1d91bf56d1e6.diff
LOG: [NFC] Fix missplaced comment
Added:
Modified:
llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp b/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
index 835eae9f572586..50d1c61c24cf47 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
@@ -4738,10 +4738,6 @@ Instruction *InstCombinerImpl::visitXor(BinaryOperator &I) {
if (Instruction *R = foldBinOpShiftWithShift(I))
return R;
- // Fold (X & M) ^ (Y & ~M) -> (X & M) | (Y & ~M)
- // This it a special case in haveNoCommonBitsSet, but the computeKnownBits
- // calls in there are unnecessary as SimplifyDemandedInstructionBits should
- // have already taken care of those cases.
Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1);
Value *X, *Y, *M;
@@ -4756,6 +4752,10 @@ Instruction *InstCombinerImpl::visitXor(BinaryOperator &I) {
return BinaryOperator::CreateXor(XorBC, X);
}
+ // Fold (X & M) ^ (Y & ~M) -> (X & M) | (Y & ~M)
+ // This it a special case in haveNoCommonBitsSet, but the computeKnownBits
+ // calls in there are unnecessary as SimplifyDemandedInstructionBits should
+ // have already taken care of those cases.
if (match(&I, m_c_Xor(m_c_And(m_Not(m_Value(M)), m_Value()),
m_c_And(m_Deferred(M), m_Value())))) {
if (isGuaranteedNotToBeUndef(M))
More information about the llvm-commits
mailing list