Skip to content

Fix phi node value renumbering issue #28099

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 16, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion base/compiler/ssair/ir.jl
Original file line number Diff line number Diff line change
Expand Up @@ -808,7 +808,7 @@ function process_newnode!(compact, new_idx, new_node_entry, idx, active_bb, do_r
bb = compact.ir.cfg.blocks[active_bb]
compact.result_types[old_result_idx] = new_node_entry.typ
compact.result_lines[old_result_idx] = new_node_entry.line
result_idx = process_node!(compact, old_result_idx, new_node_entry.node, new_idx, idx, do_rename_ssa)
result_idx = process_node!(compact, old_result_idx, new_node_entry.node, new_idx, idx - 1, do_rename_ssa)
compact.result_idx = result_idx
# If this instruction has reverse affinity and we were at the end of a basic block,
# finish it now.
Expand Down
14 changes: 14 additions & 0 deletions test/goto.jl
Original file line number Diff line number Diff line change
Expand Up @@ -154,3 +154,17 @@ function f15561()
@label crater
end
@test f15561() === nothing

# issue #28077
function foo28077()
s = 0
i = 0
@label L
i += 1
s += i
if i < 10
@goto L
end
return s
end
@test foo28077() == 55