nir: Should we unify ubitfield_extract_imm with ubfe_imm?
The following discussion from !23351 (merged) should be addressed:
-
@idr started a discussion: (+5 comments)
It might be nice to unify these helpers into a single helper that asserts its inputs do not overflow (such that the two ops become equivalent) and emits either ubfe or ubitfield_extract depending on the underlying driver. It's unclear what exact naming/semantics we want. Options:
- Keep both helpers.
- Merge into ubitfield_extract_imm, produce ubitfield_extract and rely on lowering to ubfe
- Merge into ubfe_imm, produce either ubfe or ubitfield_extract per compiler option
- Merge into ubfe_imm, product ubitfield_extract confusingly and rely on lowering to ubfe
My preference is option 3 but there wasn't consensus.