[llvm-commits] CVS: llvm/lib/Transforms/Scalar/IndVarSimplify.cpp

Dan Gohman djg at cray.com
Fri Jun 15 11:01:15 PDT 2007



Changes in directory llvm/lib/Transforms/Scalar:

IndVarSimplify.cpp updated: 1.121 -> 1.122
---
Log message:

Use SCEVConstant::get instead of SCEVUnknown::get to create an
integer constant SCEV.


---
Diffs of the changes:  (+2 -2)

 IndVarSimplify.cpp |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


Index: llvm/lib/Transforms/Scalar/IndVarSimplify.cpp
diff -u llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:1.121 llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:1.122
--- llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:1.121	Fri Jun 15 09:38:12 2007
+++ llvm/lib/Transforms/Scalar/IndVarSimplify.cpp	Fri Jun 15 13:00:55 2007
@@ -264,8 +264,8 @@
     // The IterationCount expression contains the number of times that the
     // backedge actually branches to the loop header.  This is one less than the
     // number of times the loop executes, so add one to it.
-    Constant *OneC = ConstantInt::get(IterationCount->getType(), 1);
-    TripCount = SCEVAddExpr::get(IterationCount, SCEVUnknown::get(OneC));
+    ConstantInt *OneC = ConstantInt::get(IterationCount->getType(), 1);
+    TripCount = SCEVAddExpr::get(IterationCount, SCEVConstant::get(OneC));
     IndVar = L->getCanonicalInductionVariableIncrement();
   } else {
     // We have to use the preincremented value...






More information about the llvm-commits mailing list