We weren't returning at the end of the nir_isntr_type_deref case in
nir_instrs_equal and it was falling through to the default of false.
While we're at it, make the default unreachable because all statements
in the switch now have their own returns. Had we done that before, we
would have caught this bug a long time ago.
Fixes: 19a4662a540a8c94 "nir: Add a deref instruction type"
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Reviewed-by: Thomas Helland<thomashelland90@gmail.com>
default:
unreachable("Invalid instruction deref type");
}
- break;
+ return true;
}
case nir_instr_type_tex: {
nir_tex_instr *tex1 = nir_instr_as_tex(instr1);
unreachable("Invalid instruction type");
}
- return false;
+ unreachable("All cases in the above switch should return");
}
static bool