Skip to content

Fix exclusive execution of conditional branches - #18

Closed
pratheesh wants to merge 1 commit into
TexasInstruments:mainfrom
pratheesh:fix/issue-17-conditional-merge
Closed

pratheesh wants to merge 1 commit into
TexasInstruments:mainfrom
pratheesh:fix/issue-17-conditional-merge

Conversation

@pratheesh

@pratheesh pratheesh commented Jul 30, 2026 •

Copy link
Copy Markdown

Fixes #17.

The register allocator now emits an explicit merge jump between the fall-through and target branches, so an If/Else graph executes exactly one branch without requiring manual Flow Control terminators.

Also adds a small headless simulator regression and CI workflow covering both taken and fall-through paths, and updates the block guidance.

Verification:

  • node scripts/test_headless_sim.js
  • AM243x conditional SysConfig generation + clpru compile/link
  • git diff --check

@pratheesh
pratheesh marked this pull request as ready for review October 10, 2026 05:24
@pratheesh

Copy link
Copy Markdown
Author

Closing in favour of #19, which fixes #17 by making Flow Control terminators on connected branches a validation requirement instead of inserting a merge jump.

For reference, a gap found in this approach while comparing the two: when the If/Else sits inside a Loop block, the merge label was emitted after the loop's back-edge (QBA startloop_N), so the fall-through branch exited the loop. In tamagawa_single_channel the firmware halted after the first transaction. The explicit Flow Control → startloop_0 termination in #19's updated example avoids that.

@pratheesh pratheesh closed this Oct 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

both true and false conditions executed for if/else block

1 participant