nir/constant_folding: Fix source bit size logic
authorJason Ekstrand <jason.ekstrand@intel.com>
Thu, 6 Dec 2018 20:31:20 +0000 (14:31 -0600)
committerJason Ekstrand <jason@jlekstrand.net>
Sun, 16 Dec 2018 21:03:02 +0000 (21:03 +0000)
commit3595a0abf43be3ce27d88f5939b257a74e90035b
tree943b1391c02f982c67fd7a4b707777958c3416eb
parent9f7bd843afd6d2e59cc5b2651576eca5f72eaa5a
nir/constant_folding: Fix source bit size logic

Instead of looking at input_sizes[i] which contains the number of
components for each source, we look at the bit size of input_types[i].
This fixes a regression in the 1-bit boolean series though I have no
idea how we haven't seen it before now.

Fixes: 35baee5dce5 "nir/constant_folding: fix incorrect bit-size check"
Fixes: 9076c4e289d "nir: update opcode definitions for different bit sizes"
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Tested-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/compiler/nir/nir_opt_constant_folding.c