aco: Fix maybe-uninitialized warnings.
authorTimur Kristóf <timur.kristof@gmail.com>
Tue, 21 Jan 2020 12:49:00 +0000 (13:49 +0100)
committerTimur Kristóf <timur.kristof@gmail.com>
Wed, 22 Jan 2020 10:09:14 +0000 (11:09 +0100)
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3483>

src/amd/compiler/aco_assembler.cpp
src/amd/compiler/aco_instruction_selection.cpp

index 241e3d443097868ee27c64ec31f05f7cfb5f7eec..c7088a498b5df2ded33a2fccbca2b2fa27d131fe 100644 (file)
@@ -512,6 +512,8 @@ void emit_instruction(asm_context& ctx, std::vector<uint32_t>& out, Instruction*
             encoding = (0b110100 << 26);
          } else if (ctx.chip_class == GFX10) {
             encoding = (0b110101 << 26);
+         } else {
+            unreachable("Unknown chip_class.");
          }
 
          if (ctx.chip_class <= GFX7) {
index ee6f02f4bec852a4340a965680d2cece0b601b17..873f9b013804bc1cb5ddd8bd8c3315ad4e4261dc 100644 (file)
@@ -7937,6 +7937,8 @@ static void emit_stream_output(isel_context *ctx,
       case 4:
          opcode = aco_opcode::buffer_store_dwordx4;
          break;
+      default:
+         unreachable("Unsupported dword count.");
       }
 
       aco_ptr<MUBUF_instruction> store{create_instruction<MUBUF_instruction>(opcode, Format::MUBUF, 4, 0)};