[llvm] r269017 - [X86] Update X86_INTR calling convention to save ZMM registers instead of YMM registers when AVX512 is enabled.

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Mon May 9 22:27:56 PDT 2016


Author: ctopper
Date: Tue May 10 00:27:56 2016
New Revision: 269017

URL: http://llvm.org/viewvc/llvm-project?rev=269017&view=rev
Log:
[X86] Update X86_INTR calling convention to save ZMM registers instead of YMM registers when AVX512 is enabled.

Modified:
    llvm/trunk/lib/Target/X86/X86CallingConv.td
    llvm/trunk/test/CodeGen/X86/x86-interrupt_cc.ll

Modified: llvm/trunk/lib/Target/X86/X86CallingConv.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86CallingConv.td?rev=269017&r1=269016&r2=269017&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86CallingConv.td (original)
+++ llvm/trunk/lib/Target/X86/X86CallingConv.td Tue May 10 00:27:56 2016
@@ -899,8 +899,9 @@ def CSR_64_AllRegs     : CalleeSavedRegs
 def CSR_64_AllRegs_AVX : CalleeSavedRegs<(sub (add CSR_64_MostRegs, RAX, RSP,
                                                    (sequence "YMM%u", 0, 15)),
                                               (sequence "XMM%u", 0, 15))>;
-def CSR_64_AllRegs_AVX512 : CalleeSavedRegs<(add CSR_64_AllRegs_AVX,
-                                             (sequence "YMM%u", 16, 31))>;
+def CSR_64_AllRegs_AVX512 : CalleeSavedRegs<(sub (add CSR_64_MostRegs, RAX, RSP,
+                                                   (sequence "ZMM%u", 0, 31)),
+                                              (sequence "XMM%u", 0, 15))>;
 
 // Standard C + YMM6-15
 def CSR_Win64_Intel_OCL_BI_AVX : CalleeSavedRegs<(add RBX, RBP, RDI, RSI, R12,

Modified: llvm/trunk/test/CodeGen/X86/x86-interrupt_cc.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/x86-interrupt_cc.ll?rev=269017&r1=269016&r2=269017&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/x86-interrupt_cc.ll (original)
+++ llvm/trunk/test/CodeGen/X86/x86-interrupt_cc.ll Tue May 10 00:27:56 2016
@@ -3,10 +3,10 @@
 
 ; Make sure we spill the high numbered YMM registers with the right encoding.
 ; CHECK-LABEL: foo
-; CHECK: movups %ymm31, {{.+}}
-; CHECK:      encoding: [0x62,0x61,0x7c,0x28,0x11,0xbc,0x24,0xf0,0x03,0x00,0x00]
-; ymm30 is used as an anchor for the previous regexp.
-; CHECK-NEXT: movups %ymm30
+; CHECK: movups %zmm31, {{.+}}
+; CHECK:      encoding: [0x62,0x61,0x7c,0x48,0x11,0xbc,0x24,0x10,0x08,0x00,0x00] 
+; zmm30 is used as an anchor for the previous regexp.
+; CHECK-NEXT: movups %zmm30
 ; CHECK: call
 ; CHECK: iret
 




More information about the llvm-commits mailing list