nir: introduce lowering of bitfield_insert to bfm and a new opcode bitfield_select.
authorDaniel Schürmann <daniel@schuermann.dev>
Thu, 13 Jun 2019 09:34:01 +0000 (11:34 +0200)
committerDaniel Schürmann <daniel@schuermann.dev>
Mon, 24 Jun 2019 16:42:20 +0000 (18:42 +0200)
commita8b0b6e52b095f03c96a72394d15327c42512815
treebb28cda68486d85053ae043526e4ab0c832fa5ee
parent1403c3a7bff43d37cd4bb10e4f31927597af894a
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>
src/compiler/nir/nir.h
src/compiler/nir/nir_opcodes.py
src/compiler/nir/nir_opt_algebraic.py