nir/constant_folding: Add an unreachable to a switch
authorJason Ekstrand <jason.ekstrand@intel.com>
Fri, 19 Oct 2018 03:26:03 +0000 (22:26 -0500)
committerJason Ekstrand <jason.ekstrand@intel.com>
Fri, 26 Oct 2018 16:45:29 +0000 (11:45 -0500)
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/compiler/nir/nir_opt_constant_folding.c

index e2920e6b3fddd90a56011d09a79c4eb72df73867..05b47d4c0fed7231197f5daa5001dd5137df8054 100644 (file)
@@ -89,6 +89,8 @@ constant_fold_alu_instr(nir_alu_instr *instr, void *mem_ctx)
          case 8:
             src[i].u8[j] = load_const->value.u8[instr->src[i].swizzle[j]];
             break;
+         default:
+            unreachable("Invalid bit size");
          }
       }