Skip to content

Commit 1a07e67

Browse files
authored
[AArch64][SME] Enable aarch64-split-sve-objects with hazard padding (#161714)
This enables `aarch64-split-sve-objects` by default. Note: This option only has an effect when used in conjunction with hazard padding (`aarch64-stack-hazard-size` != 0). See #142392 for more details.
1 parent 30c578a commit 1a07e67

File tree

3 files changed

+141
-139
lines changed

3 files changed

+141
-139
lines changed

llvm/lib/Target/AArch64/AArch64FrameLowering.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ static cl::opt<bool> OrderFrameObjects("aarch64-order-frame-objects",
282282
static cl::opt<bool>
283283
SplitSVEObjects("aarch64-split-sve-objects",
284284
cl::desc("Split allocation of ZPR & PPR objects"),
285-
cl::init(false), cl::Hidden);
285+
cl::init(true), cl::Hidden);
286286

287287
cl::opt<bool> EnableHomogeneousPrologEpilog(
288288
"homogeneous-prolog-epilog", cl::Hidden,

llvm/test/CodeGen/AArch64/ssve-stack-hazard-remarks.ll

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,12 @@ entry:
6868
}
6969

7070
; SVE calling conventions
71-
; Predicate register spills end up in FP region, currently. This can be
72-
; mitigated with the -aarch64-enable-zpr-predicate-spills option.
71+
; Padding is placed between predicate and fpr/zpr register spills, so only emit remarks when hazard padding is off.
72+
; Note: The -aarch64-enable-zpr-predicate-spills option is deprecated (and will be removed soon).
7373

7474
define i32 @svecc_call(<4 x i16> %P0, ptr %P1, i32 %P2, <vscale x 16 x i8> %P3, i16 %P4) #2 {
7575
; CHECK: remark: <unknown>:0:0: stack hazard in 'svecc_call': PPR stack object at [SP-64-258 * vscale] is too close to FPR stack object at [SP-64-256 * vscale]
7676
; CHECK: remark: <unknown>:0:0: stack hazard in 'svecc_call': FPR stack object at [SP-64-16 * vscale] is too close to GPR stack object at [SP-64]
77-
; CHECK-PADDING: remark: <unknown>:0:0: stack hazard in 'svecc_call': PPR stack object at [SP-1088-258 * vscale] is too close to FPR stack object at [SP-1088-256 * vscale]
7877
; CHECK-PADDING-NOT: remark: <unknown>:0:0: stack hazard in 'svecc_call':
7978
; CHECK-ZPR-PRED-SPILLS-NOT: <unknown>:0:0: stack hazard in 'svecc_call': PPR stack object at {{.*}} is too close to FPR stack object
8079
; CHECK-ZPR-PRED-SPILLS: <unknown>:0:0: stack hazard in 'svecc_call': FPR stack object at [SP-64-16 * vscale] is too close to GPR stack object at [SP-64]
@@ -89,7 +88,6 @@ entry:
8988
define i32 @svecc_alloca_call(<4 x i16> %P0, ptr %P1, i32 %P2, <vscale x 16 x i8> %P3, i16 %P4) #2 {
9089
; CHECK: remark: <unknown>:0:0: stack hazard in 'svecc_alloca_call': PPR stack object at [SP-64-258 * vscale] is too close to FPR stack object at [SP-64-256 * vscale]
9190
; CHECK: remark: <unknown>:0:0: stack hazard in 'svecc_alloca_call': FPR stack object at [SP-64-16 * vscale] is too close to GPR stack object at [SP-64]
92-
; CHECK-PADDING: remark: <unknown>:0:0: stack hazard in 'svecc_alloca_call': PPR stack object at [SP-1088-258 * vscale] is too close to FPR stack object at [SP-1088-256 * vscale]
9391
; CHECK-PADDING-NOT: remark: <unknown>:0:0: stack hazard in 'svecc_alloca_call':
9492
; CHECK-ZPR-PRED-SPILLS-NOT: <unknown>:0:0: stack hazard in 'svecc_call': PPR stack object at {{.*}} is too close to FPR stack object
9593
; CHECK-ZPR-PRED-SPILLS: <unknown>:0:0: stack hazard in 'svecc_alloca_call': FPR stack object at [SP-64-16 * vscale] is too close to GPR stack object at [SP-64]

0 commit comments

Comments
 (0)