[llvm] 026df95 - [X86] Remove unnecessary VBLENDWYrr overrides
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Sun Nov 27 08:54:52 PST 2022
Author: Simon Pilgrim
Date: 2022-11-27T16:54:47Z
New Revision: 026df9514eada25e72ff69a587a580fd29ff2732
URL: https://github.com/llvm/llvm-project/commit/026df9514eada25e72ff69a587a580fd29ff2732
DIFF: https://github.com/llvm/llvm-project/commit/026df9514eada25e72ff69a587a580fd29ff2732.diff
LOG: [X86] Remove unnecessary VBLENDWYrr overrides
The znver2 override already matched the WriteBlendY class exactly, and the znver1 override wasn't accounting for ymm double-pumping.
Found with the help of D138359
Added:
Modified:
llvm/lib/Target/X86/X86ScheduleZnver1.td
llvm/lib/Target/X86/X86ScheduleZnver2.td
llvm/test/tools/llvm-mca/X86/Znver1/resources-avx2.s
Removed:
################################################################################
diff --git a/llvm/lib/Target/X86/X86ScheduleZnver1.td b/llvm/lib/Target/X86/X86ScheduleZnver1.td
index 3de683339f6ac..33e70651a9c45 100644
--- a/llvm/lib/Target/X86/X86ScheduleZnver1.td
+++ b/llvm/lib/Target/X86/X86ScheduleZnver1.td
@@ -955,9 +955,6 @@ def ZnWriteFPU013LdY : SchedWriteRes<[ZnAGU, ZnFPU013]> {
}
// PBLENDW.
-// ymm
-def : InstRW<[ZnWriteFPU013Y], (instrs VPBLENDWYrri)>;
-
// x,m,i / v,v,m,i
def : InstRW<[ZnWriteFPU013Ld], (instregex "(V?)PBLENDWrmi")>;
// y,m,i
diff --git a/llvm/lib/Target/X86/X86ScheduleZnver2.td b/llvm/lib/Target/X86/X86ScheduleZnver2.td
index ae1a1d123363c..8a9e9b0d019ef 100644
--- a/llvm/lib/Target/X86/X86ScheduleZnver2.td
+++ b/llvm/lib/Target/X86/X86ScheduleZnver2.td
@@ -963,9 +963,6 @@ def Zn2WriteFPU013LdY : SchedWriteRes<[Zn2AGU, Zn2FPU013]> {
}
// PBLENDW.
-// ymm
-def : InstRW<[Zn2WriteFPU013Y], (instrs VPBLENDWYrri)>;
-
// x,m,i / v,v,m,i
def : InstRW<[Zn2WriteFPU013Ld], (instregex "(V?)PBLENDWrmi")>;
// y,m,i
diff --git a/llvm/test/tools/llvm-mca/X86/Znver1/resources-avx2.s b/llvm/test/tools/llvm-mca/X86/Znver1/resources-avx2.s
index cca125fd51583..a0097665cf2c5 100644
--- a/llvm/test/tools/llvm-mca/X86/Znver1/resources-avx2.s
+++ b/llvm/test/tools/llvm-mca/X86/Znver1/resources-avx2.s
@@ -524,7 +524,7 @@ vpxor (%rax), %ymm1, %ymm2
# CHECK-NEXT: 2 9 1.50 * vpblendd $11, (%rax), %ymm1, %ymm2
# CHECK-NEXT: 2 1 2.00 vpblendvb %ymm3, %ymm0, %ymm1, %ymm2
# CHECK-NEXT: 2 8 2.00 * vpblendvb %ymm3, (%rax), %ymm1, %ymm2
-# CHECK-NEXT: 1 2 0.33 vpblendw $11, %ymm0, %ymm1, %ymm2
+# CHECK-NEXT: 2 1 0.67 vpblendw $11, %ymm0, %ymm1, %ymm2
# CHECK-NEXT: 2 9 0.50 * vpblendw $11, (%rax), %ymm1, %ymm2
# CHECK-NEXT: 1 1 0.50 vpbroadcastb %xmm0, %xmm0
# CHECK-NEXT: 2 8 1.00 * vpbroadcastb (%rax), %xmm0
@@ -778,7 +778,7 @@ vpxor (%rax), %ymm1, %ymm2
# CHECK: Resource pressure per iteration:
# CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11]
-# CHECK-NEXT: 66.50 66.50 - - - - - 119.50 238.50 158.00 66.00 -
+# CHECK-NEXT: 66.50 66.50 - - - - - 119.83 238.83 158.00 66.33 -
# CHECK: Resource pressure by instruction:
# CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] Instructions:
@@ -846,7 +846,7 @@ vpxor (%rax), %ymm1, %ymm2
# CHECK-NEXT: 0.50 0.50 - - - - - 1.50 1.50 - - - vpblendd $11, (%rax), %ymm1, %ymm2
# CHECK-NEXT: - - - - - - - 2.00 - - - - vpblendvb %ymm3, %ymm0, %ymm1, %ymm2
# CHECK-NEXT: 0.50 0.50 - - - - - 2.00 - - - - vpblendvb %ymm3, (%rax), %ymm1, %ymm2
-# CHECK-NEXT: - - - - - - - 0.33 0.33 - 0.33 - vpblendw $11, %ymm0, %ymm1, %ymm2
+# CHECK-NEXT: - - - - - - - 0.67 0.67 - 0.67 - vpblendw $11, %ymm0, %ymm1, %ymm2
# CHECK-NEXT: 0.50 0.50 - - - - - 0.33 0.33 - 0.33 - vpblendw $11, (%rax), %ymm1, %ymm2
# CHECK-NEXT: - - - - - - - - 0.50 0.50 - - vpbroadcastb %xmm0, %xmm0
# CHECK-NEXT: 0.50 0.50 - - - - - - 1.00 1.00 - - vpbroadcastb (%rax), %xmm0
More information about the llvm-commits
mailing list