Author: lattner
Date: Fri Nov 23 16:36:49 2007
New Revision: 44295
URL: http://llvm.org/viewvc/llvm-project?rev=44295&view=rev
Log:
simplify some code.
Modified:
llvm/trunk/lib/Analysis/ScalarEvolution.cpp
Modified: llvm/trunk/lib/Analysis/ScalarEvolution.cpp
URL:
http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ScalarEvolution.cpp?rev=44295&r1=44294&r2=44295&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/ScalarEvolution.cpp (original)
+++ llvm/trunk/lib/Analysis/ScalarEvolution.cpp Fri Nov 23 16:36:49 2007
@@ -1416,11 +1416,7 @@
/// 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());
_______________________________________________
llvm-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits