simplify some code.
authorChris Lattner <sabre@nondot.org>
Fri, 23 Nov 2007 22:36:49 +0000 (22:36 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 23 Nov 2007 22:36:49 +0000 (22:36 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44295 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/ScalarEvolution.cpp

index 1508fd0c524a9437bcc2901e43937a56114dde1f..27158e5dddeb01718cd1d8d5681aac2062fd0ecc 100644 (file)
@@ -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());