[llvm] [X86] Break false dependencies on Zen 4 and 5 (#206849) (PR #207079)
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 14 02:49:10 PDT 2026
================
@@ -0,0 +1,448 @@
+; RUN: llc -verify-machineinstrs -mcpu=x86-64-v3 -mtriple=x86_64-unknown-unknown < %s | FileCheck %s --check-prefixes=FAST,ALL
+; RUN: llc -verify-machineinstrs -mcpu=x86-64-v3 -mattr=+false-deps-bls -mtriple=x86_64-unknown-unknown < %s | FileCheck %s --check-prefixes=SLOW,ALL
+; RUN: llc -verify-machineinstrs -mcpu=haswell -mtriple=x86_64-unknown-unknown < %s | FileCheck %s --check-prefixes=FAST,ALL
+; RUN: llc -verify-machineinstrs -mcpu=skylake -mtriple=x86_64-unknown-unknown < %s | FileCheck %s --check-prefixes=FAST,ALL
+; RUN: llc -verify-machineinstrs -mcpu=skx -mtriple=x86_64-unknown-unknown < %s | FileCheck %s --check-prefixes=FAST,ALL
+; RUN: llc -verify-machineinstrs -mcpu=icelake-client -mtriple=x86_64-unknown-unknown < %s | FileCheck %s --check-prefixes=FAST,ALL
+; RUN: llc -verify-machineinstrs -mcpu=alderlake -mtriple=x86_64-unknown-unknown < %s | FileCheck %s --check-prefixes=FAST,ALL
+; RUN: llc -verify-machineinstrs -mcpu=sapphirerapids -mtriple=x86_64-unknown-unknown < %s | FileCheck %s --check-prefixes=FAST,ALL
+; RUN: llc -verify-machineinstrs -mcpu=emeraldrapids -mtriple=x86_64-unknown-unknown < %s | FileCheck %s --check-prefixes=FAST,ALL
+; RUN: llc -verify-machineinstrs -mcpu=graniterapids -mtriple=x86_64-unknown-unknown < %s | FileCheck %s --check-prefixes=FAST,ALL
+; RUN: llc -verify-machineinstrs -mcpu=znver4 -mtriple=x86_64-unknown-unknown < %s | FileCheck %s --check-prefixes=FAST,ALL
+; RUN: llc -verify-machineinstrs -mcpu=znver5 -mtriple=x86_64-unknown-unknown < %s | FileCheck %s --check-prefixes=SLOW,ALL
+; RUN: llc -verify-machineinstrs -mcpu=znver6 -mtriple=x86_64-unknown-unknown < %s | FileCheck %s --check-prefixes=FAST,ALL
+
+
+; Test that dependencies on the output register are broken if it was written recently (write simulated using inline asm).
+
+
+define i32 @blsi32_rr(i32 %a0) {
+; SLOW-LABEL: blsi32_rr:
+; SLOW: # %bb.0:
+; SLOW-NEXT: #APP
+; SLOW-NEXT: #NO_APP
+; SLOW-NEXT: xorl %eax, %eax
+; SLOW-NEXT: blsil %edi, %eax
+; SLOW-NEXT: retq
+;
+; FAST-LABEL: blsi32_rr:
+; FAST: # %bb.0:
+; FAST-NEXT: #APP
+; FAST-NEXT: #NO_APP
+; FAST-NEXT: blsil %edi, %eax
+; FAST-NEXT: retq
+ %1 = tail call <2 x i64> asm sideeffect "", "=x,~{eax}"()
----------------
RKSimon wrote:
cheers - yes replacing the BMI ll tests with MIR tests in a future PR would be better
https://github.com/llvm/llvm-project/pull/207079
More information about the llvm-commits
mailing list