diff options
author | Dan Gohman <gohman@apple.com> | 2010-06-05 00:33:07 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2010-06-05 00:33:07 +0000 |
commit | 25fcaff409f5c4c6da08f148ffb9404a71e8e4a7 (patch) | |
tree | 8112887ebc51a77665435311292ab4e21b9125d5 /lib/Analysis/ScalarEvolutionExpander.cpp | |
parent | 88004c25c795dae031d22e5560cc4a0f98594e7c (diff) |
LSR needs to remember inserted instructions even in postinc mode, because
there could be multiple subexpressions within a single expansion which
require insert point adjustment. This fixes PR7306.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105510 91177308-0d34-0410-b5e6-96231b3b80d8
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 0012b84e1f..4f49bf17fb 100644 --- a/lib/Analysis/ScalarEvolutionExpander.cpp +++ b/lib/Analysis/ScalarEvolutionExpander.cpp @@ -1312,7 +1312,9 @@ Value *SCEVExpander::expand(const SCEV *S) { } void SCEVExpander::rememberInstruction(Value *I) { - if (PostIncLoops.empty()) + if (!PostIncLoops.empty()) + InsertedPostIncValues.insert(I); + else InsertedValues.insert(I); // If we just claimed an existing instruction and that instruction had |