[llvm] r334927 - [X86] Fix NOOP sched overrides on BDW/HSW/SKL.
Clement Courbet via llvm-commits
llvm-commits at lists.llvm.org
Sun Jun 17 23:48:22 PDT 2018
Author: courbet
Date: Sun Jun 17 23:48:22 2018
New Revision: 334927
URL: http://llvm.org/viewvc/llvm-project?rev=334927&view=rev
Log:
[X86] Fix NOOP sched overrides on BDW/HSW/SKL.
Summary: Noop certainly does not use resources.
Reviewers: RKSimon, craig.topper, andreadb
Subscribers: gbedwell, llvm-commits, gchatelet
Differential Revision: https://reviews.llvm.org/D48028
Modified:
llvm/trunk/lib/Target/X86/X86SchedBroadwell.td
llvm/trunk/lib/Target/X86/X86SchedHaswell.td
llvm/trunk/lib/Target/X86/X86SchedSkylakeClient.td
llvm/trunk/test/CodeGen/X86/schedule-x86_64.ll
llvm/trunk/test/CodeGen/X86/sse-schedule.ll
llvm/trunk/test/tools/llvm-mca/X86/Broadwell/resources-x86_64.s
llvm/trunk/test/tools/llvm-mca/X86/Haswell/resources-x86_64.s
llvm/trunk/test/tools/llvm-mca/X86/SkylakeClient/resources-x86_64.s
Modified: llvm/trunk/lib/Target/X86/X86SchedBroadwell.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86SchedBroadwell.td?rev=334927&r1=334926&r2=334927&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86SchedBroadwell.td (original)
+++ llvm/trunk/lib/Target/X86/X86SchedBroadwell.td Sun Jun 17 23:48:22 2018
@@ -625,8 +625,7 @@ def BWWriteResGroup9 : SchedWriteRes<[BW
let ResourceCycles = [1];
}
def: InstRW<[BWWriteResGroup9], (instrs LAHF, SAHF)>; // TODO: This doesnt match Agner's data
-def: InstRW<[BWWriteResGroup9], (instregex "NOOP",
- "SGDT64m",
+def: InstRW<[BWWriteResGroup9], (instregex "SGDT64m",
"SIDT64m",
"SMSW16m",
"STRm",
Modified: llvm/trunk/lib/Target/X86/X86SchedHaswell.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86SchedHaswell.td?rev=334927&r1=334926&r2=334927&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86SchedHaswell.td (original)
+++ llvm/trunk/lib/Target/X86/X86SchedHaswell.td Sun Jun 17 23:48:22 2018
@@ -913,8 +913,7 @@ def HWWriteResGroup10 : SchedWriteRes<[H
def: InstRW<[HWWriteResGroup10], (instrs CBW, CWDE, CDQE,
CMC, STC)>;
def: InstRW<[HWWriteResGroup10], (instrs LAHF, SAHF)>; // TODO: This doesn't match Agner's data
-def: InstRW<[HWWriteResGroup10], (instregex "NOOP",
- "SGDT64m",
+def: InstRW<[HWWriteResGroup10], (instregex "SGDT64m",
"SIDT64m",
"SMSW16m",
"STRm",
Modified: llvm/trunk/lib/Target/X86/X86SchedSkylakeClient.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86SchedSkylakeClient.td?rev=334927&r1=334926&r2=334927&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86SchedSkylakeClient.td (original)
+++ llvm/trunk/lib/Target/X86/X86SchedSkylakeClient.td Sun Jun 17 23:48:22 2018
@@ -630,8 +630,7 @@ def SKLWriteResGroup10 : SchedWriteRes<[
def: InstRW<[SKLWriteResGroup10], (instrs CBW, CWDE, CDQE,
CMC, STC)>;
def: InstRW<[SKLWriteResGroup10], (instrs LAHF, SAHF)>; // TODO: This doesn't match Agner's data
-def: InstRW<[SKLWriteResGroup10], (instregex "NOOP",
- "SGDT64m",
+def: InstRW<[SKLWriteResGroup10], (instregex "SGDT64m",
"SIDT64m",
"SMSW16m",
"STRm",
Modified: llvm/trunk/test/CodeGen/X86/schedule-x86_64.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/schedule-x86_64.ll?rev=334927&r1=334926&r2=334927&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/schedule-x86_64.ll (original)
+++ llvm/trunk/test/CodeGen/X86/schedule-x86_64.ll Sun Jun 17 23:48:22 2018
@@ -8363,13 +8363,13 @@ define void @test_nop(i16 %a0, i32 %a1,
; SKYLAKE-LABEL: test_nop:
; SKYLAKE: # %bb.0:
; SKYLAKE-NEXT: #APP
-; SKYLAKE-NEXT: nop # sched: [1:0.25]
-; SKYLAKE-NEXT: nopw %di # sched: [1:0.25]
-; SKYLAKE-NEXT: nopw (%rcx) # sched: [1:0.25]
-; SKYLAKE-NEXT: nopl %esi # sched: [1:0.25]
-; SKYLAKE-NEXT: nopl (%r8) # sched: [1:0.25]
-; SKYLAKE-NEXT: nopq %rdx # sched: [1:0.25]
-; SKYLAKE-NEXT: nopq (%r9) # sched: [1:0.25]
+; SKYLAKE-NEXT: nop # sched: [1:0.17]
+; SKYLAKE-NEXT: nopw %di # sched: [1:0.17]
+; SKYLAKE-NEXT: nopw (%rcx) # sched: [1:0.17]
+; SKYLAKE-NEXT: nopl %esi # sched: [1:0.17]
+; SKYLAKE-NEXT: nopl (%r8) # sched: [1:0.17]
+; SKYLAKE-NEXT: nopq %rdx # sched: [1:0.17]
+; SKYLAKE-NEXT: nopq (%r9) # sched: [1:0.17]
; SKYLAKE-NEXT: #NO_APP
; SKYLAKE-NEXT: retq # sched: [7:1.00]
;
Modified: llvm/trunk/test/CodeGen/X86/sse-schedule.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/sse-schedule.ll?rev=334927&r1=334926&r2=334927&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/sse-schedule.ll (original)
+++ llvm/trunk/test/CodeGen/X86/sse-schedule.ll Sun Jun 17 23:48:22 2018
@@ -6194,7 +6194,7 @@ define <4 x float> @test_fnop() nounwind
; SKYLAKE-SSE-LABEL: test_fnop:
; SKYLAKE-SSE: # %bb.0:
; SKYLAKE-SSE-NEXT: #APP
-; SKYLAKE-SSE-NEXT: nop # sched: [1:0.25]
+; SKYLAKE-SSE-NEXT: nop # sched: [1:0.17]
; SKYLAKE-SSE-NEXT: #NO_APP
; SKYLAKE-SSE-NEXT: xorps %xmm0, %xmm0 # sched: [1:0.33]
; SKYLAKE-SSE-NEXT: retq # sched: [7:1.00]
@@ -6202,7 +6202,7 @@ define <4 x float> @test_fnop() nounwind
; SKYLAKE-LABEL: test_fnop:
; SKYLAKE: # %bb.0:
; SKYLAKE-NEXT: #APP
-; SKYLAKE-NEXT: nop # sched: [1:0.25]
+; SKYLAKE-NEXT: nop # sched: [1:0.17]
; SKYLAKE-NEXT: #NO_APP
; SKYLAKE-NEXT: vxorps %xmm0, %xmm0, %xmm0 # sched: [1:0.33]
; SKYLAKE-NEXT: retq # sched: [7:1.00]
Modified: llvm/trunk/test/tools/llvm-mca/X86/Broadwell/resources-x86_64.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-mca/X86/Broadwell/resources-x86_64.s?rev=334927&r1=334926&r2=334927&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-mca/X86/Broadwell/resources-x86_64.s (original)
+++ llvm/trunk/test/tools/llvm-mca/X86/Broadwell/resources-x86_64.s Sun Jun 17 23:48:22 2018
@@ -1164,7 +1164,7 @@ xorq (%rax), %rdi
# CHECK: Resource pressure per iteration:
# CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9]
-# CHECK-NEXT: 50.00 - 363.75 244.25 202.00 202.00 167.00 149.75 329.25 69.00
+# CHECK-NEXT: 50.00 - 362.00 242.50 202.00 202.00 167.00 148.00 327.50 69.00
# CHECK: Resource pressure by instruction:
# CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] Instructions:
@@ -1381,13 +1381,13 @@ xorq (%rax), %rdi
# CHECK-NEXT: - - 0.25 0.25 0.83 0.83 1.00 0.25 0.25 0.33 negl (%rax)
# CHECK-NEXT: - - 0.25 0.25 - - - 0.25 0.25 - negq %rcx
# CHECK-NEXT: - - 0.25 0.25 0.83 0.83 1.00 0.25 0.25 0.33 negq (%r10)
-# CHECK-NEXT: - - 0.25 0.25 - - - 0.25 0.25 - nop
-# CHECK-NEXT: - - 0.25 0.25 - - - 0.25 0.25 - nopw %di
-# CHECK-NEXT: - - 0.25 0.25 - - - 0.25 0.25 - nopw (%rcx)
-# CHECK-NEXT: - - 0.25 0.25 - - - 0.25 0.25 - nopl %esi
-# CHECK-NEXT: - - 0.25 0.25 - - - 0.25 0.25 - nopl (%r8)
-# CHECK-NEXT: - - 0.25 0.25 - - - 0.25 0.25 - nopq %rdx
-# CHECK-NEXT: - - 0.25 0.25 - - - 0.25 0.25 - nopq (%r9)
+# CHECK-NEXT: - - - - - - - - - - nop
+# CHECK-NEXT: - - - - - - - - - - nopw %di
+# CHECK-NEXT: - - - - - - - - - - nopw (%rcx)
+# CHECK-NEXT: - - - - - - - - - - nopl %esi
+# CHECK-NEXT: - - - - - - - - - - nopl (%r8)
+# CHECK-NEXT: - - - - - - - - - - nopq %rdx
+# CHECK-NEXT: - - - - - - - - - - nopq (%r9)
# CHECK-NEXT: - - 0.25 0.25 - - - 0.25 0.25 - notb %dil
# CHECK-NEXT: - - 0.25 0.25 0.83 0.83 1.00 0.25 0.25 0.33 notb (%r8)
# CHECK-NEXT: - - 0.25 0.25 - - - 0.25 0.25 - notw %si
Modified: llvm/trunk/test/tools/llvm-mca/X86/Haswell/resources-x86_64.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-mca/X86/Haswell/resources-x86_64.s?rev=334927&r1=334926&r2=334927&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-mca/X86/Haswell/resources-x86_64.s (original)
+++ llvm/trunk/test/tools/llvm-mca/X86/Haswell/resources-x86_64.s Sun Jun 17 23:48:22 2018
@@ -1164,7 +1164,7 @@ xorq (%rax), %rdi
# CHECK: Resource pressure per iteration:
# CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9]
-# CHECK-NEXT: 80.00 - 414.75 265.25 193.00 193.00 158.00 172.75 409.25 66.00
+# CHECK-NEXT: 80.00 - 413.00 263.50 193.00 193.00 158.00 171.00 407.50 66.00
# CHECK: Resource pressure by instruction:
# CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] Instructions:
@@ -1381,13 +1381,13 @@ xorq (%rax), %rdi
# CHECK-NEXT: - - 0.25 0.25 0.83 0.83 1.00 0.25 0.25 0.33 negl (%rax)
# CHECK-NEXT: - - 0.25 0.25 - - - 0.25 0.25 - negq %rcx
# CHECK-NEXT: - - 0.25 0.25 0.83 0.83 1.00 0.25 0.25 0.33 negq (%r10)
-# CHECK-NEXT: - - 0.25 0.25 - - - 0.25 0.25 - nop
-# CHECK-NEXT: - - 0.25 0.25 - - - 0.25 0.25 - nopw %di
-# CHECK-NEXT: - - 0.25 0.25 - - - 0.25 0.25 - nopw (%rcx)
-# CHECK-NEXT: - - 0.25 0.25 - - - 0.25 0.25 - nopl %esi
-# CHECK-NEXT: - - 0.25 0.25 - - - 0.25 0.25 - nopl (%r8)
-# CHECK-NEXT: - - 0.25 0.25 - - - 0.25 0.25 - nopq %rdx
-# CHECK-NEXT: - - 0.25 0.25 - - - 0.25 0.25 - nopq (%r9)
+# CHECK-NEXT: - - - - - - - - - - nop
+# CHECK-NEXT: - - - - - - - - - - nopw %di
+# CHECK-NEXT: - - - - - - - - - - nopw (%rcx)
+# CHECK-NEXT: - - - - - - - - - - nopl %esi
+# CHECK-NEXT: - - - - - - - - - - nopl (%r8)
+# CHECK-NEXT: - - - - - - - - - - nopq %rdx
+# CHECK-NEXT: - - - - - - - - - - nopq (%r9)
# CHECK-NEXT: - - 0.25 0.25 - - - 0.25 0.25 - notb %dil
# CHECK-NEXT: - - 0.25 0.25 0.83 0.83 1.00 0.25 0.25 0.33 notb (%r8)
# CHECK-NEXT: - - 0.25 0.25 - - - 0.25 0.25 - notw %si
Modified: llvm/trunk/test/tools/llvm-mca/X86/SkylakeClient/resources-x86_64.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-mca/X86/SkylakeClient/resources-x86_64.s?rev=334927&r1=334926&r2=334927&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-mca/X86/SkylakeClient/resources-x86_64.s (original)
+++ llvm/trunk/test/tools/llvm-mca/X86/SkylakeClient/resources-x86_64.s Sun Jun 17 23:48:22 2018
@@ -822,13 +822,13 @@ xorq (%rax), %rdi
# CHECK-NEXT: 3 7 1.00 * * negl (%rax)
# CHECK-NEXT: 1 1 0.25 negq %rcx
# CHECK-NEXT: 3 7 1.00 * * negq (%r10)
-# CHECK-NEXT: 1 1 0.25 nop
-# CHECK-NEXT: 1 1 0.25 nopw %di
-# CHECK-NEXT: 1 1 0.25 nopw (%rcx)
-# CHECK-NEXT: 1 1 0.25 nopl %esi
-# CHECK-NEXT: 1 1 0.25 nopl (%r8)
-# CHECK-NEXT: 1 1 0.25 nopq %rdx
-# CHECK-NEXT: 1 1 0.25 nopq (%r9)
+# CHECK-NEXT: 1 1 0.17 nop
+# CHECK-NEXT: 1 1 0.17 nopw %di
+# CHECK-NEXT: 1 1 0.17 nopw (%rcx)
+# CHECK-NEXT: 1 1 0.17 nopl %esi
+# CHECK-NEXT: 1 1 0.17 nopl (%r8)
+# CHECK-NEXT: 1 1 0.17 nopq %rdx
+# CHECK-NEXT: 1 1 0.17 nopq (%r9)
# CHECK-NEXT: 1 1 0.25 notb %dil
# CHECK-NEXT: 3 7 1.00 * * notb (%r8)
# CHECK-NEXT: 1 1 0.25 notw %si
@@ -1164,7 +1164,7 @@ xorq (%rax), %rdi
# CHECK: Resource pressure per iteration:
# CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9]
-# CHECK-NEXT: 60.00 - 431.25 225.25 202.00 202.00 167.00 185.75 415.75 69.00
+# CHECK-NEXT: 60.00 - 429.50 223.50 202.00 202.00 167.00 184.00 414.00 69.00
# CHECK: Resource pressure by instruction:
# CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] Instructions:
@@ -1381,13 +1381,13 @@ xorq (%rax), %rdi
# CHECK-NEXT: - - 0.25 0.25 0.83 0.83 1.00 0.25 0.25 0.33 negl (%rax)
# CHECK-NEXT: - - 0.25 0.25 - - - 0.25 0.25 - negq %rcx
# CHECK-NEXT: - - 0.25 0.25 0.83 0.83 1.00 0.25 0.25 0.33 negq (%r10)
-# CHECK-NEXT: - - 0.25 0.25 - - - 0.25 0.25 - nop
-# CHECK-NEXT: - - 0.25 0.25 - - - 0.25 0.25 - nopw %di
-# CHECK-NEXT: - - 0.25 0.25 - - - 0.25 0.25 - nopw (%rcx)
-# CHECK-NEXT: - - 0.25 0.25 - - - 0.25 0.25 - nopl %esi
-# CHECK-NEXT: - - 0.25 0.25 - - - 0.25 0.25 - nopl (%r8)
-# CHECK-NEXT: - - 0.25 0.25 - - - 0.25 0.25 - nopq %rdx
-# CHECK-NEXT: - - 0.25 0.25 - - - 0.25 0.25 - nopq (%r9)
+# CHECK-NEXT: - - - - - - - - - - nop
+# CHECK-NEXT: - - - - - - - - - - nopw %di
+# CHECK-NEXT: - - - - - - - - - - nopw (%rcx)
+# CHECK-NEXT: - - - - - - - - - - nopl %esi
+# CHECK-NEXT: - - - - - - - - - - nopl (%r8)
+# CHECK-NEXT: - - - - - - - - - - nopq %rdx
+# CHECK-NEXT: - - - - - - - - - - nopq (%r9)
# CHECK-NEXT: - - 0.25 0.25 - - - 0.25 0.25 - notb %dil
# CHECK-NEXT: - - 0.25 0.25 0.83 0.83 1.00 0.25 0.25 0.33 notb (%r8)
# CHECK-NEXT: - - 0.25 0.25 - - - 0.25 0.25 - notw %si
More information about the llvm-commits
mailing list