[X86][SLM] Fix ADDQ/SUBQ/CMPEQQ throughput to account for running on either port.

Testing on a SLM box suggests these can run on either port, but the throughput is 4cy on either (inc MMX versions). Confirmed with Intel AoM / Agner / InstLatX64.
This commit is contained in:
Simon Pilgrim 2021-09-23 19:47:58 +01:00
parent 45617e1dd8
commit dade83c02a
3 changed files with 30 additions and 26 deletions

View File

@ -465,15 +465,19 @@ def : WriteRes<WriteNop, []>;
def SLMWriteResGroup1rr : SchedWriteRes<[SLM_FPC_RSV01]> {
let Latency = 4;
let NumMicroOps = 2;
let ResourceCycles = [4];
let ResourceCycles = [8];
}
def: InstRW<[SLMWriteResGroup1rr], (instrs PADDQrr, PSUBQrr, PCMPEQQrr)>;
def: InstRW<[SLMWriteResGroup1rr], (instrs MMX_PADDQirr, PADDQrr,
MMX_PSUBQirr, PSUBQrr,
PCMPEQQrr)>;
def SLMWriteResGroup1rm : SchedWriteRes<[SLM_MEC_RSV,SLM_FPC_RSV01]> {
let Latency = 7;
let NumMicroOps = 3;
let ResourceCycles = [1,4];
let ResourceCycles = [1,8];
}
def: InstRW<[SLMWriteResGroup1rm], (instrs PADDQrm, PSUBQrm, PCMPEQQrm)>;
def: InstRW<[SLMWriteResGroup1rm], (instrs MMX_PADDQirm, PADDQrm,
MMX_PSUBQirm, PSUBQrm,
PCMPEQQrm)>;
} // SchedModel

View File

@ -526,10 +526,10 @@ xorpd (%rax), %xmm2
# CHECK-NEXT: 1 4 1.00 * paddb (%rax), %xmm2
# CHECK-NEXT: 1 1 0.50 paddd %xmm0, %xmm2
# CHECK-NEXT: 1 4 1.00 * paddd (%rax), %xmm2
# CHECK-NEXT: 1 1 0.50 paddq %mm0, %mm2
# CHECK-NEXT: 1 4 1.00 * paddq (%rax), %mm2
# CHECK-NEXT: 2 4 2.00 paddq %xmm0, %xmm2
# CHECK-NEXT: 3 7 2.00 * paddq (%rax), %xmm2
# CHECK-NEXT: 2 4 4.00 paddq %mm0, %mm2
# CHECK-NEXT: 3 7 4.00 * paddq (%rax), %mm2
# CHECK-NEXT: 2 4 4.00 paddq %xmm0, %xmm2
# CHECK-NEXT: 3 7 4.00 * paddq (%rax), %xmm2
# CHECK-NEXT: 1 1 0.50 paddsb %xmm0, %xmm2
# CHECK-NEXT: 1 4 1.00 * paddsb (%rax), %xmm2
# CHECK-NEXT: 1 1 0.50 paddsw %xmm0, %xmm2
@ -624,10 +624,10 @@ xorpd (%rax), %xmm2
# CHECK-NEXT: 1 4 1.00 * psubb (%rax), %xmm2
# CHECK-NEXT: 1 1 0.50 psubd %xmm0, %xmm2
# CHECK-NEXT: 1 4 1.00 * psubd (%rax), %xmm2
# CHECK-NEXT: 1 1 0.50 psubq %mm0, %mm2
# CHECK-NEXT: 1 4 1.00 * psubq (%rax), %mm2
# CHECK-NEXT: 2 4 2.00 psubq %xmm0, %xmm2
# CHECK-NEXT: 3 7 2.00 * psubq (%rax), %xmm2
# CHECK-NEXT: 2 4 4.00 psubq %mm0, %mm2
# CHECK-NEXT: 3 7 4.00 * psubq (%rax), %mm2
# CHECK-NEXT: 2 4 4.00 psubq %xmm0, %xmm2
# CHECK-NEXT: 3 7 4.00 * psubq (%rax), %xmm2
# CHECK-NEXT: 1 1 0.50 psubsb %xmm0, %xmm2
# CHECK-NEXT: 1 4 1.00 * psubsb (%rax), %xmm2
# CHECK-NEXT: 1 1 0.50 psubsw %xmm0, %xmm2
@ -687,7 +687,7 @@ xorpd (%rax), %xmm2
# CHECK: Resource pressure per iteration:
# CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7]
# CHECK-NEXT: - 412.00 12.00 235.50 77.50 3.00 3.00 134.00
# CHECK-NEXT: - 412.00 12.00 257.50 99.50 3.00 3.00 134.00
# CHECK: Resource pressure by instruction:
# CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] Instructions:
@ -810,10 +810,10 @@ xorpd (%rax), %xmm2
# CHECK-NEXT: - - - 0.50 0.50 - - 1.00 paddb (%rax), %xmm2
# CHECK-NEXT: - - - 0.50 0.50 - - - paddd %xmm0, %xmm2
# CHECK-NEXT: - - - 0.50 0.50 - - 1.00 paddd (%rax), %xmm2
# CHECK-NEXT: - - - 0.50 0.50 - - - paddq %mm0, %mm2
# CHECK-NEXT: - - - 0.50 0.50 - - 1.00 paddq (%rax), %mm2
# CHECK-NEXT: - - - 2.00 2.00 - - - paddq %xmm0, %xmm2
# CHECK-NEXT: - - - 2.00 2.00 - - 1.00 paddq (%rax), %xmm2
# CHECK-NEXT: - - - 4.00 4.00 - - - paddq %mm0, %mm2
# CHECK-NEXT: - - - 4.00 4.00 - - 1.00 paddq (%rax), %mm2
# CHECK-NEXT: - - - 4.00 4.00 - - - paddq %xmm0, %xmm2
# CHECK-NEXT: - - - 4.00 4.00 - - 1.00 paddq (%rax), %xmm2
# CHECK-NEXT: - - - 0.50 0.50 - - - paddsb %xmm0, %xmm2
# CHECK-NEXT: - - - 0.50 0.50 - - 1.00 paddsb (%rax), %xmm2
# CHECK-NEXT: - - - 0.50 0.50 - - - paddsw %xmm0, %xmm2
@ -908,10 +908,10 @@ xorpd (%rax), %xmm2
# CHECK-NEXT: - - - 0.50 0.50 - - 1.00 psubb (%rax), %xmm2
# CHECK-NEXT: - - - 0.50 0.50 - - - psubd %xmm0, %xmm2
# CHECK-NEXT: - - - 0.50 0.50 - - 1.00 psubd (%rax), %xmm2
# CHECK-NEXT: - - - 0.50 0.50 - - - psubq %mm0, %mm2
# CHECK-NEXT: - - - 0.50 0.50 - - 1.00 psubq (%rax), %mm2
# CHECK-NEXT: - - - 2.00 2.00 - - - psubq %xmm0, %xmm2
# CHECK-NEXT: - - - 2.00 2.00 - - 1.00 psubq (%rax), %xmm2
# CHECK-NEXT: - - - 4.00 4.00 - - - psubq %mm0, %mm2
# CHECK-NEXT: - - - 4.00 4.00 - - 1.00 psubq (%rax), %mm2
# CHECK-NEXT: - - - 4.00 4.00 - - - psubq %xmm0, %xmm2
# CHECK-NEXT: - - - 4.00 4.00 - - 1.00 psubq (%rax), %xmm2
# CHECK-NEXT: - - - 0.50 0.50 - - - psubsb %xmm0, %xmm2
# CHECK-NEXT: - - - 0.50 0.50 - - 1.00 psubsb (%rax), %xmm2
# CHECK-NEXT: - - - 0.50 0.50 - - - psubsw %xmm0, %xmm2

View File

@ -180,8 +180,8 @@ roundss $1, (%rax), %xmm2
# CHECK-NEXT: 3 7 4.00 * pblendvb %xmm0, (%rax), %xmm2
# CHECK-NEXT: 1 1 1.00 pblendw $11, %xmm0, %xmm2
# CHECK-NEXT: 1 4 1.00 * pblendw $11, (%rax), %xmm2
# CHECK-NEXT: 2 4 2.00 pcmpeqq %xmm0, %xmm2
# CHECK-NEXT: 3 7 2.00 * pcmpeqq (%rax), %xmm2
# CHECK-NEXT: 2 4 4.00 pcmpeqq %xmm0, %xmm2
# CHECK-NEXT: 3 7 4.00 * pcmpeqq (%rax), %xmm2
# CHECK-NEXT: 1 1 1.00 pextrb $1, %xmm0, %ecx
# CHECK-NEXT: 2 4 2.00 * pextrb $1, %xmm0, (%rax)
# CHECK-NEXT: 1 1 1.00 pextrd $1, %xmm0, %ecx
@ -264,7 +264,7 @@ roundss $1, (%rax), %xmm2
# CHECK: Resource pressure per iteration:
# CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7]
# CHECK-NEXT: - - - 104.00 61.00 - - 54.00
# CHECK-NEXT: - - - 108.00 65.00 - - 54.00
# CHECK: Resource pressure by instruction:
# CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] Instructions:
@ -293,8 +293,8 @@ roundss $1, (%rax), %xmm2
# CHECK-NEXT: - - - 4.00 - - - 1.00 pblendvb %xmm0, (%rax), %xmm2
# CHECK-NEXT: - - - 1.00 - - - - pblendw $11, %xmm0, %xmm2
# CHECK-NEXT: - - - 1.00 - - - 1.00 pblendw $11, (%rax), %xmm2
# CHECK-NEXT: - - - 2.00 2.00 - - - pcmpeqq %xmm0, %xmm2
# CHECK-NEXT: - - - 2.00 2.00 - - 1.00 pcmpeqq (%rax), %xmm2
# CHECK-NEXT: - - - 4.00 4.00 - - - pcmpeqq %xmm0, %xmm2
# CHECK-NEXT: - - - 4.00 4.00 - - 1.00 pcmpeqq (%rax), %xmm2
# CHECK-NEXT: - - - 1.00 - - - - pextrb $1, %xmm0, %ecx
# CHECK-NEXT: - - - 1.00 - - - 2.00 pextrb $1, %xmm0, (%rax)
# CHECK-NEXT: - - - 1.00 - - - - pextrd $1, %xmm0, %ecx