[llvm] b781ca4 - [X86] Fix override for CVTPD2PS/CVTPD2DQ/CVTTPD2DQ AVX variants
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Sat Nov 5 06:57:43 PDT 2022
Author: Simon Pilgrim
Date: 2022-11-05T13:57:07Z
New Revision: b781ca4df65bcdd72abc121e30d2fc743a25720c
URL: https://github.com/llvm/llvm-project/commit/b781ca4df65bcdd72abc121e30d2fc743a25720c
DIFF: https://github.com/llvm/llvm-project/commit/b781ca4df65bcdd72abc121e30d2fc743a25720c.diff
LOG: [X86] Fix override for CVTPD2PS/CVTPD2DQ/CVTTPD2DQ AVX variants
These were lost when they were converted from instregex to instrs
Added:
Modified:
llvm/lib/Target/X86/X86SchedBroadwell.td
llvm/lib/Target/X86/X86SchedHaswell.td
llvm/test/tools/llvm-mca/X86/Broadwell/resources-avx1.s
llvm/test/tools/llvm-mca/X86/Haswell/resources-avx1.s
Removed:
################################################################################
diff --git a/llvm/lib/Target/X86/X86SchedBroadwell.td b/llvm/lib/Target/X86/X86SchedBroadwell.td
index 3c6a6a5170d9..84b36f1a84c1 100644
--- a/llvm/lib/Target/X86/X86SchedBroadwell.td
+++ b/llvm/lib/Target/X86/X86SchedBroadwell.td
@@ -1245,9 +1245,9 @@ def BWWriteResGroup107 : SchedWriteRes<[BWPort1,BWPort5,BWPort23]> {
let NumMicroOps = 3;
let ResourceCycles = [1,1,1];
}
-def: InstRW<[BWWriteResGroup107], (instrs CVTPD2PSrm,
- CVTPD2DQrm,
- CVTTPD2DQrm)>;
+def: InstRW<[BWWriteResGroup107], (instrs CVTPD2PSrm, VCVTPD2PSrm,
+ CVTPD2DQrm, VCVTPD2DQrm,
+ CVTTPD2DQrm, VCVTTPD2DQrm)>;
def: InstRW<[BWWriteResGroup107], (instregex "MMX_CVT(T?)PD2PIrm",
"(V?)CVTSD2SSrm")>;
diff --git a/llvm/lib/Target/X86/X86SchedHaswell.td b/llvm/lib/Target/X86/X86SchedHaswell.td
index b759423a14b2..4c646d47a90c 100644
--- a/llvm/lib/Target/X86/X86SchedHaswell.td
+++ b/llvm/lib/Target/X86/X86SchedHaswell.td
@@ -1428,9 +1428,9 @@ def HWWriteResGroup78 : SchedWriteRes<[HWPort1,HWPort5,HWPort23]> {
let NumMicroOps = 3;
let ResourceCycles = [1,1,1];
}
-def: InstRW<[HWWriteResGroup78], (instrs CVTPD2PSrm,
- CVTPD2DQrm,
- CVTTPD2DQrm,
+def: InstRW<[HWWriteResGroup78], (instrs CVTPD2PSrm, VCVTPD2PSrm,
+ CVTPD2DQrm, VCVTPD2DQrm,
+ CVTTPD2DQrm, VCVTTPD2DQrm,
MMX_CVTPD2PIrm,
MMX_CVTTPD2PIrm)>;
diff --git a/llvm/test/tools/llvm-mca/X86/Broadwell/resources-avx1.s b/llvm/test/tools/llvm-mca/X86/Broadwell/resources-avx1.s
index bc98992d516b..f69fed1cd4aa 100644
--- a/llvm/test/tools/llvm-mca/X86/Broadwell/resources-avx1.s
+++ b/llvm/test/tools/llvm-mca/X86/Broadwell/resources-avx1.s
@@ -1123,11 +1123,11 @@ vzeroupper
# CHECK-NEXT: 1 3 1.00 vcvtdq2ps %ymm0, %ymm2
# CHECK-NEXT: 2 9 1.00 * vcvtdq2ps (%rax), %ymm2
# CHECK-NEXT: 2 4 1.00 vcvtpd2dq %xmm0, %xmm2
-# CHECK-NEXT: 2 8 1.00 * vcvtpd2dqx (%rax), %xmm2
+# CHECK-NEXT: 3 9 1.00 * vcvtpd2dqx (%rax), %xmm2
# CHECK-NEXT: 2 6 1.00 vcvtpd2dq %ymm0, %xmm2
# CHECK-NEXT: 2 8 1.00 * vcvtpd2dqy (%rax), %xmm2
# CHECK-NEXT: 2 4 1.00 vcvtpd2ps %xmm0, %xmm2
-# CHECK-NEXT: 2 8 1.00 * vcvtpd2psx (%rax), %xmm2
+# CHECK-NEXT: 3 9 1.00 * vcvtpd2psx (%rax), %xmm2
# CHECK-NEXT: 2 6 1.00 vcvtpd2ps %ymm0, %xmm2
# CHECK-NEXT: 2 8 1.00 * vcvtpd2psy (%rax), %xmm2
# CHECK-NEXT: 1 3 1.00 vcvtps2dq %xmm0, %xmm2
@@ -1159,7 +1159,7 @@ vzeroupper
# CHECK-NEXT: 3 9 1.00 * vcvtss2si (%rax), %ecx
# CHECK-NEXT: 3 9 1.00 * vcvtss2si (%rax), %rcx
# CHECK-NEXT: 2 4 1.00 vcvttpd2dq %xmm0, %xmm2
-# CHECK-NEXT: 2 8 1.00 * vcvttpd2dqx (%rax), %xmm2
+# CHECK-NEXT: 3 9 1.00 * vcvttpd2dqx (%rax), %xmm2
# CHECK-NEXT: 2 6 1.00 vcvttpd2dq %ymm0, %xmm2
# CHECK-NEXT: 2 8 1.00 * vcvttpd2dqy (%rax), %xmm2
# CHECK-NEXT: 1 3 1.00 vcvttps2dq %xmm0, %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: - 257.00 215.25 235.25 176.17 176.17 38.00 426.25 2.25 12.67
+# CHECK-NEXT: - 257.00 215.25 235.25 176.17 176.17 38.00 429.25 2.25 12.67
# CHECK: Resource pressure by instruction:
# CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] Instructions:
@@ -1833,11 +1833,11 @@ vzeroupper
# CHECK-NEXT: - - - 1.00 - - - - - - vcvtdq2ps %ymm0, %ymm2
# CHECK-NEXT: - - - 1.00 0.50 0.50 - - - - vcvtdq2ps (%rax), %ymm2
# CHECK-NEXT: - - - 1.00 - - - 1.00 - - vcvtpd2dq %xmm0, %xmm2
-# CHECK-NEXT: - - - 1.00 0.50 0.50 - - - - vcvtpd2dqx (%rax), %xmm2
+# CHECK-NEXT: - - - 1.00 0.50 0.50 - 1.00 - - vcvtpd2dqx (%rax), %xmm2
# CHECK-NEXT: - - - 1.00 - - - 1.00 - - vcvtpd2dq %ymm0, %xmm2
# CHECK-NEXT: - - - 1.00 0.50 0.50 - - - - vcvtpd2dqy (%rax), %xmm2
# CHECK-NEXT: - - - 1.00 - - - 1.00 - - vcvtpd2ps %xmm0, %xmm2
-# CHECK-NEXT: - - - 1.00 0.50 0.50 - - - - vcvtpd2psx (%rax), %xmm2
+# CHECK-NEXT: - - - 1.00 0.50 0.50 - 1.00 - - vcvtpd2psx (%rax), %xmm2
# CHECK-NEXT: - - - 1.00 - - - 1.00 - - vcvtpd2ps %ymm0, %xmm2
# CHECK-NEXT: - - - 1.00 0.50 0.50 - - - - vcvtpd2psy (%rax), %xmm2
# CHECK-NEXT: - - - 1.00 - - - - - - vcvtps2dq %xmm0, %xmm2
@@ -1869,7 +1869,7 @@ vzeroupper
# CHECK-NEXT: - - 1.00 1.00 0.50 0.50 - - - - vcvtss2si (%rax), %ecx
# CHECK-NEXT: - - 1.00 1.00 0.50 0.50 - - - - vcvtss2si (%rax), %rcx
# CHECK-NEXT: - - - 1.00 - - - 1.00 - - vcvttpd2dq %xmm0, %xmm2
-# CHECK-NEXT: - - - 1.00 0.50 0.50 - - - - vcvttpd2dqx (%rax), %xmm2
+# CHECK-NEXT: - - - 1.00 0.50 0.50 - 1.00 - - vcvttpd2dqx (%rax), %xmm2
# CHECK-NEXT: - - - 1.00 - - - 1.00 - - vcvttpd2dq %ymm0, %xmm2
# CHECK-NEXT: - - - 1.00 0.50 0.50 - - - - vcvttpd2dqy (%rax), %xmm2
# CHECK-NEXT: - - - 1.00 - - - - - - vcvttps2dq %xmm0, %xmm2
diff --git a/llvm/test/tools/llvm-mca/X86/Haswell/resources-avx1.s b/llvm/test/tools/llvm-mca/X86/Haswell/resources-avx1.s
index 997ea6156a0a..6146a207e49e 100644
--- a/llvm/test/tools/llvm-mca/X86/Haswell/resources-avx1.s
+++ b/llvm/test/tools/llvm-mca/X86/Haswell/resources-avx1.s
@@ -1123,11 +1123,11 @@ vzeroupper
# CHECK-NEXT: 1 3 1.00 vcvtdq2ps %ymm0, %ymm2
# CHECK-NEXT: 2 10 1.00 * vcvtdq2ps (%rax), %ymm2
# CHECK-NEXT: 2 4 1.00 vcvtpd2dq %xmm0, %xmm2
-# CHECK-NEXT: 2 8 1.00 * vcvtpd2dqx (%rax), %xmm2
+# CHECK-NEXT: 3 10 1.00 * vcvtpd2dqx (%rax), %xmm2
# CHECK-NEXT: 2 6 1.00 vcvtpd2dq %ymm0, %xmm2
# CHECK-NEXT: 2 8 1.00 * vcvtpd2dqy (%rax), %xmm2
# CHECK-NEXT: 2 4 1.00 vcvtpd2ps %xmm0, %xmm2
-# CHECK-NEXT: 2 8 1.00 * vcvtpd2psx (%rax), %xmm2
+# CHECK-NEXT: 3 10 1.00 * vcvtpd2psx (%rax), %xmm2
# CHECK-NEXT: 2 6 1.00 vcvtpd2ps %ymm0, %xmm2
# CHECK-NEXT: 2 8 1.00 * vcvtpd2psy (%rax), %xmm2
# CHECK-NEXT: 1 3 1.00 vcvtps2dq %xmm0, %xmm2
@@ -1159,7 +1159,7 @@ vzeroupper
# CHECK-NEXT: 3 9 1.00 * vcvtss2si (%rax), %ecx
# CHECK-NEXT: 3 9 1.00 * vcvtss2si (%rax), %rcx
# CHECK-NEXT: 2 4 1.00 vcvttpd2dq %xmm0, %xmm2
-# CHECK-NEXT: 2 8 1.00 * vcvttpd2dqx (%rax), %xmm2
+# CHECK-NEXT: 3 10 1.00 * vcvttpd2dqx (%rax), %xmm2
# CHECK-NEXT: 2 6 1.00 vcvttpd2dq %ymm0, %xmm2
# CHECK-NEXT: 2 8 1.00 * vcvttpd2dqy (%rax), %xmm2
# CHECK-NEXT: 1 3 1.00 vcvttps2dq %xmm0, %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: - 336.00 214.58 236.58 176.17 176.17 38.00 429.58 2.25 12.67
+# CHECK-NEXT: - 336.00 214.58 236.58 176.17 176.17 38.00 432.58 2.25 12.67
# CHECK: Resource pressure by instruction:
# CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] Instructions:
@@ -1833,11 +1833,11 @@ vzeroupper
# CHECK-NEXT: - - - 1.00 - - - - - - vcvtdq2ps %ymm0, %ymm2
# CHECK-NEXT: - - - 1.00 0.50 0.50 - - - - vcvtdq2ps (%rax), %ymm2
# CHECK-NEXT: - - - 1.00 - - - 1.00 - - vcvtpd2dq %xmm0, %xmm2
-# CHECK-NEXT: - - - 1.00 0.50 0.50 - - - - vcvtpd2dqx (%rax), %xmm2
+# CHECK-NEXT: - - - 1.00 0.50 0.50 - 1.00 - - vcvtpd2dqx (%rax), %xmm2
# CHECK-NEXT: - - - 1.00 - - - 1.00 - - vcvtpd2dq %ymm0, %xmm2
# CHECK-NEXT: - - - 1.00 0.50 0.50 - - - - vcvtpd2dqy (%rax), %xmm2
# CHECK-NEXT: - - - 1.00 - - - 1.00 - - vcvtpd2ps %xmm0, %xmm2
-# CHECK-NEXT: - - - 1.00 0.50 0.50 - - - - vcvtpd2psx (%rax), %xmm2
+# CHECK-NEXT: - - - 1.00 0.50 0.50 - 1.00 - - vcvtpd2psx (%rax), %xmm2
# CHECK-NEXT: - - - 1.00 - - - 1.00 - - vcvtpd2ps %ymm0, %xmm2
# CHECK-NEXT: - - - 1.00 0.50 0.50 - - - - vcvtpd2psy (%rax), %xmm2
# CHECK-NEXT: - - - 1.00 - - - - - - vcvtps2dq %xmm0, %xmm2
@@ -1869,7 +1869,7 @@ vzeroupper
# CHECK-NEXT: - - 1.00 1.00 0.50 0.50 - - - - vcvtss2si (%rax), %ecx
# CHECK-NEXT: - - 1.00 1.00 0.50 0.50 - - - - vcvtss2si (%rax), %rcx
# CHECK-NEXT: - - - 1.00 - - - 1.00 - - vcvttpd2dq %xmm0, %xmm2
-# CHECK-NEXT: - - - 1.00 0.50 0.50 - - - - vcvttpd2dqx (%rax), %xmm2
+# CHECK-NEXT: - - - 1.00 0.50 0.50 - 1.00 - - vcvttpd2dqx (%rax), %xmm2
# CHECK-NEXT: - - - 1.00 - - - 1.00 - - vcvttpd2dq %ymm0, %xmm2
# CHECK-NEXT: - - - 1.00 0.50 0.50 - - - - vcvttpd2dqy (%rax), %xmm2
# CHECK-NEXT: - - - 1.00 - - - - - - vcvttps2dq %xmm0, %xmm2
More information about the llvm-commits
mailing list