nir/validate: Rework ALU bit-size rule validation
authorJason Ekstrand <jason.ekstrand@intel.com>
Wed, 8 Mar 2017 18:32:40 +0000 (10:32 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Tue, 14 Mar 2017 14:36:40 +0000 (07:36 -0700)
commita136884139c42a9ab96c659cbfe44149b1bbffdb
tree283c12f73fc42386d07691305c50b0b8aa8746e8
parent370d68babcbb8b2e80fb866429e792ee3c43ffeb
nir/validate: Rework ALU bit-size rule validation

The original bit-size validation wasn't capable of properly dealing with
instructions with variable bit sizes.  An attempt was made to handle it
by looking at source and destinations but, because the validation was
done in validate_alu_(src|dest), it didn't really have the needed
information.  The new validation code is much more straightforward and
should be more correct.

Reviewed-by: Eric Anholt <eric@anholt.net>
src/compiler/nir/nir_validate.c