Skip to content

Commit 425c6b5

Browse files
committed
X86 swifttailcc remove invalid check
MF can be caller or callee. This is a cherry-pick of some of the code of 23eeb5a. Upstream LLVM does not have this code i.e it matches the code after this patch. Probably things got confused during a merge.
1 parent d9ea70b commit 425c6b5

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

llvm/lib/Target/X86/X86RegisterInfo.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -391,10 +391,6 @@ X86RegisterInfo::getCalleeSavedRegs(const MachineFunction *MF) const {
391391
return IsWin64 ? CSR_Win64_SwiftError_SaveList
392392
: CSR_64_SwiftError_SaveList;
393393

394-
if (MF->getFunction().getCallingConv() == CallingConv::SwiftTail)
395-
return IsWin64 ? CSR_Win64_SwiftTail_SaveList
396-
: CSR_64_SwiftTail_SaveList;
397-
398394
if (IsWin64)
399395
return HasSSE ? CSR_Win64_SaveList : CSR_Win64_NoSSE_SaveList;
400396
if (CallsEHReturn)
@@ -515,9 +511,6 @@ X86RegisterInfo::getCallPreservedMask(const MachineFunction &MF,
515511
if (IsSwiftCC)
516512
return IsWin64 ? CSR_Win64_SwiftError_RegMask : CSR_64_SwiftError_RegMask;
517513

518-
if (MF.getFunction().getCallingConv() == CallingConv::SwiftTail)
519-
return IsWin64 ? CSR_Win64_SwiftTail_RegMask : CSR_64_SwiftTail_RegMask;
520-
521514
return IsWin64 ? CSR_Win64_RegMask : CSR_64_RegMask;
522515
}
523516

0 commit comments

Comments
 (0)