broadcom: drop backend implementation of nir_op_ufind_msb

We can have NIR do this for us now that we have uclz.

Suggested by Georg Lehmann.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30614>
This commit is contained in:
Iago Toral Quiroga 2024-08-12 13:02:28 +02:00
parent 35a10f5d5a
commit ad9ff707ce
3 changed files with 2 additions and 4 deletions

View file

@ -1619,10 +1619,6 @@ ntq_emit_alu(struct v3d_compile *c, nir_alu_instr *instr)
result = vir_CLZ(c, src[0]);
break;
case nir_op_ufind_msb:
result = vir_SUB(c, vir_uniform_ui(c, 31), vir_CLZ(c, src[0]));
break;
case nir_op_imul:
result = vir_UMUL(c, src[0], src[1]);
break;

View file

@ -218,6 +218,7 @@ v3dv_pipeline_get_nir_options(const struct v3d_device_info *devinfo)
.lower_to_scalar = true,
.lower_device_index_to_zero = true,
.lower_fquantize2f16 = true,
.lower_ufind_msb = true,
.has_fsub = true,
.has_isub = true,
.has_uclz = true,

View file

@ -749,6 +749,7 @@ v3d_screen_get_compiler_options(struct pipe_screen *pscreen,
nir_lower_shift64 |
nir_lower_ufind_msb64,
.lower_fquantize2f16 = true,
.lower_ufind_msb = true,
.has_fsub = true,
.has_isub = true,
.has_uclz = true,