nir: introduce lowering of bitfield_insert to bfm and a new opcode bitfield_select.
bitfield_select is defined as: bitfield_select(mask, base, insert) = (mask & base) | (~mask & insert) matching the behavior of AMD's BFI instruction. Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
This commit is contained in:
@@ -2288,6 +2288,8 @@ typedef struct nir_shader_compiler_options {
|
||||
bool lower_bitfield_insert;
|
||||
/** Lowers bitfield_insert to compares, and shifts. */
|
||||
bool lower_bitfield_insert_to_shifts;
|
||||
/** Lowers bitfield_insert to bfm/bitfield_select. */
|
||||
bool lower_bitfield_insert_to_bitfield_select;
|
||||
/** Lowers bitfield_reverse to shifts. */
|
||||
bool lower_bitfield_reverse;
|
||||
/** Lowers bit_count to shifts. */
|
||||
|
Reference in New Issue
Block a user