nir/gather_info: Move setting uses_64bit out of the switch
authorJason Ekstrand <jason@jlekstrand.net>
Fri, 7 Jun 2019 23:03:10 +0000 (18:03 -0500)
committerJason Ekstrand <jason@jlekstrand.net>
Tue, 23 Jul 2019 18:40:41 +0000 (13:40 -0500)
Otherwise, as we add things to the switch, we're going to forget and add
some 64-bit op at some point in the future and it'll stop getting
flagged.  There's no reason why we can't do the check for derivatives.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/compiler/nir/nir_gather_info.c

index 04a1f9b38bcb3ed0ddb9635c0e5b73d3d317f6c8..51717cd6d7f6f7ad243a82fca120259ace84d476 100644 (file)
@@ -302,13 +302,14 @@ gather_alu_info(nir_alu_instr *instr, nir_shader *shader)
       shader->info.uses_fddx_fddy = true;
       break;
    default:
-      shader->info.uses_64bit |= instr->dest.dest.ssa.bit_size == 64;
-      unsigned num_srcs = nir_op_infos[instr->op].num_inputs;
-      for (unsigned i = 0; i < num_srcs; i++) {
-         shader->info.uses_64bit |= nir_src_bit_size(instr->src[i].src) == 64;
-      }
       break;
    }
+
+   shader->info.uses_64bit |= instr->dest.dest.ssa.bit_size == 64;
+   unsigned num_srcs = nir_op_infos[instr->op].num_inputs;
+   for (unsigned i = 0; i < num_srcs; i++) {
+      shader->info.uses_64bit |= nir_src_bit_size(instr->src[i].src) == 64;
+   }
 }
 
 static void