From: Craig Topper Date: Fri, 25 Dec 2015 17:07:27 +0000 (+0000) Subject: [X86] Use assert instead of if and llvm_unreachable. NFC X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=b5faf2d29647d9207c99755a415fbf9887e980d4;p=oota-llvm.git [X86] Use assert instead of if and llvm_unreachable. NFC git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256420 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/X86/X86RegisterInfo.cpp b/lib/Target/X86/X86RegisterInfo.cpp index 85ed5859a83..b0ea7367dd3 100644 --- a/lib/Target/X86/X86RegisterInfo.cpp +++ b/lib/Target/X86/X86RegisterInfo.cpp @@ -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; }