Skip to content
This repository was archived by the owner on Apr 23, 2020. It is now read-only.

Commit 4a6c7d6

Browse files
committed
[X86] Replace some default cases in X86SelectShift with llvm_unreachable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@316839 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent cf76a97 commit 4a6c7d6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/Target/X86/X86FastISel.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1791,28 +1791,28 @@ bool X86FastISel::X86SelectShift(const Instruction *I) {
17911791
CReg = X86::CX;
17921792
RC = &X86::GR16RegClass;
17931793
switch (I->getOpcode()) {
1794+
default: llvm_unreachable("Unexpected shift opcode");
17941795
case Instruction::LShr: OpReg = X86::SHR16rCL; break;
17951796
case Instruction::AShr: OpReg = X86::SAR16rCL; break;
17961797
case Instruction::Shl: OpReg = X86::SHL16rCL; break;
1797-
default: return false;
17981798
}
17991799
} else if (I->getType()->isIntegerTy(32)) {
18001800
CReg = X86::ECX;
18011801
RC = &X86::GR32RegClass;
18021802
switch (I->getOpcode()) {
1803+
default: llvm_unreachable("Unexpected shift opcode");
18031804
case Instruction::LShr: OpReg = X86::SHR32rCL; break;
18041805
case Instruction::AShr: OpReg = X86::SAR32rCL; break;
18051806
case Instruction::Shl: OpReg = X86::SHL32rCL; break;
1806-
default: return false;
18071807
}
18081808
} else if (I->getType()->isIntegerTy(64)) {
18091809
CReg = X86::RCX;
18101810
RC = &X86::GR64RegClass;
18111811
switch (I->getOpcode()) {
1812+
default: llvm_unreachable("Unexpected shift opcode");
18121813
case Instruction::LShr: OpReg = X86::SHR64rCL; break;
18131814
case Instruction::AShr: OpReg = X86::SAR64rCL; break;
18141815
case Instruction::Shl: OpReg = X86::SHL64rCL; break;
1815-
default: return false;
18161816
}
18171817
} else {
18181818
return false;

0 commit comments

Comments
 (0)