diff options
-rw-r--r-- | polly/lib/CodeGen/BlockGenerators.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/polly/lib/CodeGen/BlockGenerators.cpp b/polly/lib/CodeGen/BlockGenerators.cpp index f0931e1ddd6..7ca5d2dd445 100644 --- a/polly/lib/CodeGen/BlockGenerators.cpp +++ b/polly/lib/CodeGen/BlockGenerators.cpp @@ -356,12 +356,16 @@ void BlockGenerator::copyInstruction(const Instruction *Inst, ValueMapT &BBMap, if (const LoadInst *Load = dyn_cast<LoadInst>(Inst)) { Value *NewLoad = generateScalarLoad(Load, BBMap, GlobalMap, LTS); + // Compute NewLoad before its insertion in BBMap to make the insertion + // deterministic. BBMap[Load] = NewLoad; return; } if (const StoreInst *Store = dyn_cast<StoreInst>(Inst)) { Value *NewStore = generateScalarStore(Store, BBMap, GlobalMap, LTS); + // Compute NewStore before its insertion in BBMap to make the insertion + // deterministic. BBMap[Store] = NewStore; return; } |