diff options
Diffstat (limited to 'polly/lib/CodeGen/BlockGenerators.cpp')
| -rw-r--r-- | polly/lib/CodeGen/BlockGenerators.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/polly/lib/CodeGen/BlockGenerators.cpp b/polly/lib/CodeGen/BlockGenerators.cpp index f2c21c4e7d6..8ad17575b77 100644 --- a/polly/lib/CodeGen/BlockGenerators.cpp +++ b/polly/lib/CodeGen/BlockGenerators.cpp @@ -441,8 +441,12 @@ void BlockGenerator::copyBB(ScopStmt &Stmt, BasicBlock *BB, BasicBlock *CopyBB, isl_id_to_ast_expr *NewAccesses) { EntryBB = &CopyBB->getParent()->getEntryBlock(); - for (Instruction &Inst : *BB) - copyInstruction(Stmt, &Inst, BBMap, LTS, NewAccesses); + if (Stmt.isBlockStmt()) + for (Instruction *Inst : Stmt.getInstructions()) + copyInstruction(Stmt, Inst, BBMap, LTS, NewAccesses); + else + for (Instruction &Inst : *BB) + copyInstruction(Stmt, &Inst, BBMap, LTS, NewAccesses); } Value *BlockGenerator::getOrCreateAlloca(const MemoryAccess &Access) { |

