findDeadCallerSavedReg fix: Missing NULL terminator in register arrays.

Fix by Ivan Baev. Sorry I don't have a unit test, but the fix is obvious so I don't want to delay it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137404 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Andrew Trick 2011-08-12 00:49:19 +00:00
parent a1b953b61a
commit 32a183c84a

View File

@ -98,12 +98,12 @@ static unsigned findDeadCallerSavedReg(MachineBasicBlock &MBB,
return 0; return 0;
static const unsigned CallerSavedRegs32Bit[] = { static const unsigned CallerSavedRegs32Bit[] = {
X86::EAX, X86::EDX, X86::ECX X86::EAX, X86::EDX, X86::ECX, 0
}; };
static const unsigned CallerSavedRegs64Bit[] = { static const unsigned CallerSavedRegs64Bit[] = {
X86::RAX, X86::RDX, X86::RCX, X86::RSI, X86::RDI, X86::RAX, X86::RDX, X86::RCX, X86::RSI, X86::RDI,
X86::R8, X86::R9, X86::R10, X86::R11 X86::R8, X86::R9, X86::R10, X86::R11, 0
}; };
unsigned Opc = MBBI->getOpcode(); unsigned Opc = MBBI->getOpcode();