[llvm] cb5bdf8 - [X86] Remove HSW/BDW incorrect MOVQ2DQ override
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 28 03:46:01 PST 2024
Author: Simon Pilgrim
Date: 2024-11-28T11:44:25Z
New Revision: cb5bdf8ce095b0b9fe874545e4d54d97d552a1c4
URL: https://github.com/llvm/llvm-project/commit/cb5bdf8ce095b0b9fe874545e4d54d97d552a1c4
DIFF: https://github.com/llvm/llvm-project/commit/cb5bdf8ce095b0b9fe874545e4d54d97d552a1c4.diff
LOG: [X86] Remove HSW/BDW incorrect MOVQ2DQ override
MOVQ2DQ is treated the same as other vector moves on Port015 (matches SandyBridge, not Skylake or later).
Confirmed by augner/uops.info
Added:
Modified:
llvm/lib/Target/X86/X86SchedBroadwell.td
llvm/lib/Target/X86/X86SchedHaswell.td
llvm/test/tools/llvm-mca/X86/Broadwell/resources-sse2.s
llvm/test/tools/llvm-mca/X86/Haswell/resources-sse2.s
Removed:
################################################################################
diff --git a/llvm/lib/Target/X86/X86SchedBroadwell.td b/llvm/lib/Target/X86/X86SchedBroadwell.td
index 42be81181c656d..4b697c43363418 100644
--- a/llvm/lib/Target/X86/X86SchedBroadwell.td
+++ b/llvm/lib/Target/X86/X86SchedBroadwell.td
@@ -648,13 +648,6 @@ def BWWriteResGroup2 : SchedWriteRes<[BWPort1]> {
def: InstRW<[BWWriteResGroup2], (instregex "COM(P?)_FST0r",
"UCOM_F(P?)r")>;
-def BWWriteResGroup3 : SchedWriteRes<[BWPort5]> {
- let Latency = 1;
- let NumMicroOps = 1;
- let ReleaseAtCycles = [1];
-}
-def: InstRW<[BWWriteResGroup3], (instrs MMX_MOVQ2DQrr)>;
-
def BWWriteResGroup4 : SchedWriteRes<[BWPort6]> {
let Latency = 1;
let NumMicroOps = 1;
diff --git a/llvm/lib/Target/X86/X86SchedHaswell.td b/llvm/lib/Target/X86/X86SchedHaswell.td
index 8aa9104edfcb74..dd1e1c3a6cb531 100644
--- a/llvm/lib/Target/X86/X86SchedHaswell.td
+++ b/llvm/lib/Target/X86/X86SchedHaswell.td
@@ -919,13 +919,6 @@ def HWWriteResGroup3 : SchedWriteRes<[HWPort1]> {
def: InstRW<[HWWriteResGroup3], (instregex "COM(P?)_FST0r",
"UCOM_F(P?)r")>;
-def HWWriteResGroup4 : SchedWriteRes<[HWPort5]> {
- let Latency = 1;
- let NumMicroOps = 1;
- let ReleaseAtCycles = [1];
-}
-def: InstRW<[HWWriteResGroup4], (instrs MMX_MOVQ2DQrr)>;
-
def HWWriteResGroup5 : SchedWriteRes<[HWPort6]> {
let Latency = 1;
let NumMicroOps = 1;
diff --git a/llvm/test/tools/llvm-mca/X86/Broadwell/resources-sse2.s b/llvm/test/tools/llvm-mca/X86/Broadwell/resources-sse2.s
index 9c2472686f3d2b..dff17ed012abe4 100644
--- a/llvm/test/tools/llvm-mca/X86/Broadwell/resources-sse2.s
+++ b/llvm/test/tools/llvm-mca/X86/Broadwell/resources-sse2.s
@@ -503,7 +503,7 @@ xorpd (%rax), %xmm2
# CHECK-NEXT: 1 5 0.50 * movq (%rax), %xmm2
# CHECK-NEXT: 1 1 1.00 movq %xmm0, %rcx
# CHECK-NEXT: 2 1 1.00 * movq %xmm0, (%rax)
-# CHECK-NEXT: 1 1 1.00 movq2dq %mm0, %xmm2
+# CHECK-NEXT: 1 1 0.33 movq2dq %mm0, %xmm2
# CHECK-NEXT: 1 1 1.00 movsd %xmm0, %xmm2
# CHECK-NEXT: 2 1 1.00 * movsd %xmm0, (%rax)
# CHECK-NEXT: 1 5 0.50 * movsd (%rax), %xmm2
@@ -689,7 +689,7 @@ xorpd (%rax), %xmm2
# CHECK: Resource pressure per iteration:
# CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9]
-# CHECK-NEXT: - 78.00 70.25 95.25 63.67 63.67 15.00 116.75 1.75 4.67
+# CHECK-NEXT: - 78.00 70.58 95.58 63.67 63.67 15.00 116.08 1.75 4.67
# CHECK: Resource pressure by instruction:
# CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] Instructions:
@@ -789,7 +789,7 @@ xorpd (%rax), %xmm2
# CHECK-NEXT: - - - - 0.50 0.50 - - - - movq (%rax), %xmm2
# CHECK-NEXT: - - 1.00 - - - - - - - movq %xmm0, %rcx
# CHECK-NEXT: - - - - 0.33 0.33 1.00 - - 0.33 movq %xmm0, (%rax)
-# CHECK-NEXT: - - - - - - - 1.00 - - movq2dq %mm0, %xmm2
+# CHECK-NEXT: - - 0.33 0.33 - - - 0.33 - - movq2dq %mm0, %xmm2
# CHECK-NEXT: - - - - - - - 1.00 - - movsd %xmm0, %xmm2
# CHECK-NEXT: - - - - 0.33 0.33 1.00 - - 0.33 movsd %xmm0, (%rax)
# CHECK-NEXT: - - - - 0.50 0.50 - - - - movsd (%rax), %xmm2
diff --git a/llvm/test/tools/llvm-mca/X86/Haswell/resources-sse2.s b/llvm/test/tools/llvm-mca/X86/Haswell/resources-sse2.s
index 4a41a797602f1a..3c862fe8bb6b30 100644
--- a/llvm/test/tools/llvm-mca/X86/Haswell/resources-sse2.s
+++ b/llvm/test/tools/llvm-mca/X86/Haswell/resources-sse2.s
@@ -503,7 +503,7 @@ xorpd (%rax), %xmm2
# CHECK-NEXT: 1 5 0.50 * movq (%rax), %xmm2
# CHECK-NEXT: 1 1 1.00 movq %xmm0, %rcx
# CHECK-NEXT: 2 1 1.00 * movq %xmm0, (%rax)
-# CHECK-NEXT: 1 1 1.00 movq2dq %mm0, %xmm2
+# CHECK-NEXT: 1 1 0.33 movq2dq %mm0, %xmm2
# CHECK-NEXT: 1 1 1.00 movsd %xmm0, %xmm2
# CHECK-NEXT: 2 1 1.00 * movsd %xmm0, (%rax)
# CHECK-NEXT: 1 5 0.50 * movsd (%rax), %xmm2
@@ -689,7 +689,7 @@ xorpd (%rax), %xmm2
# CHECK: Resource pressure per iteration:
# CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9]
-# CHECK-NEXT: - 112.00 70.25 95.25 63.67 63.67 15.00 116.75 1.75 4.67
+# CHECK-NEXT: - 112.00 70.58 95.58 63.67 63.67 15.00 116.08 1.75 4.67
# CHECK: Resource pressure by instruction:
# CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] Instructions:
@@ -789,7 +789,7 @@ xorpd (%rax), %xmm2
# CHECK-NEXT: - - - - 0.50 0.50 - - - - movq (%rax), %xmm2
# CHECK-NEXT: - - 1.00 - - - - - - - movq %xmm0, %rcx
# CHECK-NEXT: - - - - 0.33 0.33 1.00 - - 0.33 movq %xmm0, (%rax)
-# CHECK-NEXT: - - - - - - - 1.00 - - movq2dq %mm0, %xmm2
+# CHECK-NEXT: - - 0.33 0.33 - - - 0.33 - - movq2dq %mm0, %xmm2
# CHECK-NEXT: - - - - - - - 1.00 - - movsd %xmm0, %xmm2
# CHECK-NEXT: - - - - 0.33 0.33 1.00 - - 0.33 movsd %xmm0, (%rax)
# CHECK-NEXT: - - - - 0.50 0.50 - - - - movsd (%rax), %xmm2
More information about the llvm-commits
mailing list