diff options
author | Chris Lattner <sabre@nondot.org> | 2008-06-02 18:39:07 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-06-02 18:39:07 +0000 |
commit | d82e511aec0ea27ddd4c1e504b37f689796e965f (patch) | |
tree | e98f41c077d44f9282103a2162930198136579d1 /lib/Analysis/ValueTracking.cpp | |
parent | 37cdad3e59d05b82a9322dcd86886788b6387019 (diff) |
Remove unneeded code I added.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51878 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/ValueTracking.cpp')
-rw-r--r-- | lib/Analysis/ValueTracking.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/Analysis/ValueTracking.cpp b/lib/Analysis/ValueTracking.cpp index 2fe60907fb..67e4aad4fd 100644 --- a/lib/Analysis/ValueTracking.cpp +++ b/lib/Analysis/ValueTracking.cpp @@ -565,12 +565,9 @@ unsigned llvm::ComputeNumSignBits(Value *V, TargetData *TD, unsigned Depth) { unsigned Tmp, Tmp2; unsigned FirstAnswer = 1; - if (ConstantInt *CI = dyn_cast<ConstantInt>(V)) { - if (CI->getValue().isNegative()) - return CI->getValue().countLeadingOnes(); - return CI->getValue().countLeadingZeros(); - } - + // Note that ConstantInt is handled by the general ComputeMaskedBits case + // below. + if (Depth == 6) return 1; // Limit search depth. |