diff options
Diffstat (limited to 'lib/Analysis/ScalarEvolutionExpander.cpp')
-rw-r--r-- | lib/Analysis/ScalarEvolutionExpander.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Analysis/ScalarEvolutionExpander.cpp b/lib/Analysis/ScalarEvolutionExpander.cpp index eb2236b2d7..e098ea256f 100644 --- a/lib/Analysis/ScalarEvolutionExpander.cpp +++ b/lib/Analysis/ScalarEvolutionExpander.cpp @@ -349,7 +349,9 @@ Value *SCEVExpander::expandAddToGEP(const SCEV *const *op_begin, return GEP; } - // Insert a pretty getelementptr. + // Insert a pretty getelementptr. Note that this GEP is not marked inbounds, + // because ScalarEvolution may have changed the address arithmetic to + // compute a value which is beyond the end of the allocated object. Value *GEP = Builder.CreateGEP(V, GepIndices.begin(), GepIndices.end(), |