summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2011-02-28 09:17:39 +0000
committerNick Lewycky <nicholas@mxc.ca>2011-02-28 09:17:39 +0000
commit66f4f22f7b1a12ad3ced32867d76e1b02074c72b (patch)
tree437d833d32eb9d2897c013d9a00fd187e3d70f87 /llvm/lib/Analysis
parent174a7054978bf285cb01bbcd6f2fa106dc0f1931 (diff)
downloadbcm5719-llvm-66f4f22f7b1a12ad3ced32867d76e1b02074c72b.tar.gz
bcm5719-llvm-66f4f22f7b1a12ad3ced32867d76e1b02074c72b.zip
srem doesn't actually have the same resulting sign as its numerator, you could
also have a zero when numerator = denominator. Reverts parts of r126635 and r126637. llvm-svn: 126644
Diffstat (limited to 'llvm/lib/Analysis')
-rw-r--r--llvm/lib/Analysis/ValueTracking.cpp12
1 files changed, 0 insertions, 12 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))) {
OpenPOWER on IntegriCloud