[InstCombine] Remove unreachable code for turning an And where all demanded bits on both sides are known to be zero into a constant 0.

We already handled a superset check that included the known ones too and folded to a constant that may include ones. But it can also handle the case of no ones.

llvm-svn: 300093
This commit is contained in:
Craig Topper 2017-04-12 19:08:03 +00:00
parent 6e41018942
commit cf3641fd57
1 changed files with 0 additions and 4 deletions

View File

@ -195,10 +195,6 @@ Value *InstCombiner::SimplifyDemandedUseBits(Value *V, APInt DemandedMask,
(DemandedMask & ~RHSKnownZero))
return I->getOperand(1);
// If all of the demanded bits in the inputs are known zeros, return zero.
if ((DemandedMask & (RHSKnownZero|LHSKnownZero)) == DemandedMask)
return Constant::getNullValue(VTy);
// If the RHS is a constant, see if we can simplify it.
if (ShrinkDemandedConstant(I, 1, DemandedMask & ~LHSKnownZero))
return I;