[llvm] 0b7f327 - [X86] Fix cvtss2si64/cvttss2si64 typo in SkylakeClient
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Sat Nov 5 07:35:57 PDT 2022
Author: Simon Pilgrim
Date: 2022-11-05T14:35:41Z
New Revision: 0b7f327800ab2d86dafd9033eff989b3193c8334
URL: https://github.com/llvm/llvm-project/commit/0b7f327800ab2d86dafd9033eff989b3193c8334
DIFF: https://github.com/llvm/llvm-project/commit/0b7f327800ab2d86dafd9033eff989b3193c8334.diff
LOG: [X86] Fix cvtss2si64/cvttss2si64 typo in SkylakeClient
SS2SI64 conversions use Port0/Port01/Port5 (with/without truncation), but SS2SI32 only uses Port0/Port01 like SD2SI32/SD2SI64
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-sse1.s
Removed:
################################################################################
diff --git a/llvm/lib/Target/X86/X86SchedSkylakeClient.td b/llvm/lib/Target/X86/X86SchedSkylakeClient.td
index ffc5d9730d63..ef8a5efeb76c 100644
--- a/llvm/lib/Target/X86/X86SchedSkylakeClient.td
+++ b/llvm/lib/Target/X86/X86SchedSkylakeClient.td
@@ -1023,7 +1023,7 @@ def SKLWriteResGroup70 : SchedWriteRes<[SKLPort0,SKLPort01]> {
let NumMicroOps = 2;
let ResourceCycles = [1,1];
}
-def: InstRW<[SKLWriteResGroup70], (instregex "(V?)CVTSS2SI(64)?rr",
+def: InstRW<[SKLWriteResGroup70], (instregex "(V?)CVT(T?)SS2SIrr",
"(V?)CVT(T?)SD2SI(64)?rr")>;
def SKLWriteResGroup72 : SchedWriteRes<[SKLPort6,SKLPort23]> {
@@ -1160,7 +1160,7 @@ def SKLWriteResGroup95 : SchedWriteRes<[SKLPort0,SKLPort5,SKLPort01]> {
let NumMicroOps = 3;
let ResourceCycles = [1,1,1];
}
-def: InstRW<[SKLWriteResGroup95], (instregex "(V?)CVTTSS2SI(64)?rr")>;
+def: InstRW<[SKLWriteResGroup95], (instregex "(V?)CVT(T?)SS2SI64?rr")>;
def SKLWriteResGroup96 : SchedWriteRes<[SKLPort0,SKLPort23,SKLPort05]> {
let Latency = 7;
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 eb70e8be3bb6..2490cc7744d2 100644
--- a/llvm/test/tools/llvm-mca/X86/SkylakeClient/resources-avx1.s
+++ b/llvm/test/tools/llvm-mca/X86/SkylakeClient/resources-avx1.s
@@ -1155,7 +1155,7 @@ vzeroupper
# CHECK-NEXT: 2 5 1.00 vcvtss2sd %xmm0, %xmm1, %xmm2
# CHECK-NEXT: 2 10 0.50 * vcvtss2sd (%rax), %xmm1, %xmm2
# CHECK-NEXT: 2 6 1.00 vcvtss2si %xmm0, %ecx
-# CHECK-NEXT: 2 6 1.00 vcvtss2si %xmm0, %rcx
+# CHECK-NEXT: 3 7 1.00 vcvtss2si %xmm0, %rcx
# CHECK-NEXT: 3 11 1.00 * vcvtss2si (%rax), %ecx
# CHECK-NEXT: 3 11 1.00 * vcvtss2si (%rax), %rcx
# CHECK-NEXT: 2 5 1.00 vcvttpd2dq %xmm0, %xmm2
@@ -1170,7 +1170,7 @@ vzeroupper
# CHECK-NEXT: 2 6 1.00 vcvttsd2si %xmm0, %rcx
# CHECK-NEXT: 3 11 1.00 * vcvttsd2si (%rax), %ecx
# CHECK-NEXT: 3 11 1.00 * vcvttsd2si (%rax), %rcx
-# CHECK-NEXT: 3 7 1.00 vcvttss2si %xmm0, %ecx
+# CHECK-NEXT: 2 6 1.00 vcvttss2si %xmm0, %ecx
# CHECK-NEXT: 3 7 1.00 vcvttss2si %xmm0, %rcx
# CHECK-NEXT: 3 11 1.00 * vcvttss2si (%rax), %ecx
# CHECK-NEXT: 3 11 1.00 * vcvttss2si (%rax), %rcx
@@ -1865,7 +1865,7 @@ vzeroupper
# CHECK-NEXT: - - 0.33 0.33 - - - 1.33 - - vcvtss2sd %xmm0, %xmm1, %xmm2
# CHECK-NEXT: - - 0.50 0.50 0.50 0.50 - - - - vcvtss2sd (%rax), %xmm1, %xmm2
# CHECK-NEXT: - - 1.50 0.50 - - - - - - vcvtss2si %xmm0, %ecx
-# CHECK-NEXT: - - 1.50 0.50 - - - - - - vcvtss2si %xmm0, %rcx
+# CHECK-NEXT: - - 1.50 0.50 - - - 1.00 - - vcvtss2si %xmm0, %rcx
# CHECK-NEXT: - - 1.50 0.50 0.50 0.50 - - - - vcvtss2si (%rax), %ecx
# CHECK-NEXT: - - 1.50 0.50 0.50 0.50 - - - - vcvtss2si (%rax), %rcx
# CHECK-NEXT: - - 0.33 0.33 - - - 1.33 - - vcvttpd2dq %xmm0, %xmm2
@@ -1880,7 +1880,7 @@ vzeroupper
# CHECK-NEXT: - - 1.50 0.50 - - - - - - vcvttsd2si %xmm0, %rcx
# CHECK-NEXT: - - 1.50 0.50 0.50 0.50 - - - - vcvttsd2si (%rax), %ecx
# CHECK-NEXT: - - 1.50 0.50 0.50 0.50 - - - - vcvttsd2si (%rax), %rcx
-# CHECK-NEXT: - - 1.50 0.50 - - - 1.00 - - vcvttss2si %xmm0, %ecx
+# CHECK-NEXT: - - 1.50 0.50 - - - - - - vcvttss2si %xmm0, %ecx
# CHECK-NEXT: - - 1.50 0.50 - - - 1.00 - - vcvttss2si %xmm0, %rcx
# CHECK-NEXT: - - 1.50 0.50 0.50 0.50 - - - - vcvttss2si (%rax), %ecx
# CHECK-NEXT: - - 1.50 0.50 0.50 0.50 - - - - vcvttss2si (%rax), %rcx
diff --git a/llvm/test/tools/llvm-mca/X86/SkylakeClient/resources-sse1.s b/llvm/test/tools/llvm-mca/X86/SkylakeClient/resources-sse1.s
index e93bda0e38c0..e25e56ce8418 100644
--- a/llvm/test/tools/llvm-mca/X86/SkylakeClient/resources-sse1.s
+++ b/llvm/test/tools/llvm-mca/X86/SkylakeClient/resources-sse1.s
@@ -217,12 +217,12 @@ xorps (%rax), %xmm2
# CHECK-NEXT: 2 9 1.00 * cvtsi2ssl (%rax), %xmm2
# CHECK-NEXT: 2 9 1.00 * cvtsi2ssq (%rax), %xmm2
# CHECK-NEXT: 2 6 1.00 cvtss2si %xmm0, %ecx
-# CHECK-NEXT: 2 6 1.00 cvtss2si %xmm0, %rcx
+# CHECK-NEXT: 3 7 1.00 cvtss2si %xmm0, %rcx
# CHECK-NEXT: 3 11 1.00 * cvtss2si (%rax), %ecx
# CHECK-NEXT: 3 11 1.00 * cvtss2si (%rax), %rcx
# CHECK-NEXT: 2 5 1.00 cvttps2pi %xmm0, %mm2
# CHECK-NEXT: 2 9 0.50 * cvttps2pi (%rax), %mm2
-# CHECK-NEXT: 3 7 1.00 cvttss2si %xmm0, %ecx
+# CHECK-NEXT: 2 6 1.00 cvttss2si %xmm0, %ecx
# CHECK-NEXT: 3 7 1.00 cvttss2si %xmm0, %rcx
# CHECK-NEXT: 3 11 1.00 * cvttss2si (%rax), %ecx
# CHECK-NEXT: 4 12 1.00 * cvttss2si (%rax), %rcx
@@ -360,12 +360,12 @@ xorps (%rax), %xmm2
# CHECK-NEXT: - - - 1.00 0.50 0.50 - - - - cvtsi2ssl (%rax), %xmm2
# CHECK-NEXT: - - - 1.00 0.50 0.50 - - - - cvtsi2ssq (%rax), %xmm2
# CHECK-NEXT: - - 1.50 0.50 - - - - - - cvtss2si %xmm0, %ecx
-# CHECK-NEXT: - - 1.50 0.50 - - - - - - cvtss2si %xmm0, %rcx
+# CHECK-NEXT: - - 1.50 0.50 - - - 1.00 - - cvtss2si %xmm0, %rcx
# CHECK-NEXT: - - 1.50 0.50 0.50 0.50 - - - - cvtss2si (%rax), %ecx
# CHECK-NEXT: - - 1.50 0.50 0.50 0.50 - - - - cvtss2si (%rax), %rcx
# CHECK-NEXT: - - 0.33 0.33 - - - 1.33 - - cvttps2pi %xmm0, %mm2
# CHECK-NEXT: - - 0.50 0.50 0.50 0.50 - - - - cvttps2pi (%rax), %mm2
-# CHECK-NEXT: - - 1.50 0.50 - - - 1.00 - - cvttss2si %xmm0, %ecx
+# CHECK-NEXT: - - 1.50 0.50 - - - - - - cvttss2si %xmm0, %ecx
# CHECK-NEXT: - - 1.50 0.50 - - - 1.00 - - cvttss2si %xmm0, %rcx
# CHECK-NEXT: - - 1.50 0.50 0.50 0.50 - - - - cvttss2si (%rax), %ecx
# CHECK-NEXT: - - 1.50 0.50 0.50 0.50 - 1.00 - - cvttss2si (%rax), %rcx
More information about the llvm-commits
mailing list