diff --git a/src/compiler/nir/nir_opt_reassociate_bfi.c b/src/compiler/nir/nir_opt_reassociate_bfi.c index 46e1979ec4d..877ad6c1475 100644 --- a/src/compiler/nir/nir_opt_reassociate_bfi.c +++ b/src/compiler/nir/nir_opt_reassociate_bfi.c @@ -63,13 +63,9 @@ static bool nir_opt_reassociate_bfi_instr(nir_builder *b, - nir_instr *instr, + nir_alu_instr *bfiCD0, UNUSED void *cb_data) { - if (instr->type != nir_instr_type_alu) - return false; - - nir_alu_instr *bfiCD0 = nir_instr_as_alu(instr); if (bfiCD0->op != nir_op_bfi || bfiCD0->def.num_components != 1) return false; @@ -134,10 +130,6 @@ nir_opt_reassociate_bfi_instr(nir_builder *b, bool nir_opt_reassociate_bfi(nir_shader *shader) { - bool progress = nir_shader_instructions_pass(shader, - nir_opt_reassociate_bfi_instr, - nir_metadata_control_flow, - NULL); - - return progress; + return nir_shader_alu_pass(shader, nir_opt_reassociate_bfi_instr, + nir_metadata_control_flow, NULL); }