diff options
author | Dan Gohman <gohman@apple.com> | 2010-02-12 20:39:25 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2010-02-12 20:39:25 +0000 |
commit | 0a799ab15801d4ebf68eeb151d6375a799c87d9a (patch) | |
tree | e408bc97224cbe974b181600e2bd707c673dd806 /lib/Analysis/ScalarEvolutionExpander.cpp | |
parent | 0f8868b17129acc81bd79f4a30d9390023ca5304 (diff) |
Fix a case of mismatched types in an Add that turned up in 447.dealII.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96007 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/ScalarEvolutionExpander.cpp')
-rw-r--r-- | lib/Analysis/ScalarEvolutionExpander.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Analysis/ScalarEvolutionExpander.cpp b/lib/Analysis/ScalarEvolutionExpander.cpp index 9439d084c4..5de55fed48 100644 --- a/lib/Analysis/ScalarEvolutionExpander.cpp +++ b/lib/Analysis/ScalarEvolutionExpander.cpp @@ -792,6 +792,7 @@ Value *SCEVExpander::expandAddRecExprLiterally(const SCEVAddRecExpr *S) { // Re-apply any non-loop-dominating scale. if (PostLoopScale) { + Result = InsertNoopCastOfTo(Result, IntTy); Result = Builder.CreateMul(Result, expandCodeFor(PostLoopScale, IntTy)); rememberInstruction(Result); @@ -803,6 +804,7 @@ Value *SCEVExpander::expandAddRecExprLiterally(const SCEVAddRecExpr *S) { const SCEV *const OffsetArray[1] = { PostLoopOffset }; Result = expandAddToGEP(OffsetArray, OffsetArray+1, PTy, IntTy, Result); } else { + Result = InsertNoopCastOfTo(Result, IntTy); Result = Builder.CreateAdd(Result, expandCodeFor(PostLoopOffset, IntTy)); rememberInstruction(Result); |