summaryrefslogtreecommitdiffstats
path: root/lib/Analysis
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-11-23 22:36:49 +0000
committerChris Lattner <sabre@nondot.org>2007-11-23 22:36:49 +0000
commit8314a0cd0ff3a1bb86bf8ab7ec6e35b232c6cb37 (patch)
treeab6bec23aa6094385e7f64795adef791e8e185bf /lib/Analysis
parent5e557123ad3779e540fc795e083bad6be5a1c764 (diff)
downloadexternal_llvm-8314a0cd0ff3a1bb86bf8ab7ec6e35b232c6cb37.zip
external_llvm-8314a0cd0ff3a1bb86bf8ab7ec6e35b232c6cb37.tar.gz
external_llvm-8314a0cd0ff3a1bb86bf8ab7ec6e35b232c6cb37.tar.bz2
simplify some code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44295 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis')
-rw-r--r--lib/Analysis/ScalarEvolution.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/Analysis/ScalarEvolution.cpp b/lib/Analysis/ScalarEvolution.cpp
index 1508fd0..27158e5 100644
--- a/lib/Analysis/ScalarEvolution.cpp
+++ b/lib/Analysis/ScalarEvolution.cpp
@@ -1416,11 +1416,7 @@ SCEVHandle ScalarEvolutionsImpl::createNodeForPHI(PHINode *PN) {
/// it returns 2. If S is guaranteed to be 0, it returns the bitwidth of S.
static uint32_t GetMinTrailingZeros(SCEVHandle S) {
if (SCEVConstant *C = dyn_cast<SCEVConstant>(S))
- // APInt::countTrailingZeros() returns the number of trailing zeros in its
- // internal representation, which length may be greater than the represented
- // value bitwidth. This is why we use a min operation here.
- return std::min(C->getValue()->getValue().countTrailingZeros(),
- C->getBitWidth());
+ return C->getValue()->getValue().countTrailingZeros();
if (SCEVTruncateExpr *T = dyn_cast<SCEVTruncateExpr>(S))
return std::min(GetMinTrailingZeros(T->getOperand()), T->getBitWidth());