From cf78dbcbf370335b2b5d6948d40743d8258eb8d0 Mon Sep 17 00:00:00 2001 From: Vlad Brezae Date: Fri, 11 Sep 2026 17:42:37 +0300 Subject: [PATCH] Remove RCPC2 from the optimistic set on arm64 (#133576) Testing on android (https://github.com/dotnet/android/pull/12722) showed that older devices don't have rcpc2 instruction set available which leads to significant r2r code rejection. This is a simpler, cross platform fix for the issue, compared to exposing knobs to tweak the optimistic set (https://github.com/dotnet/runtime/pull/133514) and have dotnet/android use them. --------- Co-authored-by: Jan Kotas --- src/coreclr/tools/Common/InstructionSetHelpers.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/coreclr/tools/Common/InstructionSetHelpers.cs b/src/coreclr/tools/Common/InstructionSetHelpers.cs index f25320e99f785d..ed7f1649449091 100644 --- a/src/coreclr/tools/Common/InstructionSetHelpers.cs +++ b/src/coreclr/tools/Common/InstructionSetHelpers.cs @@ -299,7 +299,8 @@ public static InstructionSetSupport ConfigureInstructionSetSupport(string instru optimisticInstructionSetSupportBuilder.AddSupportedInstructionSet("dotprod"); optimisticInstructionSetSupportBuilder.AddSupportedInstructionSet("lse"); optimisticInstructionSetSupportBuilder.AddSupportedInstructionSet("rcpc"); - optimisticInstructionSetSupportBuilder.AddSupportedInstructionSet("rcpc2"); + // RCPC2 is intentionally excluded from the optimistic set since it is not universally available + // on supported ARM64 hardware yet, and many methods take an opportunistic dependency on it. optimisticInstructionSetSupportBuilder.AddSupportedInstructionSet("rdma"); optimisticInstructionSetSupportBuilder.AddSupportedInstructionSet("sha1"); optimisticInstructionSetSupportBuilder.AddSupportedInstructionSet("sha2");