Index: llvm/lib/Target/ARM/Thumb2InstrInfo.cpp =================================================================== --- llvm/lib/Target/ARM/Thumb2InstrInfo.cpp +++ llvm/lib/Target/ARM/Thumb2InstrInfo.cpp @@ -366,9 +366,6 @@ negativeOffsetOpcode(unsigned opcode) { switch (opcode) { - default: - llvm_unreachable("unknown thumb2 opcode!"); - case ARM::t2LDRi12: return ARM::t2LDRi8; case ARM::t2LDRHi12: return ARM::t2LDRHi8; case ARM::t2LDRBi12: return ARM::t2LDRBi8; @@ -389,6 +386,9 @@ case ARM::t2STRHi8: case ARM::t2PLDi8: return opcode; + + default: + llvm_unreachable("unknown thumb2 opcode."); } } @@ -396,9 +396,6 @@ positiveOffsetOpcode(unsigned opcode) { switch (opcode) { - default: - llvm_unreachable("unknown thumb2 opcode!"); - case ARM::t2LDRi8: return ARM::t2LDRi12; case ARM::t2LDRHi8: return ARM::t2LDRHi12; case ARM::t2LDRBi8: return ARM::t2LDRBi12; @@ -419,6 +416,9 @@ case ARM::t2STRHi12: case ARM::t2PLDi12: return opcode; + + default: + llvm_unreachable("unknown thumb2 opcode."); } } @@ -426,9 +426,6 @@ immediateOffsetOpcode(unsigned opcode) { switch (opcode) { - default: - llvm_unreachable("unknown thumb2 opcode!"); - case ARM::t2LDRs: return ARM::t2LDRi12; case ARM::t2LDRHs: return ARM::t2LDRHi12; case ARM::t2LDRBs: return ARM::t2LDRBi12; @@ -458,6 +455,9 @@ case ARM::t2STRHi8: case ARM::t2PLDi8: return opcode; + + default: + llvm_unreachable("unknown thumb2 opcode."); } }