Skip to content

Commit 7f7bb7b

Browse files
kunalspathakjkotas
andauthored
Arm64/Sve: Enable Sve only if vector length is 128 (#104174)
* Enable InstructionSet_Sve only if system VL == 128 * Update src/coreclr/vm/codeman.cpp Co-authored-by: Jan Kotas <jkotas@microsoft.com> * Update src/coreclr/vm/codeman.cpp * Remove hardcoding of 128 for windows --------- Co-authored-by: Jan Kotas <jkotas@microsoft.com>
1 parent a177d24 commit 7f7bb7b

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/coreclr/vm/arm64/asmhelpers.asm

+1-3
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,7 @@
8080

8181
;; uint64_t GetSveLengthFromOS(void);
8282
LEAF_ENTRY GetSveLengthFromOS
83-
;; TODO-SVE: Remove the hardcoded value 128 and uncomment once CI machines are updated to use MASM 14.4 or later
84-
;; rdvl x0, 1
85-
mov x0, #128
83+
rdvl x0, 1
8684
ret lr
8785
LEAF_END
8886

src/coreclr/vm/codeman.cpp

+4-2
Original file line numberDiff line numberDiff line change
@@ -1514,8 +1514,10 @@ void EEJitManager::SetCpuInfo()
15141514
uint32_t maxVectorTLength = (maxVectorTBitWidth / 8);
15151515
uint64_t sveLengthFromOS = GetSveLengthFromOS();
15161516

1517-
// Do not enable SVE when the user specified vector length is smaller than the one offered by underlying OS.
1518-
if ((maxVectorTLength >= sveLengthFromOS) || (maxVectorTBitWidth == 0))
1517+
// For now, enable SVE only when the system vector length is 128-bits
1518+
// TODO: https://github.com/dotnet/runtime/issues/101477
1519+
if (sveLengthFromOS == 128)
1520+
// if ((maxVectorTLength >= sveLengthFromOS) || (maxVectorTBitWidth == 0))
15191521
{
15201522
CPUCompileFlags.Set(InstructionSet_Sve);
15211523
}

0 commit comments

Comments
 (0)