Skip to content

Commit f638a1a

Browse files
committed
Fix small bug in #36684
PR #36684 changes `iterate(IncrementalCompact)` to return an extra index, but leaves its arguments unchanged. However, the PR decremented the index argument in a particular recursive call to `iterate`. This caused `iterate` not to recognise that it was done when `allow_cfg_transforms` was turned on.
1 parent 7e33582 commit f638a1a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

base/compiler/ssair/ir.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1245,7 +1245,7 @@ function iterate(compact::IncrementalCompact, (idx, active_bb)::Tuple{Int, Int}=
12451245
# Move to next block
12461246
compact.idx += 1
12471247
if finish_current_bb!(compact, active_bb, old_result_idx, true)
1248-
return iterate(compact, (compact.idx-1, active_bb + 1))
1248+
return iterate(compact, (compact.idx, active_bb + 1))
12491249
else
12501250
return Pair{Pair{Int, Int}, Any}(Pair{Int,Int}(compact.idx-1, old_result_idx), compact.result[old_result_idx][:inst]), (compact.idx, active_bb + 1)
12511251
end

0 commit comments

Comments
 (0)