nir/from_ssa: fix bit-size of temporary register
authorIago Toral Quiroga <itoral@igalia.com>
Mon, 19 Nov 2018 12:58:06 +0000 (13:58 +0100)
committerIago Toral Quiroga <itoral@igalia.com>
Wed, 21 Nov 2018 07:07:22 +0000 (08:07 +0100)
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/compiler/nir/nir_from_ssa.c

index e13c510c111ec944fd224530328a2be26dc9b23a..8419b28576badc16edb10de9e148187868992253 100644 (file)
@@ -707,10 +707,13 @@ resolve_parallel_copy(nir_parallel_copy_instr *pcopy,
       nir_register *reg = nir_local_reg_create(state->builder.impl);
       reg->name = "copy_temp";
       reg->num_array_elems = 0;
-      if (values[b].is_ssa)
+      if (values[b].is_ssa) {
          reg->num_components = values[b].ssa->num_components;
-      else
+         reg->bit_size = values[b].ssa->bit_size;
+      } else {
          reg->num_components = values[b].reg.reg->num_components;
+         reg->bit_size = values[b].reg.reg->bit_size;
+      }
       values[num_vals].is_ssa = false;
       values[num_vals].reg.reg = reg;