diff --git a/src/intel/compiler/brw_nir.c b/src/intel/compiler/brw_nir.c index d21b3a4aba7..aa47e597523 100644 --- a/src/intel/compiler/brw_nir.c +++ b/src/intel/compiler/brw_nir.c @@ -1251,6 +1251,8 @@ brw_postprocess_nir(nir_shader *nir, const struct brw_compiler *compiler, } while (progress); if (devinfo->verx10 >= 125) { + /* Lower integer division by constants before nir_lower_idiv. */ + OPT(nir_opt_idiv_const, 32); const nir_lower_idiv_options options = { .imprecise_32bit_lowering = false, .allow_fp16 = false