Skip to content

Commit 40b06bf

Browse files
committed
Fix commit message and simplify change
Created using spr 1.3.6-beta.1
1 parent 2b27c66 commit 40b06bf

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2639,16 +2639,6 @@ Instruction *InstCombinerImpl::foldICmpShrConstant(ICmpInst &Cmp,
26392639
return new ICmpInst(Pred, X, ConstantInt::get(ShrTy, C << ShAmtVal));
26402640

26412641
if (Shr->hasOneUse()) {
2642-
if (0) {
2643-
// == 0 is u< 1.
2644-
if (Pred == CmpInst::ICMP_EQ)
2645-
return new ICmpInst(CmpInst::ICMP_ULT, X,
2646-
ConstantInt::get(ShrTy, (C + 1).shl(ShAmtVal)));
2647-
else
2648-
return new ICmpInst(CmpInst::ICMP_UGT, X,
2649-
ConstantInt::get(ShrTy, (C + 1).shl(ShAmtVal) - 1));
2650-
}
2651-
26522642
// Canonicalize the shift into an 'and':
26532643
// icmp eq/ne (shr X, ShAmt), C --> icmp eq/ne (and X, HiMask), (C << ShAmt)
26542644
APInt Val(APInt::getHighBitsSet(TypeBits, TypeBits - ShAmtVal));

0 commit comments

Comments
 (0)