[llvm] [AArch64] Set the cache line size to 64 for the V2 and V3. (PR #148213)

Sjoerd Meijer via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 11 04:00:30 PDT 2025


https://github.com/sjoerdmeijer created https://github.com/llvm/llvm-project/pull/148213

This sets the cache line size to 64 for the Neoverse V2 and V3.  I've tested this with loop-interchange: it doesn't result in extra compile-times, but it does enable a lot more interchange.

I've also set this for V3, have not tested this, but looks like the sensible thing to do, but am happy to remove this.

>From a251859086d776206a369ce90cb58fda4e5955e4 Mon Sep 17 00:00:00 2001
From: Sjoerd Meijer <smeijer at nvidia.com>
Date: Fri, 11 Jul 2025 03:26:15 -0700
Subject: [PATCH] [AArch64] Set the cache line size to 64 for the V2 and V3.

This sets the cache line size to 64 for the Neoverse V2 and V3.  I've
tested this with loop-interchange: it doesn't result in extra
compile-times, but it does enable a lot more interchange.

I've set this to V3, have not tested this, but looks like the sensible
thing to do, but am happy to remove this.
---
 llvm/lib/Target/AArch64/AArch64Subtarget.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/llvm/lib/Target/AArch64/AArch64Subtarget.cpp b/llvm/lib/Target/AArch64/AArch64Subtarget.cpp
index 68ed10570a52f..4ac93526295aa 100644
--- a/llvm/lib/Target/AArch64/AArch64Subtarget.cpp
+++ b/llvm/lib/Target/AArch64/AArch64Subtarget.cpp
@@ -270,6 +270,7 @@ void AArch64Subtarget::initializeProperties(bool HasMinSize) {
     break;
   case NeoverseV2:
   case NeoverseV3:
+    CacheLineSize = 64;
     EpilogueVectorizationMinVF = 8;
     MaxInterleaveFactor = 4;
     ScatterOverhead = 13;



More information about the llvm-commits mailing list