diff options
author | Craig Topper <craig.topper@gmail.com> | 2017-04-12 19:08:03 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2017-04-12 19:08:03 +0000 |
commit | cf3641fd5704076e018cdc39e0eb53e4dc515d6c (patch) | |
tree | 601fd3b1cab61bef5430d33cd2a3464544ea465d /llvm/lib | |
parent | 6e410189421190343a742c8e7513ef10f53fc0f0 (diff) | |
download | bcm5719-llvm-cf3641fd5704076e018cdc39e0eb53e4dc515d6c.tar.gz bcm5719-llvm-cf3641fd5704076e018cdc39e0eb53e4dc515d6c.zip |
[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
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp b/llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp index ae214d8bdf5..3a5ad34aa77 100644 --- a/llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp +++ b/llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp @@ -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; |