nir/instr_set: Fix nir_instrs_equal for derefs
authorJason Ekstrand <jason.ekstrand@intel.com>
Wed, 25 Jul 2018 22:07:08 +0000 (15:07 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Sun, 29 Jul 2018 20:39:35 +0000 (13:39 -0700)
commit05fb2f88ecf46809648230bcdd2c1563b317a188
treeb50fbd6a9639c0336ba5678b29fe565af468d373
parent9a4ab4c120b97397321b8a86abdbdbe96ee42141
nir/instr_set: Fix nir_instrs_equal for derefs

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>
src/compiler/nir/nir_instr_set.c