nir/lower_explicit_io: Handle 1 bit loads and stores
authorCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Wed, 28 Aug 2019 01:32:07 +0000 (18:32 -0700)
committerCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Fri, 6 Sep 2019 05:24:09 +0000 (22:24 -0700)
commitc0c55bd84f744f9d4d498403f1eea93fafd6cb4b
tree30c0615094adfd8d7319344bda354b741553e6e0
parentd15fe8ca8262d502435c4f83985ac414f950bc5f
nir/lower_explicit_io: Handle 1 bit loads and stores

Load a 32-bit value then convert to 1-bit.  Convert 1-bit to 32-bit
value, then Store it.

These cases started to appear when we changed Anvil to use derefs for
shared memory.

v2: Use `bit_size` in a couple of places we were missing.  (Jason)
    Reassign `value` instead of `src[0]`.  (Jason)

Fixes: 024a46a4079 ("anv: use derefs for shared memory access")
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/compiler/nir/nir_lower_io.c