spirv: Mark default cases unreachable().
authorMatt Turner <mattst88@gmail.com>
Tue, 24 May 2016 19:29:30 +0000 (12:29 -0700)
committerMatt Turner <mattst88@gmail.com>
Wed, 25 May 2016 19:44:34 +0000 (12:44 -0700)
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
src/compiler/spirv/vtn_alu.c

index 8b9a63ce7606bd991e2b0ce5927cd5ebab27a54f..6d98a62ab972a3b39022d9a4046b443d345281d4 100644 (file)
@@ -356,6 +356,7 @@ vtn_handle_alu(struct vtn_builder *b, SpvOp opcode,
          case 2:  op = nir_op_bany_inequal2; break;
          case 3:  op = nir_op_bany_inequal3; break;
          case 4:  op = nir_op_bany_inequal4; break;
+         default: unreachable("invalid number of components");
          }
          val->ssa->def = nir_build_alu(&b->nb, op, src[0],
                                        nir_imm_int(&b->nb, NIR_FALSE),
@@ -372,6 +373,7 @@ vtn_handle_alu(struct vtn_builder *b, SpvOp opcode,
          case 2:  op = nir_op_ball_iequal2;  break;
          case 3:  op = nir_op_ball_iequal3;  break;
          case 4:  op = nir_op_ball_iequal4;  break;
+         default: unreachable("invalid number of components");
          }
          val->ssa->def = nir_build_alu(&b->nb, op, src[0],
                                        nir_imm_int(&b->nb, NIR_TRUE),