[llvm] cbe5b2d - [MCA][X86] Add test coverage for GFNI instructions
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Sat Nov 12 09:14:17 PST 2022
Author: Simon Pilgrim
Date: 2022-11-12T17:14:06Z
New Revision: cbe5b2dd914b7ee47bb4d0f67af154a40be4d208
URL: https://github.com/llvm/llvm-project/commit/cbe5b2dd914b7ee47bb4d0f67af154a40be4d208
DIFF: https://github.com/llvm/llvm-project/commit/cbe5b2dd914b7ee47bb4d0f67af154a40be4d208.diff
LOG: [MCA][X86] Add test coverage for GFNI instructions
Added:
llvm/test/tools/llvm-mca/X86/AlderlakeP/resources-avxgfni.s
llvm/test/tools/llvm-mca/X86/AlderlakeP/resources-gfni.s
llvm/test/tools/llvm-mca/X86/Generic/resources-avx512gfni.s
llvm/test/tools/llvm-mca/X86/Generic/resources-avx512gfnivl.s
llvm/test/tools/llvm-mca/X86/Generic/resources-avxgfni.s
llvm/test/tools/llvm-mca/X86/Generic/resources-gfni.s
llvm/test/tools/llvm-mca/X86/IceLakeServer/resources-avx512gfni.s
llvm/test/tools/llvm-mca/X86/IceLakeServer/resources-avx512gfnivl.s
llvm/test/tools/llvm-mca/X86/IceLakeServer/resources-avxgfni.s
llvm/test/tools/llvm-mca/X86/IceLakeServer/resources-gfni.s
Modified:
Removed:
################################################################################
diff --git a/llvm/test/tools/llvm-mca/X86/AlderlakeP/resources-avxgfni.s b/llvm/test/tools/llvm-mca/X86/AlderlakeP/resources-avxgfni.s
new file mode 100644
index 0000000000000..8728310759d74
--- /dev/null
+++ b/llvm/test/tools/llvm-mca/X86/AlderlakeP/resources-avxgfni.s
@@ -0,0 +1,55 @@
+# NOTE: Assertions have been autogenerated by utils/update_mca_test_checks.py
+# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=alderlake -instruction-tables < %s | FileCheck %s
+
+vgf2p8affineinvqb $0, %xmm0, %xmm1, %xmm2
+vgf2p8affineinvqb $0, (%rax), %xmm1, %xmm2
+
+vgf2p8affineqb $0, %xmm0, %xmm1, %xmm2
+vgf2p8affineqb $0, (%rax), %xmm1, %xmm2
+
+vgf2p8mulb %xmm0, %xmm1, %xmm2
+vgf2p8mulb (%rax), %xmm1, %xmm2
+
+# CHECK: Instruction Info:
+# CHECK-NEXT: [1]: #uOps
+# CHECK-NEXT: [2]: Latency
+# CHECK-NEXT: [3]: RThroughput
+# CHECK-NEXT: [4]: MayLoad
+# CHECK-NEXT: [5]: MayStore
+# CHECK-NEXT: [6]: HasSideEffects (U)
+
+# CHECK: [1] [2] [3] [4] [5] [6] Instructions:
+# CHECK-NEXT: 1 5 0.50 vgf2p8affineinvqb $0, %xmm0, %xmm1, %xmm2
+# CHECK-NEXT: 2 12 0.50 * vgf2p8affineinvqb $0, (%rax), %xmm1, %xmm2
+# CHECK-NEXT: 1 5 0.50 vgf2p8affineqb $0, %xmm0, %xmm1, %xmm2
+# CHECK-NEXT: 2 12 0.50 * vgf2p8affineqb $0, (%rax), %xmm1, %xmm2
+# CHECK-NEXT: 1 5 0.50 vgf2p8mulb %xmm0, %xmm1, %xmm2
+# CHECK-NEXT: 2 12 0.50 * vgf2p8mulb (%rax), %xmm1, %xmm2
+
+# CHECK: Resources:
+# CHECK-NEXT: [0] - ADLPPort00
+# CHECK-NEXT: [1] - ADLPPort01
+# CHECK-NEXT: [2] - ADLPPort02
+# CHECK-NEXT: [3] - ADLPPort03
+# CHECK-NEXT: [4] - ADLPPort04
+# CHECK-NEXT: [5] - ADLPPort05
+# CHECK-NEXT: [6] - ADLPPort06
+# CHECK-NEXT: [7] - ADLPPort07
+# CHECK-NEXT: [8] - ADLPPort08
+# CHECK-NEXT: [9] - ADLPPort09
+# CHECK-NEXT: [10] - ADLPPort10
+# CHECK-NEXT: [11] - ADLPPort11
+# CHECK-NEXT: [12] - ADLPPortInvalid
+
+# CHECK: Resource pressure per iteration:
+# CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12]
+# CHECK-NEXT: 3.00 3.00 1.00 1.00 - - - - - - - 1.00 -
+
+# CHECK: Resource pressure by instruction:
+# CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] Instructions:
+# CHECK-NEXT: 0.50 0.50 - - - - - - - - - - - vgf2p8affineinvqb $0, %xmm0, %xmm1, %xmm2
+# CHECK-NEXT: 0.50 0.50 0.33 0.33 - - - - - - - 0.33 - vgf2p8affineinvqb $0, (%rax), %xmm1, %xmm2
+# CHECK-NEXT: 0.50 0.50 - - - - - - - - - - - vgf2p8affineqb $0, %xmm0, %xmm1, %xmm2
+# CHECK-NEXT: 0.50 0.50 0.33 0.33 - - - - - - - 0.33 - vgf2p8affineqb $0, (%rax), %xmm1, %xmm2
+# CHECK-NEXT: 0.50 0.50 - - - - - - - - - - - vgf2p8mulb %xmm0, %xmm1, %xmm2
+# CHECK-NEXT: 0.50 0.50 0.33 0.33 - - - - - - - 0.33 - vgf2p8mulb (%rax), %xmm1, %xmm2
diff --git a/llvm/test/tools/llvm-mca/X86/AlderlakeP/resources-gfni.s b/llvm/test/tools/llvm-mca/X86/AlderlakeP/resources-gfni.s
new file mode 100644
index 0000000000000..322fcb420196e
--- /dev/null
+++ b/llvm/test/tools/llvm-mca/X86/AlderlakeP/resources-gfni.s
@@ -0,0 +1,55 @@
+# NOTE: Assertions have been autogenerated by utils/update_mca_test_checks.py
+# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=alderlake -instruction-tables < %s | FileCheck %s
+
+gf2p8affineinvqb $0, %xmm0, %xmm1
+gf2p8affineinvqb $0, (%rax), %xmm1
+
+gf2p8affineqb $0, %xmm0, %xmm1
+gf2p8affineqb $0, (%rax), %xmm1
+
+gf2p8mulb %xmm0, %xmm1
+gf2p8mulb (%rax), %xmm1
+
+# CHECK: Instruction Info:
+# CHECK-NEXT: [1]: #uOps
+# CHECK-NEXT: [2]: Latency
+# CHECK-NEXT: [3]: RThroughput
+# CHECK-NEXT: [4]: MayLoad
+# CHECK-NEXT: [5]: MayStore
+# CHECK-NEXT: [6]: HasSideEffects (U)
+
+# CHECK: [1] [2] [3] [4] [5] [6] Instructions:
+# CHECK-NEXT: 1 5 0.50 gf2p8affineinvqb $0, %xmm0, %xmm1
+# CHECK-NEXT: 2 12 0.50 * gf2p8affineinvqb $0, (%rax), %xmm1
+# CHECK-NEXT: 1 5 0.50 gf2p8affineqb $0, %xmm0, %xmm1
+# CHECK-NEXT: 2 12 0.50 * gf2p8affineqb $0, (%rax), %xmm1
+# CHECK-NEXT: 1 5 0.50 gf2p8mulb %xmm0, %xmm1
+# CHECK-NEXT: 2 12 0.50 * gf2p8mulb (%rax), %xmm1
+
+# CHECK: Resources:
+# CHECK-NEXT: [0] - ADLPPort00
+# CHECK-NEXT: [1] - ADLPPort01
+# CHECK-NEXT: [2] - ADLPPort02
+# CHECK-NEXT: [3] - ADLPPort03
+# CHECK-NEXT: [4] - ADLPPort04
+# CHECK-NEXT: [5] - ADLPPort05
+# CHECK-NEXT: [6] - ADLPPort06
+# CHECK-NEXT: [7] - ADLPPort07
+# CHECK-NEXT: [8] - ADLPPort08
+# CHECK-NEXT: [9] - ADLPPort09
+# CHECK-NEXT: [10] - ADLPPort10
+# CHECK-NEXT: [11] - ADLPPort11
+# CHECK-NEXT: [12] - ADLPPortInvalid
+
+# CHECK: Resource pressure per iteration:
+# CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12]
+# CHECK-NEXT: 3.00 3.00 1.00 1.00 - - - - - - - 1.00 -
+
+# CHECK: Resource pressure by instruction:
+# CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] Instructions:
+# CHECK-NEXT: 0.50 0.50 - - - - - - - - - - - gf2p8affineinvqb $0, %xmm0, %xmm1
+# CHECK-NEXT: 0.50 0.50 0.33 0.33 - - - - - - - 0.33 - gf2p8affineinvqb $0, (%rax), %xmm1
+# CHECK-NEXT: 0.50 0.50 - - - - - - - - - - - gf2p8affineqb $0, %xmm0, %xmm1
+# CHECK-NEXT: 0.50 0.50 0.33 0.33 - - - - - - - 0.33 - gf2p8affineqb $0, (%rax), %xmm1
+# CHECK-NEXT: 0.50 0.50 - - - - - - - - - - - gf2p8mulb %xmm0, %xmm1
+# CHECK-NEXT: 0.50 0.50 0.33 0.33 - - - - - - - 0.33 - gf2p8mulb (%rax), %xmm1
diff --git a/llvm/test/tools/llvm-mca/X86/Generic/resources-avx512gfni.s b/llvm/test/tools/llvm-mca/X86/Generic/resources-avx512gfni.s
new file mode 100644
index 0000000000000..2fa4f7327b8bd
--- /dev/null
+++ b/llvm/test/tools/llvm-mca/X86/Generic/resources-avx512gfni.s
@@ -0,0 +1,104 @@
+# NOTE: Assertions have been autogenerated by utils/update_mca_test_checks.py
+# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=x86-64 -instruction-tables < %s | FileCheck %s
+
+vgf2p8affineinvqb $0, %zmm0, %zmm1, %zmm2
+vgf2p8affineinvqb $0, (%rax), %zmm1, %zmm2
+vgf2p8affineinvqb $0, (%rax){1to8}, %zmm1, %zmm2
+vgf2p8affineinvqb $0, %zmm0, %zmm1, %zmm2 {k1}
+vgf2p8affineinvqb $0, (%rax), %zmm1, %zmm2 {k1}
+vgf2p8affineinvqb $0, (%rax){1to8}, %zmm1, %zmm2 {k1}
+vgf2p8affineinvqb $0, %zmm0, %zmm1, %zmm2 {z}{k1}
+vgf2p8affineinvqb $0, (%rax), %zmm1, %zmm2 {z}{k1}
+vgf2p8affineinvqb $0, (%rax){1to8}, %zmm1, %zmm2 {z}{k1}
+
+vgf2p8affineqb $0, %zmm0, %zmm1, %zmm2
+vgf2p8affineqb $0, (%rax), %zmm1, %zmm2
+vgf2p8affineqb $0, (%rax){1to8}, %zmm1, %zmm2
+vgf2p8affineqb $0, %zmm0, %zmm1, %zmm2
+vgf2p8affineqb $0, (%rax), %zmm1, %zmm2
+vgf2p8affineqb $0, (%rax){1to8}, %zmm1, %zmm2
+vgf2p8affineqb $0, %zmm0, %zmm1, %zmm2 {z}{k1}
+vgf2p8affineqb $0, (%rax), %zmm1, %zmm2 {z}{k1}
+vgf2p8affineqb $0, (%rax){1to8}, %zmm1, %zmm2 {z}{k1}
+
+vgf2p8mulb %zmm0, %zmm1, %zmm2
+vgf2p8mulb (%rax), %zmm1, %zmm2
+vgf2p8mulb %zmm0, %zmm1, %zmm2 {k1}
+vgf2p8mulb (%rax), %zmm1, %zmm2 {k1}
+vgf2p8mulb %zmm0, %zmm1, %zmm2 {z}{k1}
+vgf2p8mulb (%rax), %zmm1, %zmm2 {z}{k1}
+
+# CHECK: Instruction Info:
+# CHECK-NEXT: [1]: #uOps
+# CHECK-NEXT: [2]: Latency
+# CHECK-NEXT: [3]: RThroughput
+# CHECK-NEXT: [4]: MayLoad
+# CHECK-NEXT: [5]: MayStore
+# CHECK-NEXT: [6]: HasSideEffects (U)
+
+# CHECK: [1] [2] [3] [4] [5] [6] Instructions:
+# CHECK-NEXT: 1 5 1.00 vgf2p8affineinvqb $0, %zmm0, %zmm1, %zmm2
+# CHECK-NEXT: 2 12 1.00 * vgf2p8affineinvqb $0, (%rax), %zmm1, %zmm2
+# CHECK-NEXT: 2 12 1.00 * vgf2p8affineinvqb $0, (%rax){1to8}, %zmm1, %zmm2
+# CHECK-NEXT: 1 5 1.00 vgf2p8affineinvqb $0, %zmm0, %zmm1, %zmm2 {%k1}
+# CHECK-NEXT: 2 12 1.00 * vgf2p8affineinvqb $0, (%rax), %zmm1, %zmm2 {%k1}
+# CHECK-NEXT: 2 12 1.00 * vgf2p8affineinvqb $0, (%rax){1to8}, %zmm1, %zmm2 {%k1}
+# CHECK-NEXT: 1 5 1.00 vgf2p8affineinvqb $0, %zmm0, %zmm1, %zmm2 {%k1} {z}
+# CHECK-NEXT: 2 12 1.00 * vgf2p8affineinvqb $0, (%rax), %zmm1, %zmm2 {%k1} {z}
+# CHECK-NEXT: 2 12 1.00 * vgf2p8affineinvqb $0, (%rax){1to8}, %zmm1, %zmm2 {%k1} {z}
+# CHECK-NEXT: 1 5 1.00 vgf2p8affineqb $0, %zmm0, %zmm1, %zmm2
+# CHECK-NEXT: 2 12 1.00 * vgf2p8affineqb $0, (%rax), %zmm1, %zmm2
+# CHECK-NEXT: 2 12 1.00 * vgf2p8affineqb $0, (%rax){1to8}, %zmm1, %zmm2
+# CHECK-NEXT: 1 5 1.00 vgf2p8affineqb $0, %zmm0, %zmm1, %zmm2
+# CHECK-NEXT: 2 12 1.00 * vgf2p8affineqb $0, (%rax), %zmm1, %zmm2
+# CHECK-NEXT: 2 12 1.00 * vgf2p8affineqb $0, (%rax){1to8}, %zmm1, %zmm2
+# CHECK-NEXT: 1 5 1.00 vgf2p8affineqb $0, %zmm0, %zmm1, %zmm2 {%k1} {z}
+# CHECK-NEXT: 2 12 1.00 * vgf2p8affineqb $0, (%rax), %zmm1, %zmm2 {%k1} {z}
+# CHECK-NEXT: 2 12 1.00 * vgf2p8affineqb $0, (%rax){1to8}, %zmm1, %zmm2 {%k1} {z}
+# CHECK-NEXT: 1 1 0.50 vgf2p8mulb %zmm0, %zmm1, %zmm2
+# CHECK-NEXT: 2 8 0.50 * vgf2p8mulb (%rax), %zmm1, %zmm2
+# CHECK-NEXT: 1 1 0.50 vgf2p8mulb %zmm0, %zmm1, %zmm2 {%k1}
+# CHECK-NEXT: 2 8 0.50 * vgf2p8mulb (%rax), %zmm1, %zmm2 {%k1}
+# CHECK-NEXT: 1 1 0.50 vgf2p8mulb %zmm0, %zmm1, %zmm2 {%k1} {z}
+# CHECK-NEXT: 2 8 0.50 * vgf2p8mulb (%rax), %zmm1, %zmm2 {%k1} {z}
+
+# CHECK: Resources:
+# CHECK-NEXT: [0] - SBDivider
+# CHECK-NEXT: [1] - SBFPDivider
+# CHECK-NEXT: [2] - SBPort0
+# CHECK-NEXT: [3] - SBPort1
+# CHECK-NEXT: [4] - SBPort4
+# CHECK-NEXT: [5] - SBPort5
+# CHECK-NEXT: [6.0] - SBPort23
+# CHECK-NEXT: [6.1] - SBPort23
+
+# CHECK: Resource pressure per iteration:
+# CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6.0] [6.1]
+# CHECK-NEXT: - - 18.00 3.00 - 3.00 7.50 7.50
+
+# CHECK: Resource pressure by instruction:
+# CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6.0] [6.1] Instructions:
+# CHECK-NEXT: - - 1.00 - - - - - vgf2p8affineinvqb $0, %zmm0, %zmm1, %zmm2
+# CHECK-NEXT: - - 1.00 - - - 0.50 0.50 vgf2p8affineinvqb $0, (%rax), %zmm1, %zmm2
+# CHECK-NEXT: - - 1.00 - - - 0.50 0.50 vgf2p8affineinvqb $0, (%rax){1to8}, %zmm1, %zmm2
+# CHECK-NEXT: - - 1.00 - - - - - vgf2p8affineinvqb $0, %zmm0, %zmm1, %zmm2 {%k1}
+# CHECK-NEXT: - - 1.00 - - - 0.50 0.50 vgf2p8affineinvqb $0, (%rax), %zmm1, %zmm2 {%k1}
+# CHECK-NEXT: - - 1.00 - - - 0.50 0.50 vgf2p8affineinvqb $0, (%rax){1to8}, %zmm1, %zmm2 {%k1}
+# CHECK-NEXT: - - 1.00 - - - - - vgf2p8affineinvqb $0, %zmm0, %zmm1, %zmm2 {%k1} {z}
+# CHECK-NEXT: - - 1.00 - - - 0.50 0.50 vgf2p8affineinvqb $0, (%rax), %zmm1, %zmm2 {%k1} {z}
+# CHECK-NEXT: - - 1.00 - - - 0.50 0.50 vgf2p8affineinvqb $0, (%rax){1to8}, %zmm1, %zmm2 {%k1} {z}
+# CHECK-NEXT: - - 1.00 - - - - - vgf2p8affineqb $0, %zmm0, %zmm1, %zmm2
+# CHECK-NEXT: - - 1.00 - - - 0.50 0.50 vgf2p8affineqb $0, (%rax), %zmm1, %zmm2
+# CHECK-NEXT: - - 1.00 - - - 0.50 0.50 vgf2p8affineqb $0, (%rax){1to8}, %zmm1, %zmm2
+# CHECK-NEXT: - - 1.00 - - - - - vgf2p8affineqb $0, %zmm0, %zmm1, %zmm2
+# CHECK-NEXT: - - 1.00 - - - 0.50 0.50 vgf2p8affineqb $0, (%rax), %zmm1, %zmm2
+# CHECK-NEXT: - - 1.00 - - - 0.50 0.50 vgf2p8affineqb $0, (%rax){1to8}, %zmm1, %zmm2
+# CHECK-NEXT: - - 1.00 - - - - - vgf2p8affineqb $0, %zmm0, %zmm1, %zmm2 {%k1} {z}
+# CHECK-NEXT: - - 1.00 - - - 0.50 0.50 vgf2p8affineqb $0, (%rax), %zmm1, %zmm2 {%k1} {z}
+# CHECK-NEXT: - - 1.00 - - - 0.50 0.50 vgf2p8affineqb $0, (%rax){1to8}, %zmm1, %zmm2 {%k1} {z}
+# CHECK-NEXT: - - - 0.50 - 0.50 - - vgf2p8mulb %zmm0, %zmm1, %zmm2
+# CHECK-NEXT: - - - 0.50 - 0.50 0.50 0.50 vgf2p8mulb (%rax), %zmm1, %zmm2
+# CHECK-NEXT: - - - 0.50 - 0.50 - - vgf2p8mulb %zmm0, %zmm1, %zmm2 {%k1}
+# CHECK-NEXT: - - - 0.50 - 0.50 0.50 0.50 vgf2p8mulb (%rax), %zmm1, %zmm2 {%k1}
+# CHECK-NEXT: - - - 0.50 - 0.50 - - vgf2p8mulb %zmm0, %zmm1, %zmm2 {%k1} {z}
+# CHECK-NEXT: - - - 0.50 - 0.50 0.50 0.50 vgf2p8mulb (%rax), %zmm1, %zmm2 {%k1} {z}
diff --git a/llvm/test/tools/llvm-mca/X86/Generic/resources-avx512gfnivl.s b/llvm/test/tools/llvm-mca/X86/Generic/resources-avx512gfnivl.s
new file mode 100644
index 0000000000000..afb8d5558863b
--- /dev/null
+++ b/llvm/test/tools/llvm-mca/X86/Generic/resources-avx512gfnivl.s
@@ -0,0 +1,179 @@
+# NOTE: Assertions have been autogenerated by utils/update_mca_test_checks.py
+# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=x86-64 -instruction-tables < %s | FileCheck %s
+
+vgf2p8affineinvqb $0, %xmm0, %xmm1, %xmm2
+vgf2p8affineinvqb $0, (%rax), %xmm1, %xmm2
+vgf2p8affineinvqb $0, (%rax){1to2}, %xmm1, %xmm2
+vgf2p8affineinvqb $0, %xmm0, %xmm1, %xmm2 {k1}
+vgf2p8affineinvqb $0, (%rax), %xmm1, %xmm2 {k1}
+vgf2p8affineinvqb $0, (%rax){1to2}, %xmm1, %xmm2 {k1}
+vgf2p8affineinvqb $0, %xmm0, %xmm1, %xmm2 {z}{k1}
+vgf2p8affineinvqb $0, (%rax), %xmm1, %xmm2 {z}{k1}
+vgf2p8affineinvqb $0, (%rax){1to2}, %xmm1, %xmm2 {z}{k1}
+
+vgf2p8affineinvqb $0, %ymm0, %ymm1, %ymm2
+vgf2p8affineinvqb $0, (%rax), %ymm1, %ymm2
+vgf2p8affineinvqb $0, (%rax){1to4}, %ymm1, %ymm2
+vgf2p8affineinvqb $0, %ymm0, %ymm1, %ymm2 {k1}
+vgf2p8affineinvqb $0, (%rax), %ymm1, %ymm2 {k1}
+vgf2p8affineinvqb $0, (%rax){1to4}, %ymm1, %ymm2 {k1}
+vgf2p8affineinvqb $0, %ymm0, %ymm1, %ymm2 {z}{k1}
+vgf2p8affineinvqb $0, (%rax), %ymm1, %ymm2 {z}{k1}
+vgf2p8affineinvqb $0, (%rax){1to4}, %ymm1, %ymm2 {z}{k1}
+
+vgf2p8affineqb $0, %xmm0, %xmm1, %xmm2
+vgf2p8affineqb $0, (%rax), %xmm1, %xmm2
+vgf2p8affineqb $0, (%rax){1to2}, %xmm1, %xmm2
+vgf2p8affineqb $0, %xmm0, %xmm1, %xmm2
+vgf2p8affineqb $0, (%rax), %xmm1, %xmm2
+vgf2p8affineqb $0, (%rax){1to2}, %xmm1, %xmm2
+vgf2p8affineqb $0, %xmm0, %xmm1, %xmm2 {z}{k1}
+vgf2p8affineqb $0, (%rax), %xmm1, %xmm2 {z}{k1}
+vgf2p8affineqb $0, (%rax){1to2}, %xmm1, %xmm2 {z}{k1}
+
+vgf2p8affineqb $0, %ymm0, %ymm1, %ymm2
+vgf2p8affineqb $0, (%rax), %ymm1, %ymm2
+vgf2p8affineqb $0, (%rax){1to4}, %ymm1, %ymm2
+vgf2p8affineqb $0, %ymm0, %ymm1, %ymm2
+vgf2p8affineqb $0, (%rax), %ymm1, %ymm2
+vgf2p8affineqb $0, (%rax){1to4}, %ymm1, %ymm2
+vgf2p8affineqb $0, %ymm0, %ymm1, %ymm2 {z}{k1}
+vgf2p8affineqb $0, (%rax), %ymm1, %ymm2 {z}{k1}
+vgf2p8affineqb $0, (%rax){1to4}, %ymm1, %ymm2 {z}{k1}
+
+vgf2p8mulb %xmm0, %xmm1, %xmm2
+vgf2p8mulb (%rax), %xmm1, %xmm2
+vgf2p8mulb %xmm0, %xmm1, %xmm2 {k1}
+vgf2p8mulb (%rax), %xmm1, %xmm2 {k1}
+vgf2p8mulb %xmm0, %xmm1, %xmm2 {z}{k1}
+vgf2p8mulb (%rax), %xmm1, %xmm2 {z}{k1}
+
+vgf2p8mulb %ymm0, %ymm1, %ymm2
+vgf2p8mulb (%rax), %ymm1, %ymm2
+vgf2p8mulb %ymm0, %ymm1, %ymm2 {k1}
+vgf2p8mulb (%rax), %ymm1, %ymm2 {k1}
+vgf2p8mulb %ymm0, %ymm1, %ymm2 {z}{k1}
+vgf2p8mulb (%rax), %ymm1, %ymm2 {z}{k1}
+
+# CHECK: Instruction Info:
+# CHECK-NEXT: [1]: #uOps
+# CHECK-NEXT: [2]: Latency
+# CHECK-NEXT: [3]: RThroughput
+# CHECK-NEXT: [4]: MayLoad
+# CHECK-NEXT: [5]: MayStore
+# CHECK-NEXT: [6]: HasSideEffects (U)
+
+# CHECK: [1] [2] [3] [4] [5] [6] Instructions:
+# CHECK-NEXT: 1 1 0.50 vgf2p8affineinvqb $0, %xmm0, %xmm1, %xmm2
+# CHECK-NEXT: 2 7 0.50 * vgf2p8affineinvqb $0, (%rax), %xmm1, %xmm2
+# CHECK-NEXT: 2 11 1.00 * vgf2p8affineinvqb $0, (%rax){1to2}, %xmm1, %xmm2
+# CHECK-NEXT: 1 5 1.00 vgf2p8affineinvqb $0, %xmm0, %xmm1, %xmm2 {%k1}
+# CHECK-NEXT: 2 11 1.00 * vgf2p8affineinvqb $0, (%rax), %xmm1, %xmm2 {%k1}
+# CHECK-NEXT: 2 11 1.00 * vgf2p8affineinvqb $0, (%rax){1to2}, %xmm1, %xmm2 {%k1}
+# CHECK-NEXT: 1 5 1.00 vgf2p8affineinvqb $0, %xmm0, %xmm1, %xmm2 {%k1} {z}
+# CHECK-NEXT: 2 11 1.00 * vgf2p8affineinvqb $0, (%rax), %xmm1, %xmm2 {%k1} {z}
+# CHECK-NEXT: 2 11 1.00 * vgf2p8affineinvqb $0, (%rax){1to2}, %xmm1, %xmm2 {%k1} {z}
+# CHECK-NEXT: 1 1 0.50 vgf2p8affineinvqb $0, %ymm0, %ymm1, %ymm2
+# CHECK-NEXT: 2 7 0.50 * vgf2p8affineinvqb $0, (%rax), %ymm1, %ymm2
+# CHECK-NEXT: 2 12 1.00 * vgf2p8affineinvqb $0, (%rax){1to4}, %ymm1, %ymm2
+# CHECK-NEXT: 1 5 1.00 vgf2p8affineinvqb $0, %ymm0, %ymm1, %ymm2 {%k1}
+# CHECK-NEXT: 2 12 1.00 * vgf2p8affineinvqb $0, (%rax), %ymm1, %ymm2 {%k1}
+# CHECK-NEXT: 2 12 1.00 * vgf2p8affineinvqb $0, (%rax){1to4}, %ymm1, %ymm2 {%k1}
+# CHECK-NEXT: 1 5 1.00 vgf2p8affineinvqb $0, %ymm0, %ymm1, %ymm2 {%k1} {z}
+# CHECK-NEXT: 2 12 1.00 * vgf2p8affineinvqb $0, (%rax), %ymm1, %ymm2 {%k1} {z}
+# CHECK-NEXT: 2 12 1.00 * vgf2p8affineinvqb $0, (%rax){1to4}, %ymm1, %ymm2 {%k1} {z}
+# CHECK-NEXT: 1 1 0.50 vgf2p8affineqb $0, %xmm0, %xmm1, %xmm2
+# CHECK-NEXT: 2 7 0.50 * vgf2p8affineqb $0, (%rax), %xmm1, %xmm2
+# CHECK-NEXT: 2 11 1.00 * vgf2p8affineqb $0, (%rax){1to2}, %xmm1, %xmm2
+# CHECK-NEXT: 1 1 0.50 vgf2p8affineqb $0, %xmm0, %xmm1, %xmm2
+# CHECK-NEXT: 2 7 0.50 * vgf2p8affineqb $0, (%rax), %xmm1, %xmm2
+# CHECK-NEXT: 2 11 1.00 * vgf2p8affineqb $0, (%rax){1to2}, %xmm1, %xmm2
+# CHECK-NEXT: 1 5 1.00 vgf2p8affineqb $0, %xmm0, %xmm1, %xmm2 {%k1} {z}
+# CHECK-NEXT: 2 11 1.00 * vgf2p8affineqb $0, (%rax), %xmm1, %xmm2 {%k1} {z}
+# CHECK-NEXT: 2 11 1.00 * vgf2p8affineqb $0, (%rax){1to2}, %xmm1, %xmm2 {%k1} {z}
+# CHECK-NEXT: 1 1 0.50 vgf2p8affineqb $0, %ymm0, %ymm1, %ymm2
+# CHECK-NEXT: 2 7 0.50 * vgf2p8affineqb $0, (%rax), %ymm1, %ymm2
+# CHECK-NEXT: 2 12 1.00 * vgf2p8affineqb $0, (%rax){1to4}, %ymm1, %ymm2
+# CHECK-NEXT: 1 1 0.50 vgf2p8affineqb $0, %ymm0, %ymm1, %ymm2
+# CHECK-NEXT: 2 7 0.50 * vgf2p8affineqb $0, (%rax), %ymm1, %ymm2
+# CHECK-NEXT: 2 12 1.00 * vgf2p8affineqb $0, (%rax){1to4}, %ymm1, %ymm2
+# CHECK-NEXT: 1 5 1.00 vgf2p8affineqb $0, %ymm0, %ymm1, %ymm2 {%k1} {z}
+# CHECK-NEXT: 2 12 1.00 * vgf2p8affineqb $0, (%rax), %ymm1, %ymm2 {%k1} {z}
+# CHECK-NEXT: 2 12 1.00 * vgf2p8affineqb $0, (%rax){1to4}, %ymm1, %ymm2 {%k1} {z}
+# CHECK-NEXT: 1 1 0.50 vgf2p8mulb %xmm0, %xmm1, %xmm2
+# CHECK-NEXT: 2 7 0.50 * vgf2p8mulb (%rax), %xmm1, %xmm2
+# CHECK-NEXT: 1 1 0.50 vgf2p8mulb %xmm0, %xmm1, %xmm2 {%k1}
+# CHECK-NEXT: 2 7 0.50 * vgf2p8mulb (%rax), %xmm1, %xmm2 {%k1}
+# CHECK-NEXT: 1 1 0.50 vgf2p8mulb %xmm0, %xmm1, %xmm2 {%k1} {z}
+# CHECK-NEXT: 2 7 0.50 * vgf2p8mulb (%rax), %xmm1, %xmm2 {%k1} {z}
+# CHECK-NEXT: 1 1 0.50 vgf2p8mulb %ymm0, %ymm1, %ymm2
+# CHECK-NEXT: 2 7 0.50 * vgf2p8mulb (%rax), %ymm1, %ymm2
+# CHECK-NEXT: 1 1 0.50 vgf2p8mulb %ymm0, %ymm1, %ymm2 {%k1}
+# CHECK-NEXT: 2 8 0.50 * vgf2p8mulb (%rax), %ymm1, %ymm2 {%k1}
+# CHECK-NEXT: 1 1 0.50 vgf2p8mulb %ymm0, %ymm1, %ymm2 {%k1} {z}
+# CHECK-NEXT: 2 8 0.50 * vgf2p8mulb (%rax), %ymm1, %ymm2 {%k1} {z}
+
+# CHECK: Resources:
+# CHECK-NEXT: [0] - SBDivider
+# CHECK-NEXT: [1] - SBFPDivider
+# CHECK-NEXT: [2] - SBPort0
+# CHECK-NEXT: [3] - SBPort1
+# CHECK-NEXT: [4] - SBPort4
+# CHECK-NEXT: [5] - SBPort5
+# CHECK-NEXT: [6.0] - SBPort23
+# CHECK-NEXT: [6.1] - SBPort23
+
+# CHECK: Resource pressure per iteration:
+# CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6.0] [6.1]
+# CHECK-NEXT: - - 24.00 12.00 - 12.00 15.00 15.00
+
+# CHECK: Resource pressure by instruction:
+# CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6.0] [6.1] Instructions:
+# CHECK-NEXT: - - - 0.50 - 0.50 - - vgf2p8affineinvqb $0, %xmm0, %xmm1, %xmm2
+# CHECK-NEXT: - - - 0.50 - 0.50 0.50 0.50 vgf2p8affineinvqb $0, (%rax), %xmm1, %xmm2
+# CHECK-NEXT: - - 1.00 - - - 0.50 0.50 vgf2p8affineinvqb $0, (%rax){1to2}, %xmm1, %xmm2
+# CHECK-NEXT: - - 1.00 - - - - - vgf2p8affineinvqb $0, %xmm0, %xmm1, %xmm2 {%k1}
+# CHECK-NEXT: - - 1.00 - - - 0.50 0.50 vgf2p8affineinvqb $0, (%rax), %xmm1, %xmm2 {%k1}
+# CHECK-NEXT: - - 1.00 - - - 0.50 0.50 vgf2p8affineinvqb $0, (%rax){1to2}, %xmm1, %xmm2 {%k1}
+# CHECK-NEXT: - - 1.00 - - - - - vgf2p8affineinvqb $0, %xmm0, %xmm1, %xmm2 {%k1} {z}
+# CHECK-NEXT: - - 1.00 - - - 0.50 0.50 vgf2p8affineinvqb $0, (%rax), %xmm1, %xmm2 {%k1} {z}
+# CHECK-NEXT: - - 1.00 - - - 0.50 0.50 vgf2p8affineinvqb $0, (%rax){1to2}, %xmm1, %xmm2 {%k1} {z}
+# CHECK-NEXT: - - - 0.50 - 0.50 - - vgf2p8affineinvqb $0, %ymm0, %ymm1, %ymm2
+# CHECK-NEXT: - - - 0.50 - 0.50 0.50 0.50 vgf2p8affineinvqb $0, (%rax), %ymm1, %ymm2
+# CHECK-NEXT: - - 1.00 - - - 0.50 0.50 vgf2p8affineinvqb $0, (%rax){1to4}, %ymm1, %ymm2
+# CHECK-NEXT: - - 1.00 - - - - - vgf2p8affineinvqb $0, %ymm0, %ymm1, %ymm2 {%k1}
+# CHECK-NEXT: - - 1.00 - - - 0.50 0.50 vgf2p8affineinvqb $0, (%rax), %ymm1, %ymm2 {%k1}
+# CHECK-NEXT: - - 1.00 - - - 0.50 0.50 vgf2p8affineinvqb $0, (%rax){1to4}, %ymm1, %ymm2 {%k1}
+# CHECK-NEXT: - - 1.00 - - - - - vgf2p8affineinvqb $0, %ymm0, %ymm1, %ymm2 {%k1} {z}
+# CHECK-NEXT: - - 1.00 - - - 0.50 0.50 vgf2p8affineinvqb $0, (%rax), %ymm1, %ymm2 {%k1} {z}
+# CHECK-NEXT: - - 1.00 - - - 0.50 0.50 vgf2p8affineinvqb $0, (%rax){1to4}, %ymm1, %ymm2 {%k1} {z}
+# CHECK-NEXT: - - - 0.50 - 0.50 - - vgf2p8affineqb $0, %xmm0, %xmm1, %xmm2
+# CHECK-NEXT: - - - 0.50 - 0.50 0.50 0.50 vgf2p8affineqb $0, (%rax), %xmm1, %xmm2
+# CHECK-NEXT: - - 1.00 - - - 0.50 0.50 vgf2p8affineqb $0, (%rax){1to2}, %xmm1, %xmm2
+# CHECK-NEXT: - - - 0.50 - 0.50 - - vgf2p8affineqb $0, %xmm0, %xmm1, %xmm2
+# CHECK-NEXT: - - - 0.50 - 0.50 0.50 0.50 vgf2p8affineqb $0, (%rax), %xmm1, %xmm2
+# CHECK-NEXT: - - 1.00 - - - 0.50 0.50 vgf2p8affineqb $0, (%rax){1to2}, %xmm1, %xmm2
+# CHECK-NEXT: - - 1.00 - - - - - vgf2p8affineqb $0, %xmm0, %xmm1, %xmm2 {%k1} {z}
+# CHECK-NEXT: - - 1.00 - - - 0.50 0.50 vgf2p8affineqb $0, (%rax), %xmm1, %xmm2 {%k1} {z}
+# CHECK-NEXT: - - 1.00 - - - 0.50 0.50 vgf2p8affineqb $0, (%rax){1to2}, %xmm1, %xmm2 {%k1} {z}
+# CHECK-NEXT: - - - 0.50 - 0.50 - - vgf2p8affineqb $0, %ymm0, %ymm1, %ymm2
+# CHECK-NEXT: - - - 0.50 - 0.50 0.50 0.50 vgf2p8affineqb $0, (%rax), %ymm1, %ymm2
+# CHECK-NEXT: - - 1.00 - - - 0.50 0.50 vgf2p8affineqb $0, (%rax){1to4}, %ymm1, %ymm2
+# CHECK-NEXT: - - - 0.50 - 0.50 - - vgf2p8affineqb $0, %ymm0, %ymm1, %ymm2
+# CHECK-NEXT: - - - 0.50 - 0.50 0.50 0.50 vgf2p8affineqb $0, (%rax), %ymm1, %ymm2
+# CHECK-NEXT: - - 1.00 - - - 0.50 0.50 vgf2p8affineqb $0, (%rax){1to4}, %ymm1, %ymm2
+# CHECK-NEXT: - - 1.00 - - - - - vgf2p8affineqb $0, %ymm0, %ymm1, %ymm2 {%k1} {z}
+# CHECK-NEXT: - - 1.00 - - - 0.50 0.50 vgf2p8affineqb $0, (%rax), %ymm1, %ymm2 {%k1} {z}
+# CHECK-NEXT: - - 1.00 - - - 0.50 0.50 vgf2p8affineqb $0, (%rax){1to4}, %ymm1, %ymm2 {%k1} {z}
+# CHECK-NEXT: - - - 0.50 - 0.50 - - vgf2p8mulb %xmm0, %xmm1, %xmm2
+# CHECK-NEXT: - - - 0.50 - 0.50 0.50 0.50 vgf2p8mulb (%rax), %xmm1, %xmm2
+# CHECK-NEXT: - - - 0.50 - 0.50 - - vgf2p8mulb %xmm0, %xmm1, %xmm2 {%k1}
+# CHECK-NEXT: - - - 0.50 - 0.50 0.50 0.50 vgf2p8mulb (%rax), %xmm1, %xmm2 {%k1}
+# CHECK-NEXT: - - - 0.50 - 0.50 - - vgf2p8mulb %xmm0, %xmm1, %xmm2 {%k1} {z}
+# CHECK-NEXT: - - - 0.50 - 0.50 0.50 0.50 vgf2p8mulb (%rax), %xmm1, %xmm2 {%k1} {z}
+# CHECK-NEXT: - - - 0.50 - 0.50 - - vgf2p8mulb %ymm0, %ymm1, %ymm2
+# CHECK-NEXT: - - - 0.50 - 0.50 0.50 0.50 vgf2p8mulb (%rax), %ymm1, %ymm2
+# CHECK-NEXT: - - - 0.50 - 0.50 - - vgf2p8mulb %ymm0, %ymm1, %ymm2 {%k1}
+# CHECK-NEXT: - - - 0.50 - 0.50 0.50 0.50 vgf2p8mulb (%rax), %ymm1, %ymm2 {%k1}
+# CHECK-NEXT: - - - 0.50 - 0.50 - - vgf2p8mulb %ymm0, %ymm1, %ymm2 {%k1} {z}
+# CHECK-NEXT: - - - 0.50 - 0.50 0.50 0.50 vgf2p8mulb (%rax), %ymm1, %ymm2 {%k1} {z}
diff --git a/llvm/test/tools/llvm-mca/X86/Generic/resources-avxgfni.s b/llvm/test/tools/llvm-mca/X86/Generic/resources-avxgfni.s
new file mode 100644
index 0000000000000..e394e301be718
--- /dev/null
+++ b/llvm/test/tools/llvm-mca/X86/Generic/resources-avxgfni.s
@@ -0,0 +1,50 @@
+# NOTE: Assertions have been autogenerated by utils/update_mca_test_checks.py
+# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=x86-64 -instruction-tables < %s | FileCheck %s
+
+vgf2p8affineinvqb $0, %xmm0, %xmm1, %xmm2
+vgf2p8affineinvqb $0, (%rax), %xmm1, %xmm2
+
+vgf2p8affineqb $0, %xmm0, %xmm1, %xmm2
+vgf2p8affineqb $0, (%rax), %xmm1, %xmm2
+
+vgf2p8mulb %xmm0, %xmm1, %xmm2
+vgf2p8mulb (%rax), %xmm1, %xmm2
+
+# CHECK: Instruction Info:
+# CHECK-NEXT: [1]: #uOps
+# CHECK-NEXT: [2]: Latency
+# CHECK-NEXT: [3]: RThroughput
+# CHECK-NEXT: [4]: MayLoad
+# CHECK-NEXT: [5]: MayStore
+# CHECK-NEXT: [6]: HasSideEffects (U)
+
+# CHECK: [1] [2] [3] [4] [5] [6] Instructions:
+# CHECK-NEXT: 1 1 0.50 vgf2p8affineinvqb $0, %xmm0, %xmm1, %xmm2
+# CHECK-NEXT: 2 7 0.50 * vgf2p8affineinvqb $0, (%rax), %xmm1, %xmm2
+# CHECK-NEXT: 1 1 0.50 vgf2p8affineqb $0, %xmm0, %xmm1, %xmm2
+# CHECK-NEXT: 2 7 0.50 * vgf2p8affineqb $0, (%rax), %xmm1, %xmm2
+# CHECK-NEXT: 1 1 0.50 vgf2p8mulb %xmm0, %xmm1, %xmm2
+# CHECK-NEXT: 2 7 0.50 * vgf2p8mulb (%rax), %xmm1, %xmm2
+
+# CHECK: Resources:
+# CHECK-NEXT: [0] - SBDivider
+# CHECK-NEXT: [1] - SBFPDivider
+# CHECK-NEXT: [2] - SBPort0
+# CHECK-NEXT: [3] - SBPort1
+# CHECK-NEXT: [4] - SBPort4
+# CHECK-NEXT: [5] - SBPort5
+# CHECK-NEXT: [6.0] - SBPort23
+# CHECK-NEXT: [6.1] - SBPort23
+
+# CHECK: Resource pressure per iteration:
+# CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6.0] [6.1]
+# CHECK-NEXT: - - - 3.00 - 3.00 1.50 1.50
+
+# CHECK: Resource pressure by instruction:
+# CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6.0] [6.1] Instructions:
+# CHECK-NEXT: - - - 0.50 - 0.50 - - vgf2p8affineinvqb $0, %xmm0, %xmm1, %xmm2
+# CHECK-NEXT: - - - 0.50 - 0.50 0.50 0.50 vgf2p8affineinvqb $0, (%rax), %xmm1, %xmm2
+# CHECK-NEXT: - - - 0.50 - 0.50 - - vgf2p8affineqb $0, %xmm0, %xmm1, %xmm2
+# CHECK-NEXT: - - - 0.50 - 0.50 0.50 0.50 vgf2p8affineqb $0, (%rax), %xmm1, %xmm2
+# CHECK-NEXT: - - - 0.50 - 0.50 - - vgf2p8mulb %xmm0, %xmm1, %xmm2
+# CHECK-NEXT: - - - 0.50 - 0.50 0.50 0.50 vgf2p8mulb (%rax), %xmm1, %xmm2
diff --git a/llvm/test/tools/llvm-mca/X86/Generic/resources-gfni.s b/llvm/test/tools/llvm-mca/X86/Generic/resources-gfni.s
new file mode 100644
index 0000000000000..e781874f37fbc
--- /dev/null
+++ b/llvm/test/tools/llvm-mca/X86/Generic/resources-gfni.s
@@ -0,0 +1,50 @@
+# NOTE: Assertions have been autogenerated by utils/update_mca_test_checks.py
+# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=x86-64 -instruction-tables < %s | FileCheck %s
+
+gf2p8affineinvqb $0, %xmm0, %xmm1
+gf2p8affineinvqb $0, (%rax), %xmm1
+
+gf2p8affineqb $0, %xmm0, %xmm1
+gf2p8affineqb $0, (%rax), %xmm1
+
+gf2p8mulb %xmm0, %xmm1
+gf2p8mulb (%rax), %xmm1
+
+# CHECK: Instruction Info:
+# CHECK-NEXT: [1]: #uOps
+# CHECK-NEXT: [2]: Latency
+# CHECK-NEXT: [3]: RThroughput
+# CHECK-NEXT: [4]: MayLoad
+# CHECK-NEXT: [5]: MayStore
+# CHECK-NEXT: [6]: HasSideEffects (U)
+
+# CHECK: [1] [2] [3] [4] [5] [6] Instructions:
+# CHECK-NEXT: 1 1 0.50 gf2p8affineinvqb $0, %xmm0, %xmm1
+# CHECK-NEXT: 2 7 0.50 * gf2p8affineinvqb $0, (%rax), %xmm1
+# CHECK-NEXT: 1 1 0.50 gf2p8affineqb $0, %xmm0, %xmm1
+# CHECK-NEXT: 2 7 0.50 * gf2p8affineqb $0, (%rax), %xmm1
+# CHECK-NEXT: 1 1 0.50 gf2p8mulb %xmm0, %xmm1
+# CHECK-NEXT: 2 7 0.50 * gf2p8mulb (%rax), %xmm1
+
+# CHECK: Resources:
+# CHECK-NEXT: [0] - SBDivider
+# CHECK-NEXT: [1] - SBFPDivider
+# CHECK-NEXT: [2] - SBPort0
+# CHECK-NEXT: [3] - SBPort1
+# CHECK-NEXT: [4] - SBPort4
+# CHECK-NEXT: [5] - SBPort5
+# CHECK-NEXT: [6.0] - SBPort23
+# CHECK-NEXT: [6.1] - SBPort23
+
+# CHECK: Resource pressure per iteration:
+# CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6.0] [6.1]
+# CHECK-NEXT: - - - 3.00 - 3.00 1.50 1.50
+
+# CHECK: Resource pressure by instruction:
+# CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6.0] [6.1] Instructions:
+# CHECK-NEXT: - - - 0.50 - 0.50 - - gf2p8affineinvqb $0, %xmm0, %xmm1
+# CHECK-NEXT: - - - 0.50 - 0.50 0.50 0.50 gf2p8affineinvqb $0, (%rax), %xmm1
+# CHECK-NEXT: - - - 0.50 - 0.50 - - gf2p8affineqb $0, %xmm0, %xmm1
+# CHECK-NEXT: - - - 0.50 - 0.50 0.50 0.50 gf2p8affineqb $0, (%rax), %xmm1
+# CHECK-NEXT: - - - 0.50 - 0.50 - - gf2p8mulb %xmm0, %xmm1
+# CHECK-NEXT: - - - 0.50 - 0.50 0.50 0.50 gf2p8mulb (%rax), %xmm1
diff --git a/llvm/test/tools/llvm-mca/X86/IceLakeServer/resources-avx512gfni.s b/llvm/test/tools/llvm-mca/X86/IceLakeServer/resources-avx512gfni.s
new file mode 100644
index 0000000000000..23103fde9a39f
--- /dev/null
+++ b/llvm/test/tools/llvm-mca/X86/IceLakeServer/resources-avx512gfni.s
@@ -0,0 +1,108 @@
+# NOTE: Assertions have been autogenerated by utils/update_mca_test_checks.py
+# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=icelake-server -instruction-tables < %s | FileCheck %s
+
+vgf2p8affineinvqb $0, %zmm0, %zmm1, %zmm2
+vgf2p8affineinvqb $0, (%rax), %zmm1, %zmm2
+vgf2p8affineinvqb $0, (%rax){1to8}, %zmm1, %zmm2
+vgf2p8affineinvqb $0, %zmm0, %zmm1, %zmm2 {k1}
+vgf2p8affineinvqb $0, (%rax), %zmm1, %zmm2 {k1}
+vgf2p8affineinvqb $0, (%rax){1to8}, %zmm1, %zmm2 {k1}
+vgf2p8affineinvqb $0, %zmm0, %zmm1, %zmm2 {z}{k1}
+vgf2p8affineinvqb $0, (%rax), %zmm1, %zmm2 {z}{k1}
+vgf2p8affineinvqb $0, (%rax){1to8}, %zmm1, %zmm2 {z}{k1}
+
+vgf2p8affineqb $0, %zmm0, %zmm1, %zmm2
+vgf2p8affineqb $0, (%rax), %zmm1, %zmm2
+vgf2p8affineqb $0, (%rax){1to8}, %zmm1, %zmm2
+vgf2p8affineqb $0, %zmm0, %zmm1, %zmm2
+vgf2p8affineqb $0, (%rax), %zmm1, %zmm2
+vgf2p8affineqb $0, (%rax){1to8}, %zmm1, %zmm2
+vgf2p8affineqb $0, %zmm0, %zmm1, %zmm2 {z}{k1}
+vgf2p8affineqb $0, (%rax), %zmm1, %zmm2 {z}{k1}
+vgf2p8affineqb $0, (%rax){1to8}, %zmm1, %zmm2 {z}{k1}
+
+vgf2p8mulb %zmm0, %zmm1, %zmm2
+vgf2p8mulb (%rax), %zmm1, %zmm2
+vgf2p8mulb %zmm0, %zmm1, %zmm2 {k1}
+vgf2p8mulb (%rax), %zmm1, %zmm2 {k1}
+vgf2p8mulb %zmm0, %zmm1, %zmm2 {z}{k1}
+vgf2p8mulb (%rax), %zmm1, %zmm2 {z}{k1}
+
+# CHECK: Instruction Info:
+# CHECK-NEXT: [1]: #uOps
+# CHECK-NEXT: [2]: Latency
+# CHECK-NEXT: [3]: RThroughput
+# CHECK-NEXT: [4]: MayLoad
+# CHECK-NEXT: [5]: MayStore
+# CHECK-NEXT: [6]: HasSideEffects (U)
+
+# CHECK: [1] [2] [3] [4] [5] [6] Instructions:
+# CHECK-NEXT: 1 5 0.50 vgf2p8affineinvqb $0, %zmm0, %zmm1, %zmm2
+# CHECK-NEXT: 2 12 0.50 * vgf2p8affineinvqb $0, (%rax), %zmm1, %zmm2
+# CHECK-NEXT: 2 12 0.50 * vgf2p8affineinvqb $0, (%rax){1to8}, %zmm1, %zmm2
+# CHECK-NEXT: 1 5 0.50 vgf2p8affineinvqb $0, %zmm0, %zmm1, %zmm2 {%k1}
+# CHECK-NEXT: 2 12 0.50 * vgf2p8affineinvqb $0, (%rax), %zmm1, %zmm2 {%k1}
+# CHECK-NEXT: 2 12 0.50 * vgf2p8affineinvqb $0, (%rax){1to8}, %zmm1, %zmm2 {%k1}
+# CHECK-NEXT: 1 5 0.50 vgf2p8affineinvqb $0, %zmm0, %zmm1, %zmm2 {%k1} {z}
+# CHECK-NEXT: 2 12 0.50 * vgf2p8affineinvqb $0, (%rax), %zmm1, %zmm2 {%k1} {z}
+# CHECK-NEXT: 2 12 0.50 * vgf2p8affineinvqb $0, (%rax){1to8}, %zmm1, %zmm2 {%k1} {z}
+# CHECK-NEXT: 1 5 0.50 vgf2p8affineqb $0, %zmm0, %zmm1, %zmm2
+# CHECK-NEXT: 2 12 0.50 * vgf2p8affineqb $0, (%rax), %zmm1, %zmm2
+# CHECK-NEXT: 2 12 0.50 * vgf2p8affineqb $0, (%rax){1to8}, %zmm1, %zmm2
+# CHECK-NEXT: 1 5 0.50 vgf2p8affineqb $0, %zmm0, %zmm1, %zmm2
+# CHECK-NEXT: 2 12 0.50 * vgf2p8affineqb $0, (%rax), %zmm1, %zmm2
+# CHECK-NEXT: 2 12 0.50 * vgf2p8affineqb $0, (%rax){1to8}, %zmm1, %zmm2
+# CHECK-NEXT: 1 5 0.50 vgf2p8affineqb $0, %zmm0, %zmm1, %zmm2 {%k1} {z}
+# CHECK-NEXT: 2 12 0.50 * vgf2p8affineqb $0, (%rax), %zmm1, %zmm2 {%k1} {z}
+# CHECK-NEXT: 2 12 0.50 * vgf2p8affineqb $0, (%rax){1to8}, %zmm1, %zmm2 {%k1} {z}
+# CHECK-NEXT: 1 1 1.00 vgf2p8mulb %zmm0, %zmm1, %zmm2
+# CHECK-NEXT: 2 8 1.00 * vgf2p8mulb (%rax), %zmm1, %zmm2
+# CHECK-NEXT: 1 1 1.00 vgf2p8mulb %zmm0, %zmm1, %zmm2 {%k1}
+# CHECK-NEXT: 2 8 1.00 * vgf2p8mulb (%rax), %zmm1, %zmm2 {%k1}
+# CHECK-NEXT: 1 1 1.00 vgf2p8mulb %zmm0, %zmm1, %zmm2 {%k1} {z}
+# CHECK-NEXT: 2 8 1.00 * vgf2p8mulb (%rax), %zmm1, %zmm2 {%k1} {z}
+
+# CHECK: Resources:
+# CHECK-NEXT: [0] - ICXDivider
+# CHECK-NEXT: [1] - ICXFPDivider
+# CHECK-NEXT: [2] - ICXPort0
+# CHECK-NEXT: [3] - ICXPort1
+# CHECK-NEXT: [4] - ICXPort2
+# CHECK-NEXT: [5] - ICXPort3
+# CHECK-NEXT: [6] - ICXPort4
+# CHECK-NEXT: [7] - ICXPort5
+# CHECK-NEXT: [8] - ICXPort6
+# CHECK-NEXT: [9] - ICXPort7
+# CHECK-NEXT: [10] - ICXPort8
+# CHECK-NEXT: [11] - ICXPort9
+
+# CHECK: Resource pressure per iteration:
+# CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11]
+# CHECK-NEXT: - - 15.00 - 7.50 7.50 - 9.00 - - - -
+
+# CHECK: Resource pressure by instruction:
+# CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] Instructions:
+# CHECK-NEXT: - - 0.50 - - - - 0.50 - - - - vgf2p8affineinvqb $0, %zmm0, %zmm1, %zmm2
+# CHECK-NEXT: - - 0.50 - 0.50 0.50 - 0.50 - - - - vgf2p8affineinvqb $0, (%rax), %zmm1, %zmm2
+# CHECK-NEXT: - - 0.50 - 0.50 0.50 - 0.50 - - - - vgf2p8affineinvqb $0, (%rax){1to8}, %zmm1, %zmm2
+# CHECK-NEXT: - - 0.50 - - - - 0.50 - - - - vgf2p8affineinvqb $0, %zmm0, %zmm1, %zmm2 {%k1}
+# CHECK-NEXT: - - 0.50 - 0.50 0.50 - 0.50 - - - - vgf2p8affineinvqb $0, (%rax), %zmm1, %zmm2 {%k1}
+# CHECK-NEXT: - - 0.50 - 0.50 0.50 - 0.50 - - - - vgf2p8affineinvqb $0, (%rax){1to8}, %zmm1, %zmm2 {%k1}
+# CHECK-NEXT: - - 0.50 - - - - 0.50 - - - - vgf2p8affineinvqb $0, %zmm0, %zmm1, %zmm2 {%k1} {z}
+# CHECK-NEXT: - - 0.50 - 0.50 0.50 - 0.50 - - - - vgf2p8affineinvqb $0, (%rax), %zmm1, %zmm2 {%k1} {z}
+# CHECK-NEXT: - - 0.50 - 0.50 0.50 - 0.50 - - - - vgf2p8affineinvqb $0, (%rax){1to8}, %zmm1, %zmm2 {%k1} {z}
+# CHECK-NEXT: - - 0.50 - - - - 0.50 - - - - vgf2p8affineqb $0, %zmm0, %zmm1, %zmm2
+# CHECK-NEXT: - - 0.50 - 0.50 0.50 - 0.50 - - - - vgf2p8affineqb $0, (%rax), %zmm1, %zmm2
+# CHECK-NEXT: - - 0.50 - 0.50 0.50 - 0.50 - - - - vgf2p8affineqb $0, (%rax){1to8}, %zmm1, %zmm2
+# CHECK-NEXT: - - 0.50 - - - - 0.50 - - - - vgf2p8affineqb $0, %zmm0, %zmm1, %zmm2
+# CHECK-NEXT: - - 0.50 - 0.50 0.50 - 0.50 - - - - vgf2p8affineqb $0, (%rax), %zmm1, %zmm2
+# CHECK-NEXT: - - 0.50 - 0.50 0.50 - 0.50 - - - - vgf2p8affineqb $0, (%rax){1to8}, %zmm1, %zmm2
+# CHECK-NEXT: - - 0.50 - - - - 0.50 - - - - vgf2p8affineqb $0, %zmm0, %zmm1, %zmm2 {%k1} {z}
+# CHECK-NEXT: - - 0.50 - 0.50 0.50 - 0.50 - - - - vgf2p8affineqb $0, (%rax), %zmm1, %zmm2 {%k1} {z}
+# CHECK-NEXT: - - 0.50 - 0.50 0.50 - 0.50 - - - - vgf2p8affineqb $0, (%rax){1to8}, %zmm1, %zmm2 {%k1} {z}
+# CHECK-NEXT: - - 1.00 - - - - - - - - - vgf2p8mulb %zmm0, %zmm1, %zmm2
+# CHECK-NEXT: - - 1.00 - 0.50 0.50 - - - - - - vgf2p8mulb (%rax), %zmm1, %zmm2
+# CHECK-NEXT: - - 1.00 - - - - - - - - - vgf2p8mulb %zmm0, %zmm1, %zmm2 {%k1}
+# CHECK-NEXT: - - 1.00 - 0.50 0.50 - - - - - - vgf2p8mulb (%rax), %zmm1, %zmm2 {%k1}
+# CHECK-NEXT: - - 1.00 - - - - - - - - - vgf2p8mulb %zmm0, %zmm1, %zmm2 {%k1} {z}
+# CHECK-NEXT: - - 1.00 - 0.50 0.50 - - - - - - vgf2p8mulb (%rax), %zmm1, %zmm2 {%k1} {z}
diff --git a/llvm/test/tools/llvm-mca/X86/IceLakeServer/resources-avx512gfnivl.s b/llvm/test/tools/llvm-mca/X86/IceLakeServer/resources-avx512gfnivl.s
new file mode 100644
index 0000000000000..fa53da99cd83b
--- /dev/null
+++ b/llvm/test/tools/llvm-mca/X86/IceLakeServer/resources-avx512gfnivl.s
@@ -0,0 +1,183 @@
+# NOTE: Assertions have been autogenerated by utils/update_mca_test_checks.py
+# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=icelake-server -instruction-tables < %s | FileCheck %s
+
+vgf2p8affineinvqb $0, %xmm0, %xmm1, %xmm2
+vgf2p8affineinvqb $0, (%rax), %xmm1, %xmm2
+vgf2p8affineinvqb $0, (%rax){1to2}, %xmm1, %xmm2
+vgf2p8affineinvqb $0, %xmm0, %xmm1, %xmm2 {k1}
+vgf2p8affineinvqb $0, (%rax), %xmm1, %xmm2 {k1}
+vgf2p8affineinvqb $0, (%rax){1to2}, %xmm1, %xmm2 {k1}
+vgf2p8affineinvqb $0, %xmm0, %xmm1, %xmm2 {z}{k1}
+vgf2p8affineinvqb $0, (%rax), %xmm1, %xmm2 {z}{k1}
+vgf2p8affineinvqb $0, (%rax){1to2}, %xmm1, %xmm2 {z}{k1}
+
+vgf2p8affineinvqb $0, %ymm0, %ymm1, %ymm2
+vgf2p8affineinvqb $0, (%rax), %ymm1, %ymm2
+vgf2p8affineinvqb $0, (%rax){1to4}, %ymm1, %ymm2
+vgf2p8affineinvqb $0, %ymm0, %ymm1, %ymm2 {k1}
+vgf2p8affineinvqb $0, (%rax), %ymm1, %ymm2 {k1}
+vgf2p8affineinvqb $0, (%rax){1to4}, %ymm1, %ymm2 {k1}
+vgf2p8affineinvqb $0, %ymm0, %ymm1, %ymm2 {z}{k1}
+vgf2p8affineinvqb $0, (%rax), %ymm1, %ymm2 {z}{k1}
+vgf2p8affineinvqb $0, (%rax){1to4}, %ymm1, %ymm2 {z}{k1}
+
+vgf2p8affineqb $0, %xmm0, %xmm1, %xmm2
+vgf2p8affineqb $0, (%rax), %xmm1, %xmm2
+vgf2p8affineqb $0, (%rax){1to2}, %xmm1, %xmm2
+vgf2p8affineqb $0, %xmm0, %xmm1, %xmm2
+vgf2p8affineqb $0, (%rax), %xmm1, %xmm2
+vgf2p8affineqb $0, (%rax){1to2}, %xmm1, %xmm2
+vgf2p8affineqb $0, %xmm0, %xmm1, %xmm2 {z}{k1}
+vgf2p8affineqb $0, (%rax), %xmm1, %xmm2 {z}{k1}
+vgf2p8affineqb $0, (%rax){1to2}, %xmm1, %xmm2 {z}{k1}
+
+vgf2p8affineqb $0, %ymm0, %ymm1, %ymm2
+vgf2p8affineqb $0, (%rax), %ymm1, %ymm2
+vgf2p8affineqb $0, (%rax){1to4}, %ymm1, %ymm2
+vgf2p8affineqb $0, %ymm0, %ymm1, %ymm2
+vgf2p8affineqb $0, (%rax), %ymm1, %ymm2
+vgf2p8affineqb $0, (%rax){1to4}, %ymm1, %ymm2
+vgf2p8affineqb $0, %ymm0, %ymm1, %ymm2 {z}{k1}
+vgf2p8affineqb $0, (%rax), %ymm1, %ymm2 {z}{k1}
+vgf2p8affineqb $0, (%rax){1to4}, %ymm1, %ymm2 {z}{k1}
+
+vgf2p8mulb %xmm0, %xmm1, %xmm2
+vgf2p8mulb (%rax), %xmm1, %xmm2
+vgf2p8mulb %xmm0, %xmm1, %xmm2 {k1}
+vgf2p8mulb (%rax), %xmm1, %xmm2 {k1}
+vgf2p8mulb %xmm0, %xmm1, %xmm2 {z}{k1}
+vgf2p8mulb (%rax), %xmm1, %xmm2 {z}{k1}
+
+vgf2p8mulb %ymm0, %ymm1, %ymm2
+vgf2p8mulb (%rax), %ymm1, %ymm2
+vgf2p8mulb %ymm0, %ymm1, %ymm2 {k1}
+vgf2p8mulb (%rax), %ymm1, %ymm2 {k1}
+vgf2p8mulb %ymm0, %ymm1, %ymm2 {z}{k1}
+vgf2p8mulb (%rax), %ymm1, %ymm2 {z}{k1}
+
+# CHECK: Instruction Info:
+# CHECK-NEXT: [1]: #uOps
+# CHECK-NEXT: [2]: Latency
+# CHECK-NEXT: [3]: RThroughput
+# CHECK-NEXT: [4]: MayLoad
+# CHECK-NEXT: [5]: MayStore
+# CHECK-NEXT: [6]: HasSideEffects (U)
+
+# CHECK: [1] [2] [3] [4] [5] [6] Instructions:
+# CHECK-NEXT: 1 1 0.50 vgf2p8affineinvqb $0, %xmm0, %xmm1, %xmm2
+# CHECK-NEXT: 2 7 0.50 * vgf2p8affineinvqb $0, (%rax), %xmm1, %xmm2
+# CHECK-NEXT: 2 11 0.50 * vgf2p8affineinvqb $0, (%rax){1to2}, %xmm1, %xmm2
+# CHECK-NEXT: 1 5 0.50 vgf2p8affineinvqb $0, %xmm0, %xmm1, %xmm2 {%k1}
+# CHECK-NEXT: 2 11 0.50 * vgf2p8affineinvqb $0, (%rax), %xmm1, %xmm2 {%k1}
+# CHECK-NEXT: 2 11 0.50 * vgf2p8affineinvqb $0, (%rax){1to2}, %xmm1, %xmm2 {%k1}
+# CHECK-NEXT: 1 5 0.50 vgf2p8affineinvqb $0, %xmm0, %xmm1, %xmm2 {%k1} {z}
+# CHECK-NEXT: 2 11 0.50 * vgf2p8affineinvqb $0, (%rax), %xmm1, %xmm2 {%k1} {z}
+# CHECK-NEXT: 2 11 0.50 * vgf2p8affineinvqb $0, (%rax){1to2}, %xmm1, %xmm2 {%k1} {z}
+# CHECK-NEXT: 1 1 0.50 vgf2p8affineinvqb $0, %ymm0, %ymm1, %ymm2
+# CHECK-NEXT: 2 7 0.50 * vgf2p8affineinvqb $0, (%rax), %ymm1, %ymm2
+# CHECK-NEXT: 2 12 0.50 * vgf2p8affineinvqb $0, (%rax){1to4}, %ymm1, %ymm2
+# CHECK-NEXT: 1 5 0.50 vgf2p8affineinvqb $0, %ymm0, %ymm1, %ymm2 {%k1}
+# CHECK-NEXT: 2 12 0.50 * vgf2p8affineinvqb $0, (%rax), %ymm1, %ymm2 {%k1}
+# CHECK-NEXT: 2 12 0.50 * vgf2p8affineinvqb $0, (%rax){1to4}, %ymm1, %ymm2 {%k1}
+# CHECK-NEXT: 1 5 0.50 vgf2p8affineinvqb $0, %ymm0, %ymm1, %ymm2 {%k1} {z}
+# CHECK-NEXT: 2 12 0.50 * vgf2p8affineinvqb $0, (%rax), %ymm1, %ymm2 {%k1} {z}
+# CHECK-NEXT: 2 12 0.50 * vgf2p8affineinvqb $0, (%rax){1to4}, %ymm1, %ymm2 {%k1} {z}
+# CHECK-NEXT: 1 1 0.50 vgf2p8affineqb $0, %xmm0, %xmm1, %xmm2
+# CHECK-NEXT: 2 7 0.50 * vgf2p8affineqb $0, (%rax), %xmm1, %xmm2
+# CHECK-NEXT: 2 11 0.50 * vgf2p8affineqb $0, (%rax){1to2}, %xmm1, %xmm2
+# CHECK-NEXT: 1 1 0.50 vgf2p8affineqb $0, %xmm0, %xmm1, %xmm2
+# CHECK-NEXT: 2 7 0.50 * vgf2p8affineqb $0, (%rax), %xmm1, %xmm2
+# CHECK-NEXT: 2 11 0.50 * vgf2p8affineqb $0, (%rax){1to2}, %xmm1, %xmm2
+# CHECK-NEXT: 1 5 0.50 vgf2p8affineqb $0, %xmm0, %xmm1, %xmm2 {%k1} {z}
+# CHECK-NEXT: 2 11 0.50 * vgf2p8affineqb $0, (%rax), %xmm1, %xmm2 {%k1} {z}
+# CHECK-NEXT: 2 11 0.50 * vgf2p8affineqb $0, (%rax){1to2}, %xmm1, %xmm2 {%k1} {z}
+# CHECK-NEXT: 1 1 0.50 vgf2p8affineqb $0, %ymm0, %ymm1, %ymm2
+# CHECK-NEXT: 2 7 0.50 * vgf2p8affineqb $0, (%rax), %ymm1, %ymm2
+# CHECK-NEXT: 2 12 0.50 * vgf2p8affineqb $0, (%rax){1to4}, %ymm1, %ymm2
+# CHECK-NEXT: 1 1 0.50 vgf2p8affineqb $0, %ymm0, %ymm1, %ymm2
+# CHECK-NEXT: 2 7 0.50 * vgf2p8affineqb $0, (%rax), %ymm1, %ymm2
+# CHECK-NEXT: 2 12 0.50 * vgf2p8affineqb $0, (%rax){1to4}, %ymm1, %ymm2
+# CHECK-NEXT: 1 5 0.50 vgf2p8affineqb $0, %ymm0, %ymm1, %ymm2 {%k1} {z}
+# CHECK-NEXT: 2 12 0.50 * vgf2p8affineqb $0, (%rax), %ymm1, %ymm2 {%k1} {z}
+# CHECK-NEXT: 2 12 0.50 * vgf2p8affineqb $0, (%rax){1to4}, %ymm1, %ymm2 {%k1} {z}
+# CHECK-NEXT: 1 1 0.50 vgf2p8mulb %xmm0, %xmm1, %xmm2
+# CHECK-NEXT: 2 7 0.50 * vgf2p8mulb (%rax), %xmm1, %xmm2
+# CHECK-NEXT: 1 1 0.50 vgf2p8mulb %xmm0, %xmm1, %xmm2 {%k1}
+# CHECK-NEXT: 2 7 0.50 * vgf2p8mulb (%rax), %xmm1, %xmm2 {%k1}
+# CHECK-NEXT: 1 1 0.50 vgf2p8mulb %xmm0, %xmm1, %xmm2 {%k1} {z}
+# CHECK-NEXT: 2 7 0.50 * vgf2p8mulb (%rax), %xmm1, %xmm2 {%k1} {z}
+# CHECK-NEXT: 1 1 0.50 vgf2p8mulb %ymm0, %ymm1, %ymm2
+# CHECK-NEXT: 2 7 0.50 * vgf2p8mulb (%rax), %ymm1, %ymm2
+# CHECK-NEXT: 1 1 0.50 vgf2p8mulb %ymm0, %ymm1, %ymm2 {%k1}
+# CHECK-NEXT: 2 8 0.50 * vgf2p8mulb (%rax), %ymm1, %ymm2 {%k1}
+# CHECK-NEXT: 1 1 0.50 vgf2p8mulb %ymm0, %ymm1, %ymm2 {%k1} {z}
+# CHECK-NEXT: 2 8 0.50 * vgf2p8mulb (%rax), %ymm1, %ymm2 {%k1} {z}
+
+# CHECK: Resources:
+# CHECK-NEXT: [0] - ICXDivider
+# CHECK-NEXT: [1] - ICXFPDivider
+# CHECK-NEXT: [2] - ICXPort0
+# CHECK-NEXT: [3] - ICXPort1
+# CHECK-NEXT: [4] - ICXPort2
+# CHECK-NEXT: [5] - ICXPort3
+# CHECK-NEXT: [6] - ICXPort4
+# CHECK-NEXT: [7] - ICXPort5
+# CHECK-NEXT: [8] - ICXPort6
+# CHECK-NEXT: [9] - ICXPort7
+# CHECK-NEXT: [10] - ICXPort8
+# CHECK-NEXT: [11] - ICXPort9
+
+# CHECK: Resource pressure per iteration:
+# CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11]
+# CHECK-NEXT: - - 24.00 24.00 15.00 15.00 - - - - - -
+
+# CHECK: Resource pressure by instruction:
+# CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] Instructions:
+# CHECK-NEXT: - - 0.50 0.50 - - - - - - - - vgf2p8affineinvqb $0, %xmm0, %xmm1, %xmm2
+# CHECK-NEXT: - - 0.50 0.50 0.50 0.50 - - - - - - vgf2p8affineinvqb $0, (%rax), %xmm1, %xmm2
+# CHECK-NEXT: - - 0.50 0.50 0.50 0.50 - - - - - - vgf2p8affineinvqb $0, (%rax){1to2}, %xmm1, %xmm2
+# CHECK-NEXT: - - 0.50 0.50 - - - - - - - - vgf2p8affineinvqb $0, %xmm0, %xmm1, %xmm2 {%k1}
+# CHECK-NEXT: - - 0.50 0.50 0.50 0.50 - - - - - - vgf2p8affineinvqb $0, (%rax), %xmm1, %xmm2 {%k1}
+# CHECK-NEXT: - - 0.50 0.50 0.50 0.50 - - - - - - vgf2p8affineinvqb $0, (%rax){1to2}, %xmm1, %xmm2 {%k1}
+# CHECK-NEXT: - - 0.50 0.50 - - - - - - - - vgf2p8affineinvqb $0, %xmm0, %xmm1, %xmm2 {%k1} {z}
+# CHECK-NEXT: - - 0.50 0.50 0.50 0.50 - - - - - - vgf2p8affineinvqb $0, (%rax), %xmm1, %xmm2 {%k1} {z}
+# CHECK-NEXT: - - 0.50 0.50 0.50 0.50 - - - - - - vgf2p8affineinvqb $0, (%rax){1to2}, %xmm1, %xmm2 {%k1} {z}
+# CHECK-NEXT: - - 0.50 0.50 - - - - - - - - vgf2p8affineinvqb $0, %ymm0, %ymm1, %ymm2
+# CHECK-NEXT: - - 0.50 0.50 0.50 0.50 - - - - - - vgf2p8affineinvqb $0, (%rax), %ymm1, %ymm2
+# CHECK-NEXT: - - 0.50 0.50 0.50 0.50 - - - - - - vgf2p8affineinvqb $0, (%rax){1to4}, %ymm1, %ymm2
+# CHECK-NEXT: - - 0.50 0.50 - - - - - - - - vgf2p8affineinvqb $0, %ymm0, %ymm1, %ymm2 {%k1}
+# CHECK-NEXT: - - 0.50 0.50 0.50 0.50 - - - - - - vgf2p8affineinvqb $0, (%rax), %ymm1, %ymm2 {%k1}
+# CHECK-NEXT: - - 0.50 0.50 0.50 0.50 - - - - - - vgf2p8affineinvqb $0, (%rax){1to4}, %ymm1, %ymm2 {%k1}
+# CHECK-NEXT: - - 0.50 0.50 - - - - - - - - vgf2p8affineinvqb $0, %ymm0, %ymm1, %ymm2 {%k1} {z}
+# CHECK-NEXT: - - 0.50 0.50 0.50 0.50 - - - - - - vgf2p8affineinvqb $0, (%rax), %ymm1, %ymm2 {%k1} {z}
+# CHECK-NEXT: - - 0.50 0.50 0.50 0.50 - - - - - - vgf2p8affineinvqb $0, (%rax){1to4}, %ymm1, %ymm2 {%k1} {z}
+# CHECK-NEXT: - - 0.50 0.50 - - - - - - - - vgf2p8affineqb $0, %xmm0, %xmm1, %xmm2
+# CHECK-NEXT: - - 0.50 0.50 0.50 0.50 - - - - - - vgf2p8affineqb $0, (%rax), %xmm1, %xmm2
+# CHECK-NEXT: - - 0.50 0.50 0.50 0.50 - - - - - - vgf2p8affineqb $0, (%rax){1to2}, %xmm1, %xmm2
+# CHECK-NEXT: - - 0.50 0.50 - - - - - - - - vgf2p8affineqb $0, %xmm0, %xmm1, %xmm2
+# CHECK-NEXT: - - 0.50 0.50 0.50 0.50 - - - - - - vgf2p8affineqb $0, (%rax), %xmm1, %xmm2
+# CHECK-NEXT: - - 0.50 0.50 0.50 0.50 - - - - - - vgf2p8affineqb $0, (%rax){1to2}, %xmm1, %xmm2
+# CHECK-NEXT: - - 0.50 0.50 - - - - - - - - vgf2p8affineqb $0, %xmm0, %xmm1, %xmm2 {%k1} {z}
+# CHECK-NEXT: - - 0.50 0.50 0.50 0.50 - - - - - - vgf2p8affineqb $0, (%rax), %xmm1, %xmm2 {%k1} {z}
+# CHECK-NEXT: - - 0.50 0.50 0.50 0.50 - - - - - - vgf2p8affineqb $0, (%rax){1to2}, %xmm1, %xmm2 {%k1} {z}
+# CHECK-NEXT: - - 0.50 0.50 - - - - - - - - vgf2p8affineqb $0, %ymm0, %ymm1, %ymm2
+# CHECK-NEXT: - - 0.50 0.50 0.50 0.50 - - - - - - vgf2p8affineqb $0, (%rax), %ymm1, %ymm2
+# CHECK-NEXT: - - 0.50 0.50 0.50 0.50 - - - - - - vgf2p8affineqb $0, (%rax){1to4}, %ymm1, %ymm2
+# CHECK-NEXT: - - 0.50 0.50 - - - - - - - - vgf2p8affineqb $0, %ymm0, %ymm1, %ymm2
+# CHECK-NEXT: - - 0.50 0.50 0.50 0.50 - - - - - - vgf2p8affineqb $0, (%rax), %ymm1, %ymm2
+# CHECK-NEXT: - - 0.50 0.50 0.50 0.50 - - - - - - vgf2p8affineqb $0, (%rax){1to4}, %ymm1, %ymm2
+# CHECK-NEXT: - - 0.50 0.50 - - - - - - - - vgf2p8affineqb $0, %ymm0, %ymm1, %ymm2 {%k1} {z}
+# CHECK-NEXT: - - 0.50 0.50 0.50 0.50 - - - - - - vgf2p8affineqb $0, (%rax), %ymm1, %ymm2 {%k1} {z}
+# CHECK-NEXT: - - 0.50 0.50 0.50 0.50 - - - - - - vgf2p8affineqb $0, (%rax){1to4}, %ymm1, %ymm2 {%k1} {z}
+# CHECK-NEXT: - - 0.50 0.50 - - - - - - - - vgf2p8mulb %xmm0, %xmm1, %xmm2
+# CHECK-NEXT: - - 0.50 0.50 0.50 0.50 - - - - - - vgf2p8mulb (%rax), %xmm1, %xmm2
+# CHECK-NEXT: - - 0.50 0.50 - - - - - - - - vgf2p8mulb %xmm0, %xmm1, %xmm2 {%k1}
+# CHECK-NEXT: - - 0.50 0.50 0.50 0.50 - - - - - - vgf2p8mulb (%rax), %xmm1, %xmm2 {%k1}
+# CHECK-NEXT: - - 0.50 0.50 - - - - - - - - vgf2p8mulb %xmm0, %xmm1, %xmm2 {%k1} {z}
+# CHECK-NEXT: - - 0.50 0.50 0.50 0.50 - - - - - - vgf2p8mulb (%rax), %xmm1, %xmm2 {%k1} {z}
+# CHECK-NEXT: - - 0.50 0.50 - - - - - - - - vgf2p8mulb %ymm0, %ymm1, %ymm2
+# CHECK-NEXT: - - 0.50 0.50 0.50 0.50 - - - - - - vgf2p8mulb (%rax), %ymm1, %ymm2
+# CHECK-NEXT: - - 0.50 0.50 - - - - - - - - vgf2p8mulb %ymm0, %ymm1, %ymm2 {%k1}
+# CHECK-NEXT: - - 0.50 0.50 0.50 0.50 - - - - - - vgf2p8mulb (%rax), %ymm1, %ymm2 {%k1}
+# CHECK-NEXT: - - 0.50 0.50 - - - - - - - - vgf2p8mulb %ymm0, %ymm1, %ymm2 {%k1} {z}
+# CHECK-NEXT: - - 0.50 0.50 0.50 0.50 - - - - - - vgf2p8mulb (%rax), %ymm1, %ymm2 {%k1} {z}
diff --git a/llvm/test/tools/llvm-mca/X86/IceLakeServer/resources-avxgfni.s b/llvm/test/tools/llvm-mca/X86/IceLakeServer/resources-avxgfni.s
new file mode 100644
index 0000000000000..75b1291d95be7
--- /dev/null
+++ b/llvm/test/tools/llvm-mca/X86/IceLakeServer/resources-avxgfni.s
@@ -0,0 +1,54 @@
+# NOTE: Assertions have been autogenerated by utils/update_mca_test_checks.py
+# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=icelake-server -instruction-tables < %s | FileCheck %s
+
+vgf2p8affineinvqb $0, %xmm0, %xmm1, %xmm2
+vgf2p8affineinvqb $0, (%rax), %xmm1, %xmm2
+
+vgf2p8affineqb $0, %xmm0, %xmm1, %xmm2
+vgf2p8affineqb $0, (%rax), %xmm1, %xmm2
+
+vgf2p8mulb %xmm0, %xmm1, %xmm2
+vgf2p8mulb (%rax), %xmm1, %xmm2
+
+# CHECK: Instruction Info:
+# CHECK-NEXT: [1]: #uOps
+# CHECK-NEXT: [2]: Latency
+# CHECK-NEXT: [3]: RThroughput
+# CHECK-NEXT: [4]: MayLoad
+# CHECK-NEXT: [5]: MayStore
+# CHECK-NEXT: [6]: HasSideEffects (U)
+
+# CHECK: [1] [2] [3] [4] [5] [6] Instructions:
+# CHECK-NEXT: 1 1 0.50 vgf2p8affineinvqb $0, %xmm0, %xmm1, %xmm2
+# CHECK-NEXT: 2 7 0.50 * vgf2p8affineinvqb $0, (%rax), %xmm1, %xmm2
+# CHECK-NEXT: 1 1 0.50 vgf2p8affineqb $0, %xmm0, %xmm1, %xmm2
+# CHECK-NEXT: 2 7 0.50 * vgf2p8affineqb $0, (%rax), %xmm1, %xmm2
+# CHECK-NEXT: 1 1 0.50 vgf2p8mulb %xmm0, %xmm1, %xmm2
+# CHECK-NEXT: 2 7 0.50 * vgf2p8mulb (%rax), %xmm1, %xmm2
+
+# CHECK: Resources:
+# CHECK-NEXT: [0] - ICXDivider
+# CHECK-NEXT: [1] - ICXFPDivider
+# CHECK-NEXT: [2] - ICXPort0
+# CHECK-NEXT: [3] - ICXPort1
+# CHECK-NEXT: [4] - ICXPort2
+# CHECK-NEXT: [5] - ICXPort3
+# CHECK-NEXT: [6] - ICXPort4
+# CHECK-NEXT: [7] - ICXPort5
+# CHECK-NEXT: [8] - ICXPort6
+# CHECK-NEXT: [9] - ICXPort7
+# CHECK-NEXT: [10] - ICXPort8
+# CHECK-NEXT: [11] - ICXPort9
+
+# CHECK: Resource pressure per iteration:
+# CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11]
+# CHECK-NEXT: - - 3.00 3.00 1.50 1.50 - - - - - -
+
+# CHECK: Resource pressure by instruction:
+# CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] Instructions:
+# CHECK-NEXT: - - 0.50 0.50 - - - - - - - - vgf2p8affineinvqb $0, %xmm0, %xmm1, %xmm2
+# CHECK-NEXT: - - 0.50 0.50 0.50 0.50 - - - - - - vgf2p8affineinvqb $0, (%rax), %xmm1, %xmm2
+# CHECK-NEXT: - - 0.50 0.50 - - - - - - - - vgf2p8affineqb $0, %xmm0, %xmm1, %xmm2
+# CHECK-NEXT: - - 0.50 0.50 0.50 0.50 - - - - - - vgf2p8affineqb $0, (%rax), %xmm1, %xmm2
+# CHECK-NEXT: - - 0.50 0.50 - - - - - - - - vgf2p8mulb %xmm0, %xmm1, %xmm2
+# CHECK-NEXT: - - 0.50 0.50 0.50 0.50 - - - - - - vgf2p8mulb (%rax), %xmm1, %xmm2
diff --git a/llvm/test/tools/llvm-mca/X86/IceLakeServer/resources-gfni.s b/llvm/test/tools/llvm-mca/X86/IceLakeServer/resources-gfni.s
new file mode 100644
index 0000000000000..0fef4065f3dfb
--- /dev/null
+++ b/llvm/test/tools/llvm-mca/X86/IceLakeServer/resources-gfni.s
@@ -0,0 +1,54 @@
+# NOTE: Assertions have been autogenerated by utils/update_mca_test_checks.py
+# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=icelake-server -instruction-tables < %s | FileCheck %s
+
+gf2p8affineinvqb $0, %xmm0, %xmm1
+gf2p8affineinvqb $0, (%rax), %xmm1
+
+gf2p8affineqb $0, %xmm0, %xmm1
+gf2p8affineqb $0, (%rax), %xmm1
+
+gf2p8mulb %xmm0, %xmm1
+gf2p8mulb (%rax), %xmm1
+
+# CHECK: Instruction Info:
+# CHECK-NEXT: [1]: #uOps
+# CHECK-NEXT: [2]: Latency
+# CHECK-NEXT: [3]: RThroughput
+# CHECK-NEXT: [4]: MayLoad
+# CHECK-NEXT: [5]: MayStore
+# CHECK-NEXT: [6]: HasSideEffects (U)
+
+# CHECK: [1] [2] [3] [4] [5] [6] Instructions:
+# CHECK-NEXT: 1 1 0.50 gf2p8affineinvqb $0, %xmm0, %xmm1
+# CHECK-NEXT: 2 7 0.50 * gf2p8affineinvqb $0, (%rax), %xmm1
+# CHECK-NEXT: 1 1 0.50 gf2p8affineqb $0, %xmm0, %xmm1
+# CHECK-NEXT: 2 7 0.50 * gf2p8affineqb $0, (%rax), %xmm1
+# CHECK-NEXT: 1 1 0.50 gf2p8mulb %xmm0, %xmm1
+# CHECK-NEXT: 2 7 0.50 * gf2p8mulb (%rax), %xmm1
+
+# CHECK: Resources:
+# CHECK-NEXT: [0] - ICXDivider
+# CHECK-NEXT: [1] - ICXFPDivider
+# CHECK-NEXT: [2] - ICXPort0
+# CHECK-NEXT: [3] - ICXPort1
+# CHECK-NEXT: [4] - ICXPort2
+# CHECK-NEXT: [5] - ICXPort3
+# CHECK-NEXT: [6] - ICXPort4
+# CHECK-NEXT: [7] - ICXPort5
+# CHECK-NEXT: [8] - ICXPort6
+# CHECK-NEXT: [9] - ICXPort7
+# CHECK-NEXT: [10] - ICXPort8
+# CHECK-NEXT: [11] - ICXPort9
+
+# CHECK: Resource pressure per iteration:
+# CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11]
+# CHECK-NEXT: - - 3.00 3.00 1.50 1.50 - - - - - -
+
+# CHECK: Resource pressure by instruction:
+# CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] Instructions:
+# CHECK-NEXT: - - 0.50 0.50 - - - - - - - - gf2p8affineinvqb $0, %xmm0, %xmm1
+# CHECK-NEXT: - - 0.50 0.50 0.50 0.50 - - - - - - gf2p8affineinvqb $0, (%rax), %xmm1
+# CHECK-NEXT: - - 0.50 0.50 - - - - - - - - gf2p8affineqb $0, %xmm0, %xmm1
+# CHECK-NEXT: - - 0.50 0.50 0.50 0.50 - - - - - - gf2p8affineqb $0, (%rax), %xmm1
+# CHECK-NEXT: - - 0.50 0.50 - - - - - - - - gf2p8mulb %xmm0, %xmm1
+# CHECK-NEXT: - - 0.50 0.50 0.50 0.50 - - - - - - gf2p8mulb (%rax), %xmm1
More information about the llvm-commits
mailing list