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 | 2e01a69e721dff1fbd18bd418b3a56f54d366483 (patch) | |
| tree | 6058a9c6658e90dcf0ec4c3391077aba398296e4 /llvm/lib/Analysis/ValueTracking.cpp | |
| parent | 92d62b43c2235535b8da9f1b79083d7599d2c5d3 (diff) | |
| download | bcm5719-llvm-2e01a69e721dff1fbd18bd418b3a56f54d366483.tar.gz bcm5719-llvm-2e01a69e721dff1fbd18bd418b3a56f54d366483.zip | |
Remove unneeded code I added.
llvm-svn: 51878
Diffstat (limited to 'llvm/lib/Analysis/ValueTracking.cpp')
| -rw-r--r-- | llvm/lib/Analysis/ValueTracking.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/llvm/lib/Analysis/ValueTracking.cpp b/llvm/lib/Analysis/ValueTracking.cpp index 2fe60907fb7..67e4aad4fd5 100644 --- a/llvm/lib/Analysis/ValueTracking.cpp +++ b/llvm/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. |

