You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a pass to replace OneHotSelect with Select.
This change introduces `RemoveOneHotSelectPass`, a development tool pass that transforms `OneHotSelect` operations into equivalent `Select` operations. For each `OneHotSelect`, a new `Select` is created with 2^N cases, where N is the bitwidth of the selector. Each case in the new `Select` corresponds to a unique bit pattern of the selector. If multiple bits are set in a selector pattern, the corresponding `OneHotSelect` cases are combined using an OR operation. To prevent excessive node creation, the pass only operates on `OneHotSelect` nodes with a selector bitwidth of 16 or less. This pass is intended for analysis and investigation purposes.
PiperOrigin-RevId: 906592025