[llvm] [X86] Break false dependencies of compress/expand on Zen 6 (PR #211671)
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 24 03:11:12 PDT 2026
https://github.com/RKSimon updated https://github.com/llvm/llvm-project/pull/211671
>From 2796e19f45c778e55b13da7d1a2396db9eeda261 Mon Sep 17 00:00:00 2001
From: Iurii Khosoi <aadaa_fgtaa at pm.me>
Date: Thu, 23 Jul 2026 23:28:22 +0200
Subject: [PATCH] [X86] Break false dependencies of compress/expand on Zen 6
Benchmark results from #207079 show that Zen 6 microarchitecture retains
the false dependency on the output register of zero-masked
compress/expand which is also present on Zen 4 and 5. This patch applies
corresponding tunings to Zen 6.
---
llvm/lib/Target/X86/X86.td | 2 --
llvm/test/CodeGen/X86/compress-false-deps.mir | 3 ++-
llvm/test/CodeGen/X86/expand-false-deps.mir | 3 ++-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/llvm/lib/Target/X86/X86.td b/llvm/lib/Target/X86/X86.td
index b724a12d2f698..95dafc31d6b44 100644
--- a/llvm/lib/Target/X86/X86.td
+++ b/llvm/lib/Target/X86/X86.td
@@ -1759,8 +1759,6 @@ def ProcessorFeatures {
!listconcat(ZN4Features, ZN5AdditionalFeatures);
list<SubtargetFeature> ZN6RemoveTuning = [TuningSlowIndirectCall,
- TuningCOMPRESSFalseDeps,
- TuningEXPANDFalseDeps,
TuningTZCNTFalseDeps,
TuningBLSFalseDeps
];
diff --git a/llvm/test/CodeGen/X86/compress-false-deps.mir b/llvm/test/CodeGen/X86/compress-false-deps.mir
index 581d24fcb1bcd..3c0da9bb400d9 100644
--- a/llvm/test/CodeGen/X86/compress-false-deps.mir
+++ b/llvm/test/CodeGen/X86/compress-false-deps.mir
@@ -10,7 +10,8 @@
# RUN: llc -verify-machineinstrs -mcpu=znver4 -mattr=-false-deps-compress -mtriple=x86_64-unknown-unknown -run-pass=break-false-deps %s -o - | FileCheck %s --check-prefixes=FAST,ALL
# RUN: llc -verify-machineinstrs -mcpu=znver5 -mtriple=x86_64-unknown-unknown -run-pass=break-false-deps %s -o - | FileCheck %s --check-prefixes=SLOW,ALL
# RUN: llc -verify-machineinstrs -mcpu=znver5 -mattr=-false-deps-compress -mtriple=x86_64-unknown-unknown -run-pass=break-false-deps %s -o - | FileCheck %s --check-prefixes=FAST,ALL
-# RUN: llc -verify-machineinstrs -mcpu=znver6 -mtriple=x86_64-unknown-unknown -run-pass=break-false-deps %s -o - | FileCheck %s --check-prefixes=FAST,ALL
+# RUN: llc -verify-machineinstrs -mcpu=znver6 -mtriple=x86_64-unknown-unknown -run-pass=break-false-deps %s -o - | FileCheck %s --check-prefixes=SLOW,ALL
+# RUN: llc -verify-machineinstrs -mcpu=znver6 -mattr=-false-deps-compress -mtriple=x86_64-unknown-unknown -run-pass=break-false-deps %s -o - | FileCheck %s --check-prefixes=FAST,ALL
---
name: compressb_rrz_128
diff --git a/llvm/test/CodeGen/X86/expand-false-deps.mir b/llvm/test/CodeGen/X86/expand-false-deps.mir
index 08c09aa6d81b0..db890b784d6de 100644
--- a/llvm/test/CodeGen/X86/expand-false-deps.mir
+++ b/llvm/test/CodeGen/X86/expand-false-deps.mir
@@ -10,7 +10,8 @@
# RUN: llc -verify-machineinstrs -mcpu=znver4 -mattr=-false-deps-expand -mtriple=x86_64-unknown-unknown -run-pass=break-false-deps %s -o - | FileCheck %s --check-prefixes=FAST,ALL
# RUN: llc -verify-machineinstrs -mcpu=znver5 -mtriple=x86_64-unknown-unknown -run-pass=break-false-deps %s -o - | FileCheck %s --check-prefixes=SLOW,ALL
# RUN: llc -verify-machineinstrs -mcpu=znver5 -mattr=-false-deps-expand -mtriple=x86_64-unknown-unknown -run-pass=break-false-deps %s -o - | FileCheck %s --check-prefixes=FAST,ALL
-# RUN: llc -verify-machineinstrs -mcpu=znver6 -mtriple=x86_64-unknown-unknown -run-pass=break-false-deps %s -o - | FileCheck %s --check-prefixes=FAST,ALL
+# RUN: llc -verify-machineinstrs -mcpu=znver6 -mtriple=x86_64-unknown-unknown -run-pass=break-false-deps %s -o - | FileCheck %s --check-prefixes=SLOW,ALL
+# RUN: llc -verify-machineinstrs -mcpu=znver6 -mattr=-false-deps-expand -mtriple=x86_64-unknown-unknown -run-pass=break-false-deps %s -o - | FileCheck %s --check-prefixes=FAST,ALL
---
name: expandb_rrz_128
More information about the llvm-commits
mailing list