summaryrefslogtreecommitdiffstats
path: root/polly/lib/Transform/Simplify.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'polly/lib/Transform/Simplify.cpp')
-rw-r--r--polly/lib/Transform/Simplify.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/polly/lib/Transform/Simplify.cpp b/polly/lib/Transform/Simplify.cpp
index 351e0275735..f56ac4f18cb 100644
--- a/polly/lib/Transform/Simplify.cpp
+++ b/polly/lib/Transform/Simplify.cpp
@@ -558,8 +558,9 @@ private:
// Remove all non-reachable instructions.
for (ScopStmt &Stmt : *S) {
- if (!Stmt.isBlockStmt())
- continue;
+ // Note that for region statements, we can only remove the non-terminator
+ // instructions of the entry block. All other instructions are not in the
+ // instructions list, but implicitly always part of the statement.
SmallVector<Instruction *, 32> AllInsts(Stmt.insts_begin(),
Stmt.insts_end());
OpenPOWER on IntegriCloud