From: Duncan P. N. Exon Smith Date: Fri, 14 Mar 2014 16:09:13 +0000 (+0000) Subject: x86: NFC: Make getCallPreservedMask() more similar to getCalleeSavedRegs() X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=71e585e4ce89ed339ae88a979b9bce342ef6aba6;p=oota-llvm.git x86: NFC: Make getCallPreservedMask() more similar to getCalleeSavedRegs() Changing order of checks in getCallPreservedMask() to match getCalleeSavedRegs() so that the logic is easier to compare. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203939 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/X86/X86RegisterInfo.cpp b/lib/Target/X86/X86RegisterInfo.cpp index ccbe579a468..4d5d8ed89fc 100644 --- a/lib/Target/X86/X86RegisterInfo.cpp +++ b/lib/Target/X86/X86RegisterInfo.cpp @@ -306,13 +306,13 @@ X86RegisterInfo::getCallPreservedMask(CallingConv::ID CC) const { return CSR_64_RT_AllRegs_AVX_RegMask; return CSR_64_RT_AllRegs_RegMask; case CallingConv::Intel_OCL_BI: { - if (IsWin64 && HasAVX512) + if (HasAVX512 && IsWin64) return CSR_Win64_Intel_OCL_BI_AVX512_RegMask; - if (Is64Bit && HasAVX512) + if (HasAVX512 && Is64Bit) return CSR_64_Intel_OCL_BI_AVX512_RegMask; - if (IsWin64 && HasAVX) + if (HasAVX && IsWin64) return CSR_Win64_Intel_OCL_BI_AVX_RegMask; - if (Is64Bit && HasAVX) + if (HasAVX && Is64Bit) return CSR_64_Intel_OCL_BI_AVX_RegMask; if (!HasAVX && !IsWin64 && Is64Bit) return CSR_64_Intel_OCL_BI_RegMask; @@ -325,6 +325,8 @@ X86RegisterInfo::getCallPreservedMask(CallingConv::ID CC) const { break; } + // Unlike getCalleeSavedRegs(), we don't have MMI so we can't check + // callsEHReturn(). if (Is64Bit) { if (IsWin64) return CSR_Win64_RegMask;