nir: handle nir_deref_type_ptr_as_array in rematerialize_deref_in_block
authorKarol Herbst <kherbst@redhat.com>
Sat, 9 Nov 2019 01:13:25 +0000 (02:13 +0100)
committerKarol Herbst <karolherbst@gmail.com>
Wed, 11 Dec 2019 23:54:39 +0000 (23:54 +0000)
I forgot why that was required, but it still is the correct thing to do.

Hit it at some point when working on implementing more CL features.

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
src/compiler/nir/nir_deref.c

index f8b48946cffa8b4a0c27bb53fe26b337cd6a3635..02f77d622bd6b8d7779f215e38d32c8de9b4bd5d 100644 (file)
@@ -644,6 +644,7 @@ rematerialize_deref_in_block(nir_deref_instr *deref,
       break;
 
    case nir_deref_type_array:
+   case nir_deref_type_ptr_as_array:
       assert(!nir_src_as_deref(deref->arr.index));
       nir_src_copy(&new_deref->arr.index, &deref->arr.index, new_deref);
       break;