NIR_PASS_V(s, nir_lower_int_to_float);
NIR_PASS_V(s, nir_lower_bool_to_float);
+
+ /* Some ops must be lowered after being converted from int ops,
+ * so re-run nir_opt_algebraic after int lowering. */
+ do {
+ progress = false;
+ NIR_PASS(progress, s, nir_opt_algebraic);
+ } while (progress);
+
NIR_PASS_V(s, nir_copy_prop);
NIR_PASS_V(s, nir_opt_dce);
NIR_PASS_V(s, nir_lower_locals_to_regs);
NIR_PASS_V(s, nir_lower_int_to_float);
NIR_PASS_V(s, nir_lower_bool_to_float);
+ /* Some ops must be lowered after being converted from int ops,
+ * so re-run nir_opt_algebraic after int lowering. */
+ do {
+ progress = false;
+ NIR_PASS(progress, s, nir_opt_algebraic);
+ } while (progress);
+
/* Lower modifiers */
NIR_PASS_V(s, nir_lower_to_source_mods, nir_lower_all_source_mods);
NIR_PASS_V(s, nir_copy_prop);