Skip to content

[dslx] Improve lowering of one_hot_sel and priority_sel builtins#4176

Open
cdleary wants to merge 1 commit intogoogle:mainfrom
xlsynth:cdleary/2026-04-28-ohs-lowering
Open

[dslx] Improve lowering of one_hot_sel and priority_sel builtins#4176
cdleary wants to merge 1 commit intogoogle:mainfrom
xlsynth:cdleary/2026-04-28-ohs-lowering

Conversation

@cdleary
Copy link
Copy Markdown
Collaborator

@cdleary cdleary commented Apr 28, 2026

Inline array literals passed to one_hot_sel and priority_sel can already be scalarized directly during IR conversion. Do that before generic argument lowering so no-opt IR does not materialize a temporary array and then recover its members with constant array_index nodes.

Keep the existing array-index fallback for non-literal case expressions, and preserve ellipsis expansion for literal arrays.

Inline array literals passed to one_hot_sel and priority_sel can already be
scalarized directly during IR conversion. Do that before generic argument
lowering so no-opt IR does not materialize a temporary array and then recover
its members with constant array_index nodes.

Keep the existing array-index fallback for non-literal case expressions, and
preserve ellipsis expansion for literal arrays.
@cdleary cdleary marked this pull request as ready for review April 28, 2026 17:29
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.

1 participant