Fix IR generation of for loop containing break/continue #345

Merged
sb10q merged 1 commits from fix/loop-break-continue into master 2023-11-01 13:21:28 +08:00
Collaborator

Fix cases where the body BB would have two terminators because of a preceding continue/break statement already emitting a terminator.

Discovered when running artiq_sinara_tester; Regression test is added as loop_cont_break.py.

Fix cases where the body BB would have two terminators because of a preceding continue/break statement already emitting a terminator. Discovered when running `artiq_sinara_tester`; Regression test is added as `loop_cont_break.py`.
derppening self-assigned this 2023-10-30 15:24:18 +08:00
derppening added 1 commit 2023-10-30 15:24:20 +08:00
4169d41bee core: Fix IR generation of `for` loop containing break/continue
Fix cases where the body BB would have two terminators because of a
preceding continue/break statement already emitting a terminator.
sb10q reviewed 2023-10-30 15:25:48 +08:00
@ -0,0 +5,4 @@
def run() -> int32:
for i in range(4):
output_int32(i)
if i < 2:

Indentation

Indentation
derppening force-pushed fix/loop-break-continue from 4169d41bee to 5b05f82285 2023-10-30 17:20:31 +08:00 Compare
Poster
Collaborator

v2, v3: Replaced tab-indentation with 4-spaces.

v2, v3: Replaced tab-indentation with 4-spaces.
derppening requested review from sb10q 2023-10-30 17:23:52 +08:00
derppening force-pushed fix/loop-break-continue from 5b05f82285 to 1c3ee584ed 2023-10-30 17:24:16 +08:00 Compare
sb10q merged commit e95586f61e into master 2023-11-01 13:21:28 +08:00
sb10q deleted branch fix/loop-break-continue 2023-11-01 13:21:30 +08:00
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: M-Labs/nac3#345
There is no content yet.