Skip to content

Commit

Permalink
Fix loop inversion where the header contains a data flow loop.
Browse files Browse the repository at this point in the history
  • Loading branch information
Andreas Fried committed Jul 30, 2020
1 parent 69d5d78 commit 6dabd82
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ir/opt/loop.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 6dabd82

Please sign in to comment.