diff options
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Analysis/ValueTracking.cpp | 12 | ||||
-rw-r--r-- | llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp | 10 |
2 files changed, 0 insertions, 22 deletions
diff --git a/llvm/lib/Analysis/ValueTracking.cpp b/llvm/lib/Analysis/ValueTracking.cpp index 70d51fac3f2..7e208692ac2 100644 --- a/llvm/lib/Analysis/ValueTracking.cpp +++ b/llvm/lib/Analysis/ValueTracking.cpp @@ -460,18 +460,6 @@ void llvm::ComputeMaskedBits(Value *V, const APInt &Mask, assert((KnownZero & KnownOne) == 0 && "Bits known to be one AND zero?"); } } - if (Mask.isNegative()) { // We're looking for the sign bit. - APInt Mask2 = APInt::getSignBit(BitWidth); - KnownZero2 = 0; - KnownOne2 = 0; - ComputeMaskedBits(I->getOperand(0), Mask2, KnownZero2, KnownOne2, TD, - Depth+1); - if (KnownOne2[BitWidth-1]) - KnownOne |= Mask2; - if (KnownZero2[BitWidth-1]) - KnownZero |= Mask2; - assert((KnownZero & KnownOne) == 0 && "Bits known to be one AND zero?"); - } break; case Instruction::URem: { if (ConstantInt *Rem = dyn_cast<ConstantInt>(I->getOperand(1))) { diff --git a/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp b/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp index 79c5d88c631..fe117c98143 100644 --- a/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp +++ b/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp @@ -1348,16 +1348,6 @@ Instruction *InstCombiner::visitICmpInstWithInstAndIntCst(ICmpInst &ICI, } } break; - - case Instruction::SRem: { - bool TrueIfSigned; - if (LHSI->hasOneUse() && - isSignBitCheck(ICI.getPredicate(), RHS, TrueIfSigned)) { - // srem has the same sign as its dividend so the divisor is irrelevant. - return new ICmpInst(ICI.getPredicate(), LHSI->getOperand(0), RHS); - } - break; - } } // Simplify icmp_eq and icmp_ne instructions with integer constant RHS. |