[X86] EmitInstrWithCustomInserter - silence uninitialized variable warnings. NFCI.
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Tue, 17 Aug 2021 21:00:54 +0000 (22:00 +0100)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Tue, 17 Aug 2021 21:01:07 +0000 (22:01 +0100)
Consistently use llvm_unreachable for the default case in the inner switch statements.

llvm/lib/Target/X86/X86ISelLowering.cpp

index 25f27a0..c191d4d 100644 (file)
@@ -34836,6 +34836,7 @@ X86TargetLowering::EmitInstrWithCustomInserter(MachineInstr &MI,
   case X86::PTDPBF16PS: {
     unsigned Opc;
     switch (MI.getOpcode()) {
+    default: llvm_unreachable("illegal opcode!");
     case X86::PTDPBSSD: Opc = X86::TDPBSSD; break;
     case X86::PTDPBSUD: Opc = X86::TDPBSUD; break;
     case X86::PTDPBUSD: Opc = X86::TDPBUSD; break;
@@ -34863,6 +34864,7 @@ X86TargetLowering::EmitInstrWithCustomInserter(MachineInstr &MI,
   case X86::PTILESTORED: {
     unsigned Opc;
     switch (MI.getOpcode()) {
+    default: llvm_unreachable("illegal opcode!");
     case X86::PTILELOADD:   Opc = X86::TILELOADD;   break;
     case X86::PTILELOADDT1: Opc = X86::TILELOADDT1; break;
     case X86::PTILESTORED:  Opc = X86::TILESTORED;  break;