Skip to content

Conversation

@AntonOresten
Copy link
Contributor

See discussion in #16

Changes

  • Added REGION_PROPER to enum and docstring (was referenced but missing)
  • Added get_region_blocks() and get_exit_block() helpers
  • Fixed handle_if_then! to call find_merge_phis and generate YieldOp/getfield (matching handle_if_then_else!)

New tests (which fail on main)

  • if-then yields phi values - basic case
  • if-then phi inside loop - FMHA pattern
  • if-then with multiple phis - multiple variables

Copy link
Member

@maleadt maleadt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

We should have caught this earlier though. I'm going to experiment with some kind of validation to ensure all blocks are properly terminated.

@maleadt maleadt merged commit ea47c5f into JuliaGPU:main Jan 27, 2026
8 checks passed
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.

2 participants