Fix a few minor issues that were exposed by the removal of SCEVHandle.
authorDan Gohman <gohman@apple.com>
Mon, 22 Jun 2009 22:08:45 +0000 (22:08 +0000)
committerDan Gohman <gohman@apple.com>
Mon, 22 Jun 2009 22:08:45 +0000 (22:08 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73910 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/ScalarEvolutionExpander.cpp
lib/Transforms/Scalar/IndVarSimplify.cpp

index c7e296eef503797f98602425284fd20732e8216d..c5591d702730774b142a265e18bbe0719819c10e 100644 (file)
@@ -594,7 +594,7 @@ Value *SCEVExpander::visitAddRecExpr(const SCEVAddRecExpr *S) {
 
   // Truncate the result down to the original type, if needed.
   const SCEV* T = SE.getTruncateOrNoop(V, Ty);
-  return expand(V);
+  return expand(T);
 }
 
 Value *SCEVExpander::visitTruncateExpr(const SCEVTruncateExpr *S) {
index 076111c5686d7cb1a99be26ded252bb026506fb7..6c20e7d14074396f9d7ce48603b9c51c45801f4e 100644 (file)
@@ -481,7 +481,6 @@ void IndVarSimplify::RewriteIVExpressions(Loop *L, const Type *LargestType,
     ilist<IVStrideUse> &List = SI->second->Users;
     for (ilist<IVStrideUse>::iterator UI = List.begin(),
          E = List.end(); UI != E; ++UI) {
-      const SCEV* Offset = UI->getOffset();
       Value *Op = UI->getOperandValToReplace();
       const Type *UseTy = Op->getType();
       Instruction *User = UI->getUser();