[llvm] r256422 - [X86] getX86SubSuperRegisterOrZero shouldn't call getX86SubSuperRegister recursively. It should call itself instead. Otherwise it might fire an assertion when it was designed not too.
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 25 09:07:32 PST 2015
Author: ctopper
Date: Fri Dec 25 11:07:32 2015
New Revision: 256422
URL: http://llvm.org/viewvc/llvm-project?rev=256422&view=rev
Log:
[X86] getX86SubSuperRegisterOrZero shouldn't call getX86SubSuperRegister recursively. It should call itself instead. Otherwise it might fire an assertion when it was designed not too.
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=256422&r1=256421&r2=256422&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp Fri Dec 25 11:07:32 2015
@@ -638,7 +638,7 @@ unsigned getX86SubSuperRegisterOrZero(un
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:
More information about the llvm-commits
mailing list