Skip to content

Commit d1b2fd0

Browse files
committed
[AArch64] Set MaxInterleaving to 4 for Neoverse V2
This helps loop based benchmarks quite a lot, SPEC INT is unaffected.
1 parent 1feef92 commit d1b2fd0

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

llvm/lib/Target/AArch64/AArch64Subtarget.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,9 +233,11 @@ void AArch64Subtarget::initializeProperties(bool HasMinSize) {
233233
PrefLoopAlignment = Align(32);
234234
MaxBytesForLoopAlignment = 16;
235235
break;
236+
case NeoverseV2:
237+
MaxInterleaveFactor = 4;
238+
LLVM_FALLTHROUGH;
236239
case NeoverseN2:
237240
case NeoverseN3:
238-
case NeoverseV2:
239241
case NeoverseV3:
240242
PrefFunctionAlignment = Align(16);
241243
PrefLoopAlignment = Align(32);

llvm/test/Transforms/LoopVectorize/AArch64/interleaving-load-store.ll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
; RUN: opt -passes=loop-vectorize -mtriple=arm64-apple-macos -mcpu=apple-a14 -S %s | FileCheck --check-prefix=INTERLEAVE-4 %s
66
; RUN: opt -passes=loop-vectorize -mtriple=arm64-apple-macos -mcpu=apple-a15 -S %s | FileCheck --check-prefix=INTERLEAVE-4 %s
77
; RUN: opt -passes=loop-vectorize -mtriple=arm64-apple-macos -mcpu=apple-a16 -S %s | FileCheck --check-prefix=INTERLEAVE-4 %s
8+
; RUN: opt -passes=loop-vectorize -mtriple=arm64 -mcpu=neoverse-v2 -S %s | FileCheck --check-prefix=INTERLEAVE-4 %s
89

910
; Tests for selecting interleave counts for loops with loads and stores.
1011

llvm/test/Transforms/LoopVectorize/AArch64/interleaving-reduction.ll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
; RUN: opt -passes=loop-vectorize -mtriple=arm64-apple-macos -mcpu=apple-a14 -S %s | FileCheck --check-prefix=INTERLEAVE-4 %s
66
; RUN: opt -passes=loop-vectorize -mtriple=arm64-apple-macos -mcpu=apple-a15 -S %s | FileCheck --check-prefix=INTERLEAVE-4 %s
77
; RUN: opt -passes=loop-vectorize -mtriple=arm64-apple-macos -mcpu=apple-a16 -S %s | FileCheck --check-prefix=INTERLEAVE-4 %s
8+
; RUN: opt -passes=loop-vectorize -mtriple=arm64 -mcpu=neoverse-v2 -S %s | FileCheck --check-prefix=INTERLEAVE-4 %s
89

910
; Tests for selecting the interleave count for loops with reductions.
1011

0 commit comments

Comments
 (0)