Skip to content

Commit

Permalink
fix missing variable assignment
Browse files Browse the repository at this point in the history
Fixes numba#46

The problem was that, in case of a multi-header loop with a single exit,
the control-variable wasn't being setup correctly.

A further problem is that, even though this was tested, only the overall
block structure of the SCFG was being compared. However the instructions
of the blocks themselves were not, so this went unnoticed.

The fix for the test is to add the instructions contained within blocks
to the YAML and then we can test this properly.
  • Loading branch information
esc committed Jun 22, 2023
1 parent 6f20097 commit b09d738
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion numba_rvsdg/core/transformations.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def reverse_lookup(d, value):
variable_assignment[backedge_variable] = reverse_lookup(
backedge_value_table, loop_head
)
if needs_synth_exit:
if needs_synth_exit or headers_were_unified:
variable_assignment[exit_variable] = reverse_lookup(
header_value_table, jt
)
Expand Down

0 comments on commit b09d738

Please sign in to comment.