summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAndreas Fried <andreas.fried@kit.edu>2020-07-21 14:38:35 +0200
committerAndreas Fried <andreas.fried@kit.edu>2020-07-30 13:16:46 +0200
commit6dabd82983e8a42960484880c88f194346830d30 (patch)
tree18ca04613c63bbe1cb178bbec31a72188105137c
parent69d5d7888e07ef965007cfb4615eff7dd8e41218 (diff)
Fix loop inversion where the header contains a data flow loop.
-rw-r--r--ir/opt/loop.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ir/opt/loop.c b/ir/opt/loop.c
index 6cb35c8..546d4c5 100644
--- a/ir/opt/loop.c
+++ b/ir/opt/loop.c
@@ -791,7 +791,7 @@ static void get_head_outs(ir_node *const node, void *const env)
/* Find df loops inside the cc */
if (is_Phi(node) && get_nodes_block(node) == loop_head) {
- foreach_irn_in(loop_head, i, pred) {
+ foreach_irn_in(node, i, pred) {
if (is_own_backedge(loop_head, i) && is_nodes_block_marked(pred)) {
entry_edge const entry = { .node = node, .pos = i, .pred = pred };
ARR_APP1(entry_edge, head_df_loop, entry);