From d1903af7e2f015a6c26cce2db73f79988a887d24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20K=C3=B6plinger?= Date: Fri, 13 Oct 2023 17:16:28 +0200 Subject: [PATCH] Add ILLink substitution for wasm intrinsics (#93407) Noticed those were missing while looking at https://github.com/dotnet/runtime/issues/93399 Also deleted an empty file that was checked in by mistake. Fixed an issue where we weren't recursively calling IsSupported for PackedSimd which is the pattern we've been using (the JIT/AOT compiler is supposed to use the intrinsic instead) --- .../src/ILLink/ILLink.Substitutions.NoWasmIntrinsics.xml | 7 +++++++ .../src/ILLink/ILLink.Substitutions.NoX86Intrinsics.xm | 0 .../src/System.Private.CoreLib.Shared.projitems | 1 + .../src/System/Runtime/Intrinsics/Wasm/PackedSimd.cs | 2 +- 4 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 src/libraries/System.Private.CoreLib/src/ILLink/ILLink.Substitutions.NoWasmIntrinsics.xml delete mode 100644 src/libraries/System.Private.CoreLib/src/ILLink/ILLink.Substitutions.NoX86Intrinsics.xm diff --git a/src/libraries/System.Private.CoreLib/src/ILLink/ILLink.Substitutions.NoWasmIntrinsics.xml b/src/libraries/System.Private.CoreLib/src/ILLink/ILLink.Substitutions.NoWasmIntrinsics.xml new file mode 100644 index 0000000000000..c6290d2aa1a21 --- /dev/null +++ b/src/libraries/System.Private.CoreLib/src/ILLink/ILLink.Substitutions.NoWasmIntrinsics.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/src/libraries/System.Private.CoreLib/src/ILLink/ILLink.Substitutions.NoX86Intrinsics.xm b/src/libraries/System.Private.CoreLib/src/ILLink/ILLink.Substitutions.NoX86Intrinsics.xm deleted file mode 100644 index e69de29bb2d1d..0000000000000 diff --git a/src/libraries/System.Private.CoreLib/src/System.Private.CoreLib.Shared.projitems b/src/libraries/System.Private.CoreLib/src/System.Private.CoreLib.Shared.projitems index 32761e742f172..ac73beb0c03e3 100644 --- a/src/libraries/System.Private.CoreLib/src/System.Private.CoreLib.Shared.projitems +++ b/src/libraries/System.Private.CoreLib/src/System.Private.CoreLib.Shared.projitems @@ -56,6 +56,7 @@ + diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Wasm/PackedSimd.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Wasm/PackedSimd.cs index 3d22813c81d54..3d9fb000131f5 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Wasm/PackedSimd.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Wasm/PackedSimd.cs @@ -14,7 +14,7 @@ namespace System.Runtime.Intrinsics.Wasm [CLSCompliant(false)] public abstract class PackedSimd { - public static bool IsSupported { [Intrinsic] get { return false; } } + public static bool IsSupported { [Intrinsic] get { return IsSupported; } } // Constructing SIMD Values