[llvm] 94e9662 - [X86] skylake only uses Port0 for (v)phminposuw instructions
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 26 03:22:16 PDT 2024
Author: Simon Pilgrim
Date: 2024-07-26T11:21:59+01:00
New Revision: 94e966255fb4309f24805273d2e17f63a4e36d17
URL: https://github.com/llvm/llvm-project/commit/94e966255fb4309f24805273d2e17f63a4e36d17
DIFF: https://github.com/llvm/llvm-project/commit/94e966255fb4309f24805273d2e17f63a4e36d17.diff
LOG: [X86] skylake only uses Port0 for (v)phminposuw instructions
Now matches skylake-server - and matches reports from uops.info, Agner and instlatx64.
Added:
Modified:
llvm/lib/Target/X86/X86SchedSkylakeClient.td
llvm/test/tools/llvm-mca/X86/SkylakeClient/resources-avx1.s
llvm/test/tools/llvm-mca/X86/SkylakeClient/resources-sse41.s
Removed:
################################################################################
diff --git a/llvm/lib/Target/X86/X86SchedSkylakeClient.td b/llvm/lib/Target/X86/X86SchedSkylakeClient.td
index 3ee931fe5ed9c..d764cb3fe3130 100644
--- a/llvm/lib/Target/X86/X86SchedSkylakeClient.td
+++ b/llvm/lib/Target/X86/X86SchedSkylakeClient.td
@@ -404,7 +404,7 @@ defm : SKLWriteResPair<WritePSADBW, [SKLPort5], 3, [1], 1, 5>; // Vector PSADBW
defm : SKLWriteResPair<WritePSADBWX, [SKLPort5], 3, [1], 1, 6>;
defm : SKLWriteResPair<WritePSADBWY, [SKLPort5], 3, [1], 1, 7>;
defm : X86WriteResPairUnsupported<WritePSADBWZ>;
-defm : SKLWriteResPair<WritePHMINPOS, [SKLPort01], 4, [1], 1, 6>; // Vector PHMINPOS.
+defm : SKLWriteResPair<WritePHMINPOS, [SKLPort0], 4, [1], 1, 6>; // Vector PHMINPOS.
// Vector integer shifts.
defm : SKLWriteResPair<WriteVecShift, [SKLPort0], 1, [1], 1, 5>;
diff --git a/llvm/test/tools/llvm-mca/X86/SkylakeClient/resources-avx1.s b/llvm/test/tools/llvm-mca/X86/SkylakeClient/resources-avx1.s
index ef5a9e34a932b..2711bc4579b00 100644
--- a/llvm/test/tools/llvm-mca/X86/SkylakeClient/resources-avx1.s
+++ b/llvm/test/tools/llvm-mca/X86/SkylakeClient/resources-avx1.s
@@ -1461,8 +1461,8 @@ vzeroupper
# CHECK-NEXT: 4 9 2.00 * vphaddsw (%rax), %xmm1, %xmm2
# CHECK-NEXT: 3 3 2.00 vphaddw %xmm0, %xmm1, %xmm2
# CHECK-NEXT: 4 9 2.00 * vphaddw (%rax), %xmm1, %xmm2
-# CHECK-NEXT: 1 4 0.50 vphminposuw %xmm0, %xmm2
-# CHECK-NEXT: 2 10 0.50 * vphminposuw (%rax), %xmm2
+# CHECK-NEXT: 1 4 1.00 vphminposuw %xmm0, %xmm2
+# CHECK-NEXT: 2 10 1.00 * vphminposuw (%rax), %xmm2
# CHECK-NEXT: 3 3 2.00 vphsubd %xmm0, %xmm1, %xmm2
# CHECK-NEXT: 4 9 2.00 * vphsubd (%rax), %xmm1, %xmm2
# CHECK-NEXT: 3 3 2.00 vphsubsw %xmm0, %xmm1, %xmm2
@@ -1736,7 +1736,7 @@ vzeroupper
# CHECK: Resource pressure per iteration:
# CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9]
-# CHECK-NEXT: - 126.00 339.58 199.58 173.83 173.83 38.00 326.58 6.25 11.33
+# CHECK-NEXT: - 126.00 340.58 198.58 173.83 173.83 38.00 326.58 6.25 11.33
# CHECK: Resource pressure by instruction:
# CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] Instructions:
@@ -2171,8 +2171,8 @@ vzeroupper
# CHECK-NEXT: - - 0.50 0.50 0.50 0.50 - 2.00 - - vphaddsw (%rax), %xmm1, %xmm2
# CHECK-NEXT: - - 0.33 0.33 - - - 2.33 - - vphaddw %xmm0, %xmm1, %xmm2
# CHECK-NEXT: - - 0.33 0.33 0.50 0.50 - 2.33 - - vphaddw (%rax), %xmm1, %xmm2
-# CHECK-NEXT: - - 0.50 0.50 - - - - - - vphminposuw %xmm0, %xmm2
-# CHECK-NEXT: - - 0.50 0.50 0.50 0.50 - - - - vphminposuw (%rax), %xmm2
+# CHECK-NEXT: - - 1.00 - - - - - - - vphminposuw %xmm0, %xmm2
+# CHECK-NEXT: - - 1.00 - 0.50 0.50 - - - - vphminposuw (%rax), %xmm2
# CHECK-NEXT: - - 0.33 0.33 - - - 2.33 - - vphsubd %xmm0, %xmm1, %xmm2
# CHECK-NEXT: - - 0.33 0.33 0.50 0.50 - 2.33 - - vphsubd (%rax), %xmm1, %xmm2
# CHECK-NEXT: - - 0.50 0.50 - - - 2.00 - - vphsubsw %xmm0, %xmm1, %xmm2
diff --git a/llvm/test/tools/llvm-mca/X86/SkylakeClient/resources-sse41.s b/llvm/test/tools/llvm-mca/X86/SkylakeClient/resources-sse41.s
index 1d8d67fd323f1..0eec7e4cf58e8 100644
--- a/llvm/test/tools/llvm-mca/X86/SkylakeClient/resources-sse41.s
+++ b/llvm/test/tools/llvm-mca/X86/SkylakeClient/resources-sse41.s
@@ -189,8 +189,8 @@ roundss $1, (%rax), %xmm2
# CHECK-NEXT: 2 3 1.00 pextrq $1, %xmm0, %rcx
# CHECK-NEXT: 3 2 1.00 * pextrq $1, %xmm0, (%rax)
# CHECK-NEXT: 3 2 1.00 * pextrw $1, %xmm0, (%rax)
-# CHECK-NEXT: 1 4 0.50 phminposuw %xmm0, %xmm2
-# CHECK-NEXT: 2 10 0.50 * phminposuw (%rax), %xmm2
+# CHECK-NEXT: 1 4 1.00 phminposuw %xmm0, %xmm2
+# CHECK-NEXT: 2 10 1.00 * phminposuw (%rax), %xmm2
# CHECK-NEXT: 2 2 2.00 pinsrb $1, %eax, %xmm1
# CHECK-NEXT: 2 6 1.00 * pinsrb $1, (%rax), %xmm1
# CHECK-NEXT: 2 2 2.00 pinsrd $1, %eax, %xmm1
@@ -266,7 +266,7 @@ roundss $1, (%rax), %xmm2
# CHECK: Resource pressure per iteration:
# CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9]
-# CHECK-NEXT: - - 37.83 31.33 23.67 23.67 5.00 63.33 0.50 1.67
+# CHECK-NEXT: - - 38.83 30.33 23.67 23.67 5.00 63.33 0.50 1.67
# CHECK: Resource pressure by instruction:
# CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] Instructions:
@@ -304,8 +304,8 @@ roundss $1, (%rax), %xmm2
# CHECK-NEXT: - - 1.00 - - - - 1.00 - - pextrq $1, %xmm0, %rcx
# CHECK-NEXT: - - - - 0.33 0.33 1.00 1.00 - 0.33 pextrq $1, %xmm0, (%rax)
# CHECK-NEXT: - - - - 0.33 0.33 1.00 1.00 - 0.33 pextrw $1, %xmm0, (%rax)
-# CHECK-NEXT: - - 0.50 0.50 - - - - - - phminposuw %xmm0, %xmm2
-# CHECK-NEXT: - - 0.50 0.50 0.50 0.50 - - - - phminposuw (%rax), %xmm2
+# CHECK-NEXT: - - 1.00 - - - - - - - phminposuw %xmm0, %xmm2
+# CHECK-NEXT: - - 1.00 - 0.50 0.50 - - - - phminposuw (%rax), %xmm2
# CHECK-NEXT: - - - - - - - 2.00 - - pinsrb $1, %eax, %xmm1
# CHECK-NEXT: - - - - 0.50 0.50 - 1.00 - - pinsrb $1, (%rax), %xmm1
# CHECK-NEXT: - - - - - - - 2.00 - - pinsrd $1, %eax, %xmm1
More information about the llvm-commits
mailing list