nir/constant_folding: fix incorrect bit-size check
authorIago Toral Quiroga <itoral@igalia.com>
Wed, 31 Oct 2018 11:18:34 +0000 (12:18 +0100)
committerIago Toral Quiroga <itoral@igalia.com>
Fri, 9 Nov 2018 07:22:15 +0000 (08:22 +0100)
commit35baee5dce5eaa8785e0abc09c9a4d5f2aac97d4
treea453e8800765d8564007195d1a62272552d5fc78
parent6c418dfa42bfe38dc4525c9d2df12d0798ee64d3
nir/constant_folding: fix incorrect bit-size check

nir_alu_type_get_type_size takes a type as parameter and we were
passing a bit-size instead, which did what we wanted by accident,
since a bit-size of zero matches nir_type_invalid, which has a
size of 0 too.

Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
src/compiler/nir/nir_opt_constant_folding.c