Noticed while trying to improve generic reduction costs via the D103695 helper script. Confirmed with Intel AoM / Agner / InstLatX64.
defm : SLMWriteResPair<WriteVarBlend, [SLM_FPC_RSV0], 4, [4], 2, 1>;
defm : X86WriteResPairUnsupported<WriteVarBlendY>;
defm : X86WriteResPairUnsupported<WriteVarBlendZ>;
-defm : SLMWriteResPair<WriteMPSAD, [SLM_FPC_RSV0], 7>;
-defm : SLMWriteResPair<WriteMPSADY, [SLM_FPC_RSV0], 7>;
+defm : SLMWriteResPair<WriteMPSAD, [SLM_FPC_RSV0], 7, [5], 3, 1>;
+defm : X86WriteResPairUnsupported<WriteMPSADY>;
defm : X86WriteResPairUnsupported<WriteMPSADZ>;
defm : SLMWriteResPair<WritePSADBW, [SLM_FPC_RSV0], 4>;
-defm : SLMWriteResPair<WritePSADBWX, [SLM_FPC_RSV0], 4>;
-defm : SLMWriteResPair<WritePSADBWY, [SLM_FPC_RSV0], 4>;
+defm : SLMWriteResPair<WritePSADBWX, [SLM_FPC_RSV0], 5, [2]>;
+defm : X86WriteResPairUnsupported<WritePSADBWY>;
defm : X86WriteResPairUnsupported<WritePSADBWZ>;
defm : SLMWriteResPair<WritePHMINPOS, [SLM_FPC_RSV0], 4>;
defm : X86WriteResPairUnsupported<WriteShuffle256>;
# CHECK-NEXT: 1 8 2.00 * pmuludq (%rax), %xmm2
# CHECK-NEXT: 1 1 0.50 por %xmm0, %xmm2
# CHECK-NEXT: 1 4 1.00 * por (%rax), %xmm2
-# CHECK-NEXT: 1 4 1.00 psadbw %xmm0, %xmm2
-# CHECK-NEXT: 1 7 1.00 * psadbw (%rax), %xmm2
+# CHECK-NEXT: 1 5 2.00 psadbw %xmm0, %xmm2
+# CHECK-NEXT: 1 8 2.00 * psadbw (%rax), %xmm2
# CHECK-NEXT: 1 1 1.00 pshufd $1, %xmm0, %xmm2
# CHECK-NEXT: 1 4 1.00 * pshufd $1, (%rax), %xmm2
# CHECK-NEXT: 1 1 1.00 pshufhw $1, %xmm0, %xmm2
# CHECK: Resource pressure per iteration:
# CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7]
-# CHECK-NEXT: - 412.00 12.00 233.50 77.50 3.00 3.00 134.00
+# CHECK-NEXT: - 412.00 12.00 235.50 77.50 3.00 3.00 134.00
# CHECK: Resource pressure by instruction:
# CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] Instructions:
# CHECK-NEXT: - - - 2.00 - - - 1.00 pmuludq (%rax), %xmm2
# CHECK-NEXT: - - - 0.50 0.50 - - - por %xmm0, %xmm2
# CHECK-NEXT: - - - 0.50 0.50 - - 1.00 por (%rax), %xmm2
-# CHECK-NEXT: - - - 1.00 - - - - psadbw %xmm0, %xmm2
-# CHECK-NEXT: - - - 1.00 - - - 1.00 psadbw (%rax), %xmm2
+# CHECK-NEXT: - - - 2.00 - - - - psadbw %xmm0, %xmm2
+# CHECK-NEXT: - - - 2.00 - - - 1.00 psadbw (%rax), %xmm2
# CHECK-NEXT: - - - 1.00 - - - - pshufd $1, %xmm0, %xmm2
# CHECK-NEXT: - - - 1.00 - - - 1.00 pshufd $1, (%rax), %xmm2
# CHECK-NEXT: - - - 1.00 - - - - pshufhw $1, %xmm0, %xmm2
# CHECK-NEXT: 1 1 1.00 insertps $1, %xmm0, %xmm2
# CHECK-NEXT: 1 4 1.00 * insertps $1, (%rax), %xmm2
# CHECK-NEXT: 1 3 1.00 * movntdqa (%rax), %xmm2
-# CHECK-NEXT: 1 7 1.00 mpsadbw $1, %xmm0, %xmm2
-# CHECK-NEXT: 1 10 1.00 * mpsadbw $1, (%rax), %xmm2
+# CHECK-NEXT: 3 7 5.00 mpsadbw $1, %xmm0, %xmm2
+# CHECK-NEXT: 4 10 5.00 * mpsadbw $1, (%rax), %xmm2
# CHECK-NEXT: 1 1 1.00 packusdw %xmm0, %xmm2
# CHECK-NEXT: 1 4 1.00 * packusdw (%rax), %xmm2
# CHECK-NEXT: 2 4 4.00 pblendvb %xmm0, %xmm0, %xmm2
# CHECK: Resource pressure per iteration:
# CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7]
-# CHECK-NEXT: - - - 96.00 25.00 - - 54.00
+# CHECK-NEXT: - - - 104.00 25.00 - - 54.00
# CHECK: Resource pressure by instruction:
# CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] Instructions:
# CHECK-NEXT: - - - 1.00 - - - - insertps $1, %xmm0, %xmm2
# CHECK-NEXT: - - - 1.00 - - - 1.00 insertps $1, (%rax), %xmm2
# CHECK-NEXT: - - - - - - - 1.00 movntdqa (%rax), %xmm2
-# CHECK-NEXT: - - - 1.00 - - - - mpsadbw $1, %xmm0, %xmm2
-# CHECK-NEXT: - - - 1.00 - - - 1.00 mpsadbw $1, (%rax), %xmm2
+# CHECK-NEXT: - - - 5.00 - - - - mpsadbw $1, %xmm0, %xmm2
+# CHECK-NEXT: - - - 5.00 - - - 1.00 mpsadbw $1, (%rax), %xmm2
# CHECK-NEXT: - - - 1.00 - - - - packusdw %xmm0, %xmm2
# CHECK-NEXT: - - - 1.00 - - - 1.00 packusdw (%rax), %xmm2
# CHECK-NEXT: - - - 4.00 - - - - pblendvb %xmm0, %xmm0, %xmm2