[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

llvm-svn: 334927
This commit is contained in:
Clement Courbet 2018-06-18 06:48:22 +00:00
parent e26d5f4b12
commit 0d9da88d18
8 changed files with 43 additions and 46 deletions

View File

@ -625,8 +625,7 @@ def BWWriteResGroup9 : SchedWriteRes<[BWPort0156]> {
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",

View File

@ -913,8 +913,7 @@ def HWWriteResGroup10 : SchedWriteRes<[HWPort0156]> {
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",

View File

@ -630,8 +630,7 @@ def SKLWriteResGroup10 : SchedWriteRes<[SKLPort0156]> {
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",

View File

@ -8363,13 +8363,13 @@ define void @test_nop(i16 %a0, i32 %a1, i64 %a2, i16 *%p0, i32 *%p1, i64 *%p2) o
; 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]
;

View File

@ -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]

View File

@ -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

View File

@ -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

View File

@ -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