OSDN Git Service

Remove unneeded code I added.
authorChris Lattner <sabre@nondot.org>
Mon, 2 Jun 2008 18:39:07 +0000 (18:39 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 2 Jun 2008 18:39:07 +0000 (18:39 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51878 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/ValueTracking.cpp

index 2fe6090..67e4aad 100644 (file)
@@ -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.