From 394b624215ae3f4841209b27df149023d81df618 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Fri, 9 Apr 2010 18:20:03 +0000 Subject: [PATCH] Add a comment. llvm-svn: 100874 --- llvm/lib/Analysis/ScalarEvolutionExpander.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/llvm/lib/Analysis/ScalarEvolutionExpander.cpp b/llvm/lib/Analysis/ScalarEvolutionExpander.cpp index dd8ab431f344..24825bf5e565 100644 --- a/llvm/lib/Analysis/ScalarEvolutionExpander.cpp +++ b/llvm/lib/Analysis/ScalarEvolutionExpander.cpp @@ -705,7 +705,8 @@ Value *SCEVExpander::visitAddExpr(const SCEVAddExpr *S) { Sum = expandAddToGEP(NewOps.begin(), NewOps.end(), PTy, Ty, Sum); } else if (const PointerType *PTy = dyn_cast(Op->getType())) { // The running sum is an integer, and there's a pointer at this level. - // Try to form a getelementptr. + // Try to form a getelementptr. Use a SCEVUnknown so that we don't + // re-analyze the instructions that we just emitted. SmallVector NewOps; NewOps.push_back(SE.getUnknown(Sum)); for (++I; I != E && I->first == CurLoop; ++I)