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

Not really mentioned in ref docs, but measures as such.
Yes, this one is also not zero-cycle.
This commit is contained in:
Roman Lebedev 2021-05-14 18:32:34 +03:00
parent 6733fe5c0d
commit 41a5dcdf87
No known key found for this signature in database
GPG Key ID: 083C3EBB4A1689E0
2 changed files with 32 additions and 31 deletions

View File

@ -1604,7 +1604,8 @@ def : IsZeroIdiomFunction<[
VPXORrr, VPXORrr,
VPANDNrr, VPANDNrr,
VPSUBBrr, VPSUBWrr, VPSUBDrr, VPSUBQrr, VPSUBBrr, VPSUBWrr, VPSUBDrr, VPSUBQrr,
VPSUBSBrr, VPSUBSWrr VPSUBSBrr, VPSUBSWrr,
VPSUBUSBrr, VPSUBUSWrr,
], ZeroIdiomPredicate>, ], ZeroIdiomPredicate>,
// AVX YMM Zero-idioms. // AVX YMM Zero-idioms.

View File

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