[llvm] r332104 - [X86][MMX] Tag MMX Move/Load/Store as WriteVec schedule classes
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Fri May 11 09:38:59 PDT 2018
Author: rksimon
Date: Fri May 11 09:38:59 2018
New Revision: 332104
URL: http://llvm.org/viewvc/llvm-project?rev=332104&view=rev
Log:
[X86][MMX] Tag MMX Move/Load/Store as WriteVec schedule classes
Fixes an issue on SLM/Btver2 where we had instructions were being treated as scalar loads/stores
Modified:
llvm/trunk/lib/Target/X86/X86InstrMMX.td
llvm/trunk/lib/Target/X86/X86SchedBroadwell.td
llvm/trunk/lib/Target/X86/X86SchedHaswell.td
llvm/trunk/lib/Target/X86/X86SchedSkylakeClient.td
llvm/trunk/lib/Target/X86/X86SchedSkylakeServer.td
llvm/trunk/test/tools/llvm-mca/X86/BtVer2/resources-mmx.s
llvm/trunk/test/tools/llvm-mca/X86/BtVer2/resources-sse1.s
llvm/trunk/test/tools/llvm-mca/X86/SLM/resources-mmx.s
llvm/trunk/test/tools/llvm-mca/X86/SLM/resources-sse1.s
Modified: llvm/trunk/lib/Target/X86/X86InstrMMX.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrMMX.td?rev=332104&r1=332103&r2=332104&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86InstrMMX.td (original)
+++ llvm/trunk/lib/Target/X86/X86InstrMMX.td Fri May 11 09:38:59 2018
@@ -204,7 +204,7 @@ def MMX_MOVD64to64rr : MMXRI<0x6E, MRMSr
let isCodeGenOnly = 1, ForceDisassemble = 1, hasSideEffects = 0, mayLoad = 1 in
def MMX_MOVD64to64rm : MMXRI<0x6E, MRMSrcMem, (outs VR64:$dst),
(ins i64mem:$src), "movq\t{$src, $dst|$dst, $src}",
- []>, Sched<[WriteLoad]>;
+ []>, Sched<[SchedWriteVecMoveLS.MMX.RM]>;
// These are 64 bit moves, but since the OS X assembler doesn't
// recognize a register-register movq, we write them as
@@ -228,16 +228,16 @@ let isCodeGenOnly = 1, ForceDisassemble
def MMX_MOVD64from64rm : MMXRI<0x7E, MRMDestMem,
(outs), (ins i64mem:$dst, VR64:$src),
"movq\t{$src, $dst|$dst, $src}", []>,
- Sched<[WriteStore]>;
+ Sched<[SchedWriteVecMoveLS.MMX.MR]>;
-let SchedRW = [WriteLoad] in {
+let SchedRW = [SchedWriteVecMoveLS.MMX.RM] in {
let canFoldAsLoad = 1 in
def MMX_MOVQ64rm : MMXI<0x6F, MRMSrcMem, (outs VR64:$dst), (ins i64mem:$src),
"movq\t{$src, $dst|$dst, $src}",
[(set VR64:$dst, (load_mmx addr:$src))]>;
} // SchedRW
-let SchedRW = [WriteStore] in
+let SchedRW = [SchedWriteVecMoveLS.MMX.MR] in
def MMX_MOVQ64mr : MMXI<0x7F, MRMDestMem, (outs), (ins i64mem:$dst, VR64:$src),
"movq\t{$src, $dst|$dst, $src}",
[(store (x86mmx VR64:$src), addr:$dst)]>;
@@ -272,7 +272,7 @@ let Predicates = [HasSSE1] in
def MMX_MOVNTQmr : MMXI<0xE7, MRMDestMem, (outs), (ins i64mem:$dst, VR64:$src),
"movntq\t{$src, $dst|$dst, $src}",
[(int_x86_mmx_movnt_dq addr:$dst, VR64:$src)]>,
- Sched<[WriteStore]>;
+ Sched<[SchedWriteVecMoveLS.MMX.MR]>;
let Predicates = [HasMMX] in {
let AddedComplexity = 15 in
Modified: llvm/trunk/lib/Target/X86/X86SchedBroadwell.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86SchedBroadwell.td?rev=332104&r1=332103&r2=332104&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86SchedBroadwell.td (original)
+++ llvm/trunk/lib/Target/X86/X86SchedBroadwell.td Fri May 11 09:38:59 2018
@@ -575,10 +575,7 @@ def BWWriteResGroup10 : SchedWriteRes<[B
let ResourceCycles = [1,1];
}
def: InstRW<[BWWriteResGroup10], (instregex "FBSTPm",
- "MMX_MOVD64from64rm",
"MMX_MOVD64mr",
- "MMX_MOVNTQmr",
- "MMX_MOVQ64mr",
"MOVNTI_64mr",
"MOVNTImr",
"ST_FP(32|64|80)m",
Modified: llvm/trunk/lib/Target/X86/X86SchedHaswell.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86SchedHaswell.td?rev=332104&r1=332103&r2=332104&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86SchedHaswell.td (original)
+++ llvm/trunk/lib/Target/X86/X86SchedHaswell.td Fri May 11 09:38:59 2018
@@ -752,10 +752,7 @@ def HWWriteResGroup1 : SchedWriteRes<[HW
let ResourceCycles = [1,1];
}
def: InstRW<[HWWriteResGroup1], (instregex "FBSTPm",
- "MMX_MOVD64from64rm",
"MMX_MOVD64mr",
- "MMX_MOVNTQmr",
- "MMX_MOVQ64mr",
"MOVNTI_64mr",
"MOVNTImr",
"ST_FP(32|64|80)m",
Modified: llvm/trunk/lib/Target/X86/X86SchedSkylakeClient.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86SchedSkylakeClient.td?rev=332104&r1=332103&r2=332104&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86SchedSkylakeClient.td (original)
+++ llvm/trunk/lib/Target/X86/X86SchedSkylakeClient.td Fri May 11 09:38:59 2018
@@ -578,10 +578,7 @@ def SKLWriteResGroup11 : SchedWriteRes<[
let ResourceCycles = [1,1];
}
def: InstRW<[SKLWriteResGroup11], (instregex "FBSTPm",
- "MMX_MOVD64from64rm",
"MMX_MOVD64mr",
- "MMX_MOVNTQmr",
- "MMX_MOVQ64mr",
"MOVNTI_64mr",
"MOVNTImr",
"ST_FP(32|64|80)m",
Modified: llvm/trunk/lib/Target/X86/X86SchedSkylakeServer.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86SchedSkylakeServer.td?rev=332104&r1=332103&r2=332104&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86SchedSkylakeServer.td (original)
+++ llvm/trunk/lib/Target/X86/X86SchedSkylakeServer.td Fri May 11 09:38:59 2018
@@ -603,10 +603,7 @@ def SKXWriteResGroup11 : SchedWriteRes<[
}
def: InstRW<[SKXWriteResGroup11], (instregex "FBSTPm",
"KMOV(B|D|Q|W)mk",
- "MMX_MOVD64from64rm",
"MMX_MOVD64mr",
- "MMX_MOVNTQmr",
- "MMX_MOVQ64mr",
"MOVNTI_64mr",
"MOVNTImr",
"ST_FP(32|64|80)m",
Modified: llvm/trunk/test/tools/llvm-mca/X86/BtVer2/resources-mmx.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-mca/X86/BtVer2/resources-mmx.s?rev=332104&r1=332103&r2=332104&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-mca/X86/BtVer2/resources-mmx.s (original)
+++ llvm/trunk/test/tools/llvm-mca/X86/BtVer2/resources-mmx.s Fri May 11 09:38:59 2018
@@ -288,7 +288,7 @@ pxor (%rax), %mm2
# CHECK: Resource pressure per iteration:
# CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13]
-# CHECK-NEXT: 2.00 2.00 - 0.50 0.50 51.50 45.50 46.00 - 2.00 - 45.00 45.00 6.00
+# CHECK-NEXT: 2.00 2.00 - 0.50 0.50 52.00 47.00 46.00 - 2.00 1.00 45.50 45.50 6.00
# CHECK: Resource pressure by instruction:
# CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] Instructions:
@@ -298,9 +298,9 @@ pxor (%rax), %mm2
# CHECK-NEXT: 0.50 0.50 - - - - - - - - - - - - movd %mm0, %ecx
# CHECK-NEXT: - - - - - - - - - 1.00 - - - - movd %mm0, (%rax)
# CHECK-NEXT: 0.50 0.50 - - - - - - - - - - - - movq %rax, %mm2
-# CHECK-NEXT: - - - - - - - 1.00 - - - - - - movq (%rax), %mm2
+# CHECK-NEXT: - - - - - 0.50 0.50 1.00 - - - 0.50 0.50 - movq (%rax), %mm2
# CHECK-NEXT: 0.50 0.50 - - - - - - - - - - - - movq %mm0, %rcx
-# CHECK-NEXT: - - - - - - - - - 1.00 - - - - movq %mm0, (%rax)
+# CHECK-NEXT: - - - - - - 1.00 - - 1.00 1.00 - - - movq %mm0, (%rax)
# CHECK-NEXT: - - - - - 0.50 0.50 - - - - 0.50 0.50 - packsswb %mm0, %mm2
# CHECK-NEXT: - - - - - 0.50 0.50 1.00 - - - 0.50 0.50 - packsswb (%rax), %mm2
# CHECK-NEXT: - - - - - 0.50 0.50 - - - - 0.50 0.50 - packssdw %mm0, %mm2
Modified: llvm/trunk/test/tools/llvm-mca/X86/BtVer2/resources-sse1.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-mca/X86/BtVer2/resources-sse1.s?rev=332104&r1=332103&r2=332104&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-mca/X86/BtVer2/resources-sse1.s (original)
+++ llvm/trunk/test/tools/llvm-mca/X86/BtVer2/resources-sse1.s Fri May 11 09:38:59 2018
@@ -337,7 +337,7 @@ xorps (%rax), %xmm2
# CHECK: Resource pressure per iteration:
# CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13]
-# CHECK-NEXT: 15.00 - - 46.50 183.50 50.00 62.00 58.00 - 9.00 21.00 9.50 9.50 2.00
+# CHECK-NEXT: 15.00 - - 46.50 183.50 50.00 63.00 58.00 - 9.00 22.00 9.50 9.50 2.00
# CHECK: Resource pressure by instruction:
# CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] Instructions:
@@ -398,7 +398,7 @@ xorps (%rax), %xmm2
# CHECK-NEXT: - - - 0.50 0.50 0.50 0.50 1.00 - - - - - - movlps (%rax), %xmm2
# CHECK-NEXT: 1.00 - - 1.00 - 1.00 - - - - - - - - movmskps %xmm0, %ecx
# CHECK-NEXT: - - - - - - 1.00 - - 1.00 1.00 - - - movntps %xmm0, (%rax)
-# CHECK-NEXT: - - - - - - - - - 1.00 - - - - movntq %mm0, (%rax)
+# CHECK-NEXT: - - - - - - 1.00 - - 1.00 1.00 - - - movntq %mm0, (%rax)
# CHECK-NEXT: - - - 0.50 0.50 0.50 0.50 - - - - - - - movss %xmm0, %xmm2
# CHECK-NEXT: - - - - - - - - - 1.00 - - - - movss %xmm0, (%rax)
# CHECK-NEXT: - - - - - - - 1.00 - - - - - - movss (%rax), %xmm2
Modified: llvm/trunk/test/tools/llvm-mca/X86/SLM/resources-mmx.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-mca/X86/SLM/resources-mmx.s?rev=332104&r1=332103&r2=332104&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-mca/X86/SLM/resources-mmx.s (original)
+++ llvm/trunk/test/tools/llvm-mca/X86/SLM/resources-mmx.s Fri May 11 09:38:59 2018
@@ -282,7 +282,7 @@ pxor (%rax), %mm2
# CHECK: Resource pressure per iteration:
# CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7]
-# CHECK-NEXT: - - - 77.00 29.00 3.00 3.00 48.00
+# CHECK-NEXT: - - - 77.00 29.00 2.50 2.50 48.00
# CHECK: Resource pressure by instruction:
# CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] Instructions:
@@ -294,7 +294,7 @@ pxor (%rax), %mm2
# CHECK-NEXT: - - - - - 0.50 0.50 - movq %rax, %mm2
# CHECK-NEXT: - - - - - - - 1.00 movq (%rax), %mm2
# CHECK-NEXT: - - - - - 0.50 0.50 - movq %mm0, %rcx
-# CHECK-NEXT: - - - - - 0.50 0.50 1.00 movq %mm0, (%rax)
+# CHECK-NEXT: - - - - - - - 1.00 movq %mm0, (%rax)
# CHECK-NEXT: - - - 1.00 - - - - packsswb %mm0, %mm2
# CHECK-NEXT: - - - 1.00 - - - 1.00 packsswb (%rax), %mm2
# CHECK-NEXT: - - - 1.00 - - - - packssdw %mm0, %mm2
Modified: llvm/trunk/test/tools/llvm-mca/X86/SLM/resources-sse1.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-mca/X86/SLM/resources-sse1.s?rev=332104&r1=332103&r2=332104&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-mca/X86/SLM/resources-sse1.s (original)
+++ llvm/trunk/test/tools/llvm-mca/X86/SLM/resources-sse1.s Fri May 11 09:38:59 2018
@@ -331,7 +331,7 @@ xorps (%rax), %xmm2
# CHECK: Resource pressure per iteration:
# CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7]
-# CHECK-NEXT: - 232.00 8.00 61.00 46.00 2.50 2.50 67.00
+# CHECK-NEXT: - 232.00 8.00 61.00 46.00 2.00 2.00 67.00
# CHECK: Resource pressure by instruction:
# CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] Instructions:
@@ -392,7 +392,7 @@ xorps (%rax), %xmm2
# CHECK-NEXT: - - - 1.00 - - - 1.00 movlps (%rax), %xmm2
# CHECK-NEXT: - - - - 1.00 - - - movmskps %xmm0, %ecx
# CHECK-NEXT: - - - - - - - 1.00 movntps %xmm0, (%rax)
-# CHECK-NEXT: - - - - - 0.50 0.50 1.00 movntq %mm0, (%rax)
+# CHECK-NEXT: - - - - - - - 1.00 movntq %mm0, (%rax)
# CHECK-NEXT: - - - 1.00 - - - - movss %xmm0, %xmm2
# CHECK-NEXT: - - - - - 0.50 0.50 1.00 movss %xmm0, (%rax)
# CHECK-NEXT: - - - - - - - 1.00 movss (%rax), %xmm2
More information about the llvm-commits
mailing list