forked from OSchip/llvm-project
[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:
parent
6e41018942
commit
cf3641fd57
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue