[llvm] r256420 - [X86] Use assert instead of if and llvm_unreachable. NFC
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 25 09:07:27 PST 2015
Author: ctopper
Date: Fri Dec 25 11:07:27 2015
New Revision: 256420
URL: http://llvm.org/viewvc/llvm-project?rev=256420&view=rev
Log:
[X86] Use assert instead of if and llvm_unreachable. NFC
Modified:
llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp
Modified: llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp?rev=256420&r1=256419&r2=256420&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp Fri Dec 25 11:07:27 2015
@@ -807,8 +807,7 @@ unsigned getX86SubSuperRegisterOrZero(un
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;
}
More information about the llvm-commits
mailing list