freedreno/ir3: allow copy-propagate out of fanout
[mesa.git] / src / freedreno / ir3 / ir3_nir.c
index f9d059254fda1dd3666c775dec9a050590bf5818..99659a7ddef40253e3d671f069e84e189f3c8065 100644 (file)
@@ -57,6 +57,7 @@ static const nir_shader_compiler_options options = {
                .use_interpolated_input_intrinsics = true,
                .lower_rotate = true,
                .lower_to_scalar = true,
+               .has_imul24 = true,
 };
 
 /* we don't want to lower vertex_id to _zero_based on newer gpus: */
@@ -84,6 +85,7 @@ static const nir_shader_compiler_options options_a6xx = {
                .lower_rotate = true,
                .vectorize_io = true,
                .lower_to_scalar = true,
+               .has_imul24 = true,
 };
 
 const nir_shader_compiler_options *
@@ -275,7 +277,7 @@ ir3_optimize_nir(struct ir3_shader *shader, nir_shader *s,
         * NOTE that UBO analysis pass should only be done once, before variants
         */
        const bool ubo_progress = !key && OPT(s, ir3_nir_analyze_ubo_ranges, shader);
-       const bool idiv_progress = OPT(s, nir_lower_idiv);
+       const bool idiv_progress = OPT(s, nir_lower_idiv, nir_lower_idiv_fast);
        if (ubo_progress || idiv_progress)
                ir3_optimize_loop(s);