[SCEV] Introduce ScalarEvolution::getOne and getZero.
[oota-llvm.git] / lib / Transforms / Scalar / LoopRerollPass.cpp
index d8c77f47c012a84cde937e6cbe71acf5659bdb59..f007d6855a4be13bf5c2245a147f90fbf3417e99 100644 (file)
@@ -1487,8 +1487,7 @@ bool LoopReroll::runOnLoop(Loop *L, LPPassManager &LPM) {
     return Changed;
 
   const SCEV *LIBETC = SE->getBackedgeTakenCount(L);
-  const SCEV *IterCount =
-    SE->getAddExpr(LIBETC, SE->getConstant(LIBETC->getType(), 1));
+  const SCEV *IterCount = SE->getAddExpr(LIBETC, SE->getOne(LIBETC->getType()));
   DEBUG(dbgs() << "LRR: iteration count = " << *IterCount << "\n");
 
   // First, we need to find the induction variable with respect to which we can