diff options
-rw-r--r-- | src/System.Private.CoreLib/shared/System/Numerics/Vector.cs | 18 | ||||
-rw-r--r-- | src/System.Private.CoreLib/shared/System/Numerics/Vector.tt | 18 | ||||
-rw-r--r-- | src/System.Private.CoreLib/shared/System/Numerics/Vector_Operations.cs | 36 | ||||
-rw-r--r-- | src/jit/compiler.h | 1 | ||||
-rw-r--r-- | src/jit/importer.cpp | 2 | ||||
-rw-r--r-- | src/jit/simd.cpp | 17 | ||||
-rw-r--r-- | src/jit/simdintrinsiclist.h | 2 | ||||
-rw-r--r-- | src/vm/methodtablebuilder.cpp | 2 |
8 files changed, 87 insertions, 9 deletions
diff --git a/src/System.Private.CoreLib/shared/System/Numerics/Vector.cs b/src/System.Private.CoreLib/shared/System/Numerics/Vector.cs index 25a80edbc7..0c1787d3f6 100644 --- a/src/System.Private.CoreLib/shared/System/Numerics/Vector.cs +++ b/src/System.Private.CoreLib/shared/System/Numerics/Vector.cs @@ -89,7 +89,14 @@ namespace System.Numerics } private static readonly Vector<T> s_one = new Vector<T>(GetOneValue()); - internal static Vector<T> AllOnes { get { return s_allOnes; } } + internal static Vector<T> AllOnes + { + [Intrinsic] + get + { + return s_allOnes; + } + } private static readonly Vector<T> s_allOnes = new Vector<T>(GetAllBitsSetValue()); #endregion Static Members @@ -380,6 +387,7 @@ namespace System.Numerics /// Constructs a vector from the given array, starting from the given index. /// The array must contain at least Vector'T.Count from the given index. /// </summary> + [Intrinsic] public unsafe Vector(T[] values, int index) : this() { @@ -1591,6 +1599,7 @@ namespace System.Numerics /// <param name="left">The first source vector.</param> /// <param name="right">The second source vector.</param> /// <returns>The summed vector.</returns> + [Intrinsic] public static unsafe Vector<T> operator +(Vector<T> left, Vector<T> right) { unchecked @@ -1802,6 +1811,7 @@ namespace System.Numerics /// <param name="left">The first source vector.</param> /// <param name="right">The second source vector.</param> /// <returns>The difference vector.</returns> + [Intrinsic] public static unsafe Vector<T> operator -(Vector<T> left, Vector<T> right) { unchecked @@ -2014,6 +2024,7 @@ namespace System.Numerics /// <param name="left">The first source vector.</param> /// <param name="right">The second source vector.</param> /// <returns>The product vector.</returns> + [Intrinsic] public static unsafe Vector<T> operator *(Vector<T> left, Vector<T> right) { unchecked @@ -2250,6 +2261,7 @@ namespace System.Numerics /// <param name="left">The first source vector.</param> /// <param name="right">The second source vector.</param> /// <returns>The vector resulting from the division.</returns> + [Intrinsic] public static unsafe Vector<T> operator /(Vector<T> left, Vector<T> right) { unchecked @@ -2579,6 +2591,7 @@ namespace System.Numerics /// <param name="left">The first vector to compare.</param> /// <param name="right">The first vector to compare.</param> /// <returns>True if all elements are equal; False otherwise.</returns> + [Intrinsic] [MethodImplAttribute(MethodImplOptions.AggressiveInlining)] public static bool operator ==(Vector<T> left, Vector<T> right) { @@ -2591,6 +2604,7 @@ namespace System.Numerics /// <param name="left">The first vector to compare.</param> /// <param name="right">The second vector to compare.</param> /// <returns>True if left and right are not equal; False otherwise.</returns> + [Intrinsic] [MethodImplAttribute(MethodImplOptions.AggressiveInlining)] public static bool operator !=(Vector<T> left, Vector<T> right) { @@ -3969,7 +3983,7 @@ namespace System.Numerics } [Intrinsic] - internal static T DotProduct(Vector<T> left, Vector<T> right) + internal static T Dot(Vector<T> left, Vector<T> right) { if (Vector.IsHardwareAccelerated) { diff --git a/src/System.Private.CoreLib/shared/System/Numerics/Vector.tt b/src/System.Private.CoreLib/shared/System/Numerics/Vector.tt index a3bc25ca09..4b0fc4f6d5 100644 --- a/src/System.Private.CoreLib/shared/System/Numerics/Vector.tt +++ b/src/System.Private.CoreLib/shared/System/Numerics/Vector.tt @@ -94,7 +94,14 @@ namespace System.Numerics } private static readonly Vector<T> s_one = new Vector<T>(GetOneValue()); - internal static Vector<T> AllOnes { get { return s_allOnes; } } + internal static Vector<T> AllOnes + { + [Intrinsic] + get + { + return s_allOnes; + } + } private static readonly Vector<T> s_allOnes = new Vector<T>(GetAllBitsSetValue()); #endregion Static Members @@ -195,6 +202,7 @@ namespace System.Numerics /// Constructs a vector from the given array, starting from the given index. /// The array must contain at least Vector'T.Count from the given index. /// </summary> + [Intrinsic] public unsafe Vector(T[] values, int index) : this() { @@ -620,6 +628,7 @@ namespace System.Numerics /// <param name="left">The first source vector.</param> /// <param name="right">The second source vector.</param> /// <returns>The summed vector.</returns> + [Intrinsic] public static unsafe Vector<T> operator +(Vector<T> left, Vector<T> right) { unchecked @@ -679,6 +688,7 @@ namespace System.Numerics /// <param name="left">The first source vector.</param> /// <param name="right">The second source vector.</param> /// <returns>The difference vector.</returns> + [Intrinsic] public static unsafe Vector<T> operator -(Vector<T> left, Vector<T> right) { unchecked @@ -739,6 +749,7 @@ namespace System.Numerics /// <param name="left">The first source vector.</param> /// <param name="right">The second source vector.</param> /// <returns>The product vector.</returns> + [Intrinsic] public static unsafe Vector<T> operator *(Vector<T> left, Vector<T> right) { unchecked @@ -823,6 +834,7 @@ namespace System.Numerics /// <param name="left">The first source vector.</param> /// <param name="right">The second source vector.</param> /// <returns>The vector resulting from the division.</returns> + [Intrinsic] public static unsafe Vector<T> operator /(Vector<T> left, Vector<T> right) { unchecked @@ -1000,6 +1012,7 @@ namespace System.Numerics /// <param name="left">The first vector to compare.</param> /// <param name="right">The first vector to compare.</param> /// <returns>True if all elements are equal; False otherwise.</returns> + [Intrinsic] [MethodImplAttribute(MethodImplOptions.AggressiveInlining)] public static bool operator ==(Vector<T> left, Vector<T> right) { @@ -1012,6 +1025,7 @@ namespace System.Numerics /// <param name="left">The first vector to compare.</param> /// <param name="right">The second vector to compare.</param> /// <returns>True if left and right are not equal; False otherwise.</returns> + [Intrinsic] [MethodImplAttribute(MethodImplOptions.AggressiveInlining)] public static bool operator !=(Vector<T> left, Vector<T> right) { @@ -1416,7 +1430,7 @@ namespace System.Numerics } [Intrinsic] - internal static T DotProduct(Vector<T> left, Vector<T> right) + internal static T Dot(Vector<T> left, Vector<T> right) { if (Vector.IsHardwareAccelerated) { diff --git a/src/System.Private.CoreLib/shared/System/Numerics/Vector_Operations.cs b/src/System.Private.CoreLib/shared/System/Numerics/Vector_Operations.cs index d3ed2509d8..567a0a78eb 100644 --- a/src/System.Private.CoreLib/shared/System/Numerics/Vector_Operations.cs +++ b/src/System.Private.CoreLib/shared/System/Numerics/Vector_Operations.cs @@ -21,6 +21,7 @@ namespace System.Numerics /// <param name="left">The first source vector.</param> /// <param name="right">The second source vector.</param> /// <returns>The new vector with elements selected based on the mask.</returns> + [Intrinsic] [MethodImplAttribute(MethodImplOptions.AggressiveInlining)] public static Vector<float> ConditionalSelect(Vector<int> condition, Vector<float> left, Vector<float> right) { @@ -34,6 +35,7 @@ namespace System.Numerics /// <param name="left">The first source vector.</param> /// <param name="right">The second source vector.</param> /// <returns>The new vector with elements selected based on the mask.</returns> + [Intrinsic] [MethodImplAttribute(MethodImplOptions.AggressiveInlining)] public static Vector<double> ConditionalSelect(Vector<long> condition, Vector<double> left, Vector<double> right) { @@ -47,6 +49,7 @@ namespace System.Numerics /// <param name="left">The first source vector.</param> /// <param name="right">The second source vector.</param> /// <returns>The new vector with elements selected based on the mask.</returns> + [Intrinsic] [MethodImplAttribute(MethodImplOptions.AggressiveInlining)] public static Vector<T> ConditionalSelect<T>(Vector<T> condition, Vector<T> left, Vector<T> right) where T : struct { @@ -62,6 +65,7 @@ namespace System.Numerics /// <param name="left">The first vector to compare.</param> /// <param name="right">The second vector to compare.</param> /// <returns>The resultant vector.</returns> + [Intrinsic] [MethodImplAttribute(MethodImplOptions.AggressiveInlining)] public static Vector<T> Equals<T>(Vector<T> left, Vector<T> right) where T : struct { @@ -74,6 +78,7 @@ namespace System.Numerics /// <param name="left">The first vector to compare.</param> /// <param name="right">The second vector to compare.</param> /// <returns>The resultant vector.</returns> + [Intrinsic] [MethodImplAttribute(MethodImplOptions.AggressiveInlining)] public static Vector<int> Equals(Vector<float> left, Vector<float> right) { @@ -86,6 +91,7 @@ namespace System.Numerics /// <param name="left">The first vector to compare.</param> /// <param name="right">The second vector to compare.</param> /// <returns>The resultant vector.</returns> + [Intrinsic] [MethodImplAttribute(MethodImplOptions.AggressiveInlining)] public static Vector<int> Equals(Vector<int> left, Vector<int> right) { @@ -98,6 +104,7 @@ namespace System.Numerics /// <param name="left">The first vector to compare.</param> /// <param name="right">The second vector to compare.</param> /// <returns>The resultant vector.</returns> + [Intrinsic] [MethodImplAttribute(MethodImplOptions.AggressiveInlining)] public static Vector<long> Equals(Vector<double> left, Vector<double> right) { @@ -110,6 +117,7 @@ namespace System.Numerics /// <param name="left">The first vector to compare.</param> /// <param name="right">The second vector to compare.</param> /// <returns>The resultant vector.</returns> + [Intrinsic] [MethodImplAttribute(MethodImplOptions.AggressiveInlining)] public static Vector<long> Equals(Vector<long> left, Vector<long> right) { @@ -149,6 +157,7 @@ namespace System.Numerics /// <param name="left">The first vector to compare.</param> /// <param name="right">The second vector to compare.</param> /// <returns>The resultant vector.</returns> + [Intrinsic] [MethodImplAttribute(MethodImplOptions.AggressiveInlining)] public static Vector<T> LessThan<T>(Vector<T> left, Vector<T> right) where T : struct { @@ -162,6 +171,7 @@ namespace System.Numerics /// <param name="left">The first vector to compare.</param> /// <param name="right">The second vector to compare.</param> /// <returns>The resultant integral vector.</returns> + [Intrinsic] [MethodImplAttribute(MethodImplOptions.AggressiveInlining)] public static Vector<int> LessThan(Vector<float> left, Vector<float> right) { @@ -175,6 +185,7 @@ namespace System.Numerics /// <param name="left">The first vector to compare.</param> /// <param name="right">The second vector to compare.</param> /// <returns>The resultant vector.</returns> + [Intrinsic] [MethodImplAttribute(MethodImplOptions.AggressiveInlining)] public static Vector<int> LessThan(Vector<int> left, Vector<int> right) { @@ -188,6 +199,7 @@ namespace System.Numerics /// <param name="left">The first vector to compare.</param> /// <param name="right">The second vector to compare.</param> /// <returns>The resultant integral vector.</returns> + [Intrinsic] [MethodImplAttribute(MethodImplOptions.AggressiveInlining)] public static Vector<long> LessThan(Vector<double> left, Vector<double> right) { @@ -201,6 +213,7 @@ namespace System.Numerics /// <param name="left">The first vector to compare.</param> /// <param name="right">The second vector to compare.</param> /// <returns>The resultant vector.</returns> + [Intrinsic] [MethodImplAttribute(MethodImplOptions.AggressiveInlining)] public static Vector<long> LessThan(Vector<long> left, Vector<long> right) { @@ -242,6 +255,7 @@ namespace System.Numerics /// <param name="left">The first vector to compare.</param> /// <param name="right">The second vector to compare.</param> /// <returns>The resultant vector.</returns> + [Intrinsic] [MethodImplAttribute(MethodImplOptions.AggressiveInlining)] public static Vector<T> LessThanOrEqual<T>(Vector<T> left, Vector<T> right) where T : struct { @@ -255,6 +269,7 @@ namespace System.Numerics /// <param name="left">The first vector to compare.</param> /// <param name="right">The second vector to compare.</param> /// <returns>The resultant integral vector.</returns> + [Intrinsic] [MethodImplAttribute(MethodImplOptions.AggressiveInlining)] public static Vector<int> LessThanOrEqual(Vector<float> left, Vector<float> right) { @@ -268,6 +283,7 @@ namespace System.Numerics /// <param name="left">The first vector to compare.</param> /// <param name="right">The second vector to compare.</param> /// <returns>The resultant vector.</returns> + [Intrinsic] [MethodImplAttribute(MethodImplOptions.AggressiveInlining)] public static Vector<int> LessThanOrEqual(Vector<int> left, Vector<int> right) { @@ -281,6 +297,7 @@ namespace System.Numerics /// <param name="left">The first vector to compare.</param> /// <param name="right">The second vector to compare.</param> /// <returns>The resultant vector.</returns> + [Intrinsic] [MethodImplAttribute(MethodImplOptions.AggressiveInlining)] public static Vector<long> LessThanOrEqual(Vector<long> left, Vector<long> right) { @@ -294,6 +311,7 @@ namespace System.Numerics /// <param name="left">The first vector to compare.</param> /// <param name="right">The second vector to compare.</param> /// <returns>The resultant integral vector.</returns> + [Intrinsic] [MethodImplAttribute(MethodImplOptions.AggressiveInlining)] public static Vector<long> LessThanOrEqual(Vector<double> left, Vector<double> right) { @@ -335,6 +353,7 @@ namespace System.Numerics /// <param name="left">The first vector to compare.</param> /// <param name="right">The second vector to compare.</param> /// <returns>The resultant vector.</returns> + [Intrinsic] [MethodImplAttribute(MethodImplOptions.AggressiveInlining)] public static Vector<T> GreaterThan<T>(Vector<T> left, Vector<T> right) where T : struct { @@ -348,6 +367,7 @@ namespace System.Numerics /// <param name="left">The first vector to compare.</param> /// <param name="right">The second vector to compare.</param> /// <returns>The resultant integral vector.</returns> + [Intrinsic] [MethodImplAttribute(MethodImplOptions.AggressiveInlining)] public static Vector<int> GreaterThan(Vector<float> left, Vector<float> right) { @@ -361,6 +381,7 @@ namespace System.Numerics /// <param name="left">The first vector to compare.</param> /// <param name="right">The second vector to compare.</param> /// <returns>The resultant vector.</returns> + [Intrinsic] [MethodImplAttribute(MethodImplOptions.AggressiveInlining)] public static Vector<int> GreaterThan(Vector<int> left, Vector<int> right) { @@ -374,6 +395,7 @@ namespace System.Numerics /// <param name="left">The first vector to compare.</param> /// <param name="right">The second vector to compare.</param> /// <returns>The resultant integral vector.</returns> + [Intrinsic] [MethodImplAttribute(MethodImplOptions.AggressiveInlining)] public static Vector<long> GreaterThan(Vector<double> left, Vector<double> right) { @@ -387,6 +409,7 @@ namespace System.Numerics /// <param name="left">The first vector to compare.</param> /// <param name="right">The second vector to compare.</param> /// <returns>The resultant vector.</returns> + [Intrinsic] [MethodImplAttribute(MethodImplOptions.AggressiveInlining)] public static Vector<long> GreaterThan(Vector<long> left, Vector<long> right) { @@ -429,6 +452,7 @@ namespace System.Numerics /// <param name="left">The first vector to compare.</param> /// <param name="right">The second vector to compare.</param> /// <returns>The resultant vector.</returns> + [Intrinsic] [MethodImplAttribute(MethodImplOptions.AggressiveInlining)] public static Vector<T> GreaterThanOrEqual<T>(Vector<T> left, Vector<T> right) where T : struct { @@ -442,6 +466,7 @@ namespace System.Numerics /// <param name="left">The first vector to compare.</param> /// <param name="right">The second vector to compare.</param> /// <returns>The resultant integral vector.</returns> + [Intrinsic] [MethodImplAttribute(MethodImplOptions.AggressiveInlining)] public static Vector<int> GreaterThanOrEqual(Vector<float> left, Vector<float> right) { @@ -455,6 +480,7 @@ namespace System.Numerics /// <param name="left">The first vector to compare.</param> /// <param name="right">The second vector to compare.</param> /// <returns>The resultant vector.</returns> + [Intrinsic] [MethodImplAttribute(MethodImplOptions.AggressiveInlining)] public static Vector<int> GreaterThanOrEqual(Vector<int> left, Vector<int> right) { @@ -468,6 +494,7 @@ namespace System.Numerics /// <param name="left">The first vector to compare.</param> /// <param name="right">The second vector to compare.</param> /// <returns>The resultant vector.</returns> + [Intrinsic] [MethodImplAttribute(MethodImplOptions.AggressiveInlining)] public static Vector<long> GreaterThanOrEqual(Vector<long> left, Vector<long> right) { @@ -481,6 +508,7 @@ namespace System.Numerics /// <param name="left">The first vector to compare.</param> /// <param name="right">The second vector to compare.</param> /// <returns>The resultant integral vector.</returns> + [Intrinsic] [MethodImplAttribute(MethodImplOptions.AggressiveInlining)] public static Vector<long> GreaterThanOrEqual(Vector<double> left, Vector<double> right) { @@ -542,6 +570,7 @@ namespace System.Numerics /// </summary> /// <param name="value">The source vector.</param> /// <returns>The absolute value vector.</returns> + [Intrinsic] [MethodImplAttribute(MethodImplOptions.AggressiveInlining)] public static Vector<T> Abs<T>(Vector<T> value) where T : struct { @@ -554,6 +583,7 @@ namespace System.Numerics /// <param name="left">The first source vector.</param> /// <param name="right">The second source vector.</param> /// <returns>The minimum vector.</returns> + [Intrinsic] [MethodImplAttribute(MethodImplOptions.AggressiveInlining)] public static Vector<T> Min<T>(Vector<T> left, Vector<T> right) where T : struct { @@ -566,6 +596,7 @@ namespace System.Numerics /// <param name="left">The first source vector.</param> /// <param name="right">The second source vector.</param> /// <returns>The maximum vector.</returns> + [Intrinsic] [MethodImplAttribute(MethodImplOptions.AggressiveInlining)] public static Vector<T> Max<T>(Vector<T> left, Vector<T> right) where T : struct { @@ -580,10 +611,11 @@ namespace System.Numerics /// <param name="left">The first source vector.</param> /// <param name="right">The second source vector.</param> /// <returns>The dot product.</returns> + [Intrinsic] [MethodImplAttribute(MethodImplOptions.AggressiveInlining)] public static T Dot<T>(Vector<T> left, Vector<T> right) where T : struct { - return Vector<T>.DotProduct(left, right); + return Vector<T>.Dot(left, right); } /// <summary> @@ -591,6 +623,7 @@ namespace System.Numerics /// </summary> /// <param name="value">The source vector.</param> /// <returns>The square root vector.</returns> + [Intrinsic] [MethodImplAttribute(MethodImplOptions.AggressiveInlining)] public static Vector<T> SquareRoot<T>(Vector<T> value) where T : struct { @@ -738,6 +771,7 @@ namespace System.Numerics /// <param name="left">The first source vector.</param> /// <param name="right">The second source vector.</param> /// <returns>The resultant vector.</returns> + [Intrinsic] [MethodImplAttribute(MethodImplOptions.AggressiveInlining)] public static Vector<T> AndNot<T>(Vector<T> left, Vector<T> right) where T : struct { diff --git a/src/jit/compiler.h b/src/jit/compiler.h index 45c222371b..3b727741e4 100644 --- a/src/jit/compiler.h +++ b/src/jit/compiler.h @@ -7896,6 +7896,7 @@ private: CORINFO_CLASS_HANDLE clsHnd, CORINFO_METHOD_HANDLE method, CORINFO_SIG_INFO* sig, + unsigned methodFlags, int memberRef); GenTree* getOp1ForConstructor(OPCODE opcode, GenTree* newobjThis, CORINFO_CLASS_HANDLE clsHnd); diff --git a/src/jit/importer.cpp b/src/jit/importer.cpp index 56012000fb..512521d0e7 100644 --- a/src/jit/importer.cpp +++ b/src/jit/importer.cpp @@ -7838,7 +7838,7 @@ var_types Compiler::impImportCall(OPCODE opcode, #ifdef FEATURE_SIMD if (featureSIMD) { - call = impSIMDIntrinsic(opcode, newobjThis, clsHnd, methHnd, sig, pResolvedToken->token); + call = impSIMDIntrinsic(opcode, newobjThis, clsHnd, methHnd, sig, mflags, pResolvedToken->token); if (call != nullptr) { bIntrinsicImported = true; diff --git a/src/jit/simd.cpp b/src/jit/simd.cpp index ccebc785f1..a302c63e1e 100644 --- a/src/jit/simd.cpp +++ b/src/jit/simd.cpp @@ -2349,11 +2349,14 @@ GenTree* Compiler::impSIMDIntrinsic(OPCODE opcode, CORINFO_CLASS_HANDLE clsHnd, CORINFO_METHOD_HANDLE methodHnd, CORINFO_SIG_INFO* sig, + unsigned methodFlags, int memberRef) { assert(featureSIMD); - if (!isSIMDClass(clsHnd)) + // Exit early if we are either not in one of the SIMD types or if the method + // is not a JIT Intrinsic (which requires the [Intrinsic] attribute). + if (!isSIMDClass(clsHnd) || ((methodFlags & CORINFO_FLG_JIT_INTRINSIC) == 0)) { return nullptr; } @@ -2879,6 +2882,18 @@ GenTree* Compiler::impSIMDIntrinsic(OPCODE opcode, op2 = impSIMDPopStack(simdType); op1 = impSIMDPopStack(simdType, instMethod); +#ifdef _TARGET_XARCH_ + if (simdIntrinsicID == SIMDIntrinsicBitwiseAndNot) + { + // XARCH implements SIMDIntrinsicBitwiseAndNot as ~op1 & op2, while the + // software implementation does op1 & ~op2, so we need to swap the operands + + GenTree* tmp = op2; + op2 = op1; + op1 = tmp; + } +#endif // _TARGET_XARCH_ + simdTree = gtNewSIMDNode(simdType, op1, op2, simdIntrinsicID, baseType, size); retVal = simdTree; } diff --git a/src/jit/simdintrinsiclist.h b/src/jit/simdintrinsiclist.h index 19f0543413..500cac1c65 100644 --- a/src/jit/simdintrinsiclist.h +++ b/src/jit/simdintrinsiclist.h @@ -112,7 +112,7 @@ SIMD_INTRINSIC("GreaterThanOrEqual", false, GreaterThanOrEqual, // Bitwise operations SIMD_INTRINSIC("op_BitwiseAnd", false, BitwiseAnd, "&", TYP_STRUCT, 2, {TYP_STRUCT, TYP_STRUCT, TYP_UNDEF}, {TYP_INT, TYP_FLOAT, TYP_DOUBLE, TYP_LONG, TYP_USHORT, TYP_UBYTE, TYP_BYTE, TYP_SHORT, TYP_UINT, TYP_ULONG}) -SIMD_INTRINSIC("BitwiseAndNot", false, BitwiseAndNot, "&~", TYP_STRUCT, 2, {TYP_STRUCT, TYP_STRUCT, TYP_UNDEF}, {TYP_INT, TYP_FLOAT, TYP_DOUBLE, TYP_LONG, TYP_USHORT, TYP_UBYTE, TYP_BYTE, TYP_SHORT, TYP_UINT, TYP_ULONG}) +SIMD_INTRINSIC("AndNot", false, BitwiseAndNot, "&~", TYP_STRUCT, 2, {TYP_STRUCT, TYP_STRUCT, TYP_UNDEF}, {TYP_INT, TYP_FLOAT, TYP_DOUBLE, TYP_LONG, TYP_USHORT, TYP_UBYTE, TYP_BYTE, TYP_SHORT, TYP_UINT, TYP_ULONG}) SIMD_INTRINSIC("op_BitwiseOr", false, BitwiseOr, "|", TYP_STRUCT, 2, {TYP_STRUCT, TYP_STRUCT, TYP_UNDEF}, {TYP_INT, TYP_FLOAT, TYP_DOUBLE, TYP_LONG, TYP_USHORT, TYP_UBYTE, TYP_BYTE, TYP_SHORT, TYP_UINT, TYP_ULONG}) SIMD_INTRINSIC("op_ExclusiveOr", false, BitwiseXor, "^", TYP_STRUCT, 2, {TYP_STRUCT, TYP_STRUCT, TYP_UNDEF}, {TYP_INT, TYP_FLOAT, TYP_DOUBLE, TYP_LONG, TYP_USHORT, TYP_UBYTE, TYP_BYTE, TYP_SHORT, TYP_UINT, TYP_ULONG}) diff --git a/src/vm/methodtablebuilder.cpp b/src/vm/methodtablebuilder.cpp index 3e30f385aa..c33c2db564 100644 --- a/src/vm/methodtablebuilder.cpp +++ b/src/vm/methodtablebuilder.cpp @@ -5120,7 +5120,7 @@ MethodTableBuilder::InitNewMethodDesc( } // Check for methods marked as [Intrinsic] - if (GetModule()->IsSystem()) + if (GetModule()->IsSystem() || GetAssembly()->IsSIMDVectorAssembly()) { HRESULT hr = GetMDImport()->GetCustomAttributeByName(pMethod->GetMethodSignature().GetToken(), g_CompilerServicesIntrinsicAttribute, |