nir/from_ssa: Don't rewrite derefs destinations to registers
authorJason Ekstrand <jason.ekstrand@intel.com>
Sat, 22 Sep 2018 11:59:22 +0000 (06:59 -0500)
committerJason Ekstrand <jason.ekstrand@intel.com>
Tue, 2 Oct 2018 15:24:56 +0000 (10:24 -0500)
commit00f385e6d457d9b57f683ea52157e1620b96fa8c
tree268503dc8d6258a14ba4f54d59770ba4c9f99b17
parentbfc89c668e288747f51e447729914c91d27207e8
nir/from_ssa: Don't rewrite derefs destinations to registers

We already call nir_rematerialize_derefs_in_use_blocks_impl prior to
calling nir_lower_ssa_defs_to_regs_block so the assertion that all deref
uses in the block should hold.  This fixes the following CTS test when
SPIR-V optimization recipe 1:

dEQP-VK.glsl.struct.local.loop_nested_struct_array_vertex

Fixes: 606eb56ab9449b "intel/nir: Only lower load/store derefs"
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
src/compiler/nir/nir_from_ssa.c