diff options
author | Craig Topper <craig.topper@gmail.com> | 2017-04-20 19:31:22 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2017-04-20 19:31:22 +0000 |
commit | 0ec3f2f39a2dd0a8dccd9161c30a0137972fa551 (patch) | |
tree | 296570ba8d7180c5360a75ddc9c63f508f8c02c8 /llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp | |
parent | 70b34533c22703b51a95598afceb58a0257d434b (diff) | |
download | bcm5719-llvm-0ec3f2f39a2dd0a8dccd9161c30a0137972fa551.tar.gz bcm5719-llvm-0ec3f2f39a2dd0a8dccd9161c30a0137972fa551.zip |
[InstCombine] Remove redundant code from SimplifyDemandedBits handling for Or. The code above it is equivalent if you work through the bitwise math.
llvm-svn: 300876
Diffstat (limited to 'llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp')
-rw-r--r-- | llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp b/llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp index 65acac5add5..f83648413c9 100644 --- a/llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp +++ b/llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp @@ -225,15 +225,6 @@ Value *InstCombiner::SimplifyDemandedUseBits(Value *V, APInt DemandedMask, (DemandedMask & ~RHSKnownOne)) return I->getOperand(1); - // If all of the potentially set bits on one side are known to be set on - // the other side, just use the 'other' side. - if ((DemandedMask & (~RHSKnownZero) & LHSKnownOne) == - (DemandedMask & (~RHSKnownZero))) - return I->getOperand(0); - if ((DemandedMask & (~LHSKnownZero) & RHSKnownOne) == - (DemandedMask & (~LHSKnownZero))) - return I->getOperand(1); - // If the RHS is a constant, see if we can simplify it. if (ShrinkDemandedConstant(I, 1, DemandedMask)) return I; @@ -819,15 +810,6 @@ Value *InstCombiner::SimplifyMultipleUseDemandedBits(Instruction *I, (DemandedMask & ~RHSKnownOne)) return I->getOperand(1); - // If all of the potentially set bits on one side are known to be set on - // the other side, just use the 'other' side. - if ((DemandedMask & (~RHSKnownZero) & LHSKnownOne) == - (DemandedMask & (~RHSKnownZero))) - return I->getOperand(0); - if ((DemandedMask & (~LHSKnownZero) & RHSKnownOne) == - (DemandedMask & (~LHSKnownZero))) - return I->getOperand(1); - KnownZero = std::move(IKnownZero); KnownOne = std::move(IKnownOne); break; |