radv: remove second nir_lower_idiv

nir_lower_idiv now lowers 8/16-bit divisions.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10081>
This commit is contained in:
Rhys Perry
2021-04-07 19:58:19 +01:00
committed by Marge Bot
parent e00d94f14f
commit 7db8d307bc
-8
View File
@@ -3072,14 +3072,9 @@ lower_bit_size_callback(const nir_instr *instr, void *_)
switch (alu->op) {
case nir_op_iabs:
case nir_op_bitfield_select:
case nir_op_udiv:
case nir_op_idiv:
case nir_op_umod:
case nir_op_imod:
case nir_op_imul_high:
case nir_op_umul_high:
case nir_op_ineg:
case nir_op_irem:
case nir_op_isign:
return 32;
case nir_op_imax:
@@ -3369,9 +3364,6 @@ radv_create_shaders(struct radv_pipeline *pipeline, struct radv_device *device,
}
if (nir_lower_bit_size(nir[i], lower_bit_size_callback, device)) {
// TODO: lower idiv beforehand
if (nir_lower_idiv(nir[i], nir_lower_idiv_precise))
NIR_PASS_V(nir[i], nir_opt_algebraic_late); /* needed for removing ineg again */
NIR_PASS_V(nir[i], nir_opt_constant_folding);
NIR_PASS_V(nir[i], nir_opt_dce);
}