1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 20:51:52 +01:00

Fix a case of mismatched types in an Add that turned up in 447.dealII.

llvm-svn: 96007
This commit is contained in:
Dan Gohman 2010-02-12 20:39:25 +00:00
parent c75a237988
commit cdb2e784ff

View File

@ -792,6 +792,7 @@ Value *SCEVExpander::expandAddRecExprLiterally(const SCEVAddRecExpr *S) {
// Re-apply any non-loop-dominating scale. // Re-apply any non-loop-dominating scale.
if (PostLoopScale) { if (PostLoopScale) {
Result = InsertNoopCastOfTo(Result, IntTy);
Result = Builder.CreateMul(Result, Result = Builder.CreateMul(Result,
expandCodeFor(PostLoopScale, IntTy)); expandCodeFor(PostLoopScale, IntTy));
rememberInstruction(Result); rememberInstruction(Result);
@ -803,6 +804,7 @@ Value *SCEVExpander::expandAddRecExprLiterally(const SCEVAddRecExpr *S) {
const SCEV *const OffsetArray[1] = { PostLoopOffset }; const SCEV *const OffsetArray[1] = { PostLoopOffset };
Result = expandAddToGEP(OffsetArray, OffsetArray+1, PTy, IntTy, Result); Result = expandAddToGEP(OffsetArray, OffsetArray+1, PTy, IntTy, Result);
} else { } else {
Result = InsertNoopCastOfTo(Result, IntTy);
Result = Builder.CreateAdd(Result, Result = Builder.CreateAdd(Result,
expandCodeFor(PostLoopOffset, IntTy)); expandCodeFor(PostLoopOffset, IntTy));
rememberInstruction(Result); rememberInstruction(Result);