Skip to content

Commit 52ef6a6

Browse files
committed
comment fixes
1 parent b58e388 commit 52ef6a6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1320,10 +1320,10 @@ Instruction *InstCombinerImpl::foldICmpWithZero(ICmpInst &Cmp) {
13201320
return nullptr;
13211321
}
13221322

1323-
/// Fold icmp eq (num + (val - 1)) & -val, num
1323+
/// Fold icmp eq (num + mask) & ~mask, num
13241324
/// to
1325-
/// icmp eq (and num, val - 1), 0
1326-
/// For val being power of two
1325+
/// icmp eq (and num, mask), 0
1326+
/// Where mask is a low bit mask.
13271327
Instruction *InstCombinerImpl::foldIsMultipleOfAPowerOfTwo(ICmpInst &Cmp) {
13281328
Value *Num;
13291329
CmpPredicate Pred;
@@ -1342,7 +1342,7 @@ Instruction *InstCombinerImpl::foldIsMultipleOfAPowerOfTwo(ICmpInst &Cmp) {
13421342
if (!ICmpInst::isEquality(Pred))
13431343
return nullptr;
13441344

1345-
// Create new icmp eq (num & (val - 1)), 0
1345+
// Create new icmp eq (num & mask), 0
13461346
auto *NewAnd = Builder.CreateAnd(Num, *Mask);
13471347
auto *Zero = Constant::getNullValue(Num->getType());
13481348

0 commit comments

Comments
 (0)