[X86] Use assert instead of if and llvm_unreachable. NFC

llvm-svn: 256420
This commit is contained in:
Craig Topper 2015-12-25 17:07:27 +00:00
parent 3fb423ef8b
commit f804af209d
1 changed files with 1 additions and 2 deletions

View File

@ -807,8 +807,7 @@ unsigned getX86SubSuperRegisterOrZero(unsigned Reg, MVT::SimpleValueType VT,
unsigned getX86SubSuperRegister(unsigned Reg, MVT::SimpleValueType VT,
bool High) {
unsigned Res = getX86SubSuperRegisterOrZero(Reg, VT, High);
if (Res == 0)
llvm_unreachable("Unexpected register or VT");
assert(Res != 0 && "Unexpected register or VT");
return Res;
}