Skip to content

Commit 1b243b7

Browse files
authored
Fix handling of late-discovered atomic lazy loops in compiler / source generator (#117629)
Lazy loops can be made automatically atomic in some situations by the optimizer, in which case their handling significantly simplifies, because a lazy atomic loop just becomes a repeater for the min iteration count. Most viable lazy loops are caught by the optimizer, but some aren't yet are determined to be treatable as atomic at emit time. EmitLazy was handling such cases incorrectly, resulting in a missing branch target and compilation failing. This fixes that two fold: 1. The optimizer is improved, so the discovered tests cases that were triggering this case no longer do. 2. The distinction is eliminated from EmitLazy, as the case is rare and it would take a lot more code to optimize for that case.
1 parent 1766659 commit 1b243b7

File tree

4 files changed

+475
-480
lines changed

4 files changed

+475
-480
lines changed

0 commit comments

Comments
 (0)