[llvm] 4493012 - [X86] Remove unnecessary MMX PACKSS/PACKUS SchedWriteRes overrides
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Sun Oct 30 10:42:12 PDT 2022
Author: Simon Pilgrim
Date: 2022-10-30T17:41:53Z
New Revision: 44930123e01aef3986f5a9932d6def889b60d7b5
URL: https://github.com/llvm/llvm-project/commit/44930123e01aef3986f5a9932d6def889b60d7b5
DIFF: https://github.com/llvm/llvm-project/commit/44930123e01aef3986f5a9932d6def889b60d7b5.diff
LOG: [X86] Remove unnecessary MMX PACKSS/PACKUS SchedWriteRes overrides
These overrides should now match the default WriteShuffle schedules
This also fixes a typo where we were missing load latencies for the memory folded variants
Added:
Modified:
llvm/lib/Target/X86/X86ScheduleZnver1.td
llvm/lib/Target/X86/X86ScheduleZnver2.td
llvm/test/tools/llvm-mca/X86/Znver1/resources-mmx.s
llvm/test/tools/llvm-mca/X86/Znver2/resources-mmx.s
Removed:
################################################################################
diff --git a/llvm/lib/Target/X86/X86ScheduleZnver1.td b/llvm/lib/Target/X86/X86ScheduleZnver1.td
index 9d11c5ef11ae..78b32953cdf8 100644
--- a/llvm/lib/Target/X86/X86ScheduleZnver1.td
+++ b/llvm/lib/Target/X86/X86ScheduleZnver1.td
@@ -972,25 +972,6 @@ def : InstRW<[WriteMicrocoded], (instrs FNINIT)>;
//=== Integer MMX and XMM Instructions ===//
-// PACKSSWB/DW.
-// mm <- mm.
-def ZnWriteFPU12 : SchedWriteRes<[ZnFPU12]> ;
-def ZnWriteFPU12Y : SchedWriteRes<[ZnFPU12]> {
- let NumMicroOps = 2;
-}
-def ZnWriteFPU12m : SchedWriteRes<[ZnAGU, ZnFPU12]> ;
-def ZnWriteFPU12Ym : SchedWriteRes<[ZnAGU, ZnFPU12]> {
- let Latency = 8;
- let NumMicroOps = 2;
-}
-
-def : InstRW<[ZnWriteFPU12], (instrs MMX_PACKSSDWrr,
- MMX_PACKSSWBrr,
- MMX_PACKUSWBrr)>;
-def : InstRW<[ZnWriteFPU12m], (instrs MMX_PACKSSDWrm,
- MMX_PACKSSWBrm,
- MMX_PACKUSWBrm)>;
-
def ZnWriteFPU013 : SchedWriteRes<[ZnFPU013]> ;
def ZnWriteFPU013Y : SchedWriteRes<[ZnFPU013]> {
let Latency = 2;
diff --git a/llvm/lib/Target/X86/X86ScheduleZnver2.td b/llvm/lib/Target/X86/X86ScheduleZnver2.td
index 7399a4709fab..d6b0d2dd191a 100644
--- a/llvm/lib/Target/X86/X86ScheduleZnver2.td
+++ b/llvm/lib/Target/X86/X86ScheduleZnver2.td
@@ -993,26 +993,6 @@ def : InstRW<[WriteMicrocoded], (instrs FNINIT)>;
//=== Integer MMX and XMM Instructions ===//
-// PACKSSWB/DW.
-// mm <- mm.
-def Zn2WriteFPU12 : SchedWriteRes<[Zn2FPU12]> ;
-def Zn2WriteFPU12Y : SchedWriteRes<[Zn2FPU12]> {
- let Latency = 4;
- let NumMicroOps = 2;
-}
-def Zn2WriteFPU12m : SchedWriteRes<[Zn2AGU, Zn2FPU12]> ;
-def Zn2WriteFPU12Ym : SchedWriteRes<[Zn2AGU, Zn2FPU12]> {
- let Latency = 8;
- let NumMicroOps = 2;
-}
-
-def : InstRW<[Zn2WriteFPU12], (instrs MMX_PACKSSDWrr,
- MMX_PACKSSWBrr,
- MMX_PACKUSWBrr)>;
-def : InstRW<[Zn2WriteFPU12m], (instrs MMX_PACKSSDWrm,
- MMX_PACKSSWBrm,
- MMX_PACKUSWBrm)>;
-
def Zn2WriteFPU013 : SchedWriteRes<[Zn2FPU013]> ;
def Zn2WriteFPU013Y : SchedWriteRes<[Zn2FPU013]> ;
def Zn2WriteFPU013m : SchedWriteRes<[Zn2AGU, Zn2FPU013]> {
diff --git a/llvm/test/tools/llvm-mca/X86/Znver1/resources-mmx.s b/llvm/test/tools/llvm-mca/X86/Znver1/resources-mmx.s
index 77508f5be235..61462105e1b5 100644
--- a/llvm/test/tools/llvm-mca/X86/Znver1/resources-mmx.s
+++ b/llvm/test/tools/llvm-mca/X86/Znver1/resources-mmx.s
@@ -174,11 +174,11 @@ pxor (%rax), %mm2
# CHECK-NEXT: 1 2 1.00 movq %mm0, %rcx
# CHECK-NEXT: 1 1 0.50 * movq %mm0, (%rax)
# CHECK-NEXT: 1 1 0.50 packsswb %mm0, %mm2
-# CHECK-NEXT: 1 1 0.50 * packsswb (%rax), %mm2
+# CHECK-NEXT: 1 8 0.50 * packsswb (%rax), %mm2
# CHECK-NEXT: 1 1 0.50 packssdw %mm0, %mm2
-# CHECK-NEXT: 1 1 0.50 * packssdw (%rax), %mm2
+# CHECK-NEXT: 1 8 0.50 * packssdw (%rax), %mm2
# CHECK-NEXT: 1 1 0.50 packuswb %mm0, %mm2
-# CHECK-NEXT: 1 1 0.50 * packuswb (%rax), %mm2
+# CHECK-NEXT: 1 8 0.50 * packuswb (%rax), %mm2
# CHECK-NEXT: 1 1 0.33 paddb %mm0, %mm2
# CHECK-NEXT: 1 8 0.50 * paddb (%rax), %mm2
# CHECK-NEXT: 1 1 0.33 paddd %mm0, %mm2
diff --git a/llvm/test/tools/llvm-mca/X86/Znver2/resources-mmx.s b/llvm/test/tools/llvm-mca/X86/Znver2/resources-mmx.s
index 96c9351ececf..492c75f4583e 100644
--- a/llvm/test/tools/llvm-mca/X86/Znver2/resources-mmx.s
+++ b/llvm/test/tools/llvm-mca/X86/Znver2/resources-mmx.s
@@ -174,11 +174,11 @@ pxor (%rax), %mm2
# CHECK-NEXT: 1 2 1.00 movq %mm0, %rcx
# CHECK-NEXT: 1 1 0.33 * movq %mm0, (%rax)
# CHECK-NEXT: 1 1 0.50 packsswb %mm0, %mm2
-# CHECK-NEXT: 1 1 0.50 * packsswb (%rax), %mm2
+# CHECK-NEXT: 1 8 0.50 * packsswb (%rax), %mm2
# CHECK-NEXT: 1 1 0.50 packssdw %mm0, %mm2
-# CHECK-NEXT: 1 1 0.50 * packssdw (%rax), %mm2
+# CHECK-NEXT: 1 8 0.50 * packssdw (%rax), %mm2
# CHECK-NEXT: 1 1 0.50 packuswb %mm0, %mm2
-# CHECK-NEXT: 1 1 0.50 * packuswb (%rax), %mm2
+# CHECK-NEXT: 1 8 0.50 * packuswb (%rax), %mm2
# CHECK-NEXT: 1 1 0.33 paddb %mm0, %mm2
# CHECK-NEXT: 1 8 0.33 * paddb (%rax), %mm2
# CHECK-NEXT: 1 1 0.33 paddd %mm0, %mm2
More information about the llvm-commits
mailing list