From 469f3cdc13851914f3a766cbd8f701cf8431caca Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Mon, 22 Jun 2009 22:08:45 +0000 Subject: [PATCH] Fix a few minor issues that were exposed by the removal of SCEVHandle. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73910 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Analysis/ScalarEvolutionExpander.cpp | 2 +- lib/Transforms/Scalar/IndVarSimplify.cpp | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/Analysis/ScalarEvolutionExpander.cpp b/lib/Analysis/ScalarEvolutionExpander.cpp index c7e296eef50..c5591d70273 100644 --- a/lib/Analysis/ScalarEvolutionExpander.cpp +++ b/lib/Analysis/ScalarEvolutionExpander.cpp @@ -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) { diff --git a/lib/Transforms/Scalar/IndVarSimplify.cpp b/lib/Transforms/Scalar/IndVarSimplify.cpp index 076111c5686..6c20e7d1407 100644 --- a/lib/Transforms/Scalar/IndVarSimplify.cpp +++ b/lib/Transforms/Scalar/IndVarSimplify.cpp @@ -481,7 +481,6 @@ void IndVarSimplify::RewriteIVExpressions(Loop *L, const Type *LargestType, ilist &List = SI->second->Users; for (ilist::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(); -- 2.34.1