[llvm] 8e7f603 - [X86] Atom SSE shift-by-variable take 2uops/3uops not 1uop
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Sat Oct 2 04:42:22 PDT 2021
Author: Simon Pilgrim
Date: 2021-10-02T12:28:41+01:00
New Revision: 8e7f6039fa059268f9355bbcd093b284ee656f82
URL: https://github.com/llvm/llvm-project/commit/8e7f6039fa059268f9355bbcd093b284ee656f82
DIFF: https://github.com/llvm/llvm-project/commit/8e7f6039fa059268f9355bbcd093b284ee656f82.diff
LOG: [X86] Atom SSE shift-by-variable take 2uops/3uops not 1uop
Based off the most recent llvm-exegesis captures (PR36895) and what Intel AoM / Agner / InstLatX64 reports as well.
Added:
Modified:
llvm/lib/Target/X86/X86ScheduleAtom.td
llvm/test/tools/llvm-mca/X86/Atom/resources-mmx.s
llvm/test/tools/llvm-mca/X86/Atom/resources-sse2.s
Removed:
################################################################################
diff --git a/llvm/lib/Target/X86/X86ScheduleAtom.td b/llvm/lib/Target/X86/X86ScheduleAtom.td
index 1708226c60839..9f41b45140dba 100644
--- a/llvm/lib/Target/X86/X86ScheduleAtom.td
+++ b/llvm/lib/Target/X86/X86ScheduleAtom.td
@@ -396,8 +396,8 @@ defm : X86WriteResPairUnsupported<WriteVecLogicZ>;
defm : X86WriteResPairUnsupported<WriteVecTest>;
defm : X86WriteResPairUnsupported<WriteVecTestY>;
defm : X86WriteResPairUnsupported<WriteVecTestZ>;
-defm : AtomWriteResPair<WriteVecShift, [AtomPort0,AtomPort1], [AtomPort0,AtomPort1], 2, 3, [1,1], [2,2]>;
-defm : AtomWriteResPair<WriteVecShiftX, [AtomPort0,AtomPort1], [AtomPort0,AtomPort1], 2, 3, [1,1], [2,2]>;
+defm : AtomWriteResPair<WriteVecShift, [AtomPort0,AtomPort1], [AtomPort0,AtomPort1], 2, 3, [1,1], [2,2], 2, 3>;
+defm : AtomWriteResPair<WriteVecShiftX, [AtomPort0,AtomPort1], [AtomPort0,AtomPort1], 2, 3, [1,1], [2,2], 2, 3>;
defm : X86WriteResPairUnsupported<WriteVecShiftY>;
defm : X86WriteResPairUnsupported<WriteVecShiftZ>;
defm : AtomWriteResPair<WriteVecShiftImm, [AtomPort0], [AtomPort0], 1, 1>;
diff --git a/llvm/test/tools/llvm-mca/X86/Atom/resources-mmx.s b/llvm/test/tools/llvm-mca/X86/Atom/resources-mmx.s
index bc929e14fc7f3..bdefbe07b0bc1 100644
--- a/llvm/test/tools/llvm-mca/X86/Atom/resources-mmx.s
+++ b/llvm/test/tools/llvm-mca/X86/Atom/resources-mmx.s
@@ -218,29 +218,29 @@ pxor (%rax), %mm2
# CHECK-NEXT: 1 1 0.50 por %mm0, %mm2
# CHECK-NEXT: 1 1 1.00 * por (%rax), %mm2
# CHECK-NEXT: 1 1 1.00 pslld $1, %mm2
-# CHECK-NEXT: 1 2 1.00 pslld %mm0, %mm2
-# CHECK-NEXT: 1 3 2.00 * pslld (%rax), %mm2
+# CHECK-NEXT: 2 2 1.00 pslld %mm0, %mm2
+# CHECK-NEXT: 3 3 2.00 * pslld (%rax), %mm2
# CHECK-NEXT: 1 1 1.00 psllq $1, %mm2
-# CHECK-NEXT: 1 2 1.00 psllq %mm0, %mm2
-# CHECK-NEXT: 1 3 2.00 * psllq (%rax), %mm2
+# CHECK-NEXT: 2 2 1.00 psllq %mm0, %mm2
+# CHECK-NEXT: 3 3 2.00 * psllq (%rax), %mm2
# CHECK-NEXT: 1 1 1.00 psllw $1, %mm2
-# CHECK-NEXT: 1 2 1.00 psllw %mm0, %mm2
-# CHECK-NEXT: 1 3 2.00 * psllw (%rax), %mm2
+# CHECK-NEXT: 2 2 1.00 psllw %mm0, %mm2
+# CHECK-NEXT: 3 3 2.00 * psllw (%rax), %mm2
# CHECK-NEXT: 1 1 1.00 psrad $1, %mm2
-# CHECK-NEXT: 1 2 1.00 psrad %mm0, %mm2
-# CHECK-NEXT: 1 3 2.00 * psrad (%rax), %mm2
+# CHECK-NEXT: 2 2 1.00 psrad %mm0, %mm2
+# CHECK-NEXT: 3 3 2.00 * psrad (%rax), %mm2
# CHECK-NEXT: 1 1 1.00 psraw $1, %mm2
-# CHECK-NEXT: 1 2 1.00 psraw %mm0, %mm2
-# CHECK-NEXT: 1 3 2.00 * psraw (%rax), %mm2
+# CHECK-NEXT: 2 2 1.00 psraw %mm0, %mm2
+# CHECK-NEXT: 3 3 2.00 * psraw (%rax), %mm2
# CHECK-NEXT: 1 1 1.00 psrld $1, %mm2
-# CHECK-NEXT: 1 2 1.00 psrld %mm0, %mm2
-# CHECK-NEXT: 1 3 2.00 * psrld (%rax), %mm2
+# CHECK-NEXT: 2 2 1.00 psrld %mm0, %mm2
+# CHECK-NEXT: 3 3 2.00 * psrld (%rax), %mm2
# CHECK-NEXT: 1 1 1.00 psrlq $1, %mm2
-# CHECK-NEXT: 1 2 1.00 psrlq %mm0, %mm2
-# CHECK-NEXT: 1 3 2.00 * psrlq (%rax), %mm2
+# CHECK-NEXT: 2 2 1.00 psrlq %mm0, %mm2
+# CHECK-NEXT: 3 3 2.00 * psrlq (%rax), %mm2
# CHECK-NEXT: 1 1 1.00 psrlw $1, %mm2
-# CHECK-NEXT: 1 2 1.00 psrlw %mm0, %mm2
-# CHECK-NEXT: 1 3 2.00 * psrlw (%rax), %mm2
+# CHECK-NEXT: 2 2 1.00 psrlw %mm0, %mm2
+# CHECK-NEXT: 3 3 2.00 * psrlw (%rax), %mm2
# CHECK-NEXT: 1 1 0.50 psubb %mm0, %mm2
# CHECK-NEXT: 1 1 1.00 * psubb (%rax), %mm2
# CHECK-NEXT: 1 1 0.50 psubd %mm0, %mm2
diff --git a/llvm/test/tools/llvm-mca/X86/Atom/resources-sse2.s b/llvm/test/tools/llvm-mca/X86/Atom/resources-sse2.s
index 36b4c754e998b..977c94f77b841 100644
--- a/llvm/test/tools/llvm-mca/X86/Atom/resources-sse2.s
+++ b/llvm/test/tools/llvm-mca/X86/Atom/resources-sse2.s
@@ -595,31 +595,31 @@ xorpd (%rax), %xmm2
# CHECK-NEXT: 1 1 1.00 pshuflw $1, %xmm0, %xmm2
# CHECK-NEXT: 1 1 1.00 * pshuflw $1, (%rax), %xmm2
# CHECK-NEXT: 1 1 1.00 pslld $1, %xmm2
-# CHECK-NEXT: 1 2 1.00 pslld %xmm0, %xmm2
-# CHECK-NEXT: 1 3 2.00 * pslld (%rax), %xmm2
+# CHECK-NEXT: 2 2 1.00 pslld %xmm0, %xmm2
+# CHECK-NEXT: 3 3 2.00 * pslld (%rax), %xmm2
# CHECK-NEXT: 1 1 1.00 pslldq $1, %xmm2
# CHECK-NEXT: 1 1 1.00 psllq $1, %xmm2
-# CHECK-NEXT: 1 2 1.00 psllq %xmm0, %xmm2
-# CHECK-NEXT: 1 3 2.00 * psllq (%rax), %xmm2
+# CHECK-NEXT: 2 2 1.00 psllq %xmm0, %xmm2
+# CHECK-NEXT: 3 3 2.00 * psllq (%rax), %xmm2
# CHECK-NEXT: 1 1 1.00 psllw $1, %xmm2
-# CHECK-NEXT: 1 2 1.00 psllw %xmm0, %xmm2
-# CHECK-NEXT: 1 3 2.00 * psllw (%rax), %xmm2
+# CHECK-NEXT: 2 2 1.00 psllw %xmm0, %xmm2
+# CHECK-NEXT: 3 3 2.00 * psllw (%rax), %xmm2
# CHECK-NEXT: 1 1 1.00 psrad $1, %xmm2
-# CHECK-NEXT: 1 2 1.00 psrad %xmm0, %xmm2
-# CHECK-NEXT: 1 3 2.00 * psrad (%rax), %xmm2
+# CHECK-NEXT: 2 2 1.00 psrad %xmm0, %xmm2
+# CHECK-NEXT: 3 3 2.00 * psrad (%rax), %xmm2
# CHECK-NEXT: 1 1 1.00 psraw $1, %xmm2
-# CHECK-NEXT: 1 2 1.00 psraw %xmm0, %xmm2
-# CHECK-NEXT: 1 3 2.00 * psraw (%rax), %xmm2
+# CHECK-NEXT: 2 2 1.00 psraw %xmm0, %xmm2
+# CHECK-NEXT: 3 3 2.00 * psraw (%rax), %xmm2
# CHECK-NEXT: 1 1 1.00 psrld $1, %xmm2
-# CHECK-NEXT: 1 2 1.00 psrld %xmm0, %xmm2
-# CHECK-NEXT: 1 3 2.00 * psrld (%rax), %xmm2
+# CHECK-NEXT: 2 2 1.00 psrld %xmm0, %xmm2
+# CHECK-NEXT: 3 3 2.00 * psrld (%rax), %xmm2
# CHECK-NEXT: 1 1 1.00 psrldq $1, %xmm2
# CHECK-NEXT: 1 1 1.00 psrlq $1, %xmm2
-# CHECK-NEXT: 1 2 1.00 psrlq %xmm0, %xmm2
-# CHECK-NEXT: 1 3 2.00 * psrlq (%rax), %xmm2
+# CHECK-NEXT: 2 2 1.00 psrlq %xmm0, %xmm2
+# CHECK-NEXT: 3 3 2.00 * psrlq (%rax), %xmm2
# CHECK-NEXT: 1 1 1.00 psrlw $1, %xmm2
-# CHECK-NEXT: 1 2 1.00 psrlw %xmm0, %xmm2
-# CHECK-NEXT: 1 3 2.00 * psrlw (%rax), %xmm2
+# CHECK-NEXT: 2 2 1.00 psrlw %xmm0, %xmm2
+# CHECK-NEXT: 3 3 2.00 * psrlw (%rax), %xmm2
# CHECK-NEXT: 1 1 0.50 psubb %xmm0, %xmm2
# CHECK-NEXT: 1 1 1.00 * psubb (%rax), %xmm2
# CHECK-NEXT: 1 1 0.50 psubd %xmm0, %xmm2
More information about the llvm-commits
mailing list