aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Analysis/ValueTracking.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2012-02-06 21:56:39 +0000
committerChris Lattner <sabre@nondot.org>2012-02-06 21:56:39 +0000
commit8213c8af290f42bcdac070f0131d2fdabe76c93f (patch)
tree8a1b8f513d5ddf66f08efbc5c1c8bc33f87e4d1a /llvm/lib/Analysis/ValueTracking.cpp
parentb03c224e103b2986004d10cc76eaaae35eb702de (diff)
downloadllvm-8213c8af290f42bcdac070f0131d2fdabe76c93f.zip
llvm-8213c8af290f42bcdac070f0131d2fdabe76c93f.tar.gz
llvm-8213c8af290f42bcdac070f0131d2fdabe76c93f.tar.bz2
Remove some dead code and tidy things up now that vectors use ConstantDataVector
instead of always using ConstantVector. llvm-svn: 149912
Diffstat (limited to 'llvm/lib/Analysis/ValueTracking.cpp')
-rw-r--r--llvm/lib/Analysis/ValueTracking.cpp15
1 files changed, 2 insertions, 13 deletions
diff --git a/llvm/lib/Analysis/ValueTracking.cpp b/llvm/lib/Analysis/ValueTracking.cpp
index 1a18247..b5811f2 100644
--- a/llvm/lib/Analysis/ValueTracking.cpp
+++ b/llvm/lib/Analysis/ValueTracking.cpp
@@ -88,19 +88,8 @@ void llvm::ComputeMaskedBits(Value *V, const APInt &Mask,
return;
}
// Handle a constant vector by taking the intersection of the known bits of
- // each element.
- // FIXME: Remove.
- if (ConstantVector *CV = dyn_cast<ConstantVector>(V)) {
- KnownZero.setAllBits(); KnownOne.setAllBits();
- for (unsigned i = 0, e = CV->getNumOperands(); i != e; ++i) {
- APInt KnownZero2(BitWidth, 0), KnownOne2(BitWidth, 0);
- ComputeMaskedBits(CV->getOperand(i), Mask, KnownZero2, KnownOne2,
- TD, Depth);
- KnownZero &= KnownZero2;
- KnownOne &= KnownOne2;
- }
- return;
- }
+ // each element. There is no real need to handle ConstantVector here, because
+ // we don't handle undef in any particularly useful way.
if (ConstantDataSequential *CDS = dyn_cast<ConstantDataSequential>(V)) {
// We know that CDS must be a vector of integers. Take the intersection of
// each element.