nir/instr_set: remove unnecessary check in nir_instrs_equal()
authorConnor Abbott <cwabbott0@gmail.com>
Thu, 24 Sep 2015 06:18:07 +0000 (02:18 -0400)
committerConnor Abbott <cwabbott0@gmail.com>
Fri, 9 Oct 2015 14:15:28 +0000 (10:15 -0400)
commitbb59ba8634e3e5e3949103c6013918b8a4953111
tree512f88886d81d69007f104ef1faf9067a3d8d76b
parentbf5f931aee35e8448a6560545d86deb35f0639b3
nir/instr_set: remove unnecessary check in nir_instrs_equal()

This was originally added to nir_instrs_equal() instead of
nir_instr_can_cse() incorrectly, but this was fixed when moving to the
instruction set API (as it had to be, otherwise hashing wouldn't work).
Now, this is dead code since instr_can_rewrite() will only return true
for texture instructions that use an index, so we can turn the check into
an assert. This also means that now nir_instrs_equal(instr, instr) will
always return true unless it assert-fails.

Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
Signed-off-by: Connor Abbott <cwabbott0@gmail.com>
src/glsl/nir/nir_instr_set.c