[llvm] r343447 - [X86][Sched] Update scheduling information for VZEROALL on HWS, BDW, SKX, SNB.
Clement Courbet via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 1 01:37:48 PDT 2018
Author: courbet
Date: Mon Oct 1 01:37:48 2018
New Revision: 343447
URL: http://llvm.org/viewvc/llvm-project?rev=343447&view=rev
Log:
[X86][Sched] Update scheduling information for VZEROALL on HWS, BDW, SKX, SNB.
Summary:
While looking at PR35606, I found out that the scheduling info is incorrect.
One can check that it's really a P5+P6 and not a 2*P56 with:
echo -e 'vzeroall\nvandps %xmm1, %xmm2, %xmm3' | ./bin/llvm-exegesis -mode=uops -snippets-file=-
(vandps executes on P5 only)
Reviewers: craig.topper, RKSimon
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D52541
Modified:
llvm/trunk/lib/Target/X86/X86SchedBroadwell.td
llvm/trunk/lib/Target/X86/X86SchedHaswell.td
llvm/trunk/lib/Target/X86/X86SchedSandyBridge.td
llvm/trunk/lib/Target/X86/X86SchedSkylakeServer.td
llvm/trunk/test/CodeGen/X86/avx-schedule.ll
llvm/trunk/test/tools/llvm-mca/X86/Broadwell/resources-avx1.s
llvm/trunk/test/tools/llvm-mca/X86/Generic/resources-avx1.s
llvm/trunk/test/tools/llvm-mca/X86/Haswell/resources-avx1.s
llvm/trunk/test/tools/llvm-mca/X86/SandyBridge/resources-avx1.s
llvm/trunk/test/tools/llvm-mca/X86/SkylakeServer/resources-avx1.s
Modified: llvm/trunk/lib/Target/X86/X86SchedBroadwell.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86SchedBroadwell.td?rev=343447&r1=343446&r2=343447&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86SchedBroadwell.td (original)
+++ llvm/trunk/lib/Target/X86/X86SchedBroadwell.td Mon Oct 1 01:37:48 2018
@@ -1374,10 +1374,10 @@ def BWWriteResGroup153 : SchedWriteRes<[
}
def: InstRW<[BWWriteResGroup153], (instrs CMPXCHG8B)>;
-def BWWriteResGroup154 : SchedWriteRes<[BWPort5]> {
- let Latency = 16;
- let NumMicroOps = 16;
- let ResourceCycles = [16];
+def BWWriteResGroup154 : SchedWriteRes<[BWPort5,BWPort6]> {
+ let Latency = 8;
+ let NumMicroOps = 20;
+ let ResourceCycles = [1,1];
}
def: InstRW<[BWWriteResGroup154], (instrs VZEROALL)>;
Modified: llvm/trunk/lib/Target/X86/X86SchedHaswell.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86SchedHaswell.td?rev=343447&r1=343446&r2=343447&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86SchedHaswell.td (original)
+++ llvm/trunk/lib/Target/X86/X86SchedHaswell.td Mon Oct 1 01:37:48 2018
@@ -1617,10 +1617,10 @@ def HWWriteResGroup144 : SchedWriteRes<[
}
def: InstRW<[HWWriteResGroup144], (instrs INSB, INSL, INSW)>;
-def HWWriteResGroup145 : SchedWriteRes<[HWPort5]> {
- let Latency = 16;
- let NumMicroOps = 16;
- let ResourceCycles = [16];
+def HWWriteResGroup145 : SchedWriteRes<[HWPort5, HWPort6]> {
+ let Latency = 8;
+ let NumMicroOps = 20;
+ let ResourceCycles = [1,1];
}
def: InstRW<[HWWriteResGroup145], (instrs VZEROALL)>;
Modified: llvm/trunk/lib/Target/X86/X86SchedSandyBridge.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86SchedSandyBridge.td?rev=343447&r1=343446&r2=343447&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86SchedSandyBridge.td (original)
+++ llvm/trunk/lib/Target/X86/X86SchedSandyBridge.td Mon Oct 1 01:37:48 2018
@@ -1104,6 +1104,13 @@ def SBWriteResGroup131 : SchedWriteRes<[
}
def: InstRW<[SBWriteResGroup131], (instregex "DIV(R?)_FI(16|32)m")>;
+def SBWriteResGroupVzeroall : SchedWriteRes<[SBPort5]> {
+ let Latency = 9;
+ let NumMicroOps = 20;
+ let ResourceCycles = [2];
+}
+def: InstRW<[SBWriteResGroupVzeroall], (instrs VZEROALL)>;
+
def: InstRW<[WriteZero], (instrs CLC)>;
// Intruction variants handled by the renamer. These might not need execution
Modified: llvm/trunk/lib/Target/X86/X86SchedSkylakeServer.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86SchedSkylakeServer.td?rev=343447&r1=343446&r2=343447&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86SchedSkylakeServer.td (original)
+++ llvm/trunk/lib/Target/X86/X86SchedSkylakeServer.td Mon Oct 1 01:37:48 2018
@@ -2086,10 +2086,10 @@ def SKXWriteResGroup199 : SchedWriteRes<
}
def: InstRW<[SKXWriteResGroup199], (instrs CMPXCHG8B)>;
-def SKXWriteResGroup200 : SchedWriteRes<[SKXPort0156]> {
- let Latency = 16;
- let NumMicroOps = 16;
- let ResourceCycles = [16];
+def SKXWriteResGroup200 : SchedWriteRes<[SKXPort1, SKXPort05, SKXPort6]> {
+ let Latency = 12;
+ let NumMicroOps = 34;
+ let ResourceCycles = [1, 4, 5];
}
def: InstRW<[SKXWriteResGroup200], (instrs VZEROALL)>;
Modified: llvm/trunk/test/CodeGen/X86/avx-schedule.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/avx-schedule.ll?rev=343447&r1=343446&r2=343447&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/avx-schedule.ll (original)
+++ llvm/trunk/test/CodeGen/X86/avx-schedule.ll Mon Oct 1 01:37:48 2018
@@ -5339,22 +5339,22 @@ define <8 x float> @test_xorps(<8 x floa
define void @test_zeroall() {
; GENERIC-LABEL: test_zeroall:
; GENERIC: # %bb.0:
-; GENERIC-NEXT: vzeroall # sched: [100:0.33]
+; GENERIC-NEXT: vzeroall # sched: [9:2.00]
; GENERIC-NEXT: retq # sched: [1:1.00]
;
; SANDY-LABEL: test_zeroall:
; SANDY: # %bb.0:
-; SANDY-NEXT: vzeroall # sched: [100:0.33]
+; SANDY-NEXT: vzeroall # sched: [9:2.00]
; SANDY-NEXT: retq # sched: [1:1.00]
;
; HASWELL-LABEL: test_zeroall:
; HASWELL: # %bb.0:
-; HASWELL-NEXT: vzeroall # sched: [16:16.00]
+; HASWELL-NEXT: vzeroall # sched: [8:1.00]
; HASWELL-NEXT: retq # sched: [7:1.00]
;
; BROADWELL-LABEL: test_zeroall:
; BROADWELL: # %bb.0:
-; BROADWELL-NEXT: vzeroall # sched: [16:16.00]
+; BROADWELL-NEXT: vzeroall # sched: [8:1.00]
; BROADWELL-NEXT: retq # sched: [7:1.00]
;
; SKYLAKE-LABEL: test_zeroall:
@@ -5364,7 +5364,7 @@ define void @test_zeroall() {
;
; SKX-LABEL: test_zeroall:
; SKX: # %bb.0:
-; SKX-NEXT: vzeroall # sched: [16:4.00]
+; SKX-NEXT: vzeroall # sched: [12:5.00]
; SKX-NEXT: retq # sched: [7:1.00]
;
; BTVER2-LABEL: test_zeroall:
Modified: llvm/trunk/test/tools/llvm-mca/X86/Broadwell/resources-avx1.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-mca/X86/Broadwell/resources-avx1.s?rev=343447&r1=343446&r2=343447&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-mca/X86/Broadwell/resources-avx1.s (original)
+++ llvm/trunk/test/tools/llvm-mca/X86/Broadwell/resources-avx1.s Mon Oct 1 01:37:48 2018
@@ -1719,7 +1719,7 @@ vzeroupper
# CHECK-NEXT: 2 6 1.00 * vxorps (%rax), %xmm1, %xmm2
# CHECK-NEXT: 1 1 1.00 vxorps %ymm0, %ymm1, %ymm2
# CHECK-NEXT: 2 7 1.00 * vxorps (%rax), %ymm1, %ymm2
-# CHECK-NEXT: 16 16 16.00 * * U vzeroall
+# CHECK-NEXT: 20 8 1.00 * * U vzeroall
# CHECK-NEXT: 4 4 1.00 * * U vzeroupper
# CHECK: Resources:
@@ -1736,7 +1736,7 @@ vzeroupper
# CHECK: Resource pressure per iteration:
# CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9]
-# CHECK-NEXT: - 257.00 216.33 236.33 176.17 176.17 38.00 442.33 2.00 12.67
+# CHECK-NEXT: - 257.00 216.33 236.33 176.17 176.17 38.00 427.33 3.00 12.67
# CHECK: Resource pressure by instruction:
# CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] Instructions:
@@ -2429,5 +2429,5 @@ vzeroupper
# CHECK-NEXT: - - - - 0.50 0.50 - 1.00 - - vxorps (%rax), %xmm1, %xmm2
# CHECK-NEXT: - - - - - - - 1.00 - - vxorps %ymm0, %ymm1, %ymm2
# CHECK-NEXT: - - - - 0.50 0.50 - 1.00 - - vxorps (%rax), %ymm1, %ymm2
-# CHECK-NEXT: - - - - - - - 16.00 - - vzeroall
+# CHECK-NEXT: - - - - - - - 1.00 1.00 - vzeroall
# CHECK-NEXT: - - 1.08 1.08 - - - 1.08 0.75 - vzeroupper
Modified: llvm/trunk/test/tools/llvm-mca/X86/Generic/resources-avx1.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-mca/X86/Generic/resources-avx1.s?rev=343447&r1=343446&r2=343447&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-mca/X86/Generic/resources-avx1.s (original)
+++ llvm/trunk/test/tools/llvm-mca/X86/Generic/resources-avx1.s Mon Oct 1 01:37:48 2018
@@ -1719,7 +1719,7 @@ vzeroupper
# CHECK-NEXT: 2 7 1.00 * vxorps (%rax), %xmm1, %xmm2
# CHECK-NEXT: 1 1 1.00 vxorps %ymm0, %ymm1, %ymm2
# CHECK-NEXT: 2 8 1.00 * vxorps (%rax), %ymm1, %ymm2
-# CHECK-NEXT: 1 100 0.33 * * U vzeroall
+# CHECK-NEXT: 20 9 2.00 * * U vzeroall
# CHECK-NEXT: 1 100 0.33 * * U vzeroupper
# CHECK: Resources:
@@ -1734,7 +1734,7 @@ vzeroupper
# CHECK: Resource pressure per iteration:
# CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6.0] [6.1]
-# CHECK-NEXT: - 572.00 247.17 317.67 39.00 364.17 179.50 179.50
+# CHECK-NEXT: - 572.00 246.83 317.33 39.00 365.83 179.50 179.50
# CHECK: Resource pressure by instruction:
# CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6.0] [6.1] Instructions:
@@ -2427,5 +2427,5 @@ vzeroupper
# CHECK-NEXT: - - - - - 1.00 0.50 0.50 vxorps (%rax), %xmm1, %xmm2
# CHECK-NEXT: - - - - - 1.00 - - vxorps %ymm0, %ymm1, %ymm2
# CHECK-NEXT: - - - - - 1.00 0.50 0.50 vxorps (%rax), %ymm1, %ymm2
-# CHECK-NEXT: - - 0.33 0.33 - 0.33 - - vzeroall
+# CHECK-NEXT: - - - - - 2.00 - - vzeroall
# CHECK-NEXT: - - 0.33 0.33 - 0.33 - - vzeroupper
Modified: llvm/trunk/test/tools/llvm-mca/X86/Haswell/resources-avx1.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-mca/X86/Haswell/resources-avx1.s?rev=343447&r1=343446&r2=343447&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-mca/X86/Haswell/resources-avx1.s (original)
+++ llvm/trunk/test/tools/llvm-mca/X86/Haswell/resources-avx1.s Mon Oct 1 01:37:48 2018
@@ -1719,7 +1719,7 @@ vzeroupper
# CHECK-NEXT: 2 7 1.00 * vxorps (%rax), %xmm1, %xmm2
# CHECK-NEXT: 1 1 1.00 vxorps %ymm0, %ymm1, %ymm2
# CHECK-NEXT: 2 8 1.00 * vxorps (%rax), %ymm1, %ymm2
-# CHECK-NEXT: 16 16 16.00 * * U vzeroall
+# CHECK-NEXT: 20 8 1.00 * * U vzeroall
# CHECK-NEXT: 4 4 1.00 * * U vzeroupper
# CHECK: Resources:
@@ -1736,7 +1736,7 @@ vzeroupper
# CHECK: Resource pressure per iteration:
# CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9]
-# CHECK-NEXT: - 336.00 215.67 237.67 176.17 176.17 38.00 445.67 2.00 12.67
+# CHECK-NEXT: - 336.00 215.67 237.67 176.17 176.17 38.00 430.67 3.00 12.67
# CHECK: Resource pressure by instruction:
# CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] Instructions:
@@ -2429,5 +2429,5 @@ vzeroupper
# CHECK-NEXT: - - - - 0.50 0.50 - 1.00 - - vxorps (%rax), %xmm1, %xmm2
# CHECK-NEXT: - - - - - - - 1.00 - - vxorps %ymm0, %ymm1, %ymm2
# CHECK-NEXT: - - - - 0.50 0.50 - 1.00 - - vxorps (%rax), %ymm1, %ymm2
-# CHECK-NEXT: - - - - - - - 16.00 - - vzeroall
+# CHECK-NEXT: - - - - - - - 1.00 1.00 - vzeroall
# CHECK-NEXT: - - 1.08 1.08 - - - 1.08 0.75 - vzeroupper
Modified: llvm/trunk/test/tools/llvm-mca/X86/SandyBridge/resources-avx1.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-mca/X86/SandyBridge/resources-avx1.s?rev=343447&r1=343446&r2=343447&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-mca/X86/SandyBridge/resources-avx1.s (original)
+++ llvm/trunk/test/tools/llvm-mca/X86/SandyBridge/resources-avx1.s Mon Oct 1 01:37:48 2018
@@ -1719,7 +1719,7 @@ vzeroupper
# CHECK-NEXT: 2 7 1.00 * vxorps (%rax), %xmm1, %xmm2
# CHECK-NEXT: 1 1 1.00 vxorps %ymm0, %ymm1, %ymm2
# CHECK-NEXT: 2 8 1.00 * vxorps (%rax), %ymm1, %ymm2
-# CHECK-NEXT: 1 100 0.33 * * U vzeroall
+# CHECK-NEXT: 20 9 2.00 * * U vzeroall
# CHECK-NEXT: 1 100 0.33 * * U vzeroupper
# CHECK: Resources:
@@ -1734,7 +1734,7 @@ vzeroupper
# CHECK: Resource pressure per iteration:
# CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6.0] [6.1]
-# CHECK-NEXT: - 572.00 247.17 317.67 39.00 364.17 179.50 179.50
+# CHECK-NEXT: - 572.00 246.83 317.33 39.00 365.83 179.50 179.50
# CHECK: Resource pressure by instruction:
# CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6.0] [6.1] Instructions:
@@ -2427,5 +2427,5 @@ vzeroupper
# CHECK-NEXT: - - - - - 1.00 0.50 0.50 vxorps (%rax), %xmm1, %xmm2
# CHECK-NEXT: - - - - - 1.00 - - vxorps %ymm0, %ymm1, %ymm2
# CHECK-NEXT: - - - - - 1.00 0.50 0.50 vxorps (%rax), %ymm1, %ymm2
-# CHECK-NEXT: - - 0.33 0.33 - 0.33 - - vzeroall
+# CHECK-NEXT: - - - - - 2.00 - - vzeroall
# CHECK-NEXT: - - 0.33 0.33 - 0.33 - - vzeroupper
Modified: llvm/trunk/test/tools/llvm-mca/X86/SkylakeServer/resources-avx1.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-mca/X86/SkylakeServer/resources-avx1.s?rev=343447&r1=343446&r2=343447&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-mca/X86/SkylakeServer/resources-avx1.s (original)
+++ llvm/trunk/test/tools/llvm-mca/X86/SkylakeServer/resources-avx1.s Mon Oct 1 01:37:48 2018
@@ -1719,7 +1719,7 @@ vzeroupper
# CHECK-NEXT: 2 7 0.50 * vxorps (%rax), %xmm1, %xmm2
# CHECK-NEXT: 1 1 0.33 vxorps %ymm0, %ymm1, %ymm2
# CHECK-NEXT: 2 8 0.50 * vxorps (%rax), %ymm1, %ymm2
-# CHECK-NEXT: 16 16 4.00 * * U vzeroall
+# CHECK-NEXT: 34 12 5.00 * * U vzeroall
# CHECK-NEXT: 4 4 1.00 * * U vzeroupper
# CHECK: Resources:
@@ -1736,7 +1736,7 @@ vzeroupper
# CHECK: Resource pressure per iteration:
# CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9]
-# CHECK-NEXT: - 123.00 320.50 200.50 173.17 173.17 34.00 341.00 6.00 12.67
+# CHECK-NEXT: - 123.00 318.50 197.50 173.17 173.17 34.00 339.00 7.00 12.67
# CHECK: Resource pressure by instruction:
# CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] Instructions:
@@ -2429,5 +2429,5 @@ vzeroupper
# CHECK-NEXT: - - 0.33 0.33 0.50 0.50 - 0.33 - - vxorps (%rax), %xmm1, %xmm2
# CHECK-NEXT: - - 0.33 0.33 - - - 0.33 - - vxorps %ymm0, %ymm1, %ymm2
# CHECK-NEXT: - - 0.33 0.33 0.50 0.50 - 0.33 - - vxorps (%rax), %ymm1, %ymm2
-# CHECK-NEXT: - - 4.00 4.00 - - - 4.00 4.00 - vzeroall
+# CHECK-NEXT: - - 2.00 1.00 - - - 2.00 5.00 - vzeroall
# CHECK-NEXT: - - 1.08 1.08 - - - 1.08 0.75 - vzeroupper
More information about the llvm-commits
mailing list