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>
} 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