Skip to content

Commit ced41a1

Browse files
committed
[InstCombine] Remove redundant urem demanded bits case
This does the recursive simplification with all bits demanded, which is not useful. Fall through to the fallback case instead.
1 parent 9e63632 commit ced41a1

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -893,15 +893,6 @@ Value *InstCombinerImpl::SimplifyDemandedUseBits(Value *V, APInt DemandedMask,
893893
computeKnownBits(I, Known, Depth, CxtI);
894894
break;
895895
}
896-
case Instruction::URem: {
897-
APInt AllOnes = APInt::getAllOnes(BitWidth);
898-
if (SimplifyDemandedBits(I, 0, AllOnes, LHSKnown, Depth + 1) ||
899-
SimplifyDemandedBits(I, 1, AllOnes, RHSKnown, Depth + 1))
900-
return I;
901-
902-
Known = KnownBits::urem(LHSKnown, RHSKnown);
903-
break;
904-
}
905896
case Instruction::Call: {
906897
bool KnownBitsComputed = false;
907898
if (IntrinsicInst *II = dyn_cast<IntrinsicInst>(I)) {

0 commit comments

Comments
 (0)