From: Craig Topper Date: Fri, 25 Dec 2015 17:07:32 +0000 (+0000) Subject: [X86] getX86SubSuperRegisterOrZero shouldn't call getX86SubSuperRegister recursively... X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=041d7c3b778b2ecaa183f53b08b63e6b5f00bdba;p=oota-llvm.git [X86] getX86SubSuperRegisterOrZero shouldn't call getX86SubSuperRegister recursively. It should call itself instead. Otherwise it might fire an assertion when it was designed not too. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256422 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/X86/X86RegisterInfo.cpp b/lib/Target/X86/X86RegisterInfo.cpp index b0ea7367dd3..358bea68085 100644 --- a/lib/Target/X86/X86RegisterInfo.cpp +++ b/lib/Target/X86/X86RegisterInfo.cpp @@ -638,7 +638,7 @@ unsigned getX86SubSuperRegisterOrZero(unsigned Reg, MVT::SimpleValueType VT, case MVT::i8: if (High) { switch (Reg) { - default: return getX86SubSuperRegister(Reg, MVT::i64); + default: return getX86SubSuperRegisterOrZero(Reg, MVT::i64); case X86::SIL: case X86::SI: case X86::ESI: case X86::RSI: return X86::SI; case X86::DIL: case X86::DI: case X86::EDI: case X86::RDI: