Skip to content

Commit 0cc39d8

Browse files
committed
Fixups
1 parent 70345f5 commit 0cc39d8

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

llvm/lib/Target/AArch64/AArch64Subtarget.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,9 +181,11 @@ class AArch64Subtarget final : public AArch64GenSubtargetInfo {
181181
/// the SME unit could result in a hazard. 0 = disabled.
182182
unsigned getStreamingHazardSize() const {
183183
// If StreamingHazardSize has been explicitly set to a value, use that.
184-
// Otherwise, default to 1024 bytes when both SME and SVE are available,
185-
// for all other configurations default to no streaming hazards.
186-
return StreamingHazardSize.value_or(hasSME() && hasSVE() ? 1024 : 0);
184+
// Otherwise, default to 1024 bytes when both SME and SVE are available
185+
// (without FA64), for all other configurations default to no streaming
186+
// hazards.
187+
return StreamingHazardSize.value_or(
188+
!hasSMEFA64() && hasSME() && hasSVE() ? 1024 : 0);
187189
}
188190

189191
/// Returns true if the target has NEON and the function at runtime is known

llvm/test/CodeGen/AArch64/stack-hazard-defaults.ll

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
;; The hazard size can still be overridden/disabled when +sme,+sve is set.
1111
; RUN: llc < %s -mtriple=aarch64 -mattr=+sme -mattr=+sve -aarch64-stack-hazard-size=0 | FileCheck %s --check-prefix=CHECK0
1212

13+
;; When +sme-fa64 is set alongside +sme,+sve the default hazard size should be 0.
14+
; RUN: llc < %s -mtriple=aarch64 -mattr=+sme-fa64 -mattr=+sme -mattr=+sve | FileCheck %s --check-prefix=CHECK0
15+
1316
;; When +sme is set (without +sve) the default hazard size should be 0.
1417
; RUN: llc < %s -mtriple=aarch64 -mattr=+sme | FileCheck %s --check-prefix=CHECK0
1518

0 commit comments

Comments
 (0)