intel/compiler: run nir_opt_idiv_const before nir_lower_idiv
Integer div lowering can potentially create a lot of code that is not removed later on. Running const lowering pass first can be used to eliminate that code. Signed-off-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19157>
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user