1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00

[X86] AMD Zen 3: same-reg SSE XMM PSUBS{B,W} is a 1-cycle(!) dep-breaking zero-idiom

Not really mentioned in ref docs, but measures as such.
This commit is contained in:
Roman Lebedev 2021-05-14 18:06:18 +03:00
parent 9a5a00fd92
commit fe32a28378
2 changed files with 32 additions and 31 deletions

View File

@ -1589,7 +1589,8 @@ def : IsZeroIdiomFunction<[
// int variants.
PXORrr,
PANDNrr,
PSUBBrr, PSUBWrr, PSUBDrr, PSUBQrr
PSUBBrr, PSUBWrr, PSUBDrr, PSUBQrr,
PSUBSBrr, PSUBSWrr
], ZeroIdiomPredicate>,
// AVX XMM Zero-idioms.

View File

@ -975,12 +975,12 @@ pxor %xmm0, %xmm1
# CHECK: Iterations: 10000
# CHECK-NEXT: Instructions: 20000
# CHECK-NEXT: Total Cycles: 20003
# CHECK-NEXT: Total Cycles: 5004
# CHECK-NEXT: Total uOps: 20000
# CHECK: Dispatch Width: 6
# CHECK-NEXT: uOps Per Cycle: 1.00
# CHECK-NEXT: IPC: 1.00
# CHECK-NEXT: uOps Per Cycle: 4.00
# CHECK-NEXT: IPC: 4.00
# CHECK-NEXT: Block RThroughput: 0.5
# CHECK: Instruction Info:
@ -996,13 +996,13 @@ pxor %xmm0, %xmm1
# CHECK-NEXT: 1 1 0.25 pxor %xmm0, %xmm1
# CHECK: Register File statistics:
# CHECK-NEXT: Total number of mappings created: 20000
# CHECK-NEXT: Max number of mappings used: 66
# CHECK-NEXT: Total number of mappings created: 10000
# CHECK-NEXT: Max number of mappings used: 37
# CHECK: * Register File #1 -- Zn3FpPRF:
# CHECK-NEXT: Number of physical registers: 160
# CHECK-NEXT: Total number of mappings created: 20000
# CHECK-NEXT: Max number of mappings used: 66
# CHECK-NEXT: Total number of mappings created: 10000
# CHECK-NEXT: Max number of mappings used: 37
# CHECK: * Register File #2 -- Zn3IntegerPRF:
# CHECK-NEXT: Number of physical registers: 192
@ -1044,12 +1044,12 @@ pxor %xmm0, %xmm1
# CHECK-NEXT: - - - - - - - - - - 0.50 0.50 - - - - - - - - - - - pxor %xmm0, %xmm1
# CHECK: Timeline view:
# CHECK-NEXT: Index 0123456
# CHECK-NEXT: Index 01234
# CHECK: [0,0] DeER .. psubsb %xmm1, %xmm1
# CHECK-NEXT: [0,1] D=eER.. pxor %xmm0, %xmm1
# CHECK-NEXT: [1,0] D==eER. psubsb %xmm1, %xmm1
# CHECK-NEXT: [1,1] D===eER pxor %xmm0, %xmm1
# CHECK: [0,0] DeER. psubsb %xmm1, %xmm1
# CHECK-NEXT: [0,1] D=eER pxor %xmm0, %xmm1
# CHECK-NEXT: [1,0] DeE-R psubsb %xmm1, %xmm1
# CHECK-NEXT: [1,1] D=eER pxor %xmm0, %xmm1
# CHECK: Average Wait times (based on the timeline view):
# CHECK-NEXT: [0]: Executions
@ -1058,20 +1058,20 @@ pxor %xmm0, %xmm1
# CHECK-NEXT: [3]: Average time elapsed from WB until retire stage
# CHECK: [0] [1] [2] [3]
# CHECK-NEXT: 0. 2 2.0 0.5 0.0 psubsb %xmm1, %xmm1
# CHECK-NEXT: 1. 2 3.0 0.0 0.0 pxor %xmm0, %xmm1
# CHECK-NEXT: 2 2.5 0.3 0.0 <total>
# CHECK-NEXT: 0. 2 1.0 1.0 0.5 psubsb %xmm1, %xmm1
# CHECK-NEXT: 1. 2 2.0 0.0 0.0 pxor %xmm0, %xmm1
# CHECK-NEXT: 2 1.5 0.5 0.3 <total>
# CHECK: [11] Code Region
# CHECK: Iterations: 10000
# CHECK-NEXT: Instructions: 20000
# CHECK-NEXT: Total Cycles: 20003
# CHECK-NEXT: Total Cycles: 5004
# CHECK-NEXT: Total uOps: 20000
# CHECK: Dispatch Width: 6
# CHECK-NEXT: uOps Per Cycle: 1.00
# CHECK-NEXT: IPC: 1.00
# CHECK-NEXT: uOps Per Cycle: 4.00
# CHECK-NEXT: IPC: 4.00
# CHECK-NEXT: Block RThroughput: 0.5
# CHECK: Instruction Info:
@ -1087,13 +1087,13 @@ pxor %xmm0, %xmm1
# CHECK-NEXT: 1 1 0.25 pxor %xmm0, %xmm1
# CHECK: Register File statistics:
# CHECK-NEXT: Total number of mappings created: 20000
# CHECK-NEXT: Max number of mappings used: 66
# CHECK-NEXT: Total number of mappings created: 10000
# CHECK-NEXT: Max number of mappings used: 37
# CHECK: * Register File #1 -- Zn3FpPRF:
# CHECK-NEXT: Number of physical registers: 160
# CHECK-NEXT: Total number of mappings created: 20000
# CHECK-NEXT: Max number of mappings used: 66
# CHECK-NEXT: Total number of mappings created: 10000
# CHECK-NEXT: Max number of mappings used: 37
# CHECK: * Register File #2 -- Zn3IntegerPRF:
# CHECK-NEXT: Number of physical registers: 192
@ -1135,12 +1135,12 @@ pxor %xmm0, %xmm1
# CHECK-NEXT: - - - - - - - - - - 0.50 0.50 - - - - - - - - - - - pxor %xmm0, %xmm1
# CHECK: Timeline view:
# CHECK-NEXT: Index 0123456
# CHECK-NEXT: Index 01234
# CHECK: [0,0] DeER .. psubsw %xmm1, %xmm1
# CHECK-NEXT: [0,1] D=eER.. pxor %xmm0, %xmm1
# CHECK-NEXT: [1,0] D==eER. psubsw %xmm1, %xmm1
# CHECK-NEXT: [1,1] D===eER pxor %xmm0, %xmm1
# CHECK: [0,0] DeER. psubsw %xmm1, %xmm1
# CHECK-NEXT: [0,1] D=eER pxor %xmm0, %xmm1
# CHECK-NEXT: [1,0] DeE-R psubsw %xmm1, %xmm1
# CHECK-NEXT: [1,1] D=eER pxor %xmm0, %xmm1
# CHECK: Average Wait times (based on the timeline view):
# CHECK-NEXT: [0]: Executions
@ -1149,6 +1149,6 @@ pxor %xmm0, %xmm1
# CHECK-NEXT: [3]: Average time elapsed from WB until retire stage
# CHECK: [0] [1] [2] [3]
# CHECK-NEXT: 0. 2 2.0 0.5 0.0 psubsw %xmm1, %xmm1
# CHECK-NEXT: 1. 2 3.0 0.0 0.0 pxor %xmm0, %xmm1
# CHECK-NEXT: 2 2.5 0.3 0.0 <total>
# CHECK-NEXT: 0. 2 1.0 1.0 0.5 psubsw %xmm1, %xmm1
# CHECK-NEXT: 1. 2 2.0 0.0 0.0 pxor %xmm0, %xmm1
# CHECK-NEXT: 2 1.5 0.5 0.3 <total>