From 8e7f6039fa059268f9355bbcd093b284ee656f82 Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Thu, 30 Sep 2021 12:28:02 +0100 Subject: [PATCH] [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. --- llvm/lib/Target/X86/X86ScheduleAtom.td | 4 +-- .../tools/llvm-mca/X86/Atom/resources-mmx.s | 32 +++++++++---------- .../tools/llvm-mca/X86/Atom/resources-sse2.s | 32 +++++++++---------- 3 files changed, 34 insertions(+), 34 deletions(-) diff --git a/llvm/lib/Target/X86/X86ScheduleAtom.td b/llvm/lib/Target/X86/X86ScheduleAtom.td index 1708226c6083..9f41b45140db 100644 --- a/llvm/lib/Target/X86/X86ScheduleAtom.td +++ b/llvm/lib/Target/X86/X86ScheduleAtom.td @@ -396,8 +396,8 @@ defm : X86WriteResPairUnsupported; defm : X86WriteResPairUnsupported; defm : X86WriteResPairUnsupported; defm : X86WriteResPairUnsupported; -defm : AtomWriteResPair; -defm : AtomWriteResPair; +defm : AtomWriteResPair; +defm : AtomWriteResPair; defm : X86WriteResPairUnsupported; defm : X86WriteResPairUnsupported; defm : AtomWriteResPair; 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 bc929e14fc7f..bdefbe07b0bc 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 36b4c754e998..977c94f77b84 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