diff --git a/src/coreclr/jit/fgbasic.cpp b/src/coreclr/jit/fgbasic.cpp index 9895d5c940c046..56d8a1bca6c1f7 100644 --- a/src/coreclr/jit/fgbasic.cpp +++ b/src/coreclr/jit/fgbasic.cpp @@ -1400,10 +1400,6 @@ void Compiler::fgFindJumpTargets(const BYTE* codeAddr, IL_OFFSET codeSize, Fixed case NI_Vector3_Create: case NI_Vector3_CreateBroadcast: case NI_Vector3_CreateFromVector2: - case NI_Vector4_Create: - case NI_Vector4_CreateBroadcast: - case NI_Vector4_CreateFromVector2: - case NI_Vector4_CreateFromVector3: case NI_Vector128_Create: case NI_Vector128_CreateScalar: case NI_Vector128_CreateScalarUnsafe: @@ -1630,82 +1626,6 @@ void Compiler::fgFindJumpTargets(const BYTE* codeAddr, IL_OFFSET codeSize, Fixed break; } -#if defined(FEATURE_HW_INTRINSICS) -#if defined(TARGET_ARM64) - case NI_Vector64_As: - case NI_Vector64_AsByte: - case NI_Vector64_AsDouble: - case NI_Vector64_AsInt16: - case NI_Vector64_AsInt32: - case NI_Vector64_AsInt64: - case NI_Vector64_AsNInt: - case NI_Vector64_AsNUInt: - case NI_Vector64_AsSByte: - case NI_Vector64_AsSingle: - case NI_Vector64_AsUInt16: - case NI_Vector64_AsUInt32: - case NI_Vector64_AsUInt64: - case NI_Vector64_op_UnaryPlus: -#endif // TARGET_XARCH - case NI_Vector128_As: - case NI_Vector128_AsByte: - case NI_Vector128_AsDouble: - case NI_Vector128_AsInt16: - case NI_Vector128_AsInt32: - case NI_Vector128_AsInt64: - case NI_Vector128_AsNInt: - case NI_Vector128_AsNUInt: - case NI_Vector128_AsSByte: - case NI_Vector128_AsSingle: - case NI_Vector128_AsUInt16: - case NI_Vector128_AsUInt32: - case NI_Vector128_AsUInt64: - case NI_Vector128_AsVector4: - case NI_Vector128_op_UnaryPlus: - case NI_VectorT_As: - case NI_VectorT_AsVectorByte: - case NI_VectorT_AsVectorDouble: - case NI_VectorT_AsVectorInt16: - case NI_VectorT_AsVectorInt32: - case NI_VectorT_AsVectorInt64: - case NI_VectorT_AsVectorNInt: - case NI_VectorT_AsVectorNUInt: - case NI_VectorT_AsVectorSByte: - case NI_VectorT_AsVectorSingle: - case NI_VectorT_AsVectorUInt16: - case NI_VectorT_AsVectorUInt32: - case NI_VectorT_AsVectorUInt64: - case NI_VectorT_op_UnaryPlus: -#if defined(TARGET_XARCH) - case NI_Vector256_As: - case NI_Vector256_AsByte: - case NI_Vector256_AsDouble: - case NI_Vector256_AsInt16: - case NI_Vector256_AsInt32: - case NI_Vector256_AsInt64: - case NI_Vector256_AsNInt: - case NI_Vector256_AsNUInt: - case NI_Vector256_AsSByte: - case NI_Vector256_AsSingle: - case NI_Vector256_AsUInt16: - case NI_Vector256_AsUInt32: - case NI_Vector256_AsUInt64: - case NI_Vector256_op_UnaryPlus: - case NI_Vector512_As: - case NI_Vector512_AsByte: - case NI_Vector512_AsDouble: - case NI_Vector512_AsInt16: - case NI_Vector512_AsInt32: - case NI_Vector512_AsInt64: - case NI_Vector512_AsNInt: - case NI_Vector512_AsNUInt: - case NI_Vector512_AsSByte: - case NI_Vector512_AsSingle: - case NI_Vector512_AsUInt16: - case NI_Vector512_AsUInt32: - case NI_Vector512_AsUInt64: -#endif // TARGET_XARCH -#endif // FEATURE_HW_INTRINSICS case NI_SRCS_UNSAFE_As: case NI_SRCS_UNSAFE_AsRef: case NI_SRCS_UNSAFE_BitCast: @@ -1724,27 +1644,16 @@ void Compiler::fgFindJumpTargets(const BYTE* codeAddr, IL_OFFSET codeSize, Fixed #if defined(TARGET_ARM64) case NI_Vector64_get_AllBitsSet: case NI_Vector64_get_One: - case NI_Vector64_get_Zero: #endif // TARGET_ARM64 - case NI_Vector2_get_One: - case NI_Vector2_get_Zero: - case NI_Vector3_get_One: - case NI_Vector3_get_Zero: - case NI_Vector4_get_One: - case NI_Vector4_get_Zero: case NI_Vector128_get_AllBitsSet: case NI_Vector128_get_One: - case NI_Vector128_get_Zero: case NI_VectorT_get_AllBitsSet: case NI_VectorT_get_One: - case NI_VectorT_get_Zero: #if defined(TARGET_XARCH) case NI_Vector256_get_AllBitsSet: case NI_Vector256_get_One: - case NI_Vector256_get_Zero: case NI_Vector512_get_AllBitsSet: case NI_Vector512_get_One: - case NI_Vector512_get_Zero: #endif // TARGET_XARCH #endif // FEATURE_HW_INTRINSICS { diff --git a/src/coreclr/jit/hwintrinsicarm64.cpp b/src/coreclr/jit/hwintrinsicarm64.cpp index 9622d8a73c6d0b..52209a55852cb3 100644 --- a/src/coreclr/jit/hwintrinsicarm64.cpp +++ b/src/coreclr/jit/hwintrinsicarm64.cpp @@ -543,8 +543,6 @@ GenTree* Compiler::impSpecialIntrinsic(NamedIntrinsic intrinsic, break; } - case NI_Vector64_Add: - case NI_Vector128_Add: case NI_Vector64_op_Addition: case NI_Vector128_op_Addition: { @@ -569,34 +567,7 @@ GenTree* Compiler::impSpecialIntrinsic(NamedIntrinsic intrinsic, break; } - case NI_Vector64_As: - case NI_Vector64_AsByte: - case NI_Vector64_AsDouble: - case NI_Vector64_AsInt16: - case NI_Vector64_AsInt32: - case NI_Vector64_AsInt64: - case NI_Vector64_AsNInt: - case NI_Vector64_AsNUInt: - case NI_Vector64_AsSByte: - case NI_Vector64_AsSingle: - case NI_Vector64_AsUInt16: - case NI_Vector64_AsUInt32: - case NI_Vector64_AsUInt64: - case NI_Vector128_As: - case NI_Vector128_AsByte: - case NI_Vector128_AsDouble: - case NI_Vector128_AsInt16: - case NI_Vector128_AsInt32: - case NI_Vector128_AsInt64: - case NI_Vector128_AsNInt: - case NI_Vector128_AsNUInt: - case NI_Vector128_AsSByte: - case NI_Vector128_AsSingle: - case NI_Vector128_AsUInt16: - case NI_Vector128_AsUInt32: - case NI_Vector128_AsUInt64: case NI_Vector128_AsVector: - case NI_Vector128_AsVector4: { assert(!sig->hasThis()); assert(numArgs == 1); @@ -711,8 +682,6 @@ GenTree* Compiler::impSpecialIntrinsic(NamedIntrinsic intrinsic, break; } - case NI_Vector64_BitwiseAnd: - case NI_Vector128_BitwiseAnd: case NI_Vector64_op_BitwiseAnd: case NI_Vector128_op_BitwiseAnd: { @@ -725,8 +694,6 @@ GenTree* Compiler::impSpecialIntrinsic(NamedIntrinsic intrinsic, break; } - case NI_Vector64_BitwiseOr: - case NI_Vector128_BitwiseOr: case NI_Vector64_op_BitwiseOr: case NI_Vector128_op_BitwiseOr: { @@ -1095,8 +1062,6 @@ GenTree* Compiler::impSpecialIntrinsic(NamedIntrinsic intrinsic, break; } - case NI_Vector64_Divide: - case NI_Vector128_Divide: case NI_Vector64_op_Division: case NI_Vector128_op_Division: { @@ -1153,8 +1118,6 @@ GenTree* Compiler::impSpecialIntrinsic(NamedIntrinsic intrinsic, break; } - case NI_Vector64_EqualsAll: - case NI_Vector128_EqualsAll: case NI_Vector64_op_Equality: case NI_Vector128_op_Equality: { @@ -1400,14 +1363,6 @@ GenTree* Compiler::impSpecialIntrinsic(NamedIntrinsic intrinsic, break; } - case NI_Vector64_get_Zero: - case NI_Vector128_get_Zero: - { - assert(sig->numArgs == 0); - retNode = gtNewZeroConNode(retType); - break; - } - case NI_Vector64_GetElement: case NI_Vector128_GetElement: { @@ -1593,8 +1548,6 @@ GenTree* Compiler::impSpecialIntrinsic(NamedIntrinsic intrinsic, case NI_AdvSimd_LoadVector64: case NI_AdvSimd_LoadVector128: - case NI_Vector64_Load: - case NI_Vector128_Load: case NI_Vector64_LoadUnsafe: case NI_Vector128_LoadUnsafe: { @@ -1700,8 +1653,6 @@ GenTree* Compiler::impSpecialIntrinsic(NamedIntrinsic intrinsic, break; } - case NI_Vector64_Multiply: - case NI_Vector128_Multiply: case NI_Vector64_op_Multiply: case NI_Vector128_op_Multiply: { @@ -1765,8 +1716,6 @@ GenTree* Compiler::impSpecialIntrinsic(NamedIntrinsic intrinsic, break; } - case NI_Vector64_Negate: - case NI_Vector128_Negate: case NI_Vector64_op_UnaryNegation: case NI_Vector128_op_UnaryNegation: { @@ -1776,8 +1725,6 @@ GenTree* Compiler::impSpecialIntrinsic(NamedIntrinsic intrinsic, break; } - case NI_Vector64_OnesComplement: - case NI_Vector128_OnesComplement: case NI_Vector64_op_OnesComplement: case NI_Vector128_op_OnesComplement: { @@ -1800,16 +1747,6 @@ GenTree* Compiler::impSpecialIntrinsic(NamedIntrinsic intrinsic, break; } - case NI_Vector64_op_UnaryPlus: - case NI_Vector128_op_UnaryPlus: - { - assert(sig->numArgs == 1); - retNode = impSIMDPopStack(); - break; - } - - case NI_Vector64_Subtract: - case NI_Vector128_Subtract: case NI_Vector64_op_Subtraction: case NI_Vector128_op_Subtraction: { @@ -1822,8 +1759,6 @@ GenTree* Compiler::impSpecialIntrinsic(NamedIntrinsic intrinsic, break; } - case NI_Vector64_ShiftLeft: - case NI_Vector128_ShiftLeft: case NI_Vector64_op_LeftShift: case NI_Vector128_op_LeftShift: { @@ -1836,8 +1771,6 @@ GenTree* Compiler::impSpecialIntrinsic(NamedIntrinsic intrinsic, break; } - case NI_Vector64_ShiftRightArithmetic: - case NI_Vector128_ShiftRightArithmetic: case NI_Vector64_op_RightShift: case NI_Vector128_op_RightShift: { @@ -1851,8 +1784,6 @@ GenTree* Compiler::impSpecialIntrinsic(NamedIntrinsic intrinsic, break; } - case NI_Vector64_ShiftRightLogical: - case NI_Vector128_ShiftRightLogical: case NI_Vector64_op_UnsignedRightShift: case NI_Vector128_op_UnsignedRightShift: { @@ -1936,9 +1867,7 @@ GenTree* Compiler::impSpecialIntrinsic(NamedIntrinsic intrinsic, break; } - case NI_Vector64_Store: case NI_Vector64_StoreUnsafe: - case NI_Vector128_Store: case NI_Vector128_StoreUnsafe: { assert(retType == TYP_VOID); @@ -2276,8 +2205,6 @@ GenTree* Compiler::impSpecialIntrinsic(NamedIntrinsic intrinsic, break; } - case NI_Vector64_Xor: - case NI_Vector128_Xor: case NI_Vector64_op_ExclusiveOr: case NI_Vector128_op_ExclusiveOr: { diff --git a/src/coreclr/jit/hwintrinsiclistarm64.h b/src/coreclr/jit/hwintrinsiclistarm64.h index 69660b362fa9c1..d3c880f38e0fd2 100644 --- a/src/coreclr/jit/hwintrinsiclistarm64.h +++ b/src/coreclr/jit/hwintrinsiclistarm64.h @@ -16,23 +16,7 @@ // *************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************** // Vector64 Intrinsics HARDWARE_INTRINSIC(Vector64, Abs, 8, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) -HARDWARE_INTRINSIC(Vector64, Add, 8, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector64, AndNot, 8, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) -HARDWARE_INTRINSIC(Vector64, As, 8, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) -HARDWARE_INTRINSIC(Vector64, AsByte, 8, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) -HARDWARE_INTRINSIC(Vector64, AsDouble, 8, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) -HARDWARE_INTRINSIC(Vector64, AsInt16, 8, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) -HARDWARE_INTRINSIC(Vector64, AsInt32, 8, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) -HARDWARE_INTRINSIC(Vector64, AsInt64, 8, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) -HARDWARE_INTRINSIC(Vector64, AsNInt, 8, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) -HARDWARE_INTRINSIC(Vector64, AsNUInt, 8, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) -HARDWARE_INTRINSIC(Vector64, AsSByte, 8, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) -HARDWARE_INTRINSIC(Vector64, AsSingle, 8, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) -HARDWARE_INTRINSIC(Vector64, AsUInt16, 8, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) -HARDWARE_INTRINSIC(Vector64, AsUInt32, 8, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) -HARDWARE_INTRINSIC(Vector64, AsUInt64, 8, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) -HARDWARE_INTRINSIC(Vector64, BitwiseAnd, 8, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) -HARDWARE_INTRINSIC(Vector64, BitwiseOr, 8, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector64, Ceiling, 8, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector64, ConditionalSelect, 8, 3, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector64, ConvertToDouble, 8, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) @@ -49,10 +33,8 @@ HARDWARE_INTRINSIC(Vector64, Create, HARDWARE_INTRINSIC(Vector64, CreateScalar, 8, -1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_SpecialImport|HW_Flag_NoCodeGen) HARDWARE_INTRINSIC(Vector64, CreateScalarUnsafe, 8, 1, true, {INS_ins, INS_ins, INS_ins, INS_ins, INS_ins, INS_ins, INS_invalid, INS_invalid, INS_fmov, INS_invalid}, HW_Category_SIMD, HW_Flag_SpecialImport|HW_Flag_SpecialCodeGen|HW_Flag_SupportsContainment) HARDWARE_INTRINSIC(Vector64, CreateSequence, 8, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) -HARDWARE_INTRINSIC(Vector64, Divide, 8, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector64, Dot, 8, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_SpecialImport|HW_Flag_NoCodeGen|HW_Flag_BaseTypeFromFirstArg) HARDWARE_INTRINSIC(Vector64, Equals, 8, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) -HARDWARE_INTRINSIC(Vector64, EqualsAll, 8, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) HARDWARE_INTRINSIC(Vector64, EqualsAny, 8, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) HARDWARE_INTRINSIC(Vector64, ExtractMostSignificantBits, 8, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) HARDWARE_INTRINSIC(Vector64, Floor, 8, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) @@ -60,7 +42,6 @@ HARDWARE_INTRINSIC(Vector64, FusedMultiplyAdd, HARDWARE_INTRINSIC(Vector64, get_AllBitsSet, 8, 0, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector64, get_Indices, 8, 0, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector64, get_One, 8, 0, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) -HARDWARE_INTRINSIC(Vector64, get_Zero, 8, 0, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector64, GetElement, 8, 2, true, {INS_smov, INS_umov, INS_smov, INS_umov, INS_smov, INS_umov, INS_umov, INS_umov, INS_dup, INS_dup}, HW_Category_Helper, HW_Flag_SpecialImport|HW_Flag_SpecialCodeGen|HW_Flag_BaseTypeFromFirstArg) HARDWARE_INTRINSIC(Vector64, GreaterThan, 8, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector64, GreaterThanAll, 8, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) @@ -74,17 +55,13 @@ HARDWARE_INTRINSIC(Vector64, LessThanAny, HARDWARE_INTRINSIC(Vector64, LessThanOrEqual, 8, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector64, LessThanOrEqualAll, 8, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) HARDWARE_INTRINSIC(Vector64, LessThanOrEqualAny, 8, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) -HARDWARE_INTRINSIC(Vector64, Load, 8, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector64, LoadAligned, 8, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector64, LoadAlignedNonTemporal, 8, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector64, LoadUnsafe, 8, -1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector64, Max, 8, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector64, Min, 8, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) -HARDWARE_INTRINSIC(Vector64, Multiply, 8, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector64, MultiplyAddEstimate, 8, 3, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector64, Narrow, 8, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) -HARDWARE_INTRINSIC(Vector64, Negate, 8, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) -HARDWARE_INTRINSIC(Vector64, OnesComplement, 8, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector64, op_Addition, 8, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector64, op_BitwiseAnd, 8, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_Commutative) HARDWARE_INTRINSIC(Vector64, op_BitwiseOr, 8, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_Commutative) @@ -98,18 +75,12 @@ HARDWARE_INTRINSIC(Vector64, op_OnesComplement, HARDWARE_INTRINSIC(Vector64, op_RightShift, 8, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector64, op_Subtraction, 8, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector64, op_UnaryNegation, 8, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) -HARDWARE_INTRINSIC(Vector64, op_UnaryPlus, 8, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector64, op_UnsignedRightShift, 8, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) -HARDWARE_INTRINSIC(Vector64, ShiftLeft, 8, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) -HARDWARE_INTRINSIC(Vector64, ShiftRightArithmetic, 8, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) -HARDWARE_INTRINSIC(Vector64, ShiftRightLogical, 8, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector64, Shuffle, 8, -1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_SpecialImport|HW_Flag_SpecialCodeGen) HARDWARE_INTRINSIC(Vector64, Sqrt, 8, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) -HARDWARE_INTRINSIC(Vector64, Store, 8, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) HARDWARE_INTRINSIC(Vector64, StoreAligned, 8, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) HARDWARE_INTRINSIC(Vector64, StoreAlignedNonTemporal, 8, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) HARDWARE_INTRINSIC(Vector64, StoreUnsafe, 8, -1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) -HARDWARE_INTRINSIC(Vector64, Subtract, 8, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector64, Sum, 8, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) HARDWARE_INTRINSIC(Vector64, ToScalar, 8, 1, true, {INS_smov, INS_umov, INS_smov, INS_umov, INS_smov, INS_umov, INS_umov, INS_umov, INS_dup, INS_dup}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg|HW_Flag_SIMDScalar|HW_Flag_SpecialCodeGen) HARDWARE_INTRINSIC(Vector64, ToVector128, 8, 1, true, {INS_mov, INS_mov, INS_mov, INS_mov, INS_mov, INS_mov, INS_mov, INS_mov, INS_mov, INS_mov}, HW_Category_SIMD, HW_Flag_SpecialCodeGen) @@ -117,7 +88,6 @@ HARDWARE_INTRINSIC(Vector64, ToVector128Unsafe, HARDWARE_INTRINSIC(Vector64, WidenLower, 8, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) HARDWARE_INTRINSIC(Vector64, WidenUpper, 8, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) HARDWARE_INTRINSIC(Vector64, WithElement, 8, 3, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_BaseTypeFromFirstArg|HW_Flag_SpecialImport) -HARDWARE_INTRINSIC(Vector64, Xor, 8, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) // *************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************** // ISA Function name SIMD size NumArg EncodesExtraTypeArg Instructions Category Flags @@ -126,28 +96,11 @@ HARDWARE_INTRINSIC(Vector64, Xor, // Vector128 Intrinsics HARDWARE_INTRINSIC(Vector128, Abs, 16, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) -HARDWARE_INTRINSIC(Vector128, Add, 16, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector128, AndNot, 16, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) -HARDWARE_INTRINSIC(Vector128, As, 16, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) -HARDWARE_INTRINSIC(Vector128, AsByte, 16, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) -HARDWARE_INTRINSIC(Vector128, AsDouble, 16, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) -HARDWARE_INTRINSIC(Vector128, AsInt16, 16, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) -HARDWARE_INTRINSIC(Vector128, AsInt32, 16, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) -HARDWARE_INTRINSIC(Vector128, AsInt64, 16, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) -HARDWARE_INTRINSIC(Vector128, AsNInt, 16, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) -HARDWARE_INTRINSIC(Vector128, AsNUInt, 16, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) -HARDWARE_INTRINSIC(Vector128, AsSByte, 16, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) -HARDWARE_INTRINSIC(Vector128, AsSingle, 16, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) -HARDWARE_INTRINSIC(Vector128, AsUInt16, 16, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) -HARDWARE_INTRINSIC(Vector128, AsUInt32, 16, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) -HARDWARE_INTRINSIC(Vector128, AsUInt64, 16, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) HARDWARE_INTRINSIC(Vector128, AsVector, 16, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) HARDWARE_INTRINSIC(Vector128, AsVector2, 16, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) HARDWARE_INTRINSIC(Vector128, AsVector3, 16, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_mov, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg|HW_Flag_SpecialCodeGen|HW_Flag_SpecialImport) -HARDWARE_INTRINSIC(Vector128, AsVector4, 16, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) HARDWARE_INTRINSIC(Vector128, AsVector128, -1, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) -HARDWARE_INTRINSIC(Vector128, BitwiseAnd, 16, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) -HARDWARE_INTRINSIC(Vector128, BitwiseOr, 16, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector128, Ceiling, 16, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector128, ConditionalSelect, 16, 3, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector128, ConvertToDouble, 16, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) @@ -164,10 +117,8 @@ HARDWARE_INTRINSIC(Vector128, Create, HARDWARE_INTRINSIC(Vector128, CreateScalar, 16, -1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_SpecialImport|HW_Flag_NoCodeGen) HARDWARE_INTRINSIC(Vector128, CreateScalarUnsafe, 16, 1, true, {INS_ins, INS_ins, INS_ins, INS_ins, INS_ins, INS_ins, INS_ins, INS_ins, INS_fmov, INS_fmov}, HW_Category_SIMD, HW_Flag_SpecialImport|HW_Flag_SpecialCodeGen|HW_Flag_SupportsContainment) HARDWARE_INTRINSIC(Vector128, CreateSequence, 16, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) -HARDWARE_INTRINSIC(Vector128, Divide, 16, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector128, Dot, 16, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_SpecialImport|HW_Flag_NoCodeGen|HW_Flag_BaseTypeFromFirstArg) HARDWARE_INTRINSIC(Vector128, Equals, 16, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) -HARDWARE_INTRINSIC(Vector128, EqualsAll, 16, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) HARDWARE_INTRINSIC(Vector128, EqualsAny, 16, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) HARDWARE_INTRINSIC(Vector128, ExtractMostSignificantBits, 16, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) HARDWARE_INTRINSIC(Vector128, Floor, 16, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) @@ -175,7 +126,6 @@ HARDWARE_INTRINSIC(Vector128, FusedMultiplyAdd, HARDWARE_INTRINSIC(Vector128, get_AllBitsSet, 16, 0, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector128, get_Indices, 16, 0, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector128, get_One, 16, 0, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) -HARDWARE_INTRINSIC(Vector128, get_Zero, 16, 0, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector128, GetElement, 16, 2, true, {INS_smov, INS_umov, INS_smov, INS_umov, INS_smov, INS_umov, INS_umov, INS_umov, INS_dup, INS_dup}, HW_Category_Helper, HW_Flag_SpecialImport|HW_Flag_SpecialCodeGen|HW_Flag_BaseTypeFromFirstArg) HARDWARE_INTRINSIC(Vector128, GetLower, 16, 1, true, {INS_mov, INS_mov, INS_mov, INS_mov, INS_mov, INS_mov, INS_mov, INS_mov, INS_mov, INS_mov}, HW_Category_SIMD, HW_Flag_SpecialImport|HW_Flag_SpecialCodeGen) HARDWARE_INTRINSIC(Vector128, GetUpper, 16, 1, true, {INS_ext, INS_ext, INS_ext, INS_ext, INS_ext, INS_ext, INS_ext, INS_ext, INS_ext, INS_ext}, HW_Category_SIMD, HW_Flag_SpecialImport|HW_Flag_SpecialCodeGen) @@ -191,17 +141,13 @@ HARDWARE_INTRINSIC(Vector128, LessThanAny, HARDWARE_INTRINSIC(Vector128, LessThanOrEqual, 16, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector128, LessThanOrEqualAll, 16, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) HARDWARE_INTRINSIC(Vector128, LessThanOrEqualAny, 16, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) -HARDWARE_INTRINSIC(Vector128, Load, 16, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector128, LoadAligned, 16, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector128, LoadAlignedNonTemporal, 16, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector128, LoadUnsafe, 16, -1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector128, Max, 16, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector128, Min, 16, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) -HARDWARE_INTRINSIC(Vector128, Multiply, 16, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector128, MultiplyAddEstimate, 16, 3, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector128, Narrow, 16, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) -HARDWARE_INTRINSIC(Vector128, Negate, 16, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) -HARDWARE_INTRINSIC(Vector128, OnesComplement, 16, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector128, op_Addition, 16, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector128, op_BitwiseAnd, 16, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_Commutative) HARDWARE_INTRINSIC(Vector128, op_BitwiseOr, 16, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_Commutative) @@ -216,17 +162,11 @@ HARDWARE_INTRINSIC(Vector128, op_Multiply, HARDWARE_INTRINSIC(Vector128, op_OnesComplement, 16, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector128, op_Subtraction, 16, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector128, op_UnaryNegation, 16, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) -HARDWARE_INTRINSIC(Vector128, op_UnaryPlus, 16, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) -HARDWARE_INTRINSIC(Vector128, ShiftLeft, 16, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) -HARDWARE_INTRINSIC(Vector128, ShiftRightArithmetic, 16, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) -HARDWARE_INTRINSIC(Vector128, ShiftRightLogical, 16, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector128, Shuffle, 16, -1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_SpecialImport|HW_Flag_SpecialCodeGen) HARDWARE_INTRINSIC(Vector128, Sqrt, 16, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) -HARDWARE_INTRINSIC(Vector128, Store, 16, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) HARDWARE_INTRINSIC(Vector128, StoreAligned, 16, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) HARDWARE_INTRINSIC(Vector128, StoreAlignedNonTemporal, 16, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) HARDWARE_INTRINSIC(Vector128, StoreUnsafe, 16, -1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) -HARDWARE_INTRINSIC(Vector128, Subtract, 16, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector128, Sum, 16, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) HARDWARE_INTRINSIC(Vector128, ToScalar, 16, 1, true, {INS_smov, INS_umov, INS_smov, INS_umov, INS_smov, INS_umov, INS_umov, INS_umov, INS_dup, INS_dup}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg|HW_Flag_SIMDScalar|HW_Flag_SpecialCodeGen) HARDWARE_INTRINSIC(Vector128, WidenLower, 16, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) @@ -234,7 +174,6 @@ HARDWARE_INTRINSIC(Vector128, WidenUpper, HARDWARE_INTRINSIC(Vector128, WithElement, 16, 3, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_BaseTypeFromFirstArg|HW_Flag_SpecialImport) HARDWARE_INTRINSIC(Vector128, WithLower, 16, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_SpecialImport|HW_Flag_NoCodeGen) HARDWARE_INTRINSIC(Vector128, WithUpper, 16, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_SpecialImport|HW_Flag_NoCodeGen) -HARDWARE_INTRINSIC(Vector128, Xor, 16, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) // *************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************** // ISA Function name SIMD size NumArg EncodesExtraTypeArg Instructions Category Flags diff --git a/src/coreclr/jit/hwintrinsiclistxarch.h b/src/coreclr/jit/hwintrinsiclistxarch.h index bf3137ca17c4c5..578e50f76821c7 100644 --- a/src/coreclr/jit/hwintrinsiclistxarch.h +++ b/src/coreclr/jit/hwintrinsiclistxarch.h @@ -30,28 +30,11 @@ // *************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************** // Vector128 Intrinsics HARDWARE_INTRINSIC(Vector128, Abs, 16, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) -HARDWARE_INTRINSIC(Vector128, Add, 16, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector128, AndNot, 16, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) -HARDWARE_INTRINSIC(Vector128, As, 16, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) -HARDWARE_INTRINSIC(Vector128, AsByte, 16, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) -HARDWARE_INTRINSIC(Vector128, AsDouble, 16, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) -HARDWARE_INTRINSIC(Vector128, AsInt16, 16, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) -HARDWARE_INTRINSIC(Vector128, AsInt32, 16, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) -HARDWARE_INTRINSIC(Vector128, AsInt64, 16, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) -HARDWARE_INTRINSIC(Vector128, AsNInt, 16, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) -HARDWARE_INTRINSIC(Vector128, AsNUInt, 16, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) -HARDWARE_INTRINSIC(Vector128, AsSByte, 16, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) -HARDWARE_INTRINSIC(Vector128, AsSingle, 16, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) -HARDWARE_INTRINSIC(Vector128, AsUInt16, 16, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) -HARDWARE_INTRINSIC(Vector128, AsUInt32, 16, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) -HARDWARE_INTRINSIC(Vector128, AsUInt64, 16, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) HARDWARE_INTRINSIC(Vector128, AsVector, 16, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) HARDWARE_INTRINSIC(Vector128, AsVector2, 16, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_movsd_simd, INS_invalid}, HW_Category_SimpleSIMD, HW_Flag_SpecialImport|HW_Flag_BaseTypeFromFirstArg|HW_Flag_SpecialCodeGen) HARDWARE_INTRINSIC(Vector128, AsVector3, 16, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_movups, INS_invalid}, HW_Category_SimpleSIMD, HW_Flag_SpecialImport|HW_Flag_BaseTypeFromFirstArg|HW_Flag_SpecialCodeGen) -HARDWARE_INTRINSIC(Vector128, AsVector4, 16, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) HARDWARE_INTRINSIC(Vector128, AsVector128, -1, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) -HARDWARE_INTRINSIC(Vector128, BitwiseAnd, 16, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) -HARDWARE_INTRINSIC(Vector128, BitwiseOr, 16, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector128, Ceiling, 16, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector128, ConditionalSelect, 16, 3, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_SpecialImport|HW_Flag_NoCodeGen) HARDWARE_INTRINSIC(Vector128, ConvertToDouble, 16, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) @@ -68,10 +51,8 @@ HARDWARE_INTRINSIC(Vector128, Create, HARDWARE_INTRINSIC(Vector128, CreateScalar, 16, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_SpecialImport|HW_Flag_NoCodeGen) HARDWARE_INTRINSIC(Vector128, CreateScalarUnsafe, 16, 1, true, {INS_movd, INS_movd, INS_movd, INS_movd, INS_movd, INS_movd, INS_movd, INS_movd, INS_movss, INS_movsd_simd}, HW_Category_SIMDScalar, HW_Flag_SpecialImport|HW_Flag_SpecialCodeGen|HW_Flag_NoRMWSemantics) HARDWARE_INTRINSIC(Vector128, CreateSequence, 16, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) -HARDWARE_INTRINSIC(Vector128, Divide, 16, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector128, Dot, 16, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_SpecialImport|HW_Flag_NoCodeGen|HW_Flag_BaseTypeFromFirstArg) HARDWARE_INTRINSIC(Vector128, Equals, 16, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) -HARDWARE_INTRINSIC(Vector128, EqualsAll, 16, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) HARDWARE_INTRINSIC(Vector128, EqualsAny, 16, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) HARDWARE_INTRINSIC(Vector128, ExtractMostSignificantBits, 16, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) HARDWARE_INTRINSIC(Vector128, Floor, 16, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) @@ -79,7 +60,6 @@ HARDWARE_INTRINSIC(Vector128, FusedMultiplyAdd, HARDWARE_INTRINSIC(Vector128, get_AllBitsSet, 16, 0, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector128, get_Indices, 16, 0, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector128, get_One, 16, 0, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) -HARDWARE_INTRINSIC(Vector128, get_Zero, 16, 0, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector128, GetElement, 16, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_extractps, INS_invalid}, HW_Category_Helper, HW_Flag_SpecialImport|HW_Flag_SpecialCodeGen|HW_Flag_BaseTypeFromFirstArg) HARDWARE_INTRINSIC(Vector128, GreaterThan, 16, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector128, GreaterThanAll, 16, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) @@ -93,17 +73,13 @@ HARDWARE_INTRINSIC(Vector128, LessThanAny, HARDWARE_INTRINSIC(Vector128, LessThanOrEqual, 16, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector128, LessThanOrEqualAll, 16, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) HARDWARE_INTRINSIC(Vector128, LessThanOrEqualAny, 16, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) -HARDWARE_INTRINSIC(Vector128, Load, 16, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector128, LoadAligned, 16, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector128, LoadAlignedNonTemporal, 16, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector128, LoadUnsafe, 16, -1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector128, Max, 16, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector128, Min, 16, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) -HARDWARE_INTRINSIC(Vector128, Multiply, 16, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector128, MultiplyAddEstimate, 16, 3, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector128, Narrow, 16, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) -HARDWARE_INTRINSIC(Vector128, Negate, 16, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) -HARDWARE_INTRINSIC(Vector128, OnesComplement, 16, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector128, op_Addition, 16, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector128, op_BitwiseAnd, 16, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector128, op_BitwiseOr, 16, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) @@ -117,18 +93,12 @@ HARDWARE_INTRINSIC(Vector128, op_OnesComplement, HARDWARE_INTRINSIC(Vector128, op_RightShift, 16, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector128, op_Subtraction, 16, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector128, op_UnaryNegation, 16, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) -HARDWARE_INTRINSIC(Vector128, op_UnaryPlus, 16, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector128, op_UnsignedRightShift, 16, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) -HARDWARE_INTRINSIC(Vector128, ShiftLeft, 16, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) -HARDWARE_INTRINSIC(Vector128, ShiftRightArithmetic, 16, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) -HARDWARE_INTRINSIC(Vector128, ShiftRightLogical, 16, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector128, Shuffle, 16, -1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_SpecialImport|HW_Flag_SpecialCodeGen) HARDWARE_INTRINSIC(Vector128, Sqrt, 16, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) -HARDWARE_INTRINSIC(Vector128, Store, 16, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) HARDWARE_INTRINSIC(Vector128, StoreAligned, 16, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) HARDWARE_INTRINSIC(Vector128, StoreAlignedNonTemporal, 16, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) HARDWARE_INTRINSIC(Vector128, StoreUnsafe, 16, -1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) -HARDWARE_INTRINSIC(Vector128, Subtract, 16, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector128, Sum, 16, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) HARDWARE_INTRINSIC(Vector128, ToScalar, 16, 1, true, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_movss, INS_movsd_simd}, HW_Category_SIMDScalar, HW_Flag_SpecialImport|HW_Flag_SpecialCodeGen|HW_Flag_BaseTypeFromFirstArg|HW_Flag_NoRMWSemantics) HARDWARE_INTRINSIC(Vector128, ToVector256, 16, 1, true, {INS_movdqu, INS_movdqu, INS_movdqu, INS_movdqu, INS_movdqu, INS_movdqu, INS_movdqu, INS_movdqu, INS_movups, INS_movupd}, HW_Category_SimpleSIMD, HW_Flag_SpecialImport|HW_Flag_SpecialCodeGen|HW_Flag_BaseTypeFromFirstArg|HW_Flag_NoRMWSemantics) @@ -137,7 +107,6 @@ HARDWARE_INTRINSIC(Vector128, ToVector512, HARDWARE_INTRINSIC(Vector128, WidenLower, 16, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) HARDWARE_INTRINSIC(Vector128, WidenUpper, 16, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) HARDWARE_INTRINSIC(Vector128, WithElement, 16, 3, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_SpecialImport|HW_Flag_NoContainment|HW_Flag_BaseTypeFromFirstArg) -HARDWARE_INTRINSIC(Vector128, Xor, 16, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) // *************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************** // ISA Function name SIMD size NumArg EncodesExtraTypeArg Instructions Category Flags @@ -145,25 +114,9 @@ HARDWARE_INTRINSIC(Vector128, Xor, // *************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************** // Vector256 Intrinsics HARDWARE_INTRINSIC(Vector256, Abs, 32, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) -HARDWARE_INTRINSIC(Vector256, Add, 32, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector256, AndNot, 32, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_AvxOnlyCompatible) -HARDWARE_INTRINSIC(Vector256, As, 32, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg|HW_Flag_AvxOnlyCompatible) -HARDWARE_INTRINSIC(Vector256, AsByte, 32, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg|HW_Flag_AvxOnlyCompatible) -HARDWARE_INTRINSIC(Vector256, AsDouble, 32, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg|HW_Flag_AvxOnlyCompatible) -HARDWARE_INTRINSIC(Vector256, AsInt16, 32, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg|HW_Flag_AvxOnlyCompatible) -HARDWARE_INTRINSIC(Vector256, AsInt32, 32, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg|HW_Flag_AvxOnlyCompatible) -HARDWARE_INTRINSIC(Vector256, AsInt64, 32, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg|HW_Flag_AvxOnlyCompatible) -HARDWARE_INTRINSIC(Vector256, AsNInt, 32, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg|HW_Flag_AvxOnlyCompatible) -HARDWARE_INTRINSIC(Vector256, AsNUInt, 32, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg|HW_Flag_AvxOnlyCompatible) -HARDWARE_INTRINSIC(Vector256, AsSByte, 32, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg|HW_Flag_AvxOnlyCompatible) -HARDWARE_INTRINSIC(Vector256, AsSingle, 32, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg|HW_Flag_AvxOnlyCompatible) -HARDWARE_INTRINSIC(Vector256, AsUInt16, 32, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg|HW_Flag_AvxOnlyCompatible) -HARDWARE_INTRINSIC(Vector256, AsUInt32, 32, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg|HW_Flag_AvxOnlyCompatible) -HARDWARE_INTRINSIC(Vector256, AsUInt64, 32, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg|HW_Flag_AvxOnlyCompatible) HARDWARE_INTRINSIC(Vector256, AsVector, 32, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg|HW_Flag_AvxOnlyCompatible) HARDWARE_INTRINSIC(Vector256, AsVector256, 32, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg|HW_Flag_AvxOnlyCompatible) -HARDWARE_INTRINSIC(Vector256, BitwiseAnd, 32, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_AvxOnlyCompatible) -HARDWARE_INTRINSIC(Vector256, BitwiseOr, 32, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_AvxOnlyCompatible) HARDWARE_INTRINSIC(Vector256, Ceiling, 32, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_AvxOnlyCompatible) HARDWARE_INTRINSIC(Vector256, ConditionalSelect, 32, 3, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_SpecialImport|HW_Flag_NoCodeGen|HW_Flag_AvxOnlyCompatible) HARDWARE_INTRINSIC(Vector256, ConvertToDouble, 32, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) @@ -180,10 +133,8 @@ HARDWARE_INTRINSIC(Vector256, Create, HARDWARE_INTRINSIC(Vector256, CreateScalar, 32, -1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_SpecialImport|HW_Flag_NoCodeGen|HW_Flag_AvxOnlyCompatible) HARDWARE_INTRINSIC(Vector256, CreateScalarUnsafe, 32, 1, true, {INS_movd, INS_movd, INS_movd, INS_movd, INS_movd, INS_movd, INS_movd, INS_movd, INS_movss, INS_movsd_simd}, HW_Category_SIMDScalar, HW_Flag_SpecialImport|HW_Flag_SpecialCodeGen|HW_Flag_AvxOnlyCompatible) HARDWARE_INTRINSIC(Vector256, CreateSequence, 32, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_AvxOnlyCompatible) -HARDWARE_INTRINSIC(Vector256, Divide, 32, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector256, Dot, 32, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_SpecialImport|HW_Flag_NoCodeGen|HW_Flag_BaseTypeFromFirstArg) HARDWARE_INTRINSIC(Vector256, Equals, 32, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) -HARDWARE_INTRINSIC(Vector256, EqualsAll, 32, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) HARDWARE_INTRINSIC(Vector256, EqualsAny, 32, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) HARDWARE_INTRINSIC(Vector256, ExtractMostSignificantBits, 32, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) HARDWARE_INTRINSIC(Vector256, Floor, 32, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_AvxOnlyCompatible) @@ -191,7 +142,6 @@ HARDWARE_INTRINSIC(Vector256, FusedMultiplyAdd, HARDWARE_INTRINSIC(Vector256, get_AllBitsSet, 32, 0, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_AvxOnlyCompatible) HARDWARE_INTRINSIC(Vector256, get_Indices, 32, 0, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector256, get_One, 32, 0, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) -HARDWARE_INTRINSIC(Vector256, get_Zero, 32, 0, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_AvxOnlyCompatible) HARDWARE_INTRINSIC(Vector256, GetElement, 32, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_SpecialImport|HW_Flag_BaseTypeFromFirstArg|HW_Flag_AvxOnlyCompatible) HARDWARE_INTRINSIC(Vector256, GetLower, 32, 1, true, {INS_movdqu, INS_movdqu, INS_movdqu, INS_movdqu, INS_movdqu, INS_movdqu, INS_movdqu, INS_movdqu, INS_movups, INS_movupd}, HW_Category_SimpleSIMD, HW_Flag_SpecialImport|HW_Flag_SpecialCodeGen|HW_Flag_AvxOnlyCompatible) HARDWARE_INTRINSIC(Vector256, GetUpper, 32, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_SpecialImport|HW_Flag_NoCodeGen|HW_Flag_AvxOnlyCompatible) @@ -207,17 +157,13 @@ HARDWARE_INTRINSIC(Vector256, LessThanAny, HARDWARE_INTRINSIC(Vector256, LessThanOrEqual, 32, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector256, LessThanOrEqualAny, 32, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) HARDWARE_INTRINSIC(Vector256, LessThanOrEqualAll, 32, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) -HARDWARE_INTRINSIC(Vector256, Load, 32, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_AvxOnlyCompatible) HARDWARE_INTRINSIC(Vector256, LoadAligned, 32, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_AvxOnlyCompatible) HARDWARE_INTRINSIC(Vector256, LoadAlignedNonTemporal, 32, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_AvxOnlyCompatible) HARDWARE_INTRINSIC(Vector256, LoadUnsafe, 32, -1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_AvxOnlyCompatible) HARDWARE_INTRINSIC(Vector256, Max, 32, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector256, Min, 32, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) -HARDWARE_INTRINSIC(Vector256, Multiply, 32, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector256, MultiplyAddEstimate, 32, 3, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector256, Narrow, 32, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) -HARDWARE_INTRINSIC(Vector256, Negate, 32, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) -HARDWARE_INTRINSIC(Vector256, OnesComplement, 32, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_AvxOnlyCompatible) HARDWARE_INTRINSIC(Vector256, op_Addition, 32, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector256, op_BitwiseAnd, 32, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_AvxOnlyCompatible) HARDWARE_INTRINSIC(Vector256, op_BitwiseOr, 32, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_AvxOnlyCompatible) @@ -231,18 +177,12 @@ HARDWARE_INTRINSIC(Vector256, op_OnesComplement, HARDWARE_INTRINSIC(Vector256, op_RightShift, 32, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector256, op_Subtraction, 32, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector256, op_UnaryNegation, 32, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) -HARDWARE_INTRINSIC(Vector256, op_UnaryPlus, 32, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_AvxOnlyCompatible) HARDWARE_INTRINSIC(Vector256, op_UnsignedRightShift, 32, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) -HARDWARE_INTRINSIC(Vector256, ShiftLeft, 32, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) -HARDWARE_INTRINSIC(Vector256, ShiftRightArithmetic, 32, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) -HARDWARE_INTRINSIC(Vector256, ShiftRightLogical, 32, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector256, Shuffle, 32, -1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_SpecialImport|HW_Flag_SpecialCodeGen) HARDWARE_INTRINSIC(Vector256, Sqrt, 32, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_AvxOnlyCompatible) -HARDWARE_INTRINSIC(Vector256, Store, 32, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg|HW_Flag_AvxOnlyCompatible) HARDWARE_INTRINSIC(Vector256, StoreAligned, 32, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg|HW_Flag_AvxOnlyCompatible) HARDWARE_INTRINSIC(Vector256, StoreAlignedNonTemporal, 32, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg|HW_Flag_AvxOnlyCompatible) HARDWARE_INTRINSIC(Vector256, StoreUnsafe, 32, -1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg|HW_Flag_AvxOnlyCompatible) -HARDWARE_INTRINSIC(Vector256, Subtract, 32, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector256, Sum, 32, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) HARDWARE_INTRINSIC(Vector256, ToScalar, 32, 1, true, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_movss, INS_movsd_simd}, HW_Category_SIMDScalar, HW_Flag_SpecialImport|HW_Flag_SpecialCodeGen|HW_Flag_BaseTypeFromFirstArg|HW_Flag_AvxOnlyCompatible) HARDWARE_INTRINSIC(Vector256, ToVector512, 32, 1, true, {INS_movdqu, INS_movdqu, INS_movdqu, INS_movdqu, INS_movdqu, INS_movdqu, INS_vmovdqu64, INS_vmovdqu64, INS_movups, INS_movupd}, HW_Category_SimpleSIMD, HW_Flag_SpecialImport|HW_Flag_SpecialCodeGen|HW_Flag_BaseTypeFromFirstArg) @@ -252,7 +192,6 @@ HARDWARE_INTRINSIC(Vector256, WidenUpper, HARDWARE_INTRINSIC(Vector256, WithElement, 32, 3, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_SpecialImport|HW_Flag_NoContainment|HW_Flag_BaseTypeFromFirstArg|HW_Flag_AvxOnlyCompatible) HARDWARE_INTRINSIC(Vector256, WithLower, 32, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_SpecialImport|HW_Flag_NoCodeGen|HW_Flag_AvxOnlyCompatible) HARDWARE_INTRINSIC(Vector256, WithUpper, 32, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_SpecialImport|HW_Flag_NoCodeGen|HW_Flag_AvxOnlyCompatible) -HARDWARE_INTRINSIC(Vector256, Xor, 32, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_AvxOnlyCompatible) // *************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************** // ISA Function name SIMD size NumArg EncodesExtraTypeArg Instructions Category Flags @@ -260,26 +199,10 @@ HARDWARE_INTRINSIC(Vector256, Xor, // *************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************** // Vector512 Intrinsics HARDWARE_INTRINSIC(Vector512, Abs, 64, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) -HARDWARE_INTRINSIC(Vector512, Add, 64, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector512, AndNot, 64, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) -HARDWARE_INTRINSIC(Vector512, As, 64, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) -HARDWARE_INTRINSIC(Vector512, AsByte, 64, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) -HARDWARE_INTRINSIC(Vector512, AsDouble, 64, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) -HARDWARE_INTRINSIC(Vector512, AsInt16, 64, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) -HARDWARE_INTRINSIC(Vector512, AsInt32, 64, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) -HARDWARE_INTRINSIC(Vector512, AsInt64, 64, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) -HARDWARE_INTRINSIC(Vector512, AsNInt, 64, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) -HARDWARE_INTRINSIC(Vector512, AsNUInt, 64, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) -HARDWARE_INTRINSIC(Vector512, AsSByte, 64, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) -HARDWARE_INTRINSIC(Vector512, AsSingle, 64, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) -HARDWARE_INTRINSIC(Vector512, AsUInt16, 64, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) -HARDWARE_INTRINSIC(Vector512, AsUInt32, 64, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) -HARDWARE_INTRINSIC(Vector512, AsUInt64, 64, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) HARDWARE_INTRINSIC(Vector512, AsVector, 64, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) HARDWARE_INTRINSIC(Vector512, AsVector512, 64, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) -HARDWARE_INTRINSIC(Vector512, BitwiseAnd, 64, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector512, ConditionalSelect, 64, 3, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_SpecialImport|HW_Flag_NoCodeGen) -HARDWARE_INTRINSIC(Vector512, BitwiseOr, 64, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector512, Ceiling, 64, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector512, Create, 64, -1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_SpecialImport|HW_Flag_NoCodeGen) HARDWARE_INTRINSIC(Vector512, CreateScalar, 64, -1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_SpecialImport|HW_Flag_NoCodeGen) @@ -295,9 +218,7 @@ HARDWARE_INTRINSIC(Vector512, ConvertToUInt32, HARDWARE_INTRINSIC(Vector512, ConvertToUInt32Native, 64, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) HARDWARE_INTRINSIC(Vector512, ConvertToUInt64, 64, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) HARDWARE_INTRINSIC(Vector512, ConvertToUInt64Native, 64, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) -HARDWARE_INTRINSIC(Vector512, Divide, 64, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector512, Equals, 64, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) -HARDWARE_INTRINSIC(Vector512, EqualsAll, 64, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) HARDWARE_INTRINSIC(Vector512, EqualsAny, 64, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) HARDWARE_INTRINSIC(Vector512, ExtractMostSignificantBits, 64, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) HARDWARE_INTRINSIC(Vector512, Floor, 64, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) @@ -305,7 +226,6 @@ HARDWARE_INTRINSIC(Vector512, FusedMultiplyAdd, HARDWARE_INTRINSIC(Vector512, get_AllBitsSet, 64, 0, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector512, get_Indices, 64, 0, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector512, get_One, 64, 0, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) -HARDWARE_INTRINSIC(Vector512, get_Zero, 64, 0, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector512, GetElement, 64, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_SpecialImport|HW_Flag_BaseTypeFromFirstArg) HARDWARE_INTRINSIC(Vector512, GetLower, 64, 1, true, {INS_movdqu, INS_movdqu, INS_movdqu, INS_movdqu, INS_movdqu, INS_movdqu, INS_vmovdqu64, INS_vmovdqu64, INS_movups, INS_movupd}, HW_Category_SimpleSIMD, HW_Flag_SpecialImport|HW_Flag_SpecialCodeGen) HARDWARE_INTRINSIC(Vector512, GetLower128, 64, 1, true, {INS_movdqu, INS_movdqu, INS_movdqu, INS_movdqu, INS_movdqu, INS_movdqu, INS_vmovdqu64, INS_vmovdqu64, INS_movups, INS_movupd}, HW_Category_SimpleSIMD, HW_Flag_SpecialImport|HW_Flag_SpecialCodeGen|HW_Flag_BaseTypeFromFirstArg) @@ -322,17 +242,13 @@ HARDWARE_INTRINSIC(Vector512, LessThanAny, HARDWARE_INTRINSIC(Vector512, LessThanOrEqual, 64, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector512, LessThanOrEqualAll, 64, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) HARDWARE_INTRINSIC(Vector512, LessThanOrEqualAny, 64, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) -HARDWARE_INTRINSIC(Vector512, Load, 64, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector512, LoadAligned, 64, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector512, LoadAlignedNonTemporal, 64, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector512, LoadUnsafe, 64, -1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector512, Max, 64, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector512, Min, 64, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) -HARDWARE_INTRINSIC(Vector512, Multiply, 64, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector512, MultiplyAddEstimate, 64, 3, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector512, Narrow, 64, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) -HARDWARE_INTRINSIC(Vector512, Negate, 64, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) -HARDWARE_INTRINSIC(Vector512, OnesComplement, 64, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector512, op_Addition, 64, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector512, op_BitwiseAnd, 64, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector512, op_BitwiseOr, 64, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) @@ -346,18 +262,12 @@ HARDWARE_INTRINSIC(Vector512, op_OnesComplement, HARDWARE_INTRINSIC(Vector512, op_RightShift, 64, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector512, op_Subtraction, 64, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector512, op_UnaryNegation, 64, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) -HARDWARE_INTRINSIC(Vector512, op_UnaryPlus, 64, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector512, op_UnsignedRightShift, 64, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) -HARDWARE_INTRINSIC(Vector512, ShiftLeft, 64, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) -HARDWARE_INTRINSIC(Vector512, ShiftRightArithmetic, 64, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) -HARDWARE_INTRINSIC(Vector512, ShiftRightLogical, 64, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector512, Shuffle, 64, -1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_SpecialImport|HW_Flag_SpecialCodeGen) HARDWARE_INTRINSIC(Vector512, Sqrt, 64, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) -HARDWARE_INTRINSIC(Vector512, Store, 64, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) HARDWARE_INTRINSIC(Vector512, StoreAligned, 64, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) HARDWARE_INTRINSIC(Vector512, StoreAlignedNonTemporal, 64, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) HARDWARE_INTRINSIC(Vector512, StoreUnsafe, 64, -1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) -HARDWARE_INTRINSIC(Vector512, Subtract, 64, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) HARDWARE_INTRINSIC(Vector512, Sum, 64, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) HARDWARE_INTRINSIC(Vector512, ToScalar, 64, 1, true, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_movss, INS_movsd_simd}, HW_Category_SIMDScalar, HW_Flag_SpecialImport|HW_Flag_SpecialCodeGen|HW_Flag_BaseTypeFromFirstArg) HARDWARE_INTRINSIC(Vector512, WidenLower, 64, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId|HW_Flag_BaseTypeFromFirstArg) @@ -365,7 +275,6 @@ HARDWARE_INTRINSIC(Vector512, WidenUpper, HARDWARE_INTRINSIC(Vector512, WithElement, 64, 3, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_SpecialImport|HW_Flag_NoContainment|HW_Flag_BaseTypeFromFirstArg) HARDWARE_INTRINSIC(Vector512, WithLower, 64, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_SpecialImport|HW_Flag_NoCodeGen) HARDWARE_INTRINSIC(Vector512, WithUpper, 64, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_SpecialImport|HW_Flag_NoCodeGen) -HARDWARE_INTRINSIC(Vector512, Xor, 64, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_InvalidNodeId) // *************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************** // ISA Function name SIMD size NumArg EncodesExtraTypeArg Instructions Category Flags diff --git a/src/coreclr/jit/hwintrinsicxarch.cpp b/src/coreclr/jit/hwintrinsicxarch.cpp index 42447b7625ab1e..917c0c9d95641f 100644 --- a/src/coreclr/jit/hwintrinsicxarch.cpp +++ b/src/coreclr/jit/hwintrinsicxarch.cpp @@ -1011,9 +1011,6 @@ GenTree* Compiler::impSpecialIntrinsic(NamedIntrinsic intrinsic, break; } - case NI_Vector128_Add: - case NI_Vector256_Add: - case NI_Vector512_Add: case NI_Vector128_op_Addition: case NI_Vector256_op_Addition: case NI_Vector512_op_Addition: @@ -1047,59 +1044,6 @@ GenTree* Compiler::impSpecialIntrinsic(NamedIntrinsic intrinsic, break; } - case NI_Vector128_As: - case NI_Vector128_AsByte: - case NI_Vector128_AsDouble: - case NI_Vector128_AsInt16: - case NI_Vector128_AsInt32: - case NI_Vector128_AsInt64: - case NI_Vector128_AsNInt: - case NI_Vector128_AsNUInt: - case NI_Vector128_AsSByte: - case NI_Vector128_AsSingle: - case NI_Vector128_AsUInt16: - case NI_Vector128_AsUInt32: - case NI_Vector128_AsUInt64: - case NI_Vector128_AsVector4: - case NI_Vector256_As: - case NI_Vector256_AsByte: - case NI_Vector256_AsDouble: - case NI_Vector256_AsInt16: - case NI_Vector256_AsInt32: - case NI_Vector256_AsInt64: - case NI_Vector256_AsNInt: - case NI_Vector256_AsNUInt: - case NI_Vector256_AsSByte: - case NI_Vector256_AsSingle: - case NI_Vector256_AsUInt16: - case NI_Vector256_AsUInt32: - case NI_Vector256_AsUInt64: - case NI_Vector512_As: - case NI_Vector512_AsByte: - case NI_Vector512_AsDouble: - case NI_Vector512_AsInt16: - case NI_Vector512_AsInt32: - case NI_Vector512_AsInt64: - case NI_Vector512_AsNInt: - case NI_Vector512_AsNUInt: - case NI_Vector512_AsSByte: - case NI_Vector512_AsSingle: - case NI_Vector512_AsUInt16: - case NI_Vector512_AsUInt32: - case NI_Vector512_AsUInt64: - { - // We fold away the cast here, as it only exists to satisfy - // the type system. It is safe to do this here since the retNode type - // and the signature return type are both the same TYP_SIMD. - - assert(sig->numArgs == 1); - - retNode = impSIMDPopStack(); - SetOpLclRelatedToSIMDIntrinsic(retNode); - assert(retNode->gtType == getSIMDTypeForSize(getSIMDTypeSizeInBytes(sig->retTypeSigClass))); - break; - } - case NI_Vector128_AsVector: { assert(sig->numArgs == 1); @@ -1332,9 +1276,6 @@ GenTree* Compiler::impSpecialIntrinsic(NamedIntrinsic intrinsic, break; } - case NI_Vector128_BitwiseAnd: - case NI_Vector256_BitwiseAnd: - case NI_Vector512_BitwiseAnd: case NI_Vector128_op_BitwiseAnd: case NI_Vector256_op_BitwiseAnd: case NI_Vector512_op_BitwiseAnd: @@ -1348,9 +1289,6 @@ GenTree* Compiler::impSpecialIntrinsic(NamedIntrinsic intrinsic, break; } - case NI_Vector128_BitwiseOr: - case NI_Vector256_BitwiseOr: - case NI_Vector512_BitwiseOr: case NI_Vector128_op_BitwiseOr: case NI_Vector256_op_BitwiseOr: case NI_Vector512_op_BitwiseOr: @@ -1904,9 +1842,6 @@ GenTree* Compiler::impSpecialIntrinsic(NamedIntrinsic intrinsic, break; } - case NI_Vector128_Divide: - case NI_Vector256_Divide: - case NI_Vector512_Divide: case NI_Vector128_op_Division: case NI_Vector256_op_Division: case NI_Vector512_op_Division: @@ -1990,9 +1925,6 @@ GenTree* Compiler::impSpecialIntrinsic(NamedIntrinsic intrinsic, break; } - case NI_Vector128_EqualsAll: - case NI_Vector256_EqualsAll: - case NI_Vector512_EqualsAll: case NI_Vector128_op_Equality: case NI_Vector256_op_Equality: case NI_Vector512_op_Equality: @@ -2236,15 +2168,6 @@ GenTree* Compiler::impSpecialIntrinsic(NamedIntrinsic intrinsic, break; } - case NI_Vector128_get_Zero: - case NI_Vector256_get_Zero: - case NI_Vector512_get_Zero: - { - assert(sig->numArgs == 0); - retNode = gtNewZeroConNode(retType); - break; - } - case NI_Vector128_GetElement: case NI_Vector256_GetElement: case NI_Vector512_GetElement: @@ -2515,9 +2438,6 @@ GenTree* Compiler::impSpecialIntrinsic(NamedIntrinsic intrinsic, case NI_AVX_LoadVector256: case NI_AVX512F_LoadVector512: case NI_AVX512BW_LoadVector512: - case NI_Vector128_Load: - case NI_Vector256_Load: - case NI_Vector512_Load: case NI_Vector128_LoadUnsafe: case NI_Vector256_LoadUnsafe: case NI_Vector512_LoadUnsafe: @@ -2620,9 +2540,6 @@ GenTree* Compiler::impSpecialIntrinsic(NamedIntrinsic intrinsic, break; } - case NI_Vector128_Multiply: - case NI_Vector256_Multiply: - case NI_Vector512_Multiply: case NI_Vector128_op_Multiply: case NI_Vector256_op_Multiply: case NI_Vector512_op_Multiply: @@ -2715,9 +2632,6 @@ GenTree* Compiler::impSpecialIntrinsic(NamedIntrinsic intrinsic, break; } - case NI_Vector128_Negate: - case NI_Vector256_Negate: - case NI_Vector512_Negate: case NI_Vector128_op_UnaryNegation: case NI_Vector256_op_UnaryNegation: case NI_Vector512_op_UnaryNegation: @@ -2733,9 +2647,6 @@ GenTree* Compiler::impSpecialIntrinsic(NamedIntrinsic intrinsic, break; } - case NI_Vector128_OnesComplement: - case NI_Vector256_OnesComplement: - case NI_Vector512_OnesComplement: case NI_Vector128_op_OnesComplement: case NI_Vector256_op_OnesComplement: case NI_Vector512_op_OnesComplement: @@ -2781,18 +2692,6 @@ GenTree* Compiler::impSpecialIntrinsic(NamedIntrinsic intrinsic, break; } - case NI_Vector128_op_UnaryPlus: - case NI_Vector256_op_UnaryPlus: - case NI_Vector512_op_UnaryPlus: - { - assert(sig->numArgs == 1); - retNode = impSIMDPopStack(); - break; - } - - case NI_Vector128_Subtract: - case NI_Vector256_Subtract: - case NI_Vector512_Subtract: case NI_Vector128_op_Subtraction: case NI_Vector256_op_Subtraction: case NI_Vector512_op_Subtraction: @@ -2810,9 +2709,6 @@ GenTree* Compiler::impSpecialIntrinsic(NamedIntrinsic intrinsic, break; } - case NI_Vector128_ShiftLeft: - case NI_Vector256_ShiftLeft: - case NI_Vector512_ShiftLeft: case NI_Vector128_op_LeftShift: case NI_Vector256_op_LeftShift: case NI_Vector512_op_LeftShift: @@ -2835,9 +2731,6 @@ GenTree* Compiler::impSpecialIntrinsic(NamedIntrinsic intrinsic, break; } - case NI_Vector128_ShiftRightArithmetic: - case NI_Vector256_ShiftRightArithmetic: - case NI_Vector512_ShiftRightArithmetic: case NI_Vector128_op_RightShift: case NI_Vector256_op_RightShift: case NI_Vector512_op_RightShift: @@ -2871,9 +2764,6 @@ GenTree* Compiler::impSpecialIntrinsic(NamedIntrinsic intrinsic, break; } - case NI_Vector128_ShiftRightLogical: - case NI_Vector256_ShiftRightLogical: - case NI_Vector512_ShiftRightLogical: case NI_Vector128_op_UnsignedRightShift: case NI_Vector256_op_UnsignedRightShift: case NI_Vector512_op_UnsignedRightShift: @@ -2967,9 +2857,6 @@ GenTree* Compiler::impSpecialIntrinsic(NamedIntrinsic intrinsic, break; } - case NI_Vector128_Store: - case NI_Vector256_Store: - case NI_Vector512_Store: case NI_Vector128_StoreUnsafe: case NI_Vector256_StoreUnsafe: case NI_Vector512_StoreUnsafe: @@ -3332,9 +3219,6 @@ GenTree* Compiler::impSpecialIntrinsic(NamedIntrinsic intrinsic, break; } - case NI_Vector128_Xor: - case NI_Vector256_Xor: - case NI_Vector512_Xor: case NI_Vector128_op_ExclusiveOr: case NI_Vector256_op_ExclusiveOr: case NI_Vector512_op_ExclusiveOr: diff --git a/src/coreclr/jit/importercalls.cpp b/src/coreclr/jit/importercalls.cpp index 2c277469a3648a..9da10b439415d9 100644 --- a/src/coreclr/jit/importercalls.cpp +++ b/src/coreclr/jit/importercalls.cpp @@ -3049,15 +3049,15 @@ GenTree* Compiler::impIntrinsic(GenTree* newobjThis, #if defined(TARGET_XARCH) // We can't guarantee that all overloads for the xplat intrinsics can be // handled by the AltJit, so limit only the platform specific intrinsics - assert((NI_Vector512_Xor + 1) == NI_X86Base_BitScanForward); + assert((NI_Vector512_WithUpper + 1) == NI_X86Base_BitScanForward); - if (ni < NI_Vector512_Xor) + if (ni < NI_Vector512_WithUpper) #elif defined(TARGET_ARM64) // We can't guarantee that all overloads for the xplat intrinsics can be // handled by the AltJit, so limit only the platform specific intrinsics - assert((NI_Vector128_Xor + 1) == NI_AdvSimd_Abs); + assert((NI_Vector128_WithUpper + 1) == NI_AdvSimd_Abs); - if (ni < NI_Vector128_Xor) + if (ni < NI_Vector128_WithUpper) #else #error Unsupported platform #endif @@ -3089,6 +3089,13 @@ GenTree* Compiler::impIntrinsic(GenTree* newobjThis, } #endif // FEATURE_HW_INTRINSICS + if ((ni == NI_System_Numerics_Intrinsic) || (ni == NI_System_Runtime_Intrinsics_Intrinsic)) + { + // These are special markers used just to ensure we still get the inlining profitability + // boost. We actually have the implementation in managed, however, to keep the JIT simpler. + return nullptr; + } + if (!isIntrinsic) { // Outside the cases above, there are many intrinsics which apply to only a @@ -10080,6 +10087,12 @@ NamedIntrinsic Compiler::lookupNamedIntrinsic(CORINFO_METHOD_HANDLE method) result = NI_Throw_PlatformNotSupportedException; } + else + { + // Otherwise mark this as a general intrinsic in the namespace + // so we can still get the inlining profitability boost. + result = NI_System_Runtime_Intrinsics_Intrinsic; + } } } } @@ -10304,6 +10317,12 @@ NamedIntrinsic Compiler::lookupNamedIntrinsic(CORINFO_METHOD_HANDLE method) result = NI_Throw_PlatformNotSupportedException; } + else + { + // Otherwise mark this as a general intrinsic in the namespace + // so we can still get the inlining profitability boost. + result = NI_System_Numerics_Intrinsic; + } } } } diff --git a/src/coreclr/jit/lowerxarch.cpp b/src/coreclr/jit/lowerxarch.cpp index 22526033478ca0..2599c7a8b4d84c 100644 --- a/src/coreclr/jit/lowerxarch.cpp +++ b/src/coreclr/jit/lowerxarch.cpp @@ -3551,24 +3551,34 @@ GenTree* Lowering::LowerHWIntrinsicCreate(GenTreeHWIntrinsic* node) } } - if (simdSize == 32) + if (simdSize > 16) { - // We're creating a Vector256 scalar so we need to treat the original op as Vector128, - // we need to unsafely extend up to Vector256 (which is actually safe since the 128-bit - // op will zero extend up to 256-bits), and then we need to replace the original use - // with the new TYP_SIMD32 node. + assert((simdSize == 32) || (simdSize == 64)); + + // We're creating a Vector256/512 scalar so we need to treat the original op as Vector128, + // we need to unsafely extend up to Vector256/512 (which is actually safe since the 128-bit + // op will zero extend up to 256/512-bits), and then we need to replace the original use + // with the new TYP_SIMD32/64 node. node->ChangeType(TYP_SIMD16); node->SetSimdSize(16); LowerNode(node); - tmp2 = comp->gtNewSimdHWIntrinsicNode(TYP_SIMD32, node, NI_Vector128_ToVector256Unsafe, simdBaseJitType, - 16); - LIR::Use use; bool foundUse = BlockRange().TryGetUse(node, &use); + + tmp2 = comp->gtNewSimdHWIntrinsicNode(TYP_SIMD32, node, NI_Vector128_ToVector256Unsafe, simdBaseJitType, + 16); BlockRange().InsertAfter(node, tmp2); + if (simdSize == 64) + { + tmp3 = comp->gtNewSimdHWIntrinsicNode(TYP_SIMD64, tmp2, NI_Vector256_ToVector512Unsafe, + simdBaseJitType, 32); + BlockRange().InsertAfter(tmp2, tmp3); + tmp2 = tmp3; + } + if (foundUse) { use.ReplaceWith(tmp2); diff --git a/src/coreclr/jit/namedintrinsiclist.h b/src/coreclr/jit/namedintrinsiclist.h index de20de7bfbe5bd..f3a7b84a21f68c 100644 --- a/src/coreclr/jit/namedintrinsiclist.h +++ b/src/coreclr/jit/namedintrinsiclist.h @@ -140,6 +140,10 @@ enum NamedIntrinsic : unsigned short NI_System_Threading_Interlocked_MemoryBarrier, NI_System_Threading_Interlocked_ReadMemoryBarrier, + // These two are special marker IDs so that we still get the inlining profitability boost + NI_System_Numerics_Intrinsic, + NI_System_Runtime_Intrinsics_Intrinsic, + #ifdef FEATURE_HW_INTRINSICS NI_HW_INTRINSIC_START, #if defined(TARGET_XARCH) diff --git a/src/coreclr/jit/simdashwintrinsic.cpp b/src/coreclr/jit/simdashwintrinsic.cpp index f2df3915088c88..c7ae69f4ca1e25 100644 --- a/src/coreclr/jit/simdashwintrinsic.cpp +++ b/src/coreclr/jit/simdashwintrinsic.cpp @@ -512,8 +512,6 @@ GenTree* Compiler::impSimdAsHWIntrinsicSpecial(NamedIntrinsic intrinsic, #error Unsupported platform #endif // !TARGET_XARCH && !TARGET_ARM64 - bool isOpExplicit = false; - switch (intrinsic) { case NI_VectorT_ConvertToInt32Native: @@ -546,7 +544,6 @@ GenTree* Compiler::impSimdAsHWIntrinsicSpecial(NamedIntrinsic intrinsic, case NI_Vector2_MultiplyAddEstimate: case NI_Vector3_MultiplyAddEstimate: - case NI_Vector4_MultiplyAddEstimate: case NI_VectorT_MultiplyAddEstimate: { if (BlockNonDeterministicIntrinsics(mustExpand)) @@ -632,36 +629,7 @@ GenTree* Compiler::impSimdAsHWIntrinsicSpecial(NamedIntrinsic intrinsic, break; } - case NI_VectorT_As: - case NI_VectorT_AsVectorByte: - case NI_VectorT_AsVectorDouble: - case NI_VectorT_AsVectorInt16: - case NI_VectorT_AsVectorInt32: - case NI_VectorT_AsVectorInt64: - case NI_VectorT_AsVectorNInt: - case NI_VectorT_AsVectorNUInt: - case NI_VectorT_AsVectorSByte: - case NI_VectorT_AsVectorSingle: - case NI_VectorT_AsVectorUInt16: - case NI_VectorT_AsVectorUInt32: - case NI_VectorT_AsVectorUInt64: - { - unsigned retSimdSize; - CorInfoType retBaseJitType = getBaseJitTypeAndSizeOfSIMDType(sig->retTypeSigClass, &retSimdSize); - - if ((retBaseJitType == CORINFO_TYPE_UNDEF) || - !varTypeIsArithmetic(JitType2PreciseVarType(retBaseJitType)) || (retSimdSize == 0)) - { - // We get here if the return type is an unsupported type - return nullptr; - } - - isOpExplicit = true; - break; - } - #if defined(TARGET_XARCH) - case NI_VectorT_get_Item: case NI_VectorT_GetElement: { op2 = impStackTop(0).val; @@ -726,10 +694,8 @@ GenTree* Compiler::impSimdAsHWIntrinsicSpecial(NamedIntrinsic intrinsic, break; } - case NI_Quaternion_WithElement: case NI_Vector2_WithElement: case NI_Vector3_WithElement: - case NI_Vector4_WithElement: case NI_VectorT_WithElement: { assert(sig->numArgs == 3); @@ -810,10 +776,8 @@ GenTree* Compiler::impSimdAsHWIntrinsicSpecial(NamedIntrinsic intrinsic, break; } - case NI_Quaternion_WithElement: case NI_Vector2_WithElement: case NI_Vector3_WithElement: - case NI_Vector4_WithElement: case NI_VectorT_WithElement: { assert(numArgs == 3); @@ -853,7 +817,6 @@ GenTree* Compiler::impSimdAsHWIntrinsicSpecial(NamedIntrinsic intrinsic, case NI_Vector2_FusedMultiplyAdd: case NI_Vector3_FusedMultiplyAdd: - case NI_Vector4_FusedMultiplyAdd: case NI_VectorT_FusedMultiplyAdd: { bool isFmaAccelerated = false; @@ -872,7 +835,6 @@ GenTree* Compiler::impSimdAsHWIntrinsicSpecial(NamedIntrinsic intrinsic, } #if defined(TARGET_XARCH) - case NI_VectorT_Multiply: case NI_VectorT_op_Multiply: { if (varTypeIsLong(simdBaseType)) @@ -893,7 +855,6 @@ GenTree* Compiler::impSimdAsHWIntrinsicSpecial(NamedIntrinsic intrinsic, #endif // TARGET_XARCH #if defined(TARGET_XARCH) - case NI_VectorT_ShiftRightArithmetic: case NI_VectorT_op_RightShift: { if (varTypeIsLong(simdBaseType) || (simdBaseType == TYP_DOUBLE)) @@ -937,77 +898,11 @@ GenTree* Compiler::impSimdAsHWIntrinsicSpecial(NamedIntrinsic intrinsic, return gtNewSimdGetIndicesNode(retType, simdBaseJitType, simdSize); } - case NI_Vector2_get_One: - case NI_Vector3_get_One: - case NI_Vector4_get_One: case NI_VectorT_get_One: { return gtNewOneConNode(retType, simdBaseType); } - case NI_Vector2_get_UnitX: - case NI_Vector3_get_UnitX: - case NI_Vector4_get_UnitX: - { - GenTreeVecCon* vecCon = gtNewVconNode(retType); - - vecCon->gtSimdVal.f32[0] = 1.0f; - vecCon->gtSimdVal.f32[1] = 0.0f; - vecCon->gtSimdVal.f32[2] = 0.0f; - vecCon->gtSimdVal.f32[3] = 0.0f; - - return vecCon; - } - - case NI_Vector2_get_UnitY: - case NI_Vector3_get_UnitY: - case NI_Vector4_get_UnitY: - { - GenTreeVecCon* vecCon = gtNewVconNode(retType); - - vecCon->gtSimdVal.f32[0] = 0.0f; - vecCon->gtSimdVal.f32[1] = 1.0f; - vecCon->gtSimdVal.f32[2] = 0.0f; - vecCon->gtSimdVal.f32[3] = 0.0f; - - return vecCon; - } - - case NI_Vector3_get_UnitZ: - case NI_Vector4_get_UnitZ: - { - GenTreeVecCon* vecCon = gtNewVconNode(retType); - - vecCon->gtSimdVal.f32[0] = 0.0f; - vecCon->gtSimdVal.f32[1] = 0.0f; - vecCon->gtSimdVal.f32[2] = 1.0f; - vecCon->gtSimdVal.f32[3] = 0.0f; - - return vecCon; - } - - case NI_Quaternion_get_Identity: - case NI_Vector4_get_UnitW: - { - GenTreeVecCon* vecCon = gtNewVconNode(retType); - - vecCon->gtSimdVal.f32[0] = 0.0f; - vecCon->gtSimdVal.f32[1] = 0.0f; - vecCon->gtSimdVal.f32[2] = 0.0f; - vecCon->gtSimdVal.f32[3] = 1.0f; - - return vecCon; - } - - case NI_Quaternion_get_Zero: - case NI_Vector2_get_Zero: - case NI_Vector3_get_Zero: - case NI_Vector4_get_Zero: - case NI_VectorT_get_Zero: - { - return gtNewZeroConNode(retType); - } - default: { // Some platforms warn about unhandled switch cases @@ -1022,20 +917,6 @@ GenTree* Compiler::impSimdAsHWIntrinsicSpecial(NamedIntrinsic intrinsic, { assert(newobjThis == nullptr); - isOpExplicit |= (intrinsic == NI_VectorT_op_Explicit); - - if (isOpExplicit) - { - // We fold away the cast here, as it only exists to satisfy the - // type system. It is safe to do this here since the op1 type - // and the signature return type are both the same TYP_SIMD. - op1 = impSIMDPopStack(); - SetOpLclRelatedToSIMDIntrinsic(op1); - assert(op1->gtType == getSIMDTypeForSize(getSIMDTypeSizeInBytes(sig->retTypeSigClass))); - - return op1; - } - argType = isInstanceMethod ? simdType : JITtype2varType(strip(info.compCompHnd->getArgType(sig, argList, &argClass))); op1 = getArgForHWIntrinsic(argType, argClass, isInstanceMethod); @@ -1044,7 +925,6 @@ GenTree* Compiler::impSimdAsHWIntrinsicSpecial(NamedIntrinsic intrinsic, { case NI_Vector2_Abs: case NI_Vector3_Abs: - case NI_Vector4_Abs: case NI_VectorT_Abs: { return gtNewSimdAbsNode(retType, op1, simdBaseJitType, simdSize); @@ -1055,75 +935,11 @@ GenTree* Compiler::impSimdAsHWIntrinsicSpecial(NamedIntrinsic intrinsic, return gtNewSimdCeilNode(retType, op1, simdBaseJitType, simdSize); } - case NI_Quaternion_Conjugate: - { - GenTreeVecCon* vecCon = gtNewVconNode(retType); - - vecCon->gtSimdVal.f32[0] = -1.0f; - vecCon->gtSimdVal.f32[1] = -1.0f; - vecCon->gtSimdVal.f32[2] = -1.0f; - vecCon->gtSimdVal.f32[3] = +1.0f; - - return gtNewSimdBinOpNode(GT_MUL, retType, op1, vecCon, simdBaseJitType, simdSize); - } - case NI_VectorT_Floor: { return gtNewSimdFloorNode(retType, op1, simdBaseJitType, simdSize); } - case NI_Quaternion_Inverse: - { - GenTree* clonedOp1; - op1 = impCloneExpr(op1, &clonedOp1, CHECK_SPILL_ALL, - nullptr DEBUGARG("Clone op1 for quaternion inverse (1)")); - - GenTree* clonedOp2; - clonedOp1 = impCloneExpr(clonedOp1, &clonedOp2, CHECK_SPILL_ALL, - nullptr DEBUGARG("Clone op1 for quaternion inverse (2)")); - - GenTreeVecCon* vecCon = gtNewVconNode(retType); - - vecCon->gtSimdVal.f32[0] = -1.0f; - vecCon->gtSimdVal.f32[1] = -1.0f; - vecCon->gtSimdVal.f32[2] = -1.0f; - vecCon->gtSimdVal.f32[3] = +1.0f; - - GenTree* conjugate = gtNewSimdBinOpNode(GT_MUL, retType, op1, vecCon, simdBaseJitType, simdSize); - op1 = gtNewSimdDotProdNode(retType, clonedOp1, clonedOp2, simdBaseJitType, simdSize); - - return gtNewSimdBinOpNode(GT_DIV, retType, conjugate, op1, simdBaseJitType, simdSize); - } - - case NI_Quaternion_Length: - case NI_Vector2_Length: - case NI_Vector3_Length: - case NI_Vector4_Length: - { - GenTree* clonedOp1; - op1 = - impCloneExpr(op1, &clonedOp1, CHECK_SPILL_ALL, nullptr DEBUGARG("Clone op1 for vector length")); - - op1 = gtNewSimdDotProdNode(simdType, op1, clonedOp1, simdBaseJitType, simdSize); - op1 = gtNewSimdSqrtNode(simdType, op1, simdBaseJitType, simdSize); - - return gtNewSimdGetElementNode(retType, op1, gtNewIconNode(0), simdBaseJitType, simdSize); - } - - case NI_Quaternion_LengthSquared: - case NI_Vector2_LengthSquared: - case NI_Vector3_LengthSquared: - case NI_Vector4_LengthSquared: - { - GenTree* clonedOp1; - op1 = impCloneExpr(op1, &clonedOp1, CHECK_SPILL_ALL, - nullptr DEBUGARG("Clone op1 for vector length squared")); - - op1 = gtNewSimdDotProdNode(simdType, op1, clonedOp1, simdBaseJitType, simdSize); - return gtNewSimdGetElementNode(retType, op1, gtNewIconNode(0), simdBaseJitType, simdSize); - } - - case NI_VectorT_Load: case NI_VectorT_LoadUnsafe: { if (op1->OperIs(GT_CAST) && op1->gtGetOp1()->TypeIs(TYP_BYREF)) @@ -1157,40 +973,13 @@ GenTree* Compiler::impSimdAsHWIntrinsicSpecial(NamedIntrinsic intrinsic, return gtNewSimdLoadNonTemporalNode(retType, op1, simdBaseJitType, simdSize); } - case NI_Quaternion_Negate: - case NI_Quaternion_op_UnaryNegation: - case NI_Vector2_Negate: case NI_Vector2_op_UnaryNegation: - case NI_Vector3_Negate: case NI_Vector3_op_UnaryNegation: - case NI_Vector4_Negate: - case NI_Vector4_op_UnaryNegation: - case NI_VectorT_Negate: case NI_VectorT_op_UnaryNegation: { return gtNewSimdUnOpNode(GT_NEG, retType, op1, simdBaseJitType, simdSize); } - case NI_Quaternion_Normalize: - case NI_Vector2_Normalize: - case NI_Vector3_Normalize: - case NI_Vector4_Normalize: - { - GenTree* clonedOp1; - op1 = impCloneExpr(op1, &clonedOp1, CHECK_SPILL_ALL, - nullptr DEBUGARG("Clone op1 for vector normalize (1)")); - - GenTree* clonedOp2; - clonedOp1 = impCloneExpr(clonedOp1, &clonedOp2, CHECK_SPILL_ALL, - nullptr DEBUGARG("Clone op1 for vector normalize (2)")); - - op1 = gtNewSimdDotProdNode(retType, op1, clonedOp1, simdBaseJitType, simdSize); - op1 = gtNewSimdSqrtNode(retType, op1, simdBaseJitType, simdSize); - - return gtNewSimdBinOpNode(GT_DIV, retType, clonedOp2, op1, simdBaseJitType, simdSize); - } - - case NI_VectorT_OnesComplement: case NI_VectorT_op_OnesComplement: { return gtNewSimdUnOpNode(GT_NOT, retType, op1, simdBaseJitType, simdSize); @@ -1198,7 +987,6 @@ GenTree* Compiler::impSimdAsHWIntrinsicSpecial(NamedIntrinsic intrinsic, case NI_Vector2_Sqrt: case NI_Vector3_Sqrt: - case NI_Vector4_Sqrt: case NI_VectorT_Sqrt: { return gtNewSimdSqrtNode(retType, op1, simdBaseJitType, simdSize); @@ -1222,11 +1010,6 @@ GenTree* Compiler::impSimdAsHWIntrinsicSpecial(NamedIntrinsic intrinsic, return gtNewSimdToScalarNode(retType, op1, simdBaseJitType, simdSize); } - case NI_VectorT_op_UnaryPlus: - { - return op1; - } - case NI_VectorT_WidenLower: { return gtNewSimdWidenLowerNode(retType, op1, simdBaseJitType, simdSize); @@ -1416,15 +1199,8 @@ GenTree* Compiler::impSimdAsHWIntrinsicSpecial(NamedIntrinsic intrinsic, switch (intrinsic) { - case NI_Quaternion_Add: - case NI_Quaternion_op_Addition: - case NI_Vector2_Add: case NI_Vector2_op_Addition: - case NI_Vector3_Add: case NI_Vector3_op_Addition: - case NI_Vector4_Add: - case NI_Vector4_op_Addition: - case NI_VectorT_Add: case NI_VectorT_op_Addition: { return gtNewSimdBinOpNode(GT_ADD, retType, op1, op2, simdBaseJitType, simdSize); @@ -1435,13 +1211,11 @@ GenTree* Compiler::impSimdAsHWIntrinsicSpecial(NamedIntrinsic intrinsic, return gtNewSimdBinOpNode(GT_AND_NOT, retType, op1, op2, simdBaseJitType, simdSize); } - case NI_VectorT_BitwiseAnd: case NI_VectorT_op_BitwiseAnd: { return gtNewSimdBinOpNode(GT_AND, retType, op1, op2, simdBaseJitType, simdSize); } - case NI_VectorT_BitwiseOr: case NI_VectorT_op_BitwiseOr: { return gtNewSimdBinOpNode(GT_OR, retType, op1, op2, simdBaseJitType, simdSize); @@ -1449,7 +1223,6 @@ GenTree* Compiler::impSimdAsHWIntrinsicSpecial(NamedIntrinsic intrinsic, case NI_Vector2_CreateBroadcast: case NI_Vector3_CreateBroadcast: - case NI_Vector4_CreateBroadcast: case NI_VectorT_CreateBroadcast: { assert(retType == TYP_VOID); @@ -1464,64 +1237,15 @@ GenTree* Compiler::impSimdAsHWIntrinsicSpecial(NamedIntrinsic intrinsic, return gtNewSimdCreateSequenceNode(simdType, op1, op2, simdBaseJitType, simdSize); } - case NI_Plane_CreateFromVector4: - { - assert(retType == TYP_VOID); - - copyBlkDst = op1; - copyBlkSrc = op2; - - break; - } - - case NI_Vector2_Distance: - case NI_Vector3_Distance: - case NI_Vector4_Distance: - { - op1 = gtNewSimdBinOpNode(GT_SUB, simdType, op1, op2, simdBaseJitType, simdSize); - - GenTree* clonedOp1; - op1 = impCloneExpr(op1, &clonedOp1, CHECK_SPILL_ALL, - nullptr DEBUGARG("Clone diff for vector distance")); - - op1 = gtNewSimdDotProdNode(simdType, op1, clonedOp1, simdBaseJitType, simdSize); - op1 = gtNewSimdSqrtNode(simdType, op1, simdBaseJitType, simdSize); - - return gtNewSimdGetElementNode(retType, op1, gtNewIconNode(0), simdBaseJitType, simdSize); - } - - case NI_Vector2_DistanceSquared: - case NI_Vector3_DistanceSquared: - case NI_Vector4_DistanceSquared: - { - op1 = gtNewSimdBinOpNode(GT_SUB, simdType, op1, op2, simdBaseJitType, simdSize); - - GenTree* clonedOp1; - op1 = impCloneExpr(op1, &clonedOp1, CHECK_SPILL_ALL, - nullptr DEBUGARG("Clone diff for vector distance squared")); - - op1 = gtNewSimdDotProdNode(simdType, op1, clonedOp1, simdBaseJitType, simdSize); - return gtNewSimdGetElementNode(retType, op1, gtNewIconNode(0), simdBaseJitType, simdSize); - } - - case NI_Quaternion_Divide: - case NI_Vector2_Divide: case NI_Vector2_op_Division: - case NI_Vector3_Divide: case NI_Vector3_op_Division: - case NI_Vector4_Divide: - case NI_Vector4_op_Division: - case NI_VectorT_Divide: case NI_VectorT_op_Division: { return gtNewSimdBinOpNode(GT_DIV, retType, op1, op2, simdBaseJitType, simdSize); } - case NI_Plane_Dot: - case NI_Quaternion_Dot: case NI_Vector2_Dot: case NI_Vector3_Dot: - case NI_Vector4_Dot: case NI_VectorT_Dot: { op1 = gtNewSimdDotProdNode(simdType, op1, op2, simdBaseJitType, simdSize); @@ -1533,12 +1257,8 @@ GenTree* Compiler::impSimdAsHWIntrinsicSpecial(NamedIntrinsic intrinsic, return gtNewSimdCmpOpNode(GT_EQ, retType, op1, op2, simdBaseJitType, simdSize); } - case NI_Plane_op_Equality: - case NI_Quaternion_op_Equality: case NI_Vector2_op_Equality: case NI_Vector3_op_Equality: - case NI_Vector4_op_Equality: - case NI_VectorT_EqualsAll: case NI_VectorT_op_Equality: { return gtNewSimdCmpOpAllNode(GT_EQ, retType, op1, op2, simdBaseJitType, simdSize); @@ -1549,21 +1269,13 @@ GenTree* Compiler::impSimdAsHWIntrinsicSpecial(NamedIntrinsic intrinsic, return gtNewSimdCmpOpAnyNode(GT_EQ, retType, op1, op2, simdBaseJitType, simdSize); } - case NI_VectorT_Xor: case NI_VectorT_op_ExclusiveOr: { return gtNewSimdBinOpNode(GT_XOR, retType, op1, op2, simdBaseJitType, simdSize); } - case NI_Quaternion_get_Item: - case NI_Quaternion_GetElement: - case NI_Vector2_get_Item: case NI_Vector2_GetElement: - case NI_Vector3_get_Item: case NI_Vector3_GetElement: - case NI_Vector4_get_Item: - case NI_Vector4_GetElement: - case NI_VectorT_get_Item: case NI_VectorT_GetElement: { return gtNewSimdGetElementNode(retType, op1, op2, simdBaseJitType, simdSize); @@ -1599,11 +1311,8 @@ GenTree* Compiler::impSimdAsHWIntrinsicSpecial(NamedIntrinsic intrinsic, return gtNewSimdCmpOpAnyNode(GT_GE, retType, op1, op2, simdBaseJitType, simdSize); } - case NI_Plane_op_Inequality: - case NI_Quaternion_op_Inequality: case NI_Vector2_op_Inequality: case NI_Vector3_op_Inequality: - case NI_Vector4_op_Inequality: case NI_VectorT_op_Inequality: { return gtNewSimdCmpOpAnyNode(GT_NE, retType, op1, op2, simdBaseJitType, simdSize); @@ -1658,7 +1367,6 @@ GenTree* Compiler::impSimdAsHWIntrinsicSpecial(NamedIntrinsic intrinsic, case NI_Vector2_Max: case NI_Vector3_Max: - case NI_Vector4_Max: case NI_VectorT_Max: { return gtNewSimdMaxNode(retType, op1, op2, simdBaseJitType, simdSize); @@ -1666,21 +1374,13 @@ GenTree* Compiler::impSimdAsHWIntrinsicSpecial(NamedIntrinsic intrinsic, case NI_Vector2_Min: case NI_Vector3_Min: - case NI_Vector4_Min: case NI_VectorT_Min: { return gtNewSimdMinNode(retType, op1, op2, simdBaseJitType, simdSize); } - case NI_Quaternion_Multiply: - case NI_Quaternion_op_Multiply: - case NI_Vector2_Multiply: case NI_Vector2_op_Multiply: - case NI_Vector3_Multiply: case NI_Vector3_op_Multiply: - case NI_Vector4_Multiply: - case NI_Vector4_op_Multiply: - case NI_VectorT_Multiply: case NI_VectorT_op_Multiply: { return gtNewSimdBinOpNode(GT_MUL, retType, op1, op2, simdBaseJitType, simdSize); @@ -1691,26 +1391,22 @@ GenTree* Compiler::impSimdAsHWIntrinsicSpecial(NamedIntrinsic intrinsic, return gtNewSimdNarrowNode(retType, op1, op2, simdBaseJitType, simdSize); } - case NI_VectorT_ShiftLeft: case NI_VectorT_op_LeftShift: { return gtNewSimdBinOpNode(GT_LSH, retType, op1, op2, simdBaseJitType, simdSize); } - case NI_VectorT_ShiftRightArithmetic: case NI_VectorT_op_RightShift: { genTreeOps op = varTypeIsUnsigned(simdBaseType) ? GT_RSZ : GT_RSH; return gtNewSimdBinOpNode(op, retType, op1, op2, simdBaseJitType, simdSize); } - case NI_VectorT_ShiftRightLogical: case NI_VectorT_op_UnsignedRightShift: { return gtNewSimdBinOpNode(GT_RSZ, retType, op1, op2, simdBaseJitType, simdSize); } - case NI_VectorT_Store: case NI_VectorT_StoreUnsafe: { assert(retType == TYP_VOID); @@ -1750,15 +1446,8 @@ GenTree* Compiler::impSimdAsHWIntrinsicSpecial(NamedIntrinsic intrinsic, return gtNewSimdStoreNonTemporalNode(op2, op1, simdBaseJitType, simdSize); } - case NI_Quaternion_Subtract: - case NI_Quaternion_op_Subtraction: - case NI_Vector2_Subtract: case NI_Vector2_op_Subtraction: - case NI_Vector3_Subtract: case NI_Vector3_op_Subtraction: - case NI_Vector4_Subtract: - case NI_Vector4_op_Subtraction: - case NI_VectorT_Subtract: case NI_VectorT_op_Subtraction: { return gtNewSimdBinOpNode(GT_SUB, retType, op1, op2, simdBaseJitType, simdSize); @@ -1815,14 +1504,6 @@ GenTree* Compiler::impSimdAsHWIntrinsicSpecial(NamedIntrinsic intrinsic, switch (intrinsic) { - case NI_Vector2_Clamp: - case NI_Vector3_Clamp: - case NI_Vector4_Clamp: - { - GenTree* maxNode = gtNewSimdMaxNode(retType, op1, op2, simdBaseJitType, simdSize); - return gtNewSimdMinNode(retType, maxNode, op3, simdBaseJitType, simdSize); - } - case NI_VectorT_ConditionalSelect: { return gtNewSimdCndSelNode(retType, op1, op2, op3, simdBaseJitType, simdSize); @@ -1830,7 +1511,6 @@ GenTree* Compiler::impSimdAsHWIntrinsicSpecial(NamedIntrinsic intrinsic, case NI_Vector2_FusedMultiplyAdd: case NI_Vector3_FusedMultiplyAdd: - case NI_Vector4_FusedMultiplyAdd: case NI_VectorT_FusedMultiplyAdd: { return gtNewSimdFmaNode(retType, op1, op2, op3, simdBaseJitType, simdSize); @@ -1838,7 +1518,6 @@ GenTree* Compiler::impSimdAsHWIntrinsicSpecial(NamedIntrinsic intrinsic, case NI_Vector2_Lerp: case NI_Vector3_Lerp: - case NI_Vector4_Lerp: { // We generate nodes equivalent to `(op1 * (1.0f - op3)) + (op2 * op3)` // optimizing for xarch by doing a single broadcast and for arm64 by @@ -1879,7 +1558,6 @@ GenTree* Compiler::impSimdAsHWIntrinsicSpecial(NamedIntrinsic intrinsic, case NI_Vector2_MultiplyAddEstimate: case NI_Vector3_MultiplyAddEstimate: - case NI_Vector4_MultiplyAddEstimate: case NI_VectorT_MultiplyAddEstimate: { bool isFmaAccelerated = false; @@ -1963,10 +1641,7 @@ GenTree* Compiler::impSimdAsHWIntrinsicSpecial(NamedIntrinsic intrinsic, break; } - case NI_Plane_CreateFromVector3: - case NI_Quaternion_CreateFromVector3: case NI_Vector3_CreateFromVector2: - case NI_Vector4_CreateFromVector3: { assert(retType == TYP_VOID); assert(simdBaseType == TYP_FLOAT); @@ -2001,10 +1676,8 @@ GenTree* Compiler::impSimdAsHWIntrinsicSpecial(NamedIntrinsic intrinsic, break; } - case NI_Quaternion_WithElement: case NI_Vector2_WithElement: case NI_Vector3_WithElement: - case NI_Vector4_WithElement: case NI_VectorT_WithElement: { return gtNewSimdWithElementNode(retType, op1, op2, op3, simdBaseJitType, simdSize); @@ -2097,133 +1770,6 @@ GenTree* Compiler::impSimdAsHWIntrinsicSpecial(NamedIntrinsic intrinsic, break; } - case NI_Vector4_CreateFromVector2: - { - assert(retType == TYP_VOID); - assert(simdBaseType == TYP_FLOAT); - assert(simdSize == 16); - - // TODO-CQ: We should be able to check for contiguous args here after - // the relevant methods are updated to support more than just float - - if (op2->IsCnsVec() && op3->IsCnsFltOrDbl() && op4->IsCnsFltOrDbl()) - { - GenTreeVecCon* vecCon = op2->AsVecCon(); - vecCon->gtType = simdType; - - vecCon->gtSimdVal.f32[2] = static_cast(op3->AsDblCon()->DconValue()); - vecCon->gtSimdVal.f32[3] = static_cast(op4->AsDblCon()->DconValue()); - - copyBlkSrc = vecCon; - } - else - { - GenTree* idx = gtNewIconNode(2, TYP_INT); - op2 = gtNewSimdWithElementNode(simdType, op2, idx, op3, simdBaseJitType, simdSize); - - idx = gtNewIconNode(3, TYP_INT); - copyBlkSrc = gtNewSimdWithElementNode(simdType, op2, idx, op4, simdBaseJitType, simdSize); - } - - copyBlkDst = op1; - break; - } - - default: - { - // Some platforms warn about unhandled switch cases - // We handle it more generally via the assert and nullptr return below. - break; - } - } - break; - } - - case 5: - { - assert(isInstanceMethod); - assert(SimdAsHWIntrinsicInfo::SpillSideEffectsOp1(intrinsic)); - assert(!SimdAsHWIntrinsicInfo::SpillSideEffectsOp2(intrinsic)); - - if (newobjThis == nullptr) - { - impSpillSideEffect(true, verCurrentState.esStackDepth - - 5 DEBUGARG("Spilling op1 side effects for SimdAsHWIntrinsic")); - } - - CORINFO_ARG_LIST_HANDLE arg2 = argList; - CORINFO_ARG_LIST_HANDLE arg3 = info.compCompHnd->getArgNext(arg2); - CORINFO_ARG_LIST_HANDLE arg4 = info.compCompHnd->getArgNext(arg3); - CORINFO_ARG_LIST_HANDLE arg5 = info.compCompHnd->getArgNext(arg4); - - argType = JITtype2varType(strip(info.compCompHnd->getArgType(sig, arg5, &argClass))); - op5 = getArgForHWIntrinsic(argType, argClass); - - argType = JITtype2varType(strip(info.compCompHnd->getArgType(sig, arg4, &argClass))); - op4 = getArgForHWIntrinsic(argType, argClass); - - argType = JITtype2varType(strip(info.compCompHnd->getArgType(sig, arg3, &argClass))); - op3 = getArgForHWIntrinsic(argType, argClass); - - argType = JITtype2varType(strip(info.compCompHnd->getArgType(sig, arg2, &argClass))); - op2 = getArgForHWIntrinsic(argType, argClass); - - if ((newobjThis == nullptr) && (retType == TYP_VOID)) - { - op1 = getArgForHWIntrinsic(TYP_BYREF, argClass, isInstanceMethod, newobjThis); - } - else - { - op1 = getArgForHWIntrinsic(simdType, (newobjThis != nullptr) ? clsHnd : argClass, isInstanceMethod, - newobjThis); - } - - switch (intrinsic) - { - case NI_Plane_Create: - case NI_Quaternion_Create: - case NI_Vector4_Create: - { - assert(retType == TYP_VOID); - assert(simdBaseType == TYP_FLOAT); - assert(simdSize == 16); - - if (op2->IsCnsFltOrDbl() && op3->IsCnsFltOrDbl() && op4->IsCnsFltOrDbl() && op5->IsCnsFltOrDbl()) - { - GenTreeVecCon* vecCon = gtNewVconNode(TYP_SIMD16); - - float cnsVal = 0; - - vecCon->gtSimdVal.f32[0] = static_cast(op2->AsDblCon()->DconValue()); - vecCon->gtSimdVal.f32[1] = static_cast(op3->AsDblCon()->DconValue()); - vecCon->gtSimdVal.f32[2] = static_cast(op4->AsDblCon()->DconValue()); - vecCon->gtSimdVal.f32[3] = static_cast(op5->AsDblCon()->DconValue()); - - copyBlkSrc = vecCon; - } - else if (areArgumentsContiguous(op2, op3) && areArgumentsContiguous(op3, op4) && - areArgumentsContiguous(op4, op5)) - { - GenTree* op2Address = CreateAddressNodeForSimdHWIntrinsicCreate(op2, simdBaseType, 16); - copyBlkSrc = gtNewIndir(TYP_SIMD16, op2Address); - } - else - { - IntrinsicNodeBuilder nodeBuilder(getAllocator(CMK_ASTNode), 4); - - nodeBuilder.AddOperand(0, op2); - nodeBuilder.AddOperand(1, op3); - nodeBuilder.AddOperand(2, op4); - nodeBuilder.AddOperand(3, op5); - - copyBlkSrc = gtNewSimdHWIntrinsicNode(TYP_SIMD16, std::move(nodeBuilder), NI_Vector128_Create, - simdBaseJitType, 16); - } - - copyBlkDst = op1; - break; - } - default: { // Some platforms warn about unhandled switch cases diff --git a/src/coreclr/jit/simdashwintrinsiclistarm64.h b/src/coreclr/jit/simdashwintrinsiclistarm64.h index e6f3cc0d6db46d..3f73df38f13dd2 100644 --- a/src/coreclr/jit/simdashwintrinsiclistarm64.h +++ b/src/coreclr/jit/simdashwintrinsiclistarm64.h @@ -32,78 +32,21 @@ * Each intrinsic has one or more flags with type of `enum SimdAsHWIntrinsicFlag` */ -// ************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************* -// ISA ID Name NumArg Instructions Flags -// {TYP_BYTE, TYP_UBYTE, TYP_SHORT, TYP_USHORT, TYP_INT, TYP_UINT, TYP_LONG, TYP_ULONG, TYP_FLOAT, TYP_DOUBLE} -// ************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************* -// Plane Intrinsics -SIMD_AS_HWINTRINSIC_NM(Plane, Create, ".ctor", 5, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Plane_Create, NI_Illegal}, SimdAsHWIntrinsicFlag::InstanceMethod | SimdAsHWIntrinsicFlag::SpillSideEffectsOp1) -SIMD_AS_HWINTRINSIC_NM(Plane, CreateFromVector3, ".ctor", 3, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Plane_CreateFromVector3, NI_Illegal}, SimdAsHWIntrinsicFlag::InstanceMethod | SimdAsHWIntrinsicFlag::SpillSideEffectsOp1 | SimdAsHWIntrinsicFlag::BaseTypeFromThisArg) -SIMD_AS_HWINTRINSIC_NM(Plane, CreateFromVector4, ".ctor", 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Plane_CreateFromVector4, NI_Illegal}, SimdAsHWIntrinsicFlag::InstanceMethod | SimdAsHWIntrinsicFlag::SpillSideEffectsOp1 | SimdAsHWIntrinsicFlag::BaseTypeFromThisArg) -SIMD_AS_HWINTRINSIC_ID(Plane, Dot, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Plane_Dot, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Plane, op_Equality, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Plane_op_Equality, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Plane, op_Inequality, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Plane_op_Inequality, NI_Illegal}, SimdAsHWIntrinsicFlag::None) - -// ************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************* -// ISA ID Name NumArg Instructions Flags -// {TYP_BYTE, TYP_UBYTE, TYP_SHORT, TYP_USHORT, TYP_INT, TYP_UINT, TYP_LONG, TYP_ULONG, TYP_FLOAT, TYP_DOUBLE} -// ************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************* -// Quaternion Intrinsics -SIMD_AS_HWINTRINSIC_ID(Quaternion, Add, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Quaternion_Add, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Quaternion, Conjugate, 1, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Quaternion_Conjugate, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_NM(Quaternion, Create, ".ctor", 5, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Quaternion_Create, NI_Illegal}, SimdAsHWIntrinsicFlag::InstanceMethod | SimdAsHWIntrinsicFlag::SpillSideEffectsOp1) -SIMD_AS_HWINTRINSIC_NM(Quaternion, CreateFromVector3, ".ctor", 3, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Quaternion_CreateFromVector3, NI_Illegal}, SimdAsHWIntrinsicFlag::InstanceMethod | SimdAsHWIntrinsicFlag::SpillSideEffectsOp1 | SimdAsHWIntrinsicFlag::BaseTypeFromThisArg) -SIMD_AS_HWINTRINSIC_ID(Quaternion, Divide, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Quaternion_Divide, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Quaternion, Dot, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Quaternion_Dot, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Quaternion, get_Identity, 0, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Quaternion_get_Identity, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Quaternion, get_Item, 0, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Quaternion_get_Item, NI_Illegal}, SimdAsHWIntrinsicFlag::InstanceMethod | SimdAsHWIntrinsicFlag::BaseTypeFromThisArg) -SIMD_AS_HWINTRINSIC_ID(Quaternion, get_Zero, 0, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Quaternion_get_Zero, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Quaternion, GetElement, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Quaternion_GetElement, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Quaternion, Inverse, 1, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Quaternion_Inverse, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Quaternion, Length, 1, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Quaternion_Length, NI_Illegal}, SimdAsHWIntrinsicFlag::InstanceMethod) -SIMD_AS_HWINTRINSIC_ID(Quaternion, LengthSquared, 1, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Quaternion_LengthSquared, NI_Illegal}, SimdAsHWIntrinsicFlag::InstanceMethod) -SIMD_AS_HWINTRINSIC_ID(Quaternion, Multiply, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Quaternion_Multiply, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Quaternion, Negate, 1, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Quaternion_Negate, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Quaternion, Normalize, 1, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Quaternion_Normalize, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Quaternion, op_Addition, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Quaternion_op_Addition, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Quaternion, op_Equality, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Quaternion_op_Equality, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Quaternion, op_Inequality, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Quaternion_op_Inequality, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Quaternion, op_Multiply, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Quaternion_op_Multiply, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Quaternion, op_Subtraction, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Quaternion_op_Subtraction, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Quaternion, op_UnaryNegation, 1, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Quaternion_op_UnaryNegation, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Quaternion, Subtract, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Quaternion_Subtract, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Quaternion, WithElement, 3, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Quaternion_WithElement, NI_Illegal}, SimdAsHWIntrinsicFlag::None) - // ************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************* // ISA ID Name NumArg Instructions Flags // {TYP_BYTE, TYP_UBYTE, TYP_SHORT, TYP_USHORT, TYP_INT, TYP_UINT, TYP_LONG, TYP_ULONG, TYP_FLOAT, TYP_DOUBLE} // ************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************* // Vector2 Intrinsics SIMD_AS_HWINTRINSIC_ID(Vector2, Abs, 1, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector2_Abs, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector2, Add, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector2_Add, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector2, Clamp, 3, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector2_Clamp, NI_Illegal}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_NM(Vector2, Create, ".ctor", 3, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector2_Create, NI_Illegal}, SimdAsHWIntrinsicFlag::InstanceMethod | SimdAsHWIntrinsicFlag::SpillSideEffectsOp1) SIMD_AS_HWINTRINSIC_NM(Vector2, CreateBroadcast, ".ctor", 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector2_CreateBroadcast, NI_Illegal}, SimdAsHWIntrinsicFlag::InstanceMethod | SimdAsHWIntrinsicFlag::SpillSideEffectsOp1) -SIMD_AS_HWINTRINSIC_ID(Vector2, Distance, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector2_Distance, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector2, DistanceSquared, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector2_DistanceSquared, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector2, Divide, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector2_Divide, NI_Illegal}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(Vector2, Dot, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector2_Dot, NI_Illegal}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(Vector2, FusedMultiplyAdd, 3, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector2_FusedMultiplyAdd, NI_Illegal}, SimdAsHWIntrinsicFlag::SpillSideEffectsOp1 | SimdAsHWIntrinsicFlag::SpillSideEffectsOp2) -SIMD_AS_HWINTRINSIC_ID(Vector2, get_Item, 0, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector2_get_Item, NI_Illegal}, SimdAsHWIntrinsicFlag::InstanceMethod | SimdAsHWIntrinsicFlag::BaseTypeFromThisArg) -SIMD_AS_HWINTRINSIC_ID(Vector2, get_One, 0, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector2_get_One, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector2, get_UnitX, 0, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector2_get_UnitX, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector2, get_UnitY, 0, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector2_get_UnitY, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector2, get_Zero, 0, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector2_get_Zero, NI_Illegal}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(Vector2, GetElement, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector2_GetElement, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector2, Length, 1, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector2_Length, NI_Illegal}, SimdAsHWIntrinsicFlag::InstanceMethod) -SIMD_AS_HWINTRINSIC_ID(Vector2, LengthSquared, 1, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector2_LengthSquared, NI_Illegal}, SimdAsHWIntrinsicFlag::InstanceMethod) SIMD_AS_HWINTRINSIC_ID(Vector2, Lerp, 3, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector2_Lerp, NI_Illegal}, SimdAsHWIntrinsicFlag::SpillSideEffectsOp1 | SimdAsHWIntrinsicFlag::SpillSideEffectsOp2) SIMD_AS_HWINTRINSIC_ID(Vector2, Max, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector2_Max, NI_Illegal}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(Vector2, Min, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector2_Min, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector2, Multiply, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector2_Multiply, NI_Illegal}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(Vector2, MultiplyAddEstimate, 3, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector2_MultiplyAddEstimate, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector2, Negate, 1, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector2_Negate, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector2, Normalize, 1, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector2_Normalize, NI_Illegal}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(Vector2, op_Addition, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector2_op_Addition, NI_Illegal}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(Vector2, op_Division, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector2_op_Division, NI_Illegal}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(Vector2, op_Equality, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector2_op_Equality, NI_Illegal}, SimdAsHWIntrinsicFlag::None) @@ -112,7 +55,6 @@ SIMD_AS_HWINTRINSIC_ID(Vector2, op_Multiply, SIMD_AS_HWINTRINSIC_ID(Vector2, op_Subtraction, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector2_op_Subtraction, NI_Illegal}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(Vector2, op_UnaryNegation, 1, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector2_op_UnaryNegation, NI_Illegal}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_NM(Vector2, Sqrt, "SquareRoot", 1, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector2_Sqrt, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector2, Subtract, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector2_Subtract, NI_Illegal}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(Vector2, WithElement, 3, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector2_WithElement, NI_Illegal}, SimdAsHWIntrinsicFlag::None) // ************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************* @@ -121,32 +63,16 @@ SIMD_AS_HWINTRINSIC_ID(Vector2, WithElement, // ************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************* // Vector3 Intrinsics SIMD_AS_HWINTRINSIC_ID(Vector3, Abs, 1, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector3_Abs, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector3, Add, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector3_Add, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector3, Clamp, 3, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector3_Clamp, NI_Illegal}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_NM(Vector3, Create, ".ctor", 4, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector3_Create, NI_Illegal}, SimdAsHWIntrinsicFlag::InstanceMethod | SimdAsHWIntrinsicFlag::SpillSideEffectsOp1) SIMD_AS_HWINTRINSIC_NM(Vector3, CreateBroadcast, ".ctor", 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector3_CreateBroadcast, NI_Illegal}, SimdAsHWIntrinsicFlag::InstanceMethod | SimdAsHWIntrinsicFlag::SpillSideEffectsOp1) SIMD_AS_HWINTRINSIC_NM(Vector3, CreateFromVector2, ".ctor", 3, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector3_CreateFromVector2, NI_Illegal}, SimdAsHWIntrinsicFlag::InstanceMethod | SimdAsHWIntrinsicFlag::SpillSideEffectsOp1 | SimdAsHWIntrinsicFlag::BaseTypeFromThisArg) -SIMD_AS_HWINTRINSIC_ID(Vector3, Distance, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector3_Distance, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector3, DistanceSquared, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector3_DistanceSquared, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector3, Divide, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector3_Divide, NI_Illegal}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(Vector3, Dot, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector3_Dot, NI_Illegal}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(Vector3, FusedMultiplyAdd, 3, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector3_FusedMultiplyAdd, NI_Illegal}, SimdAsHWIntrinsicFlag::SpillSideEffectsOp1 | SimdAsHWIntrinsicFlag::SpillSideEffectsOp2) -SIMD_AS_HWINTRINSIC_ID(Vector3, get_Item, 0, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector3_get_Item, NI_Illegal}, SimdAsHWIntrinsicFlag::InstanceMethod | SimdAsHWIntrinsicFlag::BaseTypeFromThisArg) -SIMD_AS_HWINTRINSIC_ID(Vector3, get_One, 0, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector3_get_One, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector3, get_UnitX, 0, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector3_get_UnitX, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector3, get_UnitY, 0, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector3_get_UnitY, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector3, get_UnitZ, 0, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector3_get_UnitZ, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector3, get_Zero, 0, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector3_get_Zero, NI_Illegal}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(Vector3, GetElement, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector3_GetElement, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector3, Length, 1, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector3_Length, NI_Illegal}, SimdAsHWIntrinsicFlag::InstanceMethod) -SIMD_AS_HWINTRINSIC_ID(Vector3, LengthSquared, 1, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector3_LengthSquared, NI_Illegal}, SimdAsHWIntrinsicFlag::InstanceMethod) SIMD_AS_HWINTRINSIC_ID(Vector3, Lerp, 3, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector3_Lerp, NI_Illegal}, SimdAsHWIntrinsicFlag::SpillSideEffectsOp1 | SimdAsHWIntrinsicFlag::SpillSideEffectsOp2) SIMD_AS_HWINTRINSIC_ID(Vector3, Max, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector3_Max, NI_Illegal}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(Vector3, Min, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector3_Min, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector3, Multiply, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector3_Multiply, NI_Illegal}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(Vector3, MultiplyAddEstimate, 3, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector3_MultiplyAddEstimate, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector3, Negate, 1, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector3_Negate, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector3, Normalize, 1, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector3_Normalize, NI_Illegal}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(Vector3, op_Addition, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector3_op_Addition, NI_Illegal}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(Vector3, op_Division, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector3_op_Division, NI_Illegal}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(Vector3, op_Equality, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector3_op_Equality, NI_Illegal}, SimdAsHWIntrinsicFlag::None) @@ -155,77 +81,15 @@ SIMD_AS_HWINTRINSIC_ID(Vector3, op_Multiply, SIMD_AS_HWINTRINSIC_ID(Vector3, op_Subtraction, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector3_op_Subtraction, NI_Illegal}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(Vector3, op_UnaryNegation, 1, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector3_op_UnaryNegation, NI_Illegal}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_NM(Vector3, Sqrt, "SquareRoot", 1, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector3_Sqrt, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector3, Subtract, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector3_Subtract, NI_Illegal}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(Vector3, WithElement, 3, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector3_WithElement, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -// ************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************* -// ISA ID Name NumArg Instructions Flags -// {TYP_BYTE, TYP_UBYTE, TYP_SHORT, TYP_USHORT, TYP_INT, TYP_UINT, TYP_LONG, TYP_ULONG, TYP_FLOAT, TYP_DOUBLE} -// ************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************* -// Vector4 Intrinsics -SIMD_AS_HWINTRINSIC_ID(Vector4, Abs, 1, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector4_Abs, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector4, Add, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector4_Add, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector4, Clamp, 3, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector4_Clamp, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_NM(Vector4, Create, ".ctor", 5, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector4_Create, NI_Illegal}, SimdAsHWIntrinsicFlag::InstanceMethod | SimdAsHWIntrinsicFlag::SpillSideEffectsOp1) -SIMD_AS_HWINTRINSIC_NM(Vector4, CreateBroadcast, ".ctor", 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector4_CreateBroadcast, NI_Illegal}, SimdAsHWIntrinsicFlag::InstanceMethod | SimdAsHWIntrinsicFlag::SpillSideEffectsOp1) -SIMD_AS_HWINTRINSIC_NM(Vector4, CreateFromVector2, ".ctor", 4, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector4_CreateFromVector2, NI_Illegal}, SimdAsHWIntrinsicFlag::InstanceMethod | SimdAsHWIntrinsicFlag::SpillSideEffectsOp1 | SimdAsHWIntrinsicFlag::BaseTypeFromThisArg) -SIMD_AS_HWINTRINSIC_NM(Vector4, CreateFromVector3, ".ctor", 3, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector4_CreateFromVector3, NI_Illegal}, SimdAsHWIntrinsicFlag::InstanceMethod | SimdAsHWIntrinsicFlag::SpillSideEffectsOp1 | SimdAsHWIntrinsicFlag::BaseTypeFromThisArg) -SIMD_AS_HWINTRINSIC_ID(Vector4, Distance, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector4_Distance, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector4, DistanceSquared, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector4_DistanceSquared, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector4, Divide, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector4_Divide, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector4, Dot, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector4_Dot, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector4, FusedMultiplyAdd, 3, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector4_FusedMultiplyAdd, NI_Illegal}, SimdAsHWIntrinsicFlag::SpillSideEffectsOp1 | SimdAsHWIntrinsicFlag::SpillSideEffectsOp2) -SIMD_AS_HWINTRINSIC_ID(Vector4, get_Item, 0, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector4_get_Item, NI_Illegal}, SimdAsHWIntrinsicFlag::InstanceMethod | SimdAsHWIntrinsicFlag::BaseTypeFromThisArg) -SIMD_AS_HWINTRINSIC_ID(Vector4, get_One, 0, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector4_get_One, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector4, get_UnitX, 0, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector4_get_UnitX, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector4, get_UnitY, 0, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector4_get_UnitY, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector4, get_UnitZ, 0, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector4_get_UnitZ, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector4, get_UnitW, 0, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector4_get_UnitW, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector4, get_Zero, 0, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector4_get_Zero, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector4, GetElement, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector4_GetElement, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector4, Length, 1, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector4_Length, NI_Illegal}, SimdAsHWIntrinsicFlag::InstanceMethod) -SIMD_AS_HWINTRINSIC_ID(Vector4, LengthSquared, 1, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector4_LengthSquared, NI_Illegal}, SimdAsHWIntrinsicFlag::InstanceMethod) -SIMD_AS_HWINTRINSIC_ID(Vector4, Lerp, 3, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector4_Lerp, NI_Illegal}, SimdAsHWIntrinsicFlag::SpillSideEffectsOp1 | SimdAsHWIntrinsicFlag::SpillSideEffectsOp2) -SIMD_AS_HWINTRINSIC_ID(Vector4, Max, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector4_Max, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector4, Min, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector4_Min, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector4, Multiply, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector4_Multiply, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector4, MultiplyAddEstimate, 3, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector4_MultiplyAddEstimate, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector4, Negate, 1, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector4_Negate, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector4, Normalize, 1, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector4_Normalize, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector4, op_Addition, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector4_op_Addition, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector4, op_Division, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector4_op_Division, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector4, op_Equality, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector4_op_Equality, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector4, op_Inequality, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector4_op_Inequality, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector4, op_Multiply, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector4_op_Multiply, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector4, op_Subtraction, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector4_op_Subtraction, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector4, op_UnaryNegation, 1, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector4_op_UnaryNegation, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_NM(Vector4, Sqrt, "SquareRoot", 1, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector4_Sqrt, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector4, Subtract, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector4_Subtract, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector4, WithElement, 3, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector4_WithElement, NI_Illegal}, SimdAsHWIntrinsicFlag::None) - // ************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************* // ISA ID Name NumArg Instructions Flags // {TYP_BYTE, TYP_UBYTE, TYP_SHORT, TYP_USHORT, TYP_INT, TYP_UINT, TYP_LONG, TYP_ULONG, TYP_FLOAT, TYP_DOUBLE} // ************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************* // Vector Intrinsics SIMD_AS_HWINTRINSIC_ID(VectorT, Abs, 1, {NI_VectorT_Abs, NI_VectorT_Abs, NI_VectorT_Abs, NI_VectorT_Abs, NI_VectorT_Abs, NI_VectorT_Abs, NI_VectorT_Abs, NI_VectorT_Abs, NI_VectorT_Abs, NI_VectorT_Abs}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(VectorT, Add, 2, {NI_VectorT_Add, NI_VectorT_Add, NI_VectorT_Add, NI_VectorT_Add, NI_VectorT_Add, NI_VectorT_Add, NI_VectorT_Add, NI_VectorT_Add, NI_VectorT_Add, NI_VectorT_Add}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT, AndNot, 2, {NI_VectorT_AndNot, NI_VectorT_AndNot, NI_VectorT_AndNot, NI_VectorT_AndNot, NI_VectorT_AndNot, NI_VectorT_AndNot, NI_VectorT_AndNot, NI_VectorT_AndNot, NI_VectorT_AndNot, NI_VectorT_AndNot}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(VectorT, As, 1, {NI_VectorT_As, NI_VectorT_As, NI_VectorT_As, NI_VectorT_As, NI_VectorT_As, NI_VectorT_As, NI_VectorT_As, NI_VectorT_As, NI_VectorT_As, NI_VectorT_As}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(VectorT, AsVectorByte, 1, {NI_VectorT_AsVectorByte, NI_VectorT_AsVectorByte, NI_VectorT_AsVectorByte, NI_VectorT_AsVectorByte, NI_VectorT_AsVectorByte, NI_VectorT_AsVectorByte, NI_VectorT_AsVectorByte, NI_VectorT_AsVectorByte, NI_VectorT_AsVectorByte, NI_VectorT_AsVectorByte}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(VectorT, AsVectorDouble, 1, {NI_VectorT_AsVectorDouble, NI_VectorT_AsVectorDouble, NI_VectorT_AsVectorDouble, NI_VectorT_AsVectorDouble, NI_VectorT_AsVectorDouble, NI_VectorT_AsVectorDouble, NI_VectorT_AsVectorDouble, NI_VectorT_AsVectorDouble, NI_VectorT_AsVectorDouble, NI_VectorT_AsVectorDouble}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(VectorT, AsVectorInt16, 1, {NI_VectorT_AsVectorInt16, NI_VectorT_AsVectorInt16, NI_VectorT_AsVectorInt16, NI_VectorT_AsVectorInt16, NI_VectorT_AsVectorInt16, NI_VectorT_AsVectorInt16, NI_VectorT_AsVectorInt16, NI_VectorT_AsVectorInt16, NI_VectorT_AsVectorInt16, NI_VectorT_AsVectorInt16}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(VectorT, AsVectorInt32, 1, {NI_VectorT_AsVectorInt32, NI_VectorT_AsVectorInt32, NI_VectorT_AsVectorInt32, NI_VectorT_AsVectorInt32, NI_VectorT_AsVectorInt32, NI_VectorT_AsVectorInt32, NI_VectorT_AsVectorInt32, NI_VectorT_AsVectorInt32, NI_VectorT_AsVectorInt32, NI_VectorT_AsVectorInt32}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(VectorT, AsVectorInt64, 1, {NI_VectorT_AsVectorInt64, NI_VectorT_AsVectorInt64, NI_VectorT_AsVectorInt64, NI_VectorT_AsVectorInt64, NI_VectorT_AsVectorInt64, NI_VectorT_AsVectorInt64, NI_VectorT_AsVectorInt64, NI_VectorT_AsVectorInt64, NI_VectorT_AsVectorInt64, NI_VectorT_AsVectorInt64}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(VectorT, AsVectorNInt, 1, {NI_VectorT_AsVectorNInt, NI_VectorT_AsVectorNInt, NI_VectorT_AsVectorNInt, NI_VectorT_AsVectorNInt, NI_VectorT_AsVectorNInt, NI_VectorT_AsVectorNInt, NI_VectorT_AsVectorNInt, NI_VectorT_AsVectorNInt, NI_VectorT_AsVectorNInt, NI_VectorT_AsVectorNInt}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(VectorT, AsVectorNUInt, 1, {NI_VectorT_AsVectorNUInt, NI_VectorT_AsVectorNUInt, NI_VectorT_AsVectorNUInt, NI_VectorT_AsVectorNUInt, NI_VectorT_AsVectorNUInt, NI_VectorT_AsVectorNUInt, NI_VectorT_AsVectorNUInt, NI_VectorT_AsVectorNUInt, NI_VectorT_AsVectorNUInt, NI_VectorT_AsVectorNUInt}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(VectorT, AsVectorSByte, 1, {NI_VectorT_AsVectorSByte, NI_VectorT_AsVectorSByte, NI_VectorT_AsVectorSByte, NI_VectorT_AsVectorSByte, NI_VectorT_AsVectorSByte, NI_VectorT_AsVectorSByte, NI_VectorT_AsVectorSByte, NI_VectorT_AsVectorSByte, NI_VectorT_AsVectorSByte, NI_VectorT_AsVectorSByte}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(VectorT, AsVectorSingle, 1, {NI_VectorT_AsVectorSingle, NI_VectorT_AsVectorSingle, NI_VectorT_AsVectorSingle, NI_VectorT_AsVectorSingle, NI_VectorT_AsVectorSingle, NI_VectorT_AsVectorSingle, NI_VectorT_AsVectorSingle, NI_VectorT_AsVectorSingle, NI_VectorT_AsVectorSingle, NI_VectorT_AsVectorSingle}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(VectorT, AsVectorUInt16, 1, {NI_VectorT_AsVectorUInt16, NI_VectorT_AsVectorUInt16, NI_VectorT_AsVectorUInt16, NI_VectorT_AsVectorUInt16, NI_VectorT_AsVectorUInt16, NI_VectorT_AsVectorUInt16, NI_VectorT_AsVectorUInt16, NI_VectorT_AsVectorUInt16, NI_VectorT_AsVectorUInt16, NI_VectorT_AsVectorUInt16}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(VectorT, AsVectorUInt32, 1, {NI_VectorT_AsVectorUInt32, NI_VectorT_AsVectorUInt32, NI_VectorT_AsVectorUInt32, NI_VectorT_AsVectorUInt32, NI_VectorT_AsVectorUInt32, NI_VectorT_AsVectorUInt32, NI_VectorT_AsVectorUInt32, NI_VectorT_AsVectorUInt32, NI_VectorT_AsVectorUInt32, NI_VectorT_AsVectorUInt32}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(VectorT, AsVectorUInt64, 1, {NI_VectorT_AsVectorUInt64, NI_VectorT_AsVectorUInt64, NI_VectorT_AsVectorUInt64, NI_VectorT_AsVectorUInt64, NI_VectorT_AsVectorUInt64, NI_VectorT_AsVectorUInt64, NI_VectorT_AsVectorUInt64, NI_VectorT_AsVectorUInt64, NI_VectorT_AsVectorUInt64, NI_VectorT_AsVectorUInt64}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(VectorT, BitwiseAnd, 2, {NI_VectorT_BitwiseAnd, NI_VectorT_BitwiseAnd, NI_VectorT_BitwiseAnd, NI_VectorT_BitwiseAnd, NI_VectorT_BitwiseAnd, NI_VectorT_BitwiseAnd, NI_VectorT_BitwiseAnd, NI_VectorT_BitwiseAnd, NI_VectorT_BitwiseAnd, NI_VectorT_BitwiseAnd}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(VectorT, BitwiseOr, 2, {NI_VectorT_BitwiseOr, NI_VectorT_BitwiseOr, NI_VectorT_BitwiseOr, NI_VectorT_BitwiseOr, NI_VectorT_BitwiseOr, NI_VectorT_BitwiseOr, NI_VectorT_BitwiseOr, NI_VectorT_BitwiseOr, NI_VectorT_BitwiseOr, NI_VectorT_BitwiseOr}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT, Ceiling, 1, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_VectorT_Ceiling, NI_VectorT_Ceiling}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT, ConditionalSelect, 3, {NI_VectorT_ConditionalSelect, NI_VectorT_ConditionalSelect, NI_VectorT_ConditionalSelect, NI_VectorT_ConditionalSelect, NI_VectorT_ConditionalSelect, NI_VectorT_ConditionalSelect, NI_VectorT_ConditionalSelect, NI_VectorT_ConditionalSelect, NI_VectorT_ConditionalSelect, NI_VectorT_ConditionalSelect}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT, ConvertToDouble, 1, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_VectorT_ConvertToDouble, NI_VectorT_ConvertToDouble, NI_Illegal, NI_Illegal}, SimdAsHWIntrinsicFlag::None) @@ -240,18 +104,14 @@ SIMD_AS_HWINTRINSIC_ID(VectorT, ConvertToUInt64, SIMD_AS_HWINTRINSIC_ID(VectorT, ConvertToUInt64Native, 1, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_VectorT_ConvertToUInt64Native}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_NM(VectorT, CreateBroadcast, ".ctor", 2, {NI_VectorT_CreateBroadcast, NI_VectorT_CreateBroadcast, NI_VectorT_CreateBroadcast, NI_VectorT_CreateBroadcast, NI_VectorT_CreateBroadcast, NI_VectorT_CreateBroadcast, NI_VectorT_CreateBroadcast, NI_VectorT_CreateBroadcast, NI_VectorT_CreateBroadcast, NI_VectorT_CreateBroadcast}, SimdAsHWIntrinsicFlag::InstanceMethod | SimdAsHWIntrinsicFlag::SpillSideEffectsOp1) SIMD_AS_HWINTRINSIC_ID(VectorT, CreateSequence, 2, {NI_VectorT_CreateSequence, NI_VectorT_CreateSequence, NI_VectorT_CreateSequence, NI_VectorT_CreateSequence, NI_VectorT_CreateSequence, NI_VectorT_CreateSequence, NI_VectorT_CreateSequence, NI_VectorT_CreateSequence, NI_VectorT_CreateSequence, NI_VectorT_CreateSequence}, SimdAsHWIntrinsicFlag::SpillSideEffectsOp1) -SIMD_AS_HWINTRINSIC_ID(VectorT, Divide, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_VectorT_Divide, NI_VectorT_Divide}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT, Dot, 2, {NI_VectorT_Dot, NI_VectorT_Dot, NI_VectorT_Dot, NI_VectorT_Dot, NI_VectorT_Dot, NI_VectorT_Dot, NI_Illegal, NI_Illegal, NI_VectorT_Dot, NI_VectorT_Dot}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT, Equals, 2, {NI_VectorT_Equals, NI_VectorT_Equals, NI_VectorT_Equals, NI_VectorT_Equals, NI_VectorT_Equals, NI_VectorT_Equals, NI_VectorT_Equals, NI_VectorT_Equals, NI_VectorT_Equals, NI_VectorT_Equals}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(VectorT, EqualsAll, 2, {NI_VectorT_EqualsAll, NI_VectorT_EqualsAll, NI_VectorT_EqualsAll, NI_VectorT_EqualsAll, NI_VectorT_EqualsAll, NI_VectorT_EqualsAll, NI_VectorT_EqualsAll, NI_VectorT_EqualsAll, NI_VectorT_EqualsAll, NI_VectorT_EqualsAll}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT, EqualsAny, 2, {NI_VectorT_EqualsAny, NI_VectorT_EqualsAny, NI_VectorT_EqualsAny, NI_VectorT_EqualsAny, NI_VectorT_EqualsAny, NI_VectorT_EqualsAny, NI_VectorT_EqualsAny, NI_VectorT_EqualsAny, NI_VectorT_EqualsAny, NI_VectorT_EqualsAny}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT, Floor, 1, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_VectorT_Floor, NI_VectorT_Floor}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT, FusedMultiplyAdd, 3, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_VectorT_FusedMultiplyAdd, NI_VectorT_FusedMultiplyAdd}, SimdAsHWIntrinsicFlag::SpillSideEffectsOp1 | SimdAsHWIntrinsicFlag::SpillSideEffectsOp2) SIMD_AS_HWINTRINSIC_ID(VectorT, get_AllBitsSet, 0, {NI_VectorT_get_AllBitsSet, NI_VectorT_get_AllBitsSet, NI_VectorT_get_AllBitsSet, NI_VectorT_get_AllBitsSet, NI_VectorT_get_AllBitsSet, NI_VectorT_get_AllBitsSet, NI_VectorT_get_AllBitsSet, NI_VectorT_get_AllBitsSet, NI_VectorT_get_AllBitsSet, NI_VectorT_get_AllBitsSet}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT, get_Indices, 0, {NI_VectorT_get_Indices, NI_VectorT_get_Indices, NI_VectorT_get_Indices, NI_VectorT_get_Indices, NI_VectorT_get_Indices, NI_VectorT_get_Indices, NI_VectorT_get_Indices, NI_VectorT_get_Indices, NI_VectorT_get_Indices, NI_VectorT_get_Indices}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(VectorT, get_Item, 2, {NI_VectorT_get_Item, NI_VectorT_get_Item, NI_VectorT_get_Item, NI_VectorT_get_Item, NI_VectorT_get_Item, NI_VectorT_get_Item, NI_VectorT_get_Item, NI_VectorT_get_Item, NI_VectorT_get_Item, NI_VectorT_get_Item}, SimdAsHWIntrinsicFlag::InstanceMethod | SimdAsHWIntrinsicFlag::BaseTypeFromThisArg) SIMD_AS_HWINTRINSIC_ID(VectorT, get_One, 0, {NI_VectorT_get_One, NI_VectorT_get_One, NI_VectorT_get_One, NI_VectorT_get_One, NI_VectorT_get_One, NI_VectorT_get_One, NI_VectorT_get_One, NI_VectorT_get_One, NI_VectorT_get_One, NI_VectorT_get_One}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(VectorT, get_Zero, 0, {NI_VectorT_get_Zero, NI_VectorT_get_Zero, NI_VectorT_get_Zero, NI_VectorT_get_Zero, NI_VectorT_get_Zero, NI_VectorT_get_Zero, NI_VectorT_get_Zero, NI_VectorT_get_Zero, NI_VectorT_get_Zero, NI_VectorT_get_Zero}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT, GetElement, 2, {NI_VectorT_GetElement, NI_VectorT_GetElement, NI_VectorT_GetElement, NI_VectorT_GetElement, NI_VectorT_GetElement, NI_VectorT_GetElement, NI_VectorT_GetElement, NI_VectorT_GetElement, NI_VectorT_GetElement, NI_VectorT_GetElement}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT, GreaterThan, 2, {NI_VectorT_GreaterThan, NI_VectorT_GreaterThan, NI_VectorT_GreaterThan, NI_VectorT_GreaterThan, NI_VectorT_GreaterThan, NI_VectorT_GreaterThan, NI_VectorT_GreaterThan, NI_VectorT_GreaterThan, NI_VectorT_GreaterThan, NI_VectorT_GreaterThan}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT, GreaterThanAll, 2, {NI_VectorT_GreaterThanAll, NI_VectorT_GreaterThanAll, NI_VectorT_GreaterThanAll, NI_VectorT_GreaterThanAll, NI_VectorT_GreaterThanAll, NI_VectorT_GreaterThanAll, NI_VectorT_GreaterThanAll, NI_VectorT_GreaterThanAll, NI_VectorT_GreaterThanAll, NI_VectorT_GreaterThanAll}, SimdAsHWIntrinsicFlag::None) @@ -265,25 +125,20 @@ SIMD_AS_HWINTRINSIC_ID(VectorT, LessThanAny, SIMD_AS_HWINTRINSIC_ID(VectorT, LessThanOrEqual, 2, {NI_VectorT_LessThanOrEqual, NI_VectorT_LessThanOrEqual, NI_VectorT_LessThanOrEqual, NI_VectorT_LessThanOrEqual, NI_VectorT_LessThanOrEqual, NI_VectorT_LessThanOrEqual, NI_VectorT_LessThanOrEqual, NI_VectorT_LessThanOrEqual, NI_VectorT_LessThanOrEqual, NI_VectorT_LessThanOrEqual}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT, LessThanOrEqualAll, 2, {NI_VectorT_LessThanOrEqualAll, NI_VectorT_LessThanOrEqualAll, NI_VectorT_LessThanOrEqualAll, NI_VectorT_LessThanOrEqualAll, NI_VectorT_LessThanOrEqualAll, NI_VectorT_LessThanOrEqualAll, NI_VectorT_LessThanOrEqualAll, NI_VectorT_LessThanOrEqualAll, NI_VectorT_LessThanOrEqualAll, NI_VectorT_LessThanOrEqualAll}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT, LessThanOrEqualAny, 2, {NI_VectorT_LessThanOrEqualAny, NI_VectorT_LessThanOrEqualAny, NI_VectorT_LessThanOrEqualAny, NI_VectorT_LessThanOrEqualAny, NI_VectorT_LessThanOrEqualAny, NI_VectorT_LessThanOrEqualAny, NI_VectorT_LessThanOrEqualAny, NI_VectorT_LessThanOrEqualAny, NI_VectorT_LessThanOrEqualAny, NI_VectorT_LessThanOrEqualAny}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(VectorT, Load, 1, {NI_VectorT_Load, NI_VectorT_Load, NI_VectorT_Load, NI_VectorT_Load, NI_VectorT_Load, NI_VectorT_Load, NI_VectorT_Load, NI_VectorT_Load, NI_VectorT_Load, NI_VectorT_Load}, SimdAsHWIntrinsicFlag::KeepBaseTypeFromRet) SIMD_AS_HWINTRINSIC_ID(VectorT, LoadAligned, 1, {NI_VectorT_LoadAligned, NI_VectorT_LoadAligned, NI_VectorT_LoadAligned, NI_VectorT_LoadAligned, NI_VectorT_LoadAligned, NI_VectorT_LoadAligned, NI_VectorT_LoadAligned, NI_VectorT_LoadAligned, NI_VectorT_LoadAligned, NI_VectorT_LoadAligned}, SimdAsHWIntrinsicFlag::KeepBaseTypeFromRet) SIMD_AS_HWINTRINSIC_ID(VectorT, LoadAlignedNonTemporal, 1, {NI_VectorT_LoadAlignedNonTemporal, NI_VectorT_LoadAlignedNonTemporal, NI_VectorT_LoadAlignedNonTemporal, NI_VectorT_LoadAlignedNonTemporal, NI_VectorT_LoadAlignedNonTemporal, NI_VectorT_LoadAlignedNonTemporal, NI_VectorT_LoadAlignedNonTemporal, NI_VectorT_LoadAlignedNonTemporal, NI_VectorT_LoadAlignedNonTemporal, NI_VectorT_LoadAlignedNonTemporal}, SimdAsHWIntrinsicFlag::KeepBaseTypeFromRet) SIMD_AS_HWINTRINSIC_ID(VectorT, LoadUnsafe, 1, {NI_VectorT_LoadUnsafe, NI_VectorT_LoadUnsafe, NI_VectorT_LoadUnsafe, NI_VectorT_LoadUnsafe, NI_VectorT_LoadUnsafe, NI_VectorT_LoadUnsafe, NI_VectorT_LoadUnsafe, NI_VectorT_LoadUnsafe, NI_VectorT_LoadUnsafe, NI_VectorT_LoadUnsafe}, SimdAsHWIntrinsicFlag::KeepBaseTypeFromRet) SIMD_AS_HWINTRINSIC_NM(VectorT, LoadUnsafeIndex, "LoadUnsafe", 2, {NI_VectorT_LoadUnsafeIndex, NI_VectorT_LoadUnsafeIndex, NI_VectorT_LoadUnsafeIndex, NI_VectorT_LoadUnsafeIndex, NI_VectorT_LoadUnsafeIndex, NI_VectorT_LoadUnsafeIndex, NI_VectorT_LoadUnsafeIndex, NI_VectorT_LoadUnsafeIndex, NI_VectorT_LoadUnsafeIndex, NI_VectorT_LoadUnsafeIndex}, SimdAsHWIntrinsicFlag::KeepBaseTypeFromRet) SIMD_AS_HWINTRINSIC_ID(VectorT, Max, 2, {NI_VectorT_Max, NI_VectorT_Max, NI_VectorT_Max, NI_VectorT_Max, NI_VectorT_Max, NI_VectorT_Max, NI_VectorT_Max, NI_VectorT_Max, NI_VectorT_Max, NI_VectorT_Max}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT, Min, 2, {NI_VectorT_Min, NI_VectorT_Min, NI_VectorT_Min, NI_VectorT_Min, NI_VectorT_Min, NI_VectorT_Min, NI_VectorT_Min, NI_VectorT_Min, NI_VectorT_Min, NI_VectorT_Min}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(VectorT, Multiply, 2, {NI_VectorT_Multiply, NI_VectorT_Multiply, NI_VectorT_Multiply, NI_VectorT_Multiply, NI_VectorT_Multiply, NI_VectorT_Multiply, NI_Illegal, NI_Illegal, NI_VectorT_Multiply, NI_VectorT_Multiply}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT, MultiplyAddEstimate, 3, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_VectorT_MultiplyAddEstimate, NI_VectorT_MultiplyAddEstimate}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT, Narrow, 2, {NI_VectorT_Narrow, NI_VectorT_Narrow, NI_VectorT_Narrow, NI_VectorT_Narrow, NI_VectorT_Narrow, NI_VectorT_Narrow, NI_VectorT_Narrow, NI_VectorT_Narrow, NI_VectorT_Narrow, NI_VectorT_Narrow}, SimdAsHWIntrinsicFlag::KeepBaseTypeFromRet) -SIMD_AS_HWINTRINSIC_ID(VectorT, Negate, 1, {NI_VectorT_Negate, NI_VectorT_Negate, NI_VectorT_Negate, NI_VectorT_Negate, NI_VectorT_Negate, NI_VectorT_Negate, NI_VectorT_Negate, NI_VectorT_Negate, NI_VectorT_Negate, NI_VectorT_Negate}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(VectorT, OnesComplement, 2, {NI_VectorT_OnesComplement, NI_VectorT_OnesComplement, NI_VectorT_OnesComplement, NI_VectorT_OnesComplement, NI_VectorT_OnesComplement, NI_VectorT_OnesComplement, NI_VectorT_OnesComplement, NI_VectorT_OnesComplement, NI_VectorT_OnesComplement, NI_VectorT_OnesComplement}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT, op_Addition, 2, {NI_VectorT_op_Addition, NI_VectorT_op_Addition, NI_VectorT_op_Addition, NI_VectorT_op_Addition, NI_VectorT_op_Addition, NI_VectorT_op_Addition, NI_VectorT_op_Addition, NI_VectorT_op_Addition, NI_VectorT_op_Addition, NI_VectorT_op_Addition}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT, op_BitwiseAnd, 2, {NI_VectorT_op_BitwiseAnd, NI_VectorT_op_BitwiseAnd, NI_VectorT_op_BitwiseAnd, NI_VectorT_op_BitwiseAnd, NI_VectorT_op_BitwiseAnd, NI_VectorT_op_BitwiseAnd, NI_VectorT_op_BitwiseAnd, NI_VectorT_op_BitwiseAnd, NI_VectorT_op_BitwiseAnd, NI_VectorT_op_BitwiseAnd}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT, op_BitwiseOr, 2, {NI_VectorT_op_BitwiseOr, NI_VectorT_op_BitwiseOr, NI_VectorT_op_BitwiseOr, NI_VectorT_op_BitwiseOr, NI_VectorT_op_BitwiseOr, NI_VectorT_op_BitwiseOr, NI_VectorT_op_BitwiseOr, NI_VectorT_op_BitwiseOr, NI_VectorT_op_BitwiseOr, NI_VectorT_op_BitwiseOr}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT, op_Division, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_VectorT_op_Division, NI_VectorT_op_Division}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT, op_Equality, 2, {NI_VectorT_op_Equality, NI_VectorT_op_Equality, NI_VectorT_op_Equality, NI_VectorT_op_Equality, NI_VectorT_op_Equality, NI_VectorT_op_Equality, NI_VectorT_op_Equality, NI_VectorT_op_Equality, NI_VectorT_op_Equality, NI_VectorT_op_Equality}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT, op_ExclusiveOr, 2, {NI_VectorT_op_ExclusiveOr, NI_VectorT_op_ExclusiveOr, NI_VectorT_op_ExclusiveOr, NI_VectorT_op_ExclusiveOr, NI_VectorT_op_ExclusiveOr, NI_VectorT_op_ExclusiveOr, NI_VectorT_op_ExclusiveOr, NI_VectorT_op_ExclusiveOr, NI_VectorT_op_ExclusiveOr, NI_VectorT_op_ExclusiveOr}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(VectorT, op_Explicit, 1, {NI_VectorT_op_Explicit, NI_VectorT_op_Explicit, NI_VectorT_op_Explicit, NI_VectorT_op_Explicit, NI_VectorT_op_Explicit, NI_VectorT_op_Explicit, NI_VectorT_op_Explicit, NI_VectorT_op_Explicit, NI_VectorT_op_Explicit, NI_VectorT_op_Explicit}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT, op_Inequality, 2, {NI_VectorT_op_Inequality, NI_VectorT_op_Inequality, NI_VectorT_op_Inequality, NI_VectorT_op_Inequality, NI_VectorT_op_Inequality, NI_VectorT_op_Inequality, NI_VectorT_op_Inequality, NI_VectorT_op_Inequality, NI_VectorT_op_Inequality, NI_VectorT_op_Inequality}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT, op_LeftShift, 2, {NI_VectorT_op_LeftShift, NI_VectorT_op_LeftShift, NI_VectorT_op_LeftShift, NI_VectorT_op_LeftShift, NI_VectorT_op_LeftShift, NI_VectorT_op_LeftShift, NI_VectorT_op_LeftShift, NI_VectorT_op_LeftShift, NI_VectorT_op_LeftShift, NI_VectorT_op_LeftShift}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT, op_Multiply, 2, {NI_VectorT_op_Multiply, NI_VectorT_op_Multiply, NI_VectorT_op_Multiply, NI_VectorT_op_Multiply, NI_VectorT_op_Multiply, NI_VectorT_op_Multiply, NI_Illegal, NI_Illegal, NI_VectorT_op_Multiply, NI_VectorT_op_Multiply}, SimdAsHWIntrinsicFlag::None) @@ -291,24 +146,17 @@ SIMD_AS_HWINTRINSIC_ID(VectorT, op_OnesComplement, SIMD_AS_HWINTRINSIC_ID(VectorT, op_RightShift, 2, {NI_VectorT_op_RightShift, NI_VectorT_op_RightShift, NI_VectorT_op_RightShift, NI_VectorT_op_RightShift, NI_VectorT_op_RightShift, NI_VectorT_op_RightShift, NI_VectorT_op_RightShift, NI_VectorT_op_RightShift, NI_VectorT_op_RightShift, NI_VectorT_op_RightShift}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT, op_Subtraction, 2, {NI_VectorT_op_Subtraction, NI_VectorT_op_Subtraction, NI_VectorT_op_Subtraction, NI_VectorT_op_Subtraction, NI_VectorT_op_Subtraction, NI_VectorT_op_Subtraction, NI_VectorT_op_Subtraction, NI_VectorT_op_Subtraction, NI_VectorT_op_Subtraction, NI_VectorT_op_Subtraction}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT, op_UnaryNegation, 1, {NI_VectorT_op_UnaryNegation, NI_VectorT_op_UnaryNegation, NI_VectorT_op_UnaryNegation, NI_VectorT_op_UnaryNegation, NI_VectorT_op_UnaryNegation, NI_VectorT_op_UnaryNegation, NI_VectorT_op_UnaryNegation, NI_VectorT_op_UnaryNegation, NI_VectorT_op_UnaryNegation, NI_VectorT_op_UnaryNegation}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(VectorT, op_UnaryPlus, 1, {NI_VectorT_op_UnaryPlus, NI_VectorT_op_UnaryPlus, NI_VectorT_op_UnaryPlus, NI_VectorT_op_UnaryPlus, NI_VectorT_op_UnaryPlus, NI_VectorT_op_UnaryPlus, NI_VectorT_op_UnaryPlus, NI_VectorT_op_UnaryPlus, NI_VectorT_op_UnaryPlus, NI_VectorT_op_UnaryPlus}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT, op_UnsignedRightShift, 2, {NI_VectorT_op_UnsignedRightShift, NI_VectorT_op_UnsignedRightShift, NI_VectorT_op_UnsignedRightShift, NI_VectorT_op_UnsignedRightShift, NI_VectorT_op_UnsignedRightShift, NI_VectorT_op_UnsignedRightShift, NI_VectorT_op_UnsignedRightShift, NI_VectorT_op_UnsignedRightShift, NI_VectorT_op_UnsignedRightShift, NI_VectorT_op_UnsignedRightShift}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(VectorT, ShiftLeft, 2, {NI_VectorT_ShiftLeft, NI_VectorT_ShiftLeft, NI_VectorT_ShiftLeft, NI_VectorT_ShiftLeft, NI_VectorT_ShiftLeft, NI_VectorT_ShiftLeft, NI_VectorT_ShiftLeft, NI_VectorT_ShiftLeft, NI_Illegal, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(VectorT, ShiftRightArithmetic, 2, {NI_VectorT_ShiftRightArithmetic, NI_Illegal, NI_VectorT_ShiftRightArithmetic, NI_Illegal, NI_VectorT_ShiftRightArithmetic, NI_Illegal, NI_VectorT_ShiftRightArithmetic, NI_Illegal, NI_Illegal, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(VectorT, ShiftRightLogical, 2, {NI_VectorT_ShiftRightLogical, NI_VectorT_ShiftRightLogical, NI_VectorT_ShiftRightLogical, NI_VectorT_ShiftRightLogical, NI_VectorT_ShiftRightLogical, NI_VectorT_ShiftRightLogical, NI_VectorT_ShiftRightLogical, NI_VectorT_ShiftRightLogical, NI_Illegal, NI_Illegal}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_NM(VectorT, Sqrt, "SquareRoot", 1, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_VectorT_Sqrt, NI_VectorT_Sqrt}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(VectorT, Store, 2, {NI_VectorT_Store, NI_VectorT_Store, NI_VectorT_Store, NI_VectorT_Store, NI_VectorT_Store, NI_VectorT_Store, NI_VectorT_Store, NI_VectorT_Store, NI_VectorT_Store, NI_VectorT_Store}, SimdAsHWIntrinsicFlag::SpillSideEffectsOp1) SIMD_AS_HWINTRINSIC_ID(VectorT, StoreAligned, 2, {NI_VectorT_StoreAligned, NI_VectorT_StoreAligned, NI_VectorT_StoreAligned, NI_VectorT_StoreAligned, NI_VectorT_StoreAligned, NI_VectorT_StoreAligned, NI_VectorT_StoreAligned, NI_VectorT_StoreAligned, NI_VectorT_StoreAligned, NI_VectorT_StoreAligned}, SimdAsHWIntrinsicFlag::SpillSideEffectsOp1) SIMD_AS_HWINTRINSIC_ID(VectorT, StoreAlignedNonTemporal, 2, {NI_VectorT_StoreAlignedNonTemporal, NI_VectorT_StoreAlignedNonTemporal, NI_VectorT_StoreAlignedNonTemporal, NI_VectorT_StoreAlignedNonTemporal, NI_VectorT_StoreAlignedNonTemporal, NI_VectorT_StoreAlignedNonTemporal, NI_VectorT_StoreAlignedNonTemporal, NI_VectorT_StoreAlignedNonTemporal, NI_VectorT_StoreAlignedNonTemporal, NI_VectorT_StoreAlignedNonTemporal}, SimdAsHWIntrinsicFlag::SpillSideEffectsOp1) SIMD_AS_HWINTRINSIC_ID(VectorT, StoreUnsafe, 2, {NI_VectorT_StoreUnsafe, NI_VectorT_StoreUnsafe, NI_VectorT_StoreUnsafe, NI_VectorT_StoreUnsafe, NI_VectorT_StoreUnsafe, NI_VectorT_StoreUnsafe, NI_VectorT_StoreUnsafe, NI_VectorT_StoreUnsafe, NI_VectorT_StoreUnsafe, NI_VectorT_StoreUnsafe}, SimdAsHWIntrinsicFlag::SpillSideEffectsOp1) SIMD_AS_HWINTRINSIC_NM(VectorT, StoreUnsafeIndex, "StoreUnsafe", 3, {NI_VectorT_StoreUnsafeIndex, NI_VectorT_StoreUnsafeIndex, NI_VectorT_StoreUnsafeIndex, NI_VectorT_StoreUnsafeIndex, NI_VectorT_StoreUnsafeIndex, NI_VectorT_StoreUnsafeIndex, NI_VectorT_StoreUnsafeIndex, NI_VectorT_StoreUnsafeIndex, NI_VectorT_StoreUnsafeIndex, NI_VectorT_StoreUnsafeIndex}, SimdAsHWIntrinsicFlag::SpillSideEffectsOp1) -SIMD_AS_HWINTRINSIC_ID(VectorT, Subtract, 2, {NI_VectorT_Subtract, NI_VectorT_Subtract, NI_VectorT_Subtract, NI_VectorT_Subtract, NI_VectorT_Subtract, NI_VectorT_Subtract, NI_VectorT_Subtract, NI_VectorT_Subtract, NI_VectorT_Subtract, NI_VectorT_Subtract}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT, Sum, 1, {NI_VectorT_Sum, NI_VectorT_Sum, NI_VectorT_Sum, NI_VectorT_Sum, NI_VectorT_Sum, NI_VectorT_Sum, NI_VectorT_Sum, NI_VectorT_Sum, NI_VectorT_Sum, NI_VectorT_Sum}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT, ToScalar, 1, {NI_VectorT_ToScalar, NI_VectorT_ToScalar, NI_VectorT_ToScalar, NI_VectorT_ToScalar, NI_VectorT_ToScalar, NI_VectorT_ToScalar, NI_VectorT_ToScalar, NI_VectorT_ToScalar, NI_VectorT_ToScalar, NI_VectorT_ToScalar}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT, WidenLower, 1, {NI_VectorT_WidenLower, NI_VectorT_WidenLower, NI_VectorT_WidenLower, NI_VectorT_WidenLower, NI_VectorT_WidenLower, NI_VectorT_WidenLower, NI_VectorT_WidenLower, NI_VectorT_WidenLower, NI_VectorT_WidenLower, NI_VectorT_WidenLower}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT, WidenUpper, 1, {NI_VectorT_WidenUpper, NI_VectorT_WidenUpper, NI_VectorT_WidenUpper, NI_VectorT_WidenUpper, NI_VectorT_WidenUpper, NI_VectorT_WidenUpper, NI_VectorT_WidenUpper, NI_VectorT_WidenUpper, NI_VectorT_WidenUpper, NI_VectorT_WidenUpper}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT, WithElement, 3, {NI_VectorT_WithElement, NI_VectorT_WithElement, NI_VectorT_WithElement, NI_VectorT_WithElement, NI_VectorT_WithElement, NI_VectorT_WithElement, NI_VectorT_WithElement, NI_VectorT_WithElement, NI_VectorT_WithElement, NI_VectorT_WithElement}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(VectorT, Xor, 2, {NI_VectorT_Xor, NI_VectorT_Xor, NI_VectorT_Xor, NI_VectorT_Xor, NI_VectorT_Xor, NI_VectorT_Xor, NI_VectorT_Xor, NI_VectorT_Xor, NI_VectorT_Xor, NI_VectorT_Xor}, SimdAsHWIntrinsicFlag::None) #undef SIMD_AS_HWINTRINSIC_NM #undef SIMD_AS_HWINTRINSIC_ID diff --git a/src/coreclr/jit/simdashwintrinsiclistxarch.h b/src/coreclr/jit/simdashwintrinsiclistxarch.h index c0890478b80661..f119a4e051d59f 100644 --- a/src/coreclr/jit/simdashwintrinsiclistxarch.h +++ b/src/coreclr/jit/simdashwintrinsiclistxarch.h @@ -32,78 +32,21 @@ * Each intrinsic has one or more flags with type of `enum SimdAsHWIntrinsicFlag` */ -// ************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************* -// ISA ID Name NumArg Instructions Flags -// {TYP_BYTE, TYP_UBYTE, TYP_SHORT, TYP_USHORT, TYP_INT, TYP_UINT, TYP_LONG, TYP_ULONG, TYP_FLOAT, TYP_DOUBLE} -// ************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************* -// Plane Intrinsics -SIMD_AS_HWINTRINSIC_NM(Plane, Create, ".ctor", 5, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Plane_Create, NI_Illegal}, SimdAsHWIntrinsicFlag::InstanceMethod | SimdAsHWIntrinsicFlag::SpillSideEffectsOp1) -SIMD_AS_HWINTRINSIC_NM(Plane, CreateFromVector3, ".ctor", 3, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Plane_CreateFromVector3, NI_Illegal}, SimdAsHWIntrinsicFlag::InstanceMethod | SimdAsHWIntrinsicFlag::SpillSideEffectsOp1 | SimdAsHWIntrinsicFlag::BaseTypeFromThisArg) -SIMD_AS_HWINTRINSIC_NM(Plane, CreateFromVector4, ".ctor", 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Plane_CreateFromVector4, NI_Illegal}, SimdAsHWIntrinsicFlag::InstanceMethod | SimdAsHWIntrinsicFlag::BaseTypeFromThisArg) -SIMD_AS_HWINTRINSIC_ID(Plane, Dot, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Plane_Dot, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Plane, op_Equality, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Plane_op_Equality, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Plane, op_Inequality, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Plane_op_Inequality, NI_Illegal}, SimdAsHWIntrinsicFlag::None) - -// ************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************* -// ISA ID Name NumArg Instructions Flags -// {TYP_BYTE, TYP_UBYTE, TYP_SHORT, TYP_USHORT, TYP_INT, TYP_UINT, TYP_LONG, TYP_ULONG, TYP_FLOAT, TYP_DOUBLE} -// ************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************* -// Quaternion Intrinsics -SIMD_AS_HWINTRINSIC_ID(Quaternion, Add, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Quaternion_Add, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Quaternion, Conjugate, 1, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Quaternion_Conjugate, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_NM(Quaternion, Create, ".ctor", 5, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Quaternion_Create, NI_Illegal}, SimdAsHWIntrinsicFlag::InstanceMethod | SimdAsHWIntrinsicFlag::SpillSideEffectsOp1) -SIMD_AS_HWINTRINSIC_NM(Quaternion, CreateFromVector3, ".ctor", 3, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Quaternion_CreateFromVector3, NI_Illegal}, SimdAsHWIntrinsicFlag::InstanceMethod | SimdAsHWIntrinsicFlag::SpillSideEffectsOp1 | SimdAsHWIntrinsicFlag::BaseTypeFromThisArg) -SIMD_AS_HWINTRINSIC_ID(Quaternion, Divide, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Quaternion_Divide, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Quaternion, Dot, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Quaternion_Dot, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Quaternion, get_Identity, 0, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Quaternion_get_Identity, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Quaternion, get_Item, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Quaternion_get_Item, NI_Illegal}, SimdAsHWIntrinsicFlag::InstanceMethod | SimdAsHWIntrinsicFlag::BaseTypeFromThisArg) -SIMD_AS_HWINTRINSIC_ID(Quaternion, get_Zero, 0, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Quaternion_get_Zero, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Quaternion, GetElement, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Quaternion_GetElement, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Quaternion, Inverse, 1, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Quaternion_Inverse, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Quaternion, Length, 1, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Quaternion_Length, NI_Illegal}, SimdAsHWIntrinsicFlag::InstanceMethod) -SIMD_AS_HWINTRINSIC_ID(Quaternion, LengthSquared, 1, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Quaternion_LengthSquared, NI_Illegal}, SimdAsHWIntrinsicFlag::InstanceMethod) -SIMD_AS_HWINTRINSIC_ID(Quaternion, Multiply, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Quaternion_Multiply, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Quaternion, Negate, 1, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Quaternion_Negate, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Quaternion, Normalize, 1, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Quaternion_Normalize, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Quaternion, op_Addition, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Quaternion_op_Addition, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Quaternion, op_Equality, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Quaternion_op_Equality, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Quaternion, op_Inequality, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Quaternion_op_Inequality, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Quaternion, op_Multiply, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Quaternion_op_Multiply, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Quaternion, op_Subtraction, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Quaternion_op_Subtraction, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Quaternion, op_UnaryNegation, 1, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Quaternion_op_UnaryNegation, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Quaternion, Subtract, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Quaternion_Subtract, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Quaternion, WithElement, 3, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Quaternion_WithElement, NI_Illegal}, SimdAsHWIntrinsicFlag::None) - // ************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************* // ISA ID Name NumArg Instructions Flags // {TYP_BYTE, TYP_UBYTE, TYP_SHORT, TYP_USHORT, TYP_INT, TYP_UINT, TYP_LONG, TYP_ULONG, TYP_FLOAT, TYP_DOUBLE} // ************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************* // Vector2 Intrinsics SIMD_AS_HWINTRINSIC_ID(Vector2, Abs, 1, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector2_Abs, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector2, Add, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector2_Add, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector2, Clamp, 3, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector2_Clamp, NI_Illegal}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_NM(Vector2, Create, ".ctor", 3, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector2_Create, NI_Illegal}, SimdAsHWIntrinsicFlag::InstanceMethod | SimdAsHWIntrinsicFlag::SpillSideEffectsOp1) SIMD_AS_HWINTRINSIC_NM(Vector2, CreateBroadcast, ".ctor", 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector2_CreateBroadcast, NI_Illegal}, SimdAsHWIntrinsicFlag::InstanceMethod | SimdAsHWIntrinsicFlag::SpillSideEffectsOp1) -SIMD_AS_HWINTRINSIC_ID(Vector2, Distance, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector2_Distance, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector2, DistanceSquared, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector2_DistanceSquared, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector2, Divide, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector2_Divide, NI_Illegal}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(Vector2, Dot, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector2_Dot, NI_Illegal}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(Vector2, FusedMultiplyAdd, 3, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector2_FusedMultiplyAdd, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector2, get_Item, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector2_get_Item, NI_Illegal}, SimdAsHWIntrinsicFlag::InstanceMethod | SimdAsHWIntrinsicFlag::BaseTypeFromThisArg) -SIMD_AS_HWINTRINSIC_ID(Vector2, get_One, 0, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector2_get_One, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector2, get_UnitX, 0, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector2_get_UnitX, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector2, get_UnitY, 0, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector2_get_UnitY, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector2, get_Zero, 0, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector2_get_Zero, NI_Illegal}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(Vector2, GetElement, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector2_GetElement, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector2, Length, 1, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector2_Length, NI_Illegal}, SimdAsHWIntrinsicFlag::InstanceMethod) -SIMD_AS_HWINTRINSIC_ID(Vector2, LengthSquared, 1, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector2_LengthSquared, NI_Illegal}, SimdAsHWIntrinsicFlag::InstanceMethod) SIMD_AS_HWINTRINSIC_ID(Vector2, Lerp, 3, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector2_Lerp, NI_Illegal}, SimdAsHWIntrinsicFlag::SpillSideEffectsOp1 | SimdAsHWIntrinsicFlag::SpillSideEffectsOp2) SIMD_AS_HWINTRINSIC_ID(Vector2, Max, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector2_Max, NI_Illegal}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(Vector2, Min, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector2_Min, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector2, Multiply, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector2_Multiply, NI_Illegal}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(Vector2, MultiplyAddEstimate, 3, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector2_MultiplyAddEstimate, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector2, Negate, 1, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector2_Negate, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector2, Normalize, 1, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector2_Normalize, NI_Illegal}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(Vector2, op_Addition, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector2_op_Addition, NI_Illegal}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(Vector2, op_Division, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector2_op_Division, NI_Illegal}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(Vector2, op_Equality, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector2_op_Equality, NI_Illegal}, SimdAsHWIntrinsicFlag::None) @@ -112,7 +55,6 @@ SIMD_AS_HWINTRINSIC_ID(Vector2, op_Multiply, SIMD_AS_HWINTRINSIC_ID(Vector2, op_Subtraction, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector2_op_Subtraction, NI_Illegal}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(Vector2, op_UnaryNegation, 1, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector2_op_UnaryNegation, NI_Illegal}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_NM(Vector2, Sqrt, "SquareRoot", 1, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector2_Sqrt, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector2, Subtract, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector2_Subtract, NI_Illegal}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(Vector2, WithElement, 3, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector2_WithElement, NI_Illegal}, SimdAsHWIntrinsicFlag::None) // ************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************* @@ -121,32 +63,16 @@ SIMD_AS_HWINTRINSIC_ID(Vector2, WithElement, // ************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************* // Vector3 Intrinsics SIMD_AS_HWINTRINSIC_ID(Vector3, Abs, 1, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector3_Abs, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector3, Add, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector3_Add, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector3, Clamp, 3, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector3_Clamp, NI_Illegal}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_NM(Vector3, Create, ".ctor", 4, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector3_Create, NI_Illegal}, SimdAsHWIntrinsicFlag::InstanceMethod | SimdAsHWIntrinsicFlag::SpillSideEffectsOp1) SIMD_AS_HWINTRINSIC_NM(Vector3, CreateBroadcast, ".ctor", 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector3_CreateBroadcast, NI_Illegal}, SimdAsHWIntrinsicFlag::InstanceMethod | SimdAsHWIntrinsicFlag::SpillSideEffectsOp1) SIMD_AS_HWINTRINSIC_NM(Vector3, CreateFromVector2, ".ctor", 3, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector3_CreateFromVector2, NI_Illegal}, SimdAsHWIntrinsicFlag::InstanceMethod | SimdAsHWIntrinsicFlag::SpillSideEffectsOp1 | SimdAsHWIntrinsicFlag::BaseTypeFromThisArg) -SIMD_AS_HWINTRINSIC_ID(Vector3, Distance, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector3_Distance, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector3, DistanceSquared, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector3_DistanceSquared, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector3, Divide, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector3_Divide, NI_Illegal}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(Vector3, Dot, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector3_Dot, NI_Illegal}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(Vector3, FusedMultiplyAdd, 3, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector3_FusedMultiplyAdd, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector3, get_Item, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector3_get_Item, NI_Illegal}, SimdAsHWIntrinsicFlag::InstanceMethod | SimdAsHWIntrinsicFlag::BaseTypeFromThisArg) -SIMD_AS_HWINTRINSIC_ID(Vector3, get_One, 0, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector3_get_One, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector3, get_UnitX, 0, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector3_get_UnitX, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector3, get_UnitY, 0, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector3_get_UnitY, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector3, get_UnitZ, 0, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector3_get_UnitZ, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector3, get_Zero, 0, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector3_get_Zero, NI_Illegal}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(Vector3, GetElement, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector3_GetElement, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector3, Length, 1, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector3_Length, NI_Illegal}, SimdAsHWIntrinsicFlag::InstanceMethod) -SIMD_AS_HWINTRINSIC_ID(Vector3, LengthSquared, 1, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector3_LengthSquared, NI_Illegal}, SimdAsHWIntrinsicFlag::InstanceMethod) SIMD_AS_HWINTRINSIC_ID(Vector3, Lerp, 3, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector3_Lerp, NI_Illegal}, SimdAsHWIntrinsicFlag::SpillSideEffectsOp1 | SimdAsHWIntrinsicFlag::SpillSideEffectsOp2) SIMD_AS_HWINTRINSIC_ID(Vector3, Max, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector3_Max, NI_Illegal}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(Vector3, Min, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector3_Min, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector3, Multiply, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector3_Multiply, NI_Illegal}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(Vector3, MultiplyAddEstimate, 3, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector3_MultiplyAddEstimate, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector3, Negate, 1, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector3_Negate, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector3, Normalize, 1, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector3_Normalize, NI_Illegal}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(Vector3, op_Addition, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector3_op_Addition, NI_Illegal}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(Vector3, op_Division, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector3_op_Division, NI_Illegal}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(Vector3, op_Equality, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector3_op_Equality, NI_Illegal}, SimdAsHWIntrinsicFlag::None) @@ -155,77 +81,15 @@ SIMD_AS_HWINTRINSIC_ID(Vector3, op_Multiply, SIMD_AS_HWINTRINSIC_ID(Vector3, op_Subtraction, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector3_op_Subtraction, NI_Illegal}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(Vector3, op_UnaryNegation, 1, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector3_op_UnaryNegation, NI_Illegal}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_NM(Vector3, Sqrt, "SquareRoot", 1, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector3_Sqrt, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector3, Subtract, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector3_Subtract, NI_Illegal}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(Vector3, WithElement, 3, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector3_WithElement, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -// ************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************* -// ISA ID Name NumArg Instructions Flags -// {TYP_BYTE, TYP_UBYTE, TYP_SHORT, TYP_USHORT, TYP_INT, TYP_UINT, TYP_LONG, TYP_ULONG, TYP_FLOAT, TYP_DOUBLE} -// ************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************* -// Vector4 Intrinsics -SIMD_AS_HWINTRINSIC_ID(Vector4, Abs, 1, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector4_Abs, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector4, Add, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector4_Add, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector4, Clamp, 3, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector4_Clamp, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_NM(Vector4, Create, ".ctor", 5, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector4_Create, NI_Illegal}, SimdAsHWIntrinsicFlag::InstanceMethod | SimdAsHWIntrinsicFlag::SpillSideEffectsOp1) -SIMD_AS_HWINTRINSIC_NM(Vector4, CreateBroadcast, ".ctor", 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector4_CreateBroadcast, NI_Illegal}, SimdAsHWIntrinsicFlag::InstanceMethod | SimdAsHWIntrinsicFlag::SpillSideEffectsOp1) -SIMD_AS_HWINTRINSIC_NM(Vector4, CreateFromVector2, ".ctor", 4, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector4_CreateFromVector2, NI_Illegal}, SimdAsHWIntrinsicFlag::InstanceMethod | SimdAsHWIntrinsicFlag::SpillSideEffectsOp1 | SimdAsHWIntrinsicFlag::BaseTypeFromThisArg) -SIMD_AS_HWINTRINSIC_NM(Vector4, CreateFromVector3, ".ctor", 3, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector4_CreateFromVector3, NI_Illegal}, SimdAsHWIntrinsicFlag::InstanceMethod | SimdAsHWIntrinsicFlag::SpillSideEffectsOp1 | SimdAsHWIntrinsicFlag::BaseTypeFromThisArg) -SIMD_AS_HWINTRINSIC_ID(Vector4, Distance, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector4_Distance, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector4, DistanceSquared, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector4_DistanceSquared, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector4, Divide, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector4_Divide, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector4, Dot, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector4_Dot, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector4, FusedMultiplyAdd, 3, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector4_FusedMultiplyAdd, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector4, get_Item, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector4_get_Item, NI_Illegal}, SimdAsHWIntrinsicFlag::InstanceMethod | SimdAsHWIntrinsicFlag::BaseTypeFromThisArg) -SIMD_AS_HWINTRINSIC_ID(Vector4, get_One, 0, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector4_get_One, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector4, get_UnitX, 0, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector4_get_UnitX, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector4, get_UnitY, 0, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector4_get_UnitY, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector4, get_UnitZ, 0, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector4_get_UnitZ, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector4, get_UnitW, 0, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector4_get_UnitW, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector4, get_Zero, 0, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector4_get_Zero, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector4, GetElement, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector4_GetElement, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector4, Length, 1, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector4_Length, NI_Illegal}, SimdAsHWIntrinsicFlag::InstanceMethod) -SIMD_AS_HWINTRINSIC_ID(Vector4, LengthSquared, 1, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector4_LengthSquared, NI_Illegal}, SimdAsHWIntrinsicFlag::InstanceMethod) -SIMD_AS_HWINTRINSIC_ID(Vector4, Lerp, 3, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector4_Lerp, NI_Illegal}, SimdAsHWIntrinsicFlag::SpillSideEffectsOp1 | SimdAsHWIntrinsicFlag::SpillSideEffectsOp2) -SIMD_AS_HWINTRINSIC_ID(Vector4, Max, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector4_Max, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector4, Min, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector4_Min, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector4, Multiply, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector4_Multiply, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector4, MultiplyAddEstimate, 3, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector4_MultiplyAddEstimate, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector4, Negate, 1, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector4_Negate, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector4, Normalize, 1, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector4_Normalize, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector4, op_Addition, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector4_op_Addition, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector4, op_Division, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector4_op_Division, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector4, op_Equality, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector4_op_Equality, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector4, op_Inequality, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector4_op_Inequality, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector4, op_Multiply, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector4_op_Multiply, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector4, op_Subtraction, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector4_op_Subtraction, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector4, op_UnaryNegation, 1, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector4_op_UnaryNegation, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_NM(Vector4, Sqrt, "SquareRoot", 1, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector4_Sqrt, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector4, Subtract, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector4_Subtract, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(Vector4, WithElement, 3, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Vector4_WithElement, NI_Illegal}, SimdAsHWIntrinsicFlag::None) - // ************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************* // ISA ID Name NumArg Instructions Flags // {TYP_BYTE, TYP_UBYTE, TYP_SHORT, TYP_USHORT, TYP_INT, TYP_UINT, TYP_LONG, TYP_ULONG, TYP_FLOAT, TYP_DOUBLE} // ************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************* // Vector Intrinsics SIMD_AS_HWINTRINSIC_ID(VectorT, Abs, 1, {NI_VectorT_Abs, NI_VectorT_Abs, NI_VectorT_Abs, NI_VectorT_Abs, NI_VectorT_Abs, NI_VectorT_Abs, NI_VectorT_Abs, NI_VectorT_Abs, NI_VectorT_Abs, NI_VectorT_Abs}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(VectorT, Add, 2, {NI_VectorT_Add, NI_VectorT_Add, NI_VectorT_Add, NI_VectorT_Add, NI_VectorT_Add, NI_VectorT_Add, NI_VectorT_Add, NI_VectorT_Add, NI_VectorT_Add, NI_VectorT_Add}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT, AndNot, 2, {NI_VectorT_AndNot, NI_VectorT_AndNot, NI_VectorT_AndNot, NI_VectorT_AndNot, NI_VectorT_AndNot, NI_VectorT_AndNot, NI_VectorT_AndNot, NI_VectorT_AndNot, NI_VectorT_AndNot, NI_VectorT_AndNot}, SimdAsHWIntrinsicFlag::SpillSideEffectsOp1) -SIMD_AS_HWINTRINSIC_ID(VectorT, As, 1, {NI_VectorT_As, NI_VectorT_As, NI_VectorT_As, NI_VectorT_As, NI_VectorT_As, NI_VectorT_As, NI_VectorT_As, NI_VectorT_As, NI_VectorT_As, NI_VectorT_As}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(VectorT, AsVectorByte, 1, {NI_VectorT_AsVectorByte, NI_VectorT_AsVectorByte, NI_VectorT_AsVectorByte, NI_VectorT_AsVectorByte, NI_VectorT_AsVectorByte, NI_VectorT_AsVectorByte, NI_VectorT_AsVectorByte, NI_VectorT_AsVectorByte, NI_VectorT_AsVectorByte, NI_VectorT_AsVectorByte}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(VectorT, AsVectorDouble, 1, {NI_VectorT_AsVectorDouble, NI_VectorT_AsVectorDouble, NI_VectorT_AsVectorDouble, NI_VectorT_AsVectorDouble, NI_VectorT_AsVectorDouble, NI_VectorT_AsVectorDouble, NI_VectorT_AsVectorDouble, NI_VectorT_AsVectorDouble, NI_VectorT_AsVectorDouble, NI_VectorT_AsVectorDouble}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(VectorT, AsVectorInt16, 1, {NI_VectorT_AsVectorInt16, NI_VectorT_AsVectorInt16, NI_VectorT_AsVectorInt16, NI_VectorT_AsVectorInt16, NI_VectorT_AsVectorInt16, NI_VectorT_AsVectorInt16, NI_VectorT_AsVectorInt16, NI_VectorT_AsVectorInt16, NI_VectorT_AsVectorInt16, NI_VectorT_AsVectorInt16}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(VectorT, AsVectorInt32, 1, {NI_VectorT_AsVectorInt32, NI_VectorT_AsVectorInt32, NI_VectorT_AsVectorInt32, NI_VectorT_AsVectorInt32, NI_VectorT_AsVectorInt32, NI_VectorT_AsVectorInt32, NI_VectorT_AsVectorInt32, NI_VectorT_AsVectorInt32, NI_VectorT_AsVectorInt32, NI_VectorT_AsVectorInt32}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(VectorT, AsVectorInt64, 1, {NI_VectorT_AsVectorInt64, NI_VectorT_AsVectorInt64, NI_VectorT_AsVectorInt64, NI_VectorT_AsVectorInt64, NI_VectorT_AsVectorInt64, NI_VectorT_AsVectorInt64, NI_VectorT_AsVectorInt64, NI_VectorT_AsVectorInt64, NI_VectorT_AsVectorInt64, NI_VectorT_AsVectorInt64}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(VectorT, AsVectorNInt, 1, {NI_VectorT_AsVectorNInt, NI_VectorT_AsVectorNInt, NI_VectorT_AsVectorNInt, NI_VectorT_AsVectorNInt, NI_VectorT_AsVectorNInt, NI_VectorT_AsVectorNInt, NI_VectorT_AsVectorNInt, NI_VectorT_AsVectorNInt, NI_VectorT_AsVectorNInt, NI_VectorT_AsVectorNInt}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(VectorT, AsVectorNUInt, 1, {NI_VectorT_AsVectorNUInt, NI_VectorT_AsVectorNUInt, NI_VectorT_AsVectorNUInt, NI_VectorT_AsVectorNUInt, NI_VectorT_AsVectorNUInt, NI_VectorT_AsVectorNUInt, NI_VectorT_AsVectorNUInt, NI_VectorT_AsVectorNUInt, NI_VectorT_AsVectorNUInt, NI_VectorT_AsVectorNUInt}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(VectorT, AsVectorSByte, 1, {NI_VectorT_AsVectorSByte, NI_VectorT_AsVectorSByte, NI_VectorT_AsVectorSByte, NI_VectorT_AsVectorSByte, NI_VectorT_AsVectorSByte, NI_VectorT_AsVectorSByte, NI_VectorT_AsVectorSByte, NI_VectorT_AsVectorSByte, NI_VectorT_AsVectorSByte, NI_VectorT_AsVectorSByte}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(VectorT, AsVectorSingle, 1, {NI_VectorT_AsVectorSingle, NI_VectorT_AsVectorSingle, NI_VectorT_AsVectorSingle, NI_VectorT_AsVectorSingle, NI_VectorT_AsVectorSingle, NI_VectorT_AsVectorSingle, NI_VectorT_AsVectorSingle, NI_VectorT_AsVectorSingle, NI_VectorT_AsVectorSingle, NI_VectorT_AsVectorSingle}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(VectorT, AsVectorUInt16, 1, {NI_VectorT_AsVectorUInt16, NI_VectorT_AsVectorUInt16, NI_VectorT_AsVectorUInt16, NI_VectorT_AsVectorUInt16, NI_VectorT_AsVectorUInt16, NI_VectorT_AsVectorUInt16, NI_VectorT_AsVectorUInt16, NI_VectorT_AsVectorUInt16, NI_VectorT_AsVectorUInt16, NI_VectorT_AsVectorUInt16}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(VectorT, AsVectorUInt32, 1, {NI_VectorT_AsVectorUInt32, NI_VectorT_AsVectorUInt32, NI_VectorT_AsVectorUInt32, NI_VectorT_AsVectorUInt32, NI_VectorT_AsVectorUInt32, NI_VectorT_AsVectorUInt32, NI_VectorT_AsVectorUInt32, NI_VectorT_AsVectorUInt32, NI_VectorT_AsVectorUInt32, NI_VectorT_AsVectorUInt32}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(VectorT, AsVectorUInt64, 1, {NI_VectorT_AsVectorUInt64, NI_VectorT_AsVectorUInt64, NI_VectorT_AsVectorUInt64, NI_VectorT_AsVectorUInt64, NI_VectorT_AsVectorUInt64, NI_VectorT_AsVectorUInt64, NI_VectorT_AsVectorUInt64, NI_VectorT_AsVectorUInt64, NI_VectorT_AsVectorUInt64, NI_VectorT_AsVectorUInt64}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(VectorT, BitwiseAnd, 2, {NI_VectorT_BitwiseAnd, NI_VectorT_BitwiseAnd, NI_VectorT_BitwiseAnd, NI_VectorT_BitwiseAnd, NI_VectorT_BitwiseAnd, NI_VectorT_BitwiseAnd, NI_VectorT_BitwiseAnd, NI_VectorT_BitwiseAnd, NI_VectorT_BitwiseAnd, NI_VectorT_BitwiseAnd}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(VectorT, BitwiseOr, 2, {NI_VectorT_BitwiseOr, NI_VectorT_BitwiseOr, NI_VectorT_BitwiseOr, NI_VectorT_BitwiseOr, NI_VectorT_BitwiseOr, NI_VectorT_BitwiseOr, NI_VectorT_BitwiseOr, NI_VectorT_BitwiseOr, NI_VectorT_BitwiseOr, NI_VectorT_BitwiseOr}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT, Ceiling, 1, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_VectorT_Ceiling, NI_VectorT_Ceiling}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT, ConditionalSelect, 3, {NI_VectorT_ConditionalSelect, NI_VectorT_ConditionalSelect, NI_VectorT_ConditionalSelect, NI_VectorT_ConditionalSelect, NI_VectorT_ConditionalSelect, NI_VectorT_ConditionalSelect, NI_VectorT_ConditionalSelect, NI_VectorT_ConditionalSelect, NI_VectorT_ConditionalSelect, NI_VectorT_ConditionalSelect}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT, ConvertToDouble, 1, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_VectorT_ConvertToDouble, NI_VectorT_ConvertToDouble, NI_Illegal, NI_Illegal}, SimdAsHWIntrinsicFlag::None) @@ -240,18 +104,14 @@ SIMD_AS_HWINTRINSIC_ID(VectorT, ConvertToUInt64, SIMD_AS_HWINTRINSIC_ID(VectorT, ConvertToUInt64Native, 1, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_VectorT_ConvertToUInt64Native}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_NM(VectorT, CreateBroadcast, ".ctor", 2, {NI_VectorT_CreateBroadcast, NI_VectorT_CreateBroadcast, NI_VectorT_CreateBroadcast, NI_VectorT_CreateBroadcast, NI_VectorT_CreateBroadcast, NI_VectorT_CreateBroadcast, NI_VectorT_CreateBroadcast, NI_VectorT_CreateBroadcast, NI_VectorT_CreateBroadcast, NI_VectorT_CreateBroadcast}, SimdAsHWIntrinsicFlag::InstanceMethod | SimdAsHWIntrinsicFlag::SpillSideEffectsOp1) SIMD_AS_HWINTRINSIC_ID(VectorT, CreateSequence, 2, {NI_VectorT_CreateSequence, NI_VectorT_CreateSequence, NI_VectorT_CreateSequence, NI_VectorT_CreateSequence, NI_VectorT_CreateSequence, NI_VectorT_CreateSequence, NI_VectorT_CreateSequence, NI_VectorT_CreateSequence, NI_VectorT_CreateSequence, NI_VectorT_CreateSequence}, SimdAsHWIntrinsicFlag::SpillSideEffectsOp1) -SIMD_AS_HWINTRINSIC_ID(VectorT, Divide, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_VectorT_Divide, NI_VectorT_Divide}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT, Dot, 2, {NI_Illegal, NI_Illegal, NI_VectorT_Dot, NI_VectorT_Dot, NI_VectorT_Dot, NI_VectorT_Dot, NI_Illegal, NI_Illegal, NI_VectorT_Dot, NI_VectorT_Dot}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT, Equals, 2, {NI_VectorT_Equals, NI_VectorT_Equals, NI_VectorT_Equals, NI_VectorT_Equals, NI_VectorT_Equals, NI_VectorT_Equals, NI_VectorT_Equals, NI_VectorT_Equals, NI_VectorT_Equals, NI_VectorT_Equals}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(VectorT, EqualsAll, 2, {NI_VectorT_EqualsAll, NI_VectorT_EqualsAll, NI_VectorT_EqualsAll, NI_VectorT_EqualsAll, NI_VectorT_EqualsAll, NI_VectorT_EqualsAll, NI_VectorT_EqualsAll, NI_VectorT_EqualsAll, NI_VectorT_EqualsAll, NI_VectorT_EqualsAll}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT, EqualsAny, 2, {NI_VectorT_EqualsAny, NI_VectorT_EqualsAny, NI_VectorT_EqualsAny, NI_VectorT_EqualsAny, NI_VectorT_EqualsAny, NI_VectorT_EqualsAny, NI_VectorT_EqualsAny, NI_VectorT_EqualsAny, NI_VectorT_EqualsAny, NI_VectorT_EqualsAny}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT, Floor, 1, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_VectorT_Floor, NI_VectorT_Floor}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT, FusedMultiplyAdd, 3, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_VectorT_FusedMultiplyAdd, NI_VectorT_FusedMultiplyAdd}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT, get_AllBitsSet, 0, {NI_VectorT_get_AllBitsSet, NI_VectorT_get_AllBitsSet, NI_VectorT_get_AllBitsSet, NI_VectorT_get_AllBitsSet, NI_VectorT_get_AllBitsSet, NI_VectorT_get_AllBitsSet, NI_VectorT_get_AllBitsSet, NI_VectorT_get_AllBitsSet, NI_VectorT_get_AllBitsSet, NI_VectorT_get_AllBitsSet}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT, get_Indices, 0, {NI_VectorT_get_Indices, NI_VectorT_get_Indices, NI_VectorT_get_Indices, NI_VectorT_get_Indices, NI_VectorT_get_Indices, NI_VectorT_get_Indices, NI_VectorT_get_Indices, NI_VectorT_get_Indices, NI_VectorT_get_Indices, NI_VectorT_get_Indices}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(VectorT, get_Item, 2, {NI_VectorT_get_Item, NI_VectorT_get_Item, NI_VectorT_get_Item, NI_VectorT_get_Item, NI_VectorT_get_Item, NI_VectorT_get_Item, NI_VectorT_get_Item, NI_VectorT_get_Item, NI_VectorT_get_Item, NI_VectorT_get_Item}, SimdAsHWIntrinsicFlag::InstanceMethod | SimdAsHWIntrinsicFlag::BaseTypeFromThisArg) SIMD_AS_HWINTRINSIC_ID(VectorT, get_One, 0, {NI_VectorT_get_One, NI_VectorT_get_One, NI_VectorT_get_One, NI_VectorT_get_One, NI_VectorT_get_One, NI_VectorT_get_One, NI_VectorT_get_One, NI_VectorT_get_One, NI_VectorT_get_One, NI_VectorT_get_One}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(VectorT, get_Zero, 0, {NI_VectorT_get_Zero, NI_VectorT_get_Zero, NI_VectorT_get_Zero, NI_VectorT_get_Zero, NI_VectorT_get_Zero, NI_VectorT_get_Zero, NI_VectorT_get_Zero, NI_VectorT_get_Zero, NI_VectorT_get_Zero, NI_VectorT_get_Zero}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT, GetElement, 2, {NI_VectorT_GetElement, NI_VectorT_GetElement, NI_VectorT_GetElement, NI_VectorT_GetElement, NI_VectorT_GetElement, NI_VectorT_GetElement, NI_VectorT_GetElement, NI_VectorT_GetElement, NI_VectorT_GetElement, NI_VectorT_GetElement}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT, GreaterThan, 2, {NI_VectorT_GreaterThan, NI_VectorT_GreaterThan, NI_VectorT_GreaterThan, NI_VectorT_GreaterThan, NI_VectorT_GreaterThan, NI_VectorT_GreaterThan, NI_VectorT_GreaterThan, NI_VectorT_GreaterThan, NI_VectorT_GreaterThan, NI_VectorT_GreaterThan}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT, GreaterThanAll, 2, {NI_VectorT_GreaterThanAll, NI_VectorT_GreaterThanAll, NI_VectorT_GreaterThanAll, NI_VectorT_GreaterThanAll, NI_VectorT_GreaterThanAll, NI_VectorT_GreaterThanAll, NI_VectorT_GreaterThanAll, NI_VectorT_GreaterThanAll, NI_VectorT_GreaterThanAll, NI_VectorT_GreaterThanAll}, SimdAsHWIntrinsicFlag::None) @@ -265,25 +125,20 @@ SIMD_AS_HWINTRINSIC_ID(VectorT, LessThanAny, SIMD_AS_HWINTRINSIC_ID(VectorT, LessThanOrEqual, 2, {NI_VectorT_LessThanOrEqual, NI_VectorT_LessThanOrEqual, NI_VectorT_LessThanOrEqual, NI_VectorT_LessThanOrEqual, NI_VectorT_LessThanOrEqual, NI_VectorT_LessThanOrEqual, NI_VectorT_LessThanOrEqual, NI_VectorT_LessThanOrEqual, NI_VectorT_LessThanOrEqual, NI_VectorT_LessThanOrEqual}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT, LessThanOrEqualAll, 2, {NI_VectorT_LessThanOrEqualAll, NI_VectorT_LessThanOrEqualAll, NI_VectorT_LessThanOrEqualAll, NI_VectorT_LessThanOrEqualAll, NI_VectorT_LessThanOrEqualAll, NI_VectorT_LessThanOrEqualAll, NI_VectorT_LessThanOrEqualAll, NI_VectorT_LessThanOrEqualAll, NI_VectorT_LessThanOrEqualAll, NI_VectorT_LessThanOrEqualAll}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT, LessThanOrEqualAny, 2, {NI_VectorT_LessThanOrEqualAny, NI_VectorT_LessThanOrEqualAny, NI_VectorT_LessThanOrEqualAny, NI_VectorT_LessThanOrEqualAny, NI_VectorT_LessThanOrEqualAny, NI_VectorT_LessThanOrEqualAny, NI_VectorT_LessThanOrEqualAny, NI_VectorT_LessThanOrEqualAny, NI_VectorT_LessThanOrEqualAny, NI_VectorT_LessThanOrEqualAny}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(VectorT, Load, 1, {NI_VectorT_Load, NI_VectorT_Load, NI_VectorT_Load, NI_VectorT_Load, NI_VectorT_Load, NI_VectorT_Load, NI_VectorT_Load, NI_VectorT_Load, NI_VectorT_Load, NI_VectorT_Load}, SimdAsHWIntrinsicFlag::KeepBaseTypeFromRet) SIMD_AS_HWINTRINSIC_ID(VectorT, LoadAligned, 1, {NI_VectorT_LoadAligned, NI_VectorT_LoadAligned, NI_VectorT_LoadAligned, NI_VectorT_LoadAligned, NI_VectorT_LoadAligned, NI_VectorT_LoadAligned, NI_VectorT_LoadAligned, NI_VectorT_LoadAligned, NI_VectorT_LoadAligned, NI_VectorT_LoadAligned}, SimdAsHWIntrinsicFlag::KeepBaseTypeFromRet) SIMD_AS_HWINTRINSIC_ID(VectorT, LoadAlignedNonTemporal, 1, {NI_VectorT_LoadAlignedNonTemporal, NI_VectorT_LoadAlignedNonTemporal, NI_VectorT_LoadAlignedNonTemporal, NI_VectorT_LoadAlignedNonTemporal, NI_VectorT_LoadAlignedNonTemporal, NI_VectorT_LoadAlignedNonTemporal, NI_VectorT_LoadAlignedNonTemporal, NI_VectorT_LoadAlignedNonTemporal, NI_VectorT_LoadAlignedNonTemporal, NI_VectorT_LoadAlignedNonTemporal}, SimdAsHWIntrinsicFlag::KeepBaseTypeFromRet) SIMD_AS_HWINTRINSIC_ID(VectorT, LoadUnsafe, 1, {NI_VectorT_LoadUnsafe, NI_VectorT_LoadUnsafe, NI_VectorT_LoadUnsafe, NI_VectorT_LoadUnsafe, NI_VectorT_LoadUnsafe, NI_VectorT_LoadUnsafe, NI_VectorT_LoadUnsafe, NI_VectorT_LoadUnsafe, NI_VectorT_LoadUnsafe, NI_VectorT_LoadUnsafe}, SimdAsHWIntrinsicFlag::KeepBaseTypeFromRet) SIMD_AS_HWINTRINSIC_NM(VectorT, LoadUnsafeIndex, "LoadUnsafe", 2, {NI_VectorT_LoadUnsafeIndex, NI_VectorT_LoadUnsafeIndex, NI_VectorT_LoadUnsafeIndex, NI_VectorT_LoadUnsafeIndex, NI_VectorT_LoadUnsafeIndex, NI_VectorT_LoadUnsafeIndex, NI_VectorT_LoadUnsafeIndex, NI_VectorT_LoadUnsafeIndex, NI_VectorT_LoadUnsafeIndex, NI_VectorT_LoadUnsafeIndex}, SimdAsHWIntrinsicFlag::KeepBaseTypeFromRet) SIMD_AS_HWINTRINSIC_ID(VectorT, Max, 2, {NI_VectorT_Max, NI_VectorT_Max, NI_VectorT_Max, NI_VectorT_Max, NI_VectorT_Max, NI_VectorT_Max, NI_VectorT_Max, NI_VectorT_Max, NI_VectorT_Max, NI_VectorT_Max}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT, Min, 2, {NI_VectorT_Min, NI_VectorT_Min, NI_VectorT_Min, NI_VectorT_Min, NI_VectorT_Min, NI_VectorT_Min, NI_VectorT_Min, NI_VectorT_Min, NI_VectorT_Min, NI_VectorT_Min}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(VectorT, Multiply, 2, {NI_Illegal, NI_Illegal, NI_VectorT_Multiply, NI_VectorT_Multiply, NI_VectorT_Multiply, NI_VectorT_Multiply, NI_VectorT_Multiply, NI_VectorT_Multiply, NI_VectorT_Multiply, NI_VectorT_Multiply}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT, MultiplyAddEstimate, 3, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_VectorT_MultiplyAddEstimate, NI_VectorT_MultiplyAddEstimate}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT, Narrow, 2, {NI_VectorT_Narrow, NI_VectorT_Narrow, NI_VectorT_Narrow, NI_VectorT_Narrow, NI_VectorT_Narrow, NI_VectorT_Narrow, NI_VectorT_Narrow, NI_VectorT_Narrow, NI_VectorT_Narrow, NI_VectorT_Narrow}, SimdAsHWIntrinsicFlag::KeepBaseTypeFromRet) -SIMD_AS_HWINTRINSIC_ID(VectorT, Negate, 1, {NI_VectorT_Negate, NI_VectorT_Negate, NI_VectorT_Negate, NI_VectorT_Negate, NI_VectorT_Negate, NI_VectorT_Negate, NI_VectorT_Negate, NI_VectorT_Negate, NI_VectorT_Negate, NI_VectorT_Negate}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(VectorT, OnesComplement, 1, {NI_VectorT_OnesComplement, NI_VectorT_OnesComplement, NI_VectorT_OnesComplement, NI_VectorT_OnesComplement, NI_VectorT_OnesComplement, NI_VectorT_OnesComplement, NI_VectorT_OnesComplement, NI_VectorT_OnesComplement, NI_VectorT_OnesComplement, NI_VectorT_OnesComplement}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT, op_Addition, 2, {NI_VectorT_op_Addition, NI_VectorT_op_Addition, NI_VectorT_op_Addition, NI_VectorT_op_Addition, NI_VectorT_op_Addition, NI_VectorT_op_Addition, NI_VectorT_op_Addition, NI_VectorT_op_Addition, NI_VectorT_op_Addition, NI_VectorT_op_Addition}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT, op_BitwiseAnd, 2, {NI_VectorT_op_BitwiseAnd, NI_VectorT_op_BitwiseAnd, NI_VectorT_op_BitwiseAnd, NI_VectorT_op_BitwiseAnd, NI_VectorT_op_BitwiseAnd, NI_VectorT_op_BitwiseAnd, NI_VectorT_op_BitwiseAnd, NI_VectorT_op_BitwiseAnd, NI_VectorT_op_BitwiseAnd, NI_VectorT_op_BitwiseAnd}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT, op_BitwiseOr, 2, {NI_VectorT_op_BitwiseOr, NI_VectorT_op_BitwiseOr, NI_VectorT_op_BitwiseOr, NI_VectorT_op_BitwiseOr, NI_VectorT_op_BitwiseOr, NI_VectorT_op_BitwiseOr, NI_VectorT_op_BitwiseOr, NI_VectorT_op_BitwiseOr, NI_VectorT_op_BitwiseOr, NI_VectorT_op_BitwiseOr}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT, op_Division, 2, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_VectorT_op_Division, NI_VectorT_op_Division}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT, op_Equality, 2, {NI_VectorT_op_Equality, NI_VectorT_op_Equality, NI_VectorT_op_Equality, NI_VectorT_op_Equality, NI_VectorT_op_Equality, NI_VectorT_op_Equality, NI_VectorT_op_Equality, NI_VectorT_op_Equality, NI_VectorT_op_Equality, NI_VectorT_op_Equality}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT, op_ExclusiveOr, 2, {NI_VectorT_op_ExclusiveOr, NI_VectorT_op_ExclusiveOr, NI_VectorT_op_ExclusiveOr, NI_VectorT_op_ExclusiveOr, NI_VectorT_op_ExclusiveOr, NI_VectorT_op_ExclusiveOr, NI_VectorT_op_ExclusiveOr, NI_VectorT_op_ExclusiveOr, NI_VectorT_op_ExclusiveOr, NI_VectorT_op_ExclusiveOr}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(VectorT, op_Explicit, 1, {NI_VectorT_op_Explicit, NI_VectorT_op_Explicit, NI_VectorT_op_Explicit, NI_VectorT_op_Explicit, NI_VectorT_op_Explicit, NI_VectorT_op_Explicit, NI_VectorT_op_Explicit, NI_VectorT_op_Explicit, NI_VectorT_op_Explicit, NI_VectorT_op_Explicit}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT, op_Inequality, 2, {NI_VectorT_op_Inequality, NI_VectorT_op_Inequality, NI_VectorT_op_Inequality, NI_VectorT_op_Inequality, NI_VectorT_op_Inequality, NI_VectorT_op_Inequality, NI_VectorT_op_Inequality, NI_VectorT_op_Inequality, NI_VectorT_op_Inequality, NI_VectorT_op_Inequality}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT, op_LeftShift, 2, {NI_Illegal, NI_Illegal, NI_VectorT_op_LeftShift, NI_VectorT_op_LeftShift, NI_VectorT_op_LeftShift, NI_VectorT_op_LeftShift, NI_VectorT_op_LeftShift, NI_VectorT_op_LeftShift, NI_VectorT_op_LeftShift, NI_VectorT_op_LeftShift}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT, op_Multiply, 2, {NI_Illegal, NI_Illegal, NI_VectorT_op_Multiply, NI_VectorT_op_Multiply, NI_VectorT_op_Multiply, NI_VectorT_op_Multiply, NI_Illegal, NI_Illegal, NI_VectorT_op_Multiply, NI_VectorT_op_Multiply}, SimdAsHWIntrinsicFlag::None) @@ -291,24 +146,17 @@ SIMD_AS_HWINTRINSIC_ID(VectorT, op_OnesComplement, SIMD_AS_HWINTRINSIC_ID(VectorT, op_RightShift, 2, {NI_Illegal, NI_Illegal, NI_VectorT_op_RightShift, NI_VectorT_op_RightShift, NI_VectorT_op_RightShift, NI_VectorT_op_RightShift, NI_VectorT_op_RightShift, NI_VectorT_op_RightShift, NI_VectorT_op_RightShift, NI_VectorT_op_RightShift}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT, op_Subtraction, 2, {NI_VectorT_op_Subtraction, NI_VectorT_op_Subtraction, NI_VectorT_op_Subtraction, NI_VectorT_op_Subtraction, NI_VectorT_op_Subtraction, NI_VectorT_op_Subtraction, NI_VectorT_op_Subtraction, NI_VectorT_op_Subtraction, NI_VectorT_op_Subtraction, NI_VectorT_op_Subtraction}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT, op_UnaryNegation, 1, {NI_VectorT_op_UnaryNegation, NI_VectorT_op_UnaryNegation, NI_VectorT_op_UnaryNegation, NI_VectorT_op_UnaryNegation, NI_VectorT_op_UnaryNegation, NI_VectorT_op_UnaryNegation, NI_VectorT_op_UnaryNegation, NI_VectorT_op_UnaryNegation, NI_VectorT_op_UnaryNegation, NI_VectorT_op_UnaryNegation}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(VectorT, op_UnaryPlus, 1, {NI_VectorT_op_UnaryPlus, NI_VectorT_op_UnaryPlus, NI_VectorT_op_UnaryPlus, NI_VectorT_op_UnaryPlus, NI_VectorT_op_UnaryPlus, NI_VectorT_op_UnaryPlus, NI_VectorT_op_UnaryPlus, NI_VectorT_op_UnaryPlus, NI_VectorT_op_UnaryPlus, NI_VectorT_op_UnaryPlus}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT, op_UnsignedRightShift, 2, {NI_Illegal, NI_Illegal, NI_VectorT_op_UnsignedRightShift, NI_VectorT_op_UnsignedRightShift, NI_VectorT_op_UnsignedRightShift, NI_VectorT_op_UnsignedRightShift, NI_VectorT_op_UnsignedRightShift, NI_VectorT_op_UnsignedRightShift, NI_VectorT_op_UnsignedRightShift, NI_VectorT_op_UnsignedRightShift}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(VectorT, ShiftLeft, 2, {NI_Illegal, NI_Illegal, NI_VectorT_ShiftLeft, NI_VectorT_ShiftLeft, NI_VectorT_ShiftLeft, NI_VectorT_ShiftLeft, NI_VectorT_ShiftLeft, NI_VectorT_ShiftLeft, NI_Illegal, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(VectorT, ShiftRightArithmetic, 2, {NI_Illegal, NI_Illegal, NI_VectorT_ShiftRightArithmetic, NI_Illegal, NI_VectorT_ShiftRightArithmetic, NI_Illegal, NI_VectorT_ShiftRightArithmetic, NI_Illegal, NI_Illegal, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(VectorT, ShiftRightLogical, 2, {NI_Illegal, NI_Illegal, NI_VectorT_ShiftRightLogical, NI_VectorT_ShiftRightLogical, NI_VectorT_ShiftRightLogical, NI_VectorT_ShiftRightLogical, NI_VectorT_ShiftRightLogical, NI_VectorT_ShiftRightLogical, NI_Illegal, NI_Illegal}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_NM(VectorT, Sqrt, "SquareRoot", 1, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_VectorT_Sqrt, NI_VectorT_Sqrt}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(VectorT, Store, 2, {NI_VectorT_Store, NI_VectorT_Store, NI_VectorT_Store, NI_VectorT_Store, NI_VectorT_Store, NI_VectorT_Store, NI_VectorT_Store, NI_VectorT_Store, NI_VectorT_Store, NI_VectorT_Store}, SimdAsHWIntrinsicFlag::SpillSideEffectsOp1) SIMD_AS_HWINTRINSIC_ID(VectorT, StoreAligned, 2, {NI_VectorT_StoreAligned, NI_VectorT_StoreAligned, NI_VectorT_StoreAligned, NI_VectorT_StoreAligned, NI_VectorT_StoreAligned, NI_VectorT_StoreAligned, NI_VectorT_StoreAligned, NI_VectorT_StoreAligned, NI_VectorT_StoreAligned, NI_VectorT_StoreAligned}, SimdAsHWIntrinsicFlag::SpillSideEffectsOp1) SIMD_AS_HWINTRINSIC_ID(VectorT, StoreAlignedNonTemporal, 2, {NI_VectorT_StoreAlignedNonTemporal, NI_VectorT_StoreAlignedNonTemporal, NI_VectorT_StoreAlignedNonTemporal, NI_VectorT_StoreAlignedNonTemporal, NI_VectorT_StoreAlignedNonTemporal, NI_VectorT_StoreAlignedNonTemporal, NI_VectorT_StoreAlignedNonTemporal, NI_VectorT_StoreAlignedNonTemporal, NI_VectorT_StoreAlignedNonTemporal, NI_VectorT_StoreAlignedNonTemporal}, SimdAsHWIntrinsicFlag::SpillSideEffectsOp1) SIMD_AS_HWINTRINSIC_ID(VectorT, StoreUnsafe, -1, {NI_VectorT_StoreUnsafe, NI_VectorT_StoreUnsafe, NI_VectorT_StoreUnsafe, NI_VectorT_StoreUnsafe, NI_VectorT_StoreUnsafe, NI_VectorT_StoreUnsafe, NI_VectorT_StoreUnsafe, NI_VectorT_StoreUnsafe, NI_VectorT_StoreUnsafe, NI_VectorT_StoreUnsafe}, SimdAsHWIntrinsicFlag::SpillSideEffectsOp1) SIMD_AS_HWINTRINSIC_NM(VectorT, StoreUnsafeIndex, "StoreUnsafe", 3, {NI_VectorT_StoreUnsafeIndex, NI_VectorT_StoreUnsafeIndex, NI_VectorT_StoreUnsafeIndex, NI_VectorT_StoreUnsafeIndex, NI_VectorT_StoreUnsafeIndex, NI_VectorT_StoreUnsafeIndex, NI_VectorT_StoreUnsafeIndex, NI_VectorT_StoreUnsafeIndex, NI_VectorT_StoreUnsafeIndex, NI_VectorT_StoreUnsafeIndex}, SimdAsHWIntrinsicFlag::SpillSideEffectsOp1) -SIMD_AS_HWINTRINSIC_ID(VectorT, Subtract, 2, {NI_VectorT_Subtract, NI_VectorT_Subtract, NI_VectorT_Subtract, NI_VectorT_Subtract, NI_VectorT_Subtract, NI_VectorT_Subtract, NI_VectorT_Subtract, NI_VectorT_Subtract, NI_VectorT_Subtract, NI_VectorT_Subtract}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT, Sum, 1, {NI_Illegal, NI_Illegal, NI_VectorT_Sum, NI_VectorT_Sum, NI_VectorT_Sum, NI_VectorT_Sum, NI_Illegal, NI_Illegal, NI_VectorT_Sum, NI_VectorT_Sum}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT, ToScalar, 1, {NI_VectorT_ToScalar, NI_VectorT_ToScalar, NI_VectorT_ToScalar, NI_VectorT_ToScalar, NI_VectorT_ToScalar, NI_VectorT_ToScalar, NI_VectorT_ToScalar, NI_VectorT_ToScalar, NI_VectorT_ToScalar, NI_VectorT_ToScalar}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT, WidenLower, 1, {NI_VectorT_WidenLower, NI_VectorT_WidenLower, NI_VectorT_WidenLower, NI_VectorT_WidenLower, NI_VectorT_WidenLower, NI_VectorT_WidenLower, NI_VectorT_WidenLower, NI_VectorT_WidenLower, NI_VectorT_WidenLower, NI_VectorT_WidenLower}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT, WidenUpper, 1, {NI_VectorT_WidenUpper, NI_VectorT_WidenUpper, NI_VectorT_WidenUpper, NI_VectorT_WidenUpper, NI_VectorT_WidenUpper, NI_VectorT_WidenUpper, NI_VectorT_WidenUpper, NI_VectorT_WidenUpper, NI_VectorT_WidenUpper, NI_VectorT_WidenUpper}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT, WithElement, 3, {NI_VectorT_WithElement, NI_VectorT_WithElement, NI_VectorT_WithElement, NI_VectorT_WithElement, NI_VectorT_WithElement, NI_VectorT_WithElement, NI_VectorT_WithElement, NI_VectorT_WithElement, NI_VectorT_WithElement, NI_VectorT_WithElement}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(VectorT, Xor, 2, {NI_VectorT_Xor, NI_VectorT_Xor, NI_VectorT_Xor, NI_VectorT_Xor, NI_VectorT_Xor, NI_VectorT_Xor, NI_VectorT_Xor, NI_VectorT_Xor, NI_VectorT_Xor, NI_VectorT_Xor}, SimdAsHWIntrinsicFlag::None) #undef SIMD_AS_HWINTRINSIC_NM #undef SIMD_AS_HWINTRINSIC_ID diff --git a/src/libraries/System.Private.CoreLib/src/System/Numerics/Plane.cs b/src/libraries/System.Private.CoreLib/src/System/Numerics/Plane.cs index a4636a6e76a15f..09d19a137f9173 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Numerics/Plane.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Numerics/Plane.cs @@ -30,8 +30,7 @@ public struct Plane : IEquatable [Intrinsic] public Plane(float x, float y, float z, float d) { - Normal = new Vector3(x, y, z); - D = d; + this = Vector128.Create(x, y, z, d).AsPlane(); } /// Creates a object from a specified normal and the distance along the normal from the origin. @@ -40,8 +39,7 @@ public Plane(float x, float y, float z, float d) [Intrinsic] public Plane(Vector3 normal, float d) { - Normal = normal; - D = d; + this = new Vector4(normal, d).AsPlane(); } /// Creates a object from a specified four-dimensional vector. @@ -49,8 +47,7 @@ public Plane(Vector3 normal, float d) [Intrinsic] public Plane(Vector4 value) { - Normal = new Vector3(value.X, value.Y, value.Z); - D = value.W; + this = value.AsPlane(); } /// Creates a object that contains three specified points. @@ -111,52 +108,19 @@ public static Plane CreateFromVertices(Vector3 point1, Vector3 point2, Vector3 p /// The dot product. [Intrinsic] [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static float Dot(Plane plane, Vector4 value) - { - return (plane.Normal.X * value.X) - + (plane.Normal.Y * value.Y) - + (plane.Normal.Z * value.Z) - + (plane.D * value.W); - } + public static float Dot(Plane plane, Vector4 value) => Vector128.Dot(plane.AsVector128(), value.AsVector128()); /// Returns the dot product of a specified three-dimensional vector and the normal vector of this plane plus the distance () value of the plane. /// The plane. /// The 3-dimensional vector. /// The dot product. - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static float DotCoordinate(Plane plane, Vector3 value) - { - if (Vector128.IsHardwareAccelerated) - { - return Vector3.Dot(plane.Normal, value) + plane.D; - } - else - { - return plane.Normal.X * value.X + - plane.Normal.Y * value.Y + - plane.Normal.Z * value.Z + - plane.D; - } - } + public static float DotCoordinate(Plane plane, Vector3 value) => Vector3.Dot(plane.Normal, value) + plane.D; /// Returns the dot product of a specified three-dimensional vector and the vector of this plane. /// The plane. /// The three-dimensional vector. /// The dot product. - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static float DotNormal(Plane plane, Vector3 value) - { - if (Vector128.IsHardwareAccelerated) - { - return Vector3.Dot(plane.Normal, value); - } - else - { - return plane.Normal.X * value.X + - plane.Normal.Y * value.Y + - plane.Normal.Z * value.Z; - } - } + public static float DotNormal(Plane plane, Vector3 value) => Vector3.Dot(plane.Normal, value); /// Creates a new object whose normal vector is the source plane's normal vector normalized. /// The source plane. @@ -164,36 +128,15 @@ public static float DotNormal(Plane plane, Vector3 value) [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Plane Normalize(Plane value) { - if (Vector128.IsHardwareAccelerated) + float normalLengthSquared = value.Normal.LengthSquared(); + + if (MathF.Abs(normalLengthSquared - 1.0f) < NormalizeEpsilon) { - float normalLengthSquared = value.Normal.LengthSquared(); - if (MathF.Abs(normalLengthSquared - 1.0f) < NormalizeEpsilon) - { - // It already normalized, so we don't need to farther process. - return value; - } - float normalLength = MathF.Sqrt(normalLengthSquared); - return new Plane( - value.Normal / normalLength, - value.D / normalLength); + // It already normalized, so we don't need to farther process. + return value; } - else - { - float f = value.Normal.X * value.Normal.X + value.Normal.Y * value.Normal.Y + value.Normal.Z * value.Normal.Z; - if (MathF.Abs(f - 1.0f) < NormalizeEpsilon) - { - return value; // It already normalized, so we don't need to further process. - } - - float fInv = 1.0f / MathF.Sqrt(f); - - return new Plane( - value.Normal.X * fInv, - value.Normal.Y * fInv, - value.Normal.Z * fInv, - value.D * fInv); - } + return (value.AsVector128() / MathF.Sqrt(normalLengthSquared)).AsPlane(); } /// Transforms a normalized plane by a 4x4 matrix. @@ -267,11 +210,7 @@ public static Plane Transform(Plane plane, Quaternion rotation) /// The method defines the operation of the equality operator for objects. [Intrinsic] [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static bool operator ==(Plane value1, Plane value2) - { - return (value1.Normal == value2.Normal) - && (value1.D == value2.D); - } + public static bool operator ==(Plane value1, Plane value2) => value1.AsVector128() == value2.AsVector128(); /// Returns a value that indicates whether two planes are not equal. /// The first plane to compare. @@ -279,52 +218,24 @@ public static Plane Transform(Plane plane, Quaternion rotation) /// if and are not equal; otherwise, . /// The method defines the operation of the inequality operator for objects. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static bool operator !=(Plane value1, Plane value2) - { - return !(value1 == value2); - } + public static bool operator !=(Plane value1, Plane value2) => !(value1 == value2); /// Returns a value that indicates whether this instance and a specified object are equal. /// The object to compare with the current instance. /// if the current instance and are equal; otherwise, . If is , the method returns . /// The current instance and are equal if is a object and their and fields are equal. - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public override readonly bool Equals([NotNullWhen(true)] object? obj) - { - return (obj is Plane other) && Equals(other); - } + public override readonly bool Equals([NotNullWhen(true)] object? obj) => (obj is Plane other) && Equals(other); /// Returns a value that indicates whether this instance and another plane object are equal. /// The other plane. /// if the two planes are equal; otherwise, . /// Two objects are equal if their and fields are equal. [MethodImpl(MethodImplOptions.AggressiveInlining)] - public readonly bool Equals(Plane other) - { - // This function needs to account for floating-point equality around NaN - // and so must behave equivalently to the underlying float/double.Equals - - if (Vector128.IsHardwareAccelerated) - { - return this.AsVector128().Equals(other.AsVector128()); - } - - return SoftwareFallback(in this, other); - - static bool SoftwareFallback(in Plane self, Plane other) - { - return self.Normal.Equals(other.Normal) - && self.D.Equals(other.D); - } - } + public readonly bool Equals(Plane other) => this.AsVector128().Equals(other.AsVector128()); /// Returns the hash code for this instance. /// The hash code. - public override readonly int GetHashCode() - { - return HashCode.Combine(Normal, D); - } + public override readonly int GetHashCode() => HashCode.Combine(Normal, D); /// Returns the string representation of this plane object. /// A string that represents this object. diff --git a/src/libraries/System.Private.CoreLib/src/System/Numerics/Quaternion.Extensions.cs b/src/libraries/System.Private.CoreLib/src/System/Numerics/Quaternion.Extensions.cs index 7c0e561c2edec1..42ac2e3d0dfc3d 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Numerics/Quaternion.Extensions.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Numerics/Quaternion.Extensions.cs @@ -3,6 +3,7 @@ using System.Diagnostics; using System.Runtime.CompilerServices; +using System.Runtime.Intrinsics; namespace System.Numerics { @@ -17,12 +18,7 @@ public static unsafe partial class Vector [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static float GetElement(this Quaternion quaternion, int index) { - if ((uint)(index) >= (uint)(Quaternion.Count)) - { - ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.index); - } - - return quaternion.GetElementUnsafe(index); + return quaternion.AsVector128().GetElement(index); } /// Creates a new with the element at the specified index set to the specified value and the remaining elements set to the same value as that in the given quaternion. @@ -34,14 +30,7 @@ internal static float GetElement(this Quaternion quaternion, int index) [Intrinsic] internal static Quaternion WithElement(this Quaternion quaternion, int index, float value) { - if ((uint)(index) >= (uint)(Quaternion.Count)) - { - ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.index); - } - - Quaternion result = quaternion; - result.SetElementUnsafe(index, value); - return result; + return quaternion.AsVector128().WithElement(index, value).AsQuaternion(); } [MethodImpl(MethodImplOptions.AggressiveInlining)] diff --git a/src/libraries/System.Private.CoreLib/src/System/Numerics/Quaternion.cs b/src/libraries/System.Private.CoreLib/src/System/Numerics/Quaternion.cs index ecebdb1b3d42f6..4ec7f536ed43f3 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Numerics/Quaternion.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Numerics/Quaternion.cs @@ -38,10 +38,7 @@ public struct Quaternion : IEquatable [Intrinsic] public Quaternion(float x, float y, float z, float w) { - X = x; - Y = y; - Z = z; - W = w; + this = Vector128.Create(x, y, z, w).AsQuaternion(); } /// Creates a quaternion from the specified vector and rotation parts. @@ -50,10 +47,7 @@ public Quaternion(float x, float y, float z, float w) [Intrinsic] public Quaternion(Vector3 vectorPart, float scalarPart) { - X = vectorPart.X; - Y = vectorPart.Y; - Z = vectorPart.Z; - W = scalarPart; + this = new Vector4(vectorPart, scalarPart).AsQuaternion(); } /// Gets a quaternion that represents a zero. @@ -79,20 +73,15 @@ public static Quaternion Identity public float this[int index] { [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] readonly get => this.GetElement(index); - [MethodImpl(MethodImplOptions.AggressiveInlining)] set => this = this.WithElement(index, value); } /// Gets a value that indicates whether the current instance is the identity quaternion. /// if the current instance is the identity quaternion; otherwise, . /// - public readonly bool IsIdentity - { - get => this == Identity; - } + public readonly bool IsIdentity => this == Identity; /// Adds each element in one quaternion with its corresponding element in a second quaternion. /// The first quaternion. @@ -101,15 +90,7 @@ public readonly bool IsIdentity /// The method defines the operation of the addition operator for objects. [Intrinsic] [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Quaternion operator +(Quaternion value1, Quaternion value2) - { - return new Quaternion( - value1.X + value2.X, - value1.Y + value2.Y, - value1.Z + value2.Z, - value1.W + value2.W - ); - } + public static Quaternion operator +(Quaternion value1, Quaternion value2) => (value1.AsVector128() + value2.AsVector128()).AsQuaternion(); /// Divides one quaternion by a second quaternion. /// The dividend. @@ -162,24 +143,14 @@ public readonly bool IsIdentity /// The method defines the operation of the equality operator for objects. [Intrinsic] [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static bool operator ==(Quaternion value1, Quaternion value2) - { - return (value1.X == value2.X) - && (value1.Y == value2.Y) - && (value1.Z == value2.Z) - && (value1.W == value2.W); - } + public static bool operator ==(Quaternion value1, Quaternion value2) => value1.AsVector128() == value2.AsVector128(); /// Returns a value that indicates whether two quaternions are not equal. /// The first quaternion to compare. /// The second quaternion to compare. /// if and are not equal; otherwise, . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static bool operator !=(Quaternion value1, Quaternion value2) - { - return !(value1 == value2); - } + public static bool operator !=(Quaternion value1, Quaternion value2) => !(value1 == value2); /// Returns the quaternion that results from multiplying two quaternions together. /// The first quaternion. @@ -236,15 +207,7 @@ public readonly bool IsIdentity /// The method defines the operation of the multiplication operator for objects. [Intrinsic] [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Quaternion operator *(Quaternion value1, float value2) - { - return new Quaternion( - value1.X * value2, - value1.Y * value2, - value1.Z * value2, - value1.W * value2 - ); - } + public static Quaternion operator *(Quaternion value1, float value2) => (value1.AsVector128() * value2).AsQuaternion(); /// Subtracts each element in a second quaternion from its corresponding element in a first quaternion. /// The first quaternion. @@ -253,15 +216,7 @@ public readonly bool IsIdentity /// The method defines the operation of the subtraction operator for objects. [Intrinsic] [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Quaternion operator -(Quaternion value1, Quaternion value2) - { - return new Quaternion( - value1.X - value2.X, - value1.Y - value2.Y, - value1.Z - value2.Z, - value1.W - value2.W - ); - } + public static Quaternion operator -(Quaternion value1, Quaternion value2) => (value1.AsVector128() - value2.AsVector128()).AsQuaternion(); /// Reverses the sign of each component of the quaternion. /// The quaternion to negate. @@ -269,21 +224,14 @@ public readonly bool IsIdentity /// The method defines the operation of the unary negation operator for objects. [Intrinsic] [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Quaternion operator -(Quaternion value) - { - return Zero - value; - } + public static Quaternion operator -(Quaternion value) => (-value.AsVector128()).AsQuaternion(); /// Adds each element in one quaternion with its corresponding element in a second quaternion. /// The first quaternion. /// The second quaternion. /// The quaternion that contains the summed values of and . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Quaternion Add(Quaternion value1, Quaternion value2) - { - return value1 + value2; - } + public static Quaternion Add(Quaternion value1, Quaternion value2) => value1 + value2; /// Concatenates two quaternions. /// The first quaternion rotation in the series. @@ -325,10 +273,7 @@ public static Quaternion Concatenate(Quaternion value1, Quaternion value2) /// A new quaternion that is the conjugate of . [Intrinsic] [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Quaternion Conjugate(Quaternion value) - { - return Multiply(value, new Vector4(-1.0f, -1.0f, -1.0f, 1.0f)); - } + public static Quaternion Conjugate(Quaternion value) => (value.AsVector128() * Vector128.Create(-1.0f, -1.0f, -1.0f, 1.0f)).AsQuaternion(); /// Creates a quaternion from a unit vector and an angle to rotate around the vector. /// The unit vector to rotate around. @@ -440,27 +385,7 @@ public static Quaternion CreateFromYawPitchRoll(float yaw, float pitch, float ro /// The dividend. /// The divisor. /// The quaternion that results from dividing by . - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Quaternion Divide(Quaternion value1, Quaternion value2) - { - return value1 / value2; - } - - /// Divides the specified quaternion by a specified scalar value. - /// The quaternion. - /// The scalar value. - /// The quaternion that results from the division. - [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] - internal static Quaternion Divide(Quaternion left, float divisor) - { - return new Quaternion( - left.X / divisor, - left.Y / divisor, - left.Z / divisor, - left.W / divisor - ); - } + public static Quaternion Divide(Quaternion value1, Quaternion value2) => value1 / value2; /// Calculates the dot product of two quaternions. /// The first quaternion. @@ -468,13 +393,7 @@ internal static Quaternion Divide(Quaternion left, float divisor) /// The dot product. [Intrinsic] [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static float Dot(Quaternion quaternion1, Quaternion quaternion2) - { - return (quaternion1.X * quaternion2.X) - + (quaternion1.Y * quaternion2.Y) - + (quaternion1.Z * quaternion2.Z) - + (quaternion1.W * quaternion2.W); - } + public static float Dot(Quaternion quaternion1, Quaternion quaternion2) => Vector128.Dot(quaternion1.AsVector128(), quaternion2.AsVector128()); /// Returns the inverse of a quaternion. /// The quaternion. @@ -487,7 +406,7 @@ public static Quaternion Inverse(Quaternion value) // q = ( ------------- ------------- ) // ( a^2 + |v|^2 , a^2 + |v|^2 ) - return Divide(Conjugate(value), value.LengthSquared()); + return (Conjugate(value).AsVector128() / value.LengthSquared()).AsQuaternion(); } /// Performs a linear interpolation between two quaternions based on a value that specifies the weighting of the second quaternion. @@ -536,58 +455,27 @@ public static Quaternion Lerp(Quaternion quaternion1, Quaternion quaternion2, fl /// The first quaternion. /// The second quaternion. /// The product quaternion. - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Quaternion Multiply(Quaternion value1, Quaternion value2) - { - return value1 * value2; - } - - /// Returns a new quaternion whose values are the product of each pair of elements in specified quaternion and vector. - /// The quaternion. - /// The vector. - /// The element-wise product vector. - [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] - internal static Quaternion Multiply(Quaternion value1, Vector4 value2) - { - return new Quaternion( - value1.X * value2.X, - value1.Y * value2.Y, - value1.Z * value2.Z, - value1.W * value2.W - ); - } + public static Quaternion Multiply(Quaternion value1, Quaternion value2) => value1 * value2; /// Returns the quaternion that results from scaling all the components of a specified quaternion by a scalar factor. /// The source quaternion. /// The scalar value. /// The scaled quaternion. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Quaternion Multiply(Quaternion value1, float value2) - { - return value1 * value2; - } + public static Quaternion Multiply(Quaternion value1, float value2) => value1 * value2; /// Reverses the sign of each component of the quaternion. /// The quaternion to negate. /// The negated quaternion. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Quaternion Negate(Quaternion value) - { - return -value; - } + public static Quaternion Negate(Quaternion value) => -value; /// Divides each component of a specified by its length. /// The quaternion to normalize. /// The normalized quaternion. [Intrinsic] [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Quaternion Normalize(Quaternion value) - { - return Divide(value, value.Length()); - } + public static Quaternion Normalize(Quaternion value) => (value.AsVector128() / value.Length()).AsQuaternion(); /// Interpolates between two quaternions, using spherical linear interpolation. /// The first quaternion. @@ -643,77 +531,38 @@ public static Quaternion Slerp(Quaternion quaternion1, Quaternion quaternion2, f /// The second quaternion. /// The quaternion containing the values that result from subtracting each element in from its corresponding element in . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Quaternion Subtract(Quaternion value1, Quaternion value2) - { - return value1 - value2; - } + public static Quaternion Subtract(Quaternion value1, Quaternion value2) => value1 - value2; /// Returns a value that indicates whether this instance and a specified object are equal. /// The object to compare with the current instance. /// if the current instance and are equal; otherwise, . If is , the method returns . /// The current instance and are equal if is a object and the corresponding components of each matrix are equal. - public override readonly bool Equals([NotNullWhen(true)] object? obj) - { - return (obj is Quaternion other) && Equals(other); - } + public override readonly bool Equals([NotNullWhen(true)] object? obj) => (obj is Quaternion other) && Equals(other); /// Returns a value that indicates whether this instance and another quaternion are equal. /// The other quaternion. /// if the two quaternions are equal; otherwise, . /// Two quaternions are equal if each of their corresponding components is equal. [MethodImpl(MethodImplOptions.AggressiveInlining)] - public readonly bool Equals(Quaternion other) - { - // This function needs to account for floating-point equality around NaN - // and so must behave equivalently to the underlying float/double.Equals - - if (Vector128.IsHardwareAccelerated) - { - return this.AsVector128().Equals(other.AsVector128()); - } - - return SoftwareFallback(in this, other); - - static bool SoftwareFallback(in Quaternion self, Quaternion other) - { - return self.X.Equals(other.X) - && self.Y.Equals(other.Y) - && self.Z.Equals(other.Z) - && self.W.Equals(other.W); - } - } + public readonly bool Equals(Quaternion other) => this.AsVector128().Equals(other.AsVector128()); /// Returns the hash code for this instance. /// The hash code. - public override readonly int GetHashCode() - { - return HashCode.Combine(X, Y, Z, W); - } + public override readonly int GetHashCode() => HashCode.Combine(X, Y, Z, W); /// Calculates the length of the quaternion. /// The computed length of the quaternion. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public readonly float Length() - { - float lengthSquared = LengthSquared(); - return MathF.Sqrt(lengthSquared); - } + public readonly float Length() => MathF.Sqrt(LengthSquared()); /// Calculates the squared length of the quaternion. /// The length squared of the quaternion. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public readonly float LengthSquared() - { - return Dot(this, this); - } + public readonly float LengthSquared() => Dot(this, this); /// Returns a string that represents this quaternion. /// The string representation of this quaternion. /// The numeric values in the returned string are formatted by using the conventions of the current culture. For example, for the en-US culture, the returned string might appear as {X:1.1 Y:2.2 Z:3.3 W:4.4}. - public override readonly string ToString() => - $"{{X:{X} Y:{Y} Z:{Z} W:{W}}}"; + public override readonly string ToString() => $"{{X:{X} Y:{Y} Z:{Z} W:{W}}}"; } } diff --git a/src/libraries/System.Private.CoreLib/src/System/Numerics/Vector.cs b/src/libraries/System.Private.CoreLib/src/System/Numerics/Vector.cs index 6bbdf2f7423068..41961bbb54c790 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Numerics/Vector.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Numerics/Vector.cs @@ -5,6 +5,7 @@ using System.Runtime.CompilerServices; using System.Runtime.Intrinsics; using System.Runtime.Intrinsics.X86; +using static Interop; namespace System.Numerics { @@ -59,7 +60,6 @@ public static Vector Abs(Vector value) /// The type of the elements in the vector. /// The sum of and . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector Add(Vector left, Vector right) => left + right; /// Computes the bitwise-and of a given vector and the ones complement of another vector. @@ -68,7 +68,6 @@ public static Vector Abs(Vector value) /// The type of the elements in the vector. /// The bitwise-and of and the ones-complement of . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector AndNot(Vector left, Vector right) => left & ~right; /// Reinterprets a as a new . @@ -84,7 +83,11 @@ public static Vector As(this Vector vector) ThrowHelper.ThrowForUnsupportedNumericsVectorBaseType(); ThrowHelper.ThrowForUnsupportedNumericsVectorBaseType(); +#if MONO return Unsafe.As, Vector>(ref vector); +#else + return Unsafe.BitCast, Vector>(vector); +#endif } /// Reinterprets a as a new . @@ -93,7 +96,6 @@ public static Vector As(this Vector vector) /// reinterpreted as a new . /// The type of () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector AsVectorByte(Vector value) => value.As(); /// Reinterprets a as a new . @@ -102,7 +104,6 @@ public static Vector As(this Vector vector) /// reinterpreted as a new . /// The type of () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector AsVectorDouble(Vector value) => value.As(); /// Reinterprets a as a new . @@ -111,7 +112,6 @@ public static Vector As(this Vector vector) /// reinterpreted as a new . /// The type of () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector AsVectorInt16(Vector value) => value.As(); /// Reinterprets a as a new . @@ -120,7 +120,6 @@ public static Vector As(this Vector vector) /// reinterpreted as a new . /// The type of () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector AsVectorInt32(Vector value) => value.As(); /// Reinterprets a as a new . @@ -129,7 +128,6 @@ public static Vector As(this Vector vector) /// reinterpreted as a new . /// The type of () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector AsVectorInt64(Vector value) => value.As(); /// Reinterprets a as a new . @@ -138,7 +136,6 @@ public static Vector As(this Vector vector) /// reinterpreted as a new . /// The type of () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector AsVectorNInt(Vector value) => value.As(); /// Reinterprets a as a new . @@ -148,7 +145,6 @@ public static Vector As(this Vector vector) /// The type of () is not supported. [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector AsVectorNUInt(Vector value) => value.As(); /// Reinterprets a as a new . @@ -158,7 +154,6 @@ public static Vector As(this Vector vector) /// The type of () is not supported. [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector AsVectorSByte(Vector value) => value.As(); /// Reinterprets a as a new . @@ -167,7 +162,6 @@ public static Vector As(this Vector vector) /// reinterpreted as a new . /// The type of () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector AsVectorSingle(Vector value) => value.As(); /// Reinterprets a as a new . @@ -177,7 +171,6 @@ public static Vector As(this Vector vector) /// The type of () is not supported. [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector AsVectorUInt16(Vector value) => value.As(); /// Reinterprets a as a new . @@ -187,7 +180,6 @@ public static Vector As(this Vector vector) /// The type of () is not supported. [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector AsVectorUInt32(Vector value) => value.As(); /// Reinterprets a as a new . @@ -197,7 +189,6 @@ public static Vector As(this Vector vector) /// The type of () is not supported. [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector AsVectorUInt64(Vector value) => value.As(); /// Computes the bitwise-and of two vectors. @@ -206,7 +197,6 @@ public static Vector As(this Vector vector) /// The type of the elements in the vector. /// The bitwise-and of and . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector BitwiseAnd(Vector left, Vector right) => left & right; /// Computes the bitwise-or of two vectors. @@ -215,7 +205,6 @@ public static Vector As(this Vector vector) /// The type of the elements in the vector. /// The bitwise-or of and . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector BitwiseOr(Vector left, Vector right) => left | right; /// Computes the ceiling of each element in a vector. @@ -272,9 +261,7 @@ public static Vector Ceiling(Vector value) /// The vector that is selected when the corresponding bit in is zero. /// A vector whose bits come from or based on the value of . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Vector ConditionalSelect(Vector condition, Vector left, Vector right) - => ConditionalSelect(condition.As(), left, right); + public static Vector ConditionalSelect(Vector condition, Vector left, Vector right) => ConditionalSelect(condition.As(), left, right); /// Conditionally selects a value from two vectors on a bitwise basis. /// The mask that is used to select a value from or . @@ -282,9 +269,7 @@ public static Vector ConditionalSelect(Vector condition, VectorThe vector that is selected when the corresponding bit in is zero. /// A vector whose bits come from or based on the value of . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Vector ConditionalSelect(Vector condition, Vector left, Vector right) - => ConditionalSelect(condition.As(), left, right); + public static Vector ConditionalSelect(Vector condition, Vector left, Vector right) => ConditionalSelect(condition.As(), left, right); /// Converts a to a . /// The vector to convert. @@ -517,7 +502,6 @@ public static Vector ConvertToUInt64Native(Vector value) /// The type of the elements in the vector. /// The quotient of divided by . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector Divide(Vector left, Vector right) => left / right; /// Divides a vector by a scalar to compute the per-element quotient. @@ -526,7 +510,6 @@ public static Vector ConvertToUInt64Native(Vector value) /// The type of the elements in the vector. /// The quotient of divided by . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector Divide(Vector left, T right) => left / right; /// Computes the dot product of two vectors. @@ -535,19 +518,7 @@ public static Vector ConvertToUInt64Native(Vector value) /// The type of the elements in the vector. /// The dot product of and . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static T Dot(Vector left, Vector right) - { - T result = default!; - - for (int index = 0; index < Vector.Count; index++) - { - T value = Scalar.Multiply(left.GetElementUnsafe(index), right.GetElementUnsafe(index)); - result = Scalar.Add(result, value); - } - - return result; - } + public static T Dot(Vector left, Vector right) => Sum(left * right); /// Compares two vectors to determine if they are equal on a per-element basis. /// The vector to compare with . @@ -574,7 +545,6 @@ public static Vector Equals(Vector left, Vector right) /// The vector to compare with . /// A vector whose elements are all-bits-set or zero, depending on if the corresponding elements in and were equal. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector Equals(Vector left, Vector right) => Equals(left, right).As(); /// Compares two vectors to determine if they are equal on a per-element basis. @@ -582,7 +552,6 @@ public static Vector Equals(Vector left, Vector right) /// The vector to compare with . /// A vector whose elements are all-bits-set or zero, depending on if the corresponding elements in and were equal. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector Equals(Vector left, Vector right) => Equals(left, right); /// Compares two vectors to determine if they are equal on a per-element basis. @@ -590,7 +559,6 @@ public static Vector Equals(Vector left, Vector right) /// The vector to compare with . /// A vector whose elements are all-bits-set or zero, depending on if the corresponding elements in and were equal. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector Equals(Vector left, Vector right) => Equals(left, right); /// Compares two vectors to determine if they are equal on a per-element basis. @@ -598,7 +566,6 @@ public static Vector Equals(Vector left, Vector right) /// The vector to compare with . /// A vector whose elements are all-bits-set or zero, depending on if the corresponding elements in and were equal. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector Equals(Vector left, Vector right) => Equals(left, right).As(); /// Compares two vectors to determine if all elements are equal. @@ -607,7 +574,6 @@ public static Vector Equals(Vector left, Vector right) /// The type of the elements in the vector. /// true if all elements in were equal to the corresponding element in . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static bool EqualsAll(Vector left, Vector right) => left == right; /// Compares two vectors to determine if any elements are equal. @@ -760,7 +726,6 @@ public static Vector GreaterThan(Vector left, Vector right) /// The vector to compare with . /// A vector whose elements are all-bits-set or zero, depending on if which of the corresponding elements in and were greater. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector GreaterThan(Vector left, Vector right) => GreaterThan(left, right).As(); /// Compares two vectors to determine which is greater on a per-element basis. @@ -768,14 +733,13 @@ public static Vector GreaterThan(Vector left, Vector right) /// The vector to compare with . /// A vector whose elements are all-bits-set or zero, depending on if which of the corresponding elements in and were greater. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector GreaterThan(Vector left, Vector right) => GreaterThan(left, right); /// Compares two vectors to determine which is greater on a per-element basis. /// The vector to compare with . /// The vector to compare with . /// A vector whose elements are all-bits-set or zero, depending on if which of the corresponding elements in and were greater. - [MethodImpl(MethodImplOptions.AggressiveInlining)] + [Intrinsic] public static Vector GreaterThan(Vector left, Vector right) => GreaterThan(left, right); /// Compares two vectors to determine which is greater on a per-element basis. @@ -783,7 +747,6 @@ public static Vector GreaterThan(Vector left, Vector right) /// The vector to compare with . /// A vector whose elements are all-bits-set or zero, depending on if which of the corresponding elements in and were greater. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector GreaterThan(Vector left, Vector right) => GreaterThan(left, right).As(); /// Compares two vectors to determine if all elements are greater. @@ -851,7 +814,6 @@ public static Vector GreaterThanOrEqual(Vector left, Vector right) /// The vector to compare with . /// A vector whose elements are all-bits-set or zero, depending on if which of the corresponding elements in and were greater or equal. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector GreaterThanOrEqual(Vector left, Vector right) => GreaterThanOrEqual(left, right).As(); /// Compares two vectors to determine which is greater or equal on a per-element basis. @@ -859,7 +821,6 @@ public static Vector GreaterThanOrEqual(Vector left, Vector right) /// The vector to compare with . /// A vector whose elements are all-bits-set or zero, depending on if which of the corresponding elements in and were greater or equal. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector GreaterThanOrEqual(Vector left, Vector right) => GreaterThanOrEqual(left, right); /// Compares two vectors to determine which is greater or equal on a per-element basis. @@ -867,7 +828,6 @@ public static Vector GreaterThanOrEqual(Vector left, Vector right) /// The vector to compare with . /// A vector whose elements are all-bits-set or zero, depending on if which of the corresponding elements in and were greater or equal. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector GreaterThanOrEqual(Vector left, Vector right) => GreaterThanOrEqual(left, right); /// Compares two vectors to determine which is greater or equal on a per-element basis. @@ -875,7 +835,6 @@ public static Vector GreaterThanOrEqual(Vector left, Vector right) /// The vector to compare with . /// A vector whose elements are all-bits-set or zero, depending on if which of the corresponding elements in and were greater or equal. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector GreaterThanOrEqual(Vector left, Vector right) => GreaterThanOrEqual(left, right).As(); /// Compares two vectors to determine if all elements are greater or equal. @@ -943,7 +902,6 @@ public static Vector LessThan(Vector left, Vector right) /// The vector to compare with . /// A vector whose elements are all-bits-set or zero, depending on if which of the corresponding elements in and were less. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector LessThan(Vector left, Vector right) => LessThan(left, right).As(); /// Compares two vectors to determine which is less on a per-element basis. @@ -951,7 +909,6 @@ public static Vector LessThan(Vector left, Vector right) /// The vector to compare with . /// A vector whose elements are all-bits-set or zero, depending on if which of the corresponding elements in and were less. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector LessThan(Vector left, Vector right) => LessThan(left, right); /// Compares two vectors to determine which is less on a per-element basis. @@ -959,7 +916,6 @@ public static Vector LessThan(Vector left, Vector right) /// The vector to compare with . /// A vector whose elements are all-bits-set or zero, depending on if which of the corresponding elements in and were less. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector LessThan(Vector left, Vector right) => LessThan(left, right); /// Compares two vectors to determine which is less on a per-element basis. @@ -967,7 +923,6 @@ public static Vector LessThan(Vector left, Vector right) /// The vector to compare with . /// A vector whose elements are all-bits-set or zero, depending on if which of the corresponding elements in and were less. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector LessThan(Vector left, Vector right) => LessThan(left, right).As(); /// Compares two vectors to determine if all elements are less. @@ -1035,7 +990,6 @@ public static Vector LessThanOrEqual(Vector left, Vector right) /// The vector to compare with . /// A vector whose elements are all-bits-set or zero, depending on if which of the corresponding elements in and were less or equal. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector LessThanOrEqual(Vector left, Vector right) => LessThanOrEqual(left, right).As(); /// Compares two vectors to determine which is less or equal on a per-element basis. @@ -1043,7 +997,6 @@ public static Vector LessThanOrEqual(Vector left, Vector right) /// The vector to compare with . /// A vector whose elements are all-bits-set or zero, depending on if which of the corresponding elements in and were less or equal. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector LessThanOrEqual(Vector left, Vector right) => LessThanOrEqual(left, right); /// Compares two vectors to determine which is less or equal on a per-element basis. @@ -1051,7 +1004,6 @@ public static Vector LessThanOrEqual(Vector left, Vector right) /// The vector to compare with . /// A vector whose elements are all-bits-set or zero, depending on if which of the corresponding elements in and were less or equal. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector LessThanOrEqual(Vector left, Vector right) => LessThanOrEqual(left, right); /// Compares two vectors to determine which is less or equal on a per-element basis. @@ -1059,7 +1011,6 @@ public static Vector LessThanOrEqual(Vector left, Vector right) /// The vector to compare with . /// A vector whose elements are all-bits-set or zero, depending on if which of the corresponding elements in and were less or equal. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector LessThanOrEqual(Vector left, Vector right) => LessThanOrEqual(left, right).As(); /// Compares two vectors to determine if all elements are less or equal. @@ -1110,7 +1061,6 @@ public static bool LessThanOrEqualAny(Vector left, Vector right) /// The type of () is not supported. [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector Load(T* source) => LoadUnsafe(ref *source); /// Loads a vector from the given aligned source. @@ -1141,7 +1091,6 @@ public static Vector LoadAligned(T* source) /// The type of () is not supported. [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector LoadAlignedNonTemporal(T* source) => LoadAligned(source); #pragma warning restore CS8500 // This takes the address of, gets the size of, or declares a pointer to a managed type ('T') @@ -1221,7 +1170,6 @@ public static Vector Min(Vector left, Vector right) /// The type of the elements in the vector. /// The element-wise product of and . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector Multiply(Vector left, Vector right) => left * right; /// Multiplies a vector by a scalar to compute their product. @@ -1230,7 +1178,6 @@ public static Vector Min(Vector left, Vector right) /// The type of the elements in the vector. /// The product of and . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector Multiply(Vector left, T right) => left * right; /// Multiplies a vector by a scalar to compute their product. @@ -1239,7 +1186,6 @@ public static Vector Min(Vector left, Vector right) /// The type of the elements in the vector. /// The product of and . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector Multiply(T left, Vector right) => left * right; /// @@ -1458,7 +1404,6 @@ public static Vector Narrow(Vector low, Vector high) /// The type of the elements in the vector. /// A vector whose elements are the unary negation of the corresponding elements in . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector Negate(Vector value) => -value; /// Computes the ones-complement of a vector. @@ -1466,7 +1411,6 @@ public static Vector Narrow(Vector low, Vector high) /// The type of the elements in the vector. /// A vector whose elements are the ones-complement of the corresponding elements in . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector OnesComplement(Vector value) => ~value; /// Shifts each element of a vector left by the specified amount. @@ -1474,7 +1418,6 @@ public static Vector Narrow(Vector low, Vector high) /// The number of bits by which to shift each element. /// A vector whose elements where shifted left by . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector ShiftLeft(Vector value, int shiftCount) => value << shiftCount; /// Shifts each element of a vector left by the specified amount. @@ -1482,7 +1425,6 @@ public static Vector Narrow(Vector low, Vector high) /// The number of bits by which to shift each element. /// A vector whose elements where shifted left by . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector ShiftLeft(Vector value, int shiftCount) => value << shiftCount; /// Shifts each element of a vector left by the specified amount. @@ -1490,7 +1432,6 @@ public static Vector Narrow(Vector low, Vector high) /// The number of bits by which to shift each element. /// A vector whose elements where shifted left by . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector ShiftLeft(Vector value, int shiftCount) => value << shiftCount; /// Shifts each element of a vector left by the specified amount. @@ -1498,7 +1439,6 @@ public static Vector Narrow(Vector low, Vector high) /// The number of bits by which to shift each element. /// A vector whose elements where shifted left by . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector ShiftLeft(Vector value, int shiftCount) => value << shiftCount; /// Shifts each element of a vector left by the specified amount. @@ -1506,7 +1446,6 @@ public static Vector Narrow(Vector low, Vector high) /// The number of bits by which to shift each element. /// A vector whose elements where shifted left by . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector ShiftLeft(Vector value, int shiftCount) => value << shiftCount; /// Shifts each element of a vector left by the specified amount. @@ -1515,7 +1454,6 @@ public static Vector Narrow(Vector low, Vector high) /// A vector whose elements where shifted left by . [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector ShiftLeft(Vector value, int shiftCount) => value << shiftCount; /// Shifts each element of a vector left by the specified amount. @@ -1524,7 +1462,6 @@ public static Vector Narrow(Vector low, Vector high) /// A vector whose elements where shifted left by . [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector ShiftLeft(Vector value, int shiftCount) => value << shiftCount; /// Shifts each element of a vector left by the specified amount. @@ -1533,7 +1470,6 @@ public static Vector Narrow(Vector low, Vector high) /// A vector whose elements where shifted left by . [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector ShiftLeft(Vector value, int shiftCount) => value << shiftCount; /// Shifts each element of a vector left by the specified amount. @@ -1542,7 +1478,6 @@ public static Vector Narrow(Vector low, Vector high) /// A vector whose elements where shifted left by . [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector ShiftLeft(Vector value, int shiftCount) => value << shiftCount; /// Shifts each element of a vector left by the specified amount. @@ -1551,7 +1486,6 @@ public static Vector Narrow(Vector low, Vector high) /// A vector whose elements where shifted left by . [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector ShiftLeft(Vector value, int shiftCount) => value << shiftCount; /// Shifts (signed) each element of a vector right by the specified amount. @@ -1559,7 +1493,6 @@ public static Vector Narrow(Vector low, Vector high) /// The number of bits by which to shift each element. /// A vector whose elements where shifted right by . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector ShiftRightArithmetic(Vector value, int shiftCount) => value >> shiftCount; /// Shifts (signed) each element of a vector right by the specified amount. @@ -1567,7 +1500,6 @@ public static Vector Narrow(Vector low, Vector high) /// The number of bits by which to shift each element. /// A vector whose elements where shifted right by . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector ShiftRightArithmetic(Vector value, int shiftCount) => value >> shiftCount; /// Shifts (signed) each element of a vector right by the specified amount. @@ -1575,7 +1507,6 @@ public static Vector Narrow(Vector low, Vector high) /// The number of bits by which to shift each element. /// A vector whose elements where shifted right by . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector ShiftRightArithmetic(Vector value, int shiftCount) => value >> shiftCount; /// Shifts (signed) each element of a vector right by the specified amount. @@ -1583,7 +1514,6 @@ public static Vector Narrow(Vector low, Vector high) /// The number of bits by which to shift each element. /// A vector whose elements where shifted right by . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector ShiftRightArithmetic(Vector value, int shiftCount) => value >> shiftCount; /// Shifts (signed) each element of a vector right by the specified amount. @@ -1592,7 +1522,6 @@ public static Vector Narrow(Vector low, Vector high) /// A vector whose elements where shifted right by . [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector ShiftRightArithmetic(Vector value, int shiftCount) => value >> shiftCount; /// Shifts (unsigned) each element of a vector right by the specified amount. @@ -1600,7 +1529,6 @@ public static Vector Narrow(Vector low, Vector high) /// The number of bits by which to shift each element. /// A vector whose elements where shifted right by . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector ShiftRightLogical(Vector value, int shiftCount) => value >>> shiftCount; /// Shifts (unsigned) each element of a vector right by the specified amount. @@ -1608,7 +1536,6 @@ public static Vector Narrow(Vector low, Vector high) /// The number of bits by which to shift each element. /// A vector whose elements where shifted right by . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector ShiftRightLogical(Vector value, int shiftCount) => value >>> shiftCount; /// Shifts (unsigned) each element of a vector right by the specified amount. @@ -1616,7 +1543,6 @@ public static Vector Narrow(Vector low, Vector high) /// The number of bits by which to shift each element. /// A vector whose elements where shifted right by . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector ShiftRightLogical(Vector value, int shiftCount) => value >>> shiftCount; /// Shifts (unsigned) each element of a vector right by the specified amount. @@ -1624,7 +1550,6 @@ public static Vector Narrow(Vector low, Vector high) /// The number of bits by which to shift each element. /// A vector whose elements where shifted right by . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector ShiftRightLogical(Vector value, int shiftCount) => value >>> shiftCount; /// Shifts (unsigned) each element of a vector right by the specified amount. @@ -1632,7 +1557,6 @@ public static Vector Narrow(Vector low, Vector high) /// The number of bits by which to shift each element. /// A vector whose elements where shifted right by . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector ShiftRightLogical(Vector value, int shiftCount) => value >>> shiftCount; /// Shifts (unsigned) each element of a vector right by the specified amount. @@ -1641,7 +1565,6 @@ public static Vector Narrow(Vector low, Vector high) /// A vector whose elements where shifted right by . [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector ShiftRightLogical(Vector value, int shiftCount) => value >>> shiftCount; /// Shifts (unsigned) each element of a vector right by the specified amount. @@ -1650,7 +1573,6 @@ public static Vector Narrow(Vector low, Vector high) /// A vector whose elements where shifted right by . [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector ShiftRightLogical(Vector value, int shiftCount) => value >>> shiftCount; /// Shifts (unsigned) each element of a vector right by the specified amount. @@ -1659,7 +1581,6 @@ public static Vector Narrow(Vector low, Vector high) /// A vector whose elements where shifted right by . [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector ShiftRightLogical(Vector value, int shiftCount) => value >>> shiftCount; /// Shifts (unsigned) each element of a vector right by the specified amount. @@ -1668,7 +1589,6 @@ public static Vector Narrow(Vector low, Vector high) /// A vector whose elements where shifted right by . [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector ShiftRightLogical(Vector value, int shiftCount) => value >>> shiftCount; /// Shifts (unsigned) each element of a vector right by the specified amount. @@ -1677,7 +1597,6 @@ public static Vector Narrow(Vector low, Vector high) /// A vector whose elements where shifted right by . [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector ShiftRightLogical(Vector value, int shiftCount) => value >>> shiftCount; /// Computes the square root of a vector on a per-element basis. @@ -1707,7 +1626,6 @@ public static Vector SquareRoot(Vector value) /// The type of () is not supported. [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void Store(this Vector source, T* destination) => source.StoreUnsafe(ref *destination); /// Stores a vector at the given aligned destination. @@ -1738,7 +1656,6 @@ public static void StoreAligned(this Vector source, T* destination) /// The type of () is not supported. [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void StoreAlignedNonTemporal(this Vector source, T* destination) => source.StoreAligned(destination); #pragma warning restore CS8500 // This takes the address of, gets the size of, or declares a pointer to a managed type ('T') @@ -1778,7 +1695,6 @@ public static void StoreUnsafe(this Vector source, ref T destination, nuin /// The type of the elements in the vector. /// The difference of and . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector Subtract(Vector left, Vector right) => left - right; /// @@ -1804,7 +1720,6 @@ public static T Sum(Vector value) /// A scalar containing the value of the first element. /// The type of () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static T ToScalar(this Vector vector) { ThrowHelper.ThrowForUnsupportedNumericsVectorBaseType(); @@ -2179,7 +2094,6 @@ public static Vector WithElement(this Vector vector, int index, T value /// The type of the elements in the vector. /// The exclusive-or of and . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector Xor(Vector left, Vector right) => left ^ right; [MethodImpl(MethodImplOptions.AggressiveInlining)] diff --git a/src/libraries/System.Private.CoreLib/src/System/Numerics/Vector2.cs b/src/libraries/System.Private.CoreLib/src/System/Numerics/Vector2.cs index 2b27fe4f961e3d..931cbf5eca86bd 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Numerics/Vector2.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Numerics/Vector2.cs @@ -93,10 +93,8 @@ public static Vector2 UnitY public float this[int index] { [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] readonly get => this.GetElement(index); - [MethodImpl(MethodImplOptions.AggressiveInlining)] set => this = this.WithElement(index, value); } @@ -136,11 +134,7 @@ public float this[int index] /// The result of the division. /// The method defines the division operation for objects. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Vector2 operator /(Vector2 value1, float value2) - { - return value1 / new Vector2(value2); - } + public static Vector2 operator /(Vector2 value1, float value2) => value1 / new Vector2(value2); /// Returns a value that indicates whether each pair of elements in two specified vectors is equal. /// The first vector to compare. @@ -160,11 +154,7 @@ public float this[int index] /// The second vector to compare. /// if and are not equal; otherwise, . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static bool operator !=(Vector2 left, Vector2 right) - { - return !(left == right); - } + public static bool operator !=(Vector2 left, Vector2 right) => !(left == right); /// Returns a new vector whose values are the product of each pair of elements in two specified vectors. /// The first vector. @@ -187,11 +177,7 @@ public float this[int index] /// The scaled vector. /// The method defines the multiplication operation for objects. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Vector2 operator *(Vector2 left, float right) - { - return left * new Vector2(right); - } + public static Vector2 operator *(Vector2 left, float right) => left * new Vector2(right); /// Multiplies the scalar value by the specified vector. /// The vector. @@ -199,11 +185,7 @@ public float this[int index] /// The scaled vector. /// The method defines the multiplication operation for objects. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Vector2 operator *(float left, Vector2 right) - { - return right * left; - } + public static Vector2 operator *(float left, Vector2 right) => right * left; /// Subtracts the second vector from the first. /// The first vector. @@ -225,11 +207,7 @@ public float this[int index] /// The negated vector. /// The method defines the unary negation operation for objects. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Vector2 operator -(Vector2 value) - { - return Zero - value; - } + public static Vector2 operator -(Vector2 value) => Zero - value; /// Returns a vector whose elements are the absolute values of each of the specified vector's elements. /// A vector. @@ -249,11 +227,7 @@ public static Vector2 Abs(Vector2 value) /// The second vector to add. /// The summed vector. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Vector2 Add(Vector2 left, Vector2 right) - { - return left + right; - } + public static Vector2 Add(Vector2 left, Vector2 right) => left + right; /// Restricts a vector between a minimum and a maximum value. /// The vector to restrict. @@ -261,7 +235,6 @@ public static Vector2 Add(Vector2 left, Vector2 right) /// The maximum value. /// The restricted vector. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector2 Clamp(Vector2 value1, Vector2 min, Vector2 max) { // We must follow HLSL behavior in the case user specified min value is bigger than max value. @@ -273,46 +246,28 @@ public static Vector2 Clamp(Vector2 value1, Vector2 min, Vector2 max) /// The second point. /// The distance. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static float Distance(Vector2 value1, Vector2 value2) - { - float distanceSquared = DistanceSquared(value1, value2); - return MathF.Sqrt(distanceSquared); - } + public static float Distance(Vector2 value1, Vector2 value2) => MathF.Sqrt(DistanceSquared(value1, value2)); /// Returns the Euclidean distance squared between two specified points. /// The first point. /// The second point. /// The distance squared. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static float DistanceSquared(Vector2 value1, Vector2 value2) - { - Vector2 difference = value1 - value2; - return Dot(difference, difference); - } + public static float DistanceSquared(Vector2 value1, Vector2 value2) => (value1 - value2).LengthSquared(); /// Divides the first vector by the second. /// The first vector. /// The second vector. /// The vector resulting from the division. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Vector2 Divide(Vector2 left, Vector2 right) - { - return left / right; - } + public static Vector2 Divide(Vector2 left, Vector2 right) => left / right; /// Divides the specified vector by a specified scalar value. /// The vector. /// The scalar value. /// The vector that results from the division. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Vector2 Divide(Vector2 left, float divisor) - { - return left / divisor; - } + public static Vector2 Divide(Vector2 left, float divisor) => left / divisor; /// Returns the dot product of two vectors. /// The first vector. @@ -347,10 +302,7 @@ public static Vector2 FusedMultiplyAdd(Vector2 left, Vector2 right, Vector2 adde /// ]]> [Intrinsic] [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Vector2 Lerp(Vector2 value1, Vector2 value2, float amount) - { - return (value1 * (1.0f - amount)) + (value2 * amount); - } + public static Vector2 Lerp(Vector2 value1, Vector2 value2, float amount) => (value1 * (1.0f - amount)) + (value2 * amount); /// Returns a vector whose elements are the maximum of each of the pairs of elements in two specified vectors. /// The first vector. @@ -385,33 +337,21 @@ public static Vector2 Min(Vector2 value1, Vector2 value2) /// The second vector. /// The element-wise product vector. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Vector2 Multiply(Vector2 left, Vector2 right) - { - return left * right; - } + public static Vector2 Multiply(Vector2 left, Vector2 right) => left * right; /// Multiplies a vector by a specified scalar. /// The vector to multiply. /// The scalar value. /// The scaled vector. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Vector2 Multiply(Vector2 left, float right) - { - return left * right; - } + public static Vector2 Multiply(Vector2 left, float right) => left * right; /// Multiplies a scalar value by a specified vector. /// The scaled value. /// The vector. /// The scaled vector. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Vector2 Multiply(float left, Vector2 right) - { - return left * right; - } + public static Vector2 Multiply(float left, Vector2 right) => left * right; /// [Intrinsic] @@ -428,32 +368,20 @@ public static Vector2 MultiplyAddEstimate(Vector2 left, Vector2 right, Vector2 a /// The vector to negate. /// The negated vector. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Vector2 Negate(Vector2 value) - { - return -value; - } + public static Vector2 Negate(Vector2 value) => -value; /// Returns a vector with the same direction as the specified vector, but with a length of one. /// The vector to normalize. /// The normalized vector. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Vector2 Normalize(Vector2 value) - { - return value / value.Length(); - } + public static Vector2 Normalize(Vector2 value) => value / value.Length(); /// Returns the reflection of a vector off a surface that has the specified normal. /// The source vector. /// The normal of the surface being reflected off. /// The reflected vector. [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Vector2 Reflect(Vector2 vector, Vector2 normal) - { - float dot = Dot(vector, normal); - return vector - (2.0f * (dot * normal)); - } + public static Vector2 Reflect(Vector2 vector, Vector2 normal) => vector - (2.0f * (Dot(vector, normal) * normal)); /// Returns a vector whose elements are the square root of each of a specified vector's elements. /// A vector. @@ -473,21 +401,13 @@ public static Vector2 SquareRoot(Vector2 value) /// The second vector. /// The difference vector. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Vector2 Subtract(Vector2 left, Vector2 right) - { - return left - right; - } + public static Vector2 Subtract(Vector2 left, Vector2 right) => left - right; /// Transforms a vector by a specified 3x2 matrix. /// The vector to transform. /// The transformation matrix. /// The transformed vector. - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Vector2 Transform(Vector2 position, Matrix3x2 matrix) - { - return Transform(position, in matrix.AsImpl()); - } + public static Vector2 Transform(Vector2 position, Matrix3x2 matrix) => Transform(position, in matrix.AsImpl()); [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static Vector2 Transform(Vector2 position, in Matrix3x2.Impl matrix) @@ -505,10 +425,7 @@ internal static Vector2 Transform(Vector2 position, in Matrix3x2.Impl matrix) /// The transformation matrix. /// The transformed vector. [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Vector2 Transform(Vector2 position, Matrix4x4 matrix) - { - return Vector4.Transform(position, in matrix.AsImpl()).AsVector128().AsVector2(); - } + public static Vector2 Transform(Vector2 position, Matrix4x4 matrix) => Vector4.Transform(position, in matrix.AsImpl()).AsVector128().AsVector2(); /// Transforms a vector by the specified Quaternion rotation value. /// The vector to rotate. @@ -537,11 +454,7 @@ public static Vector2 Transform(Vector2 value, Quaternion rotation) /// The source vector. /// The matrix. /// The transformed vector. - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Vector2 TransformNormal(Vector2 normal, Matrix3x2 matrix) - { - return TransformNormal(normal, in matrix.AsImpl()); - } + public static Vector2 TransformNormal(Vector2 normal, Matrix3x2 matrix) => TransformNormal(normal, in matrix.AsImpl()); [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static Vector2 TransformNormal(Vector2 normal, in Matrix3x2.Impl matrix) @@ -557,11 +470,7 @@ internal static Vector2 TransformNormal(Vector2 normal, in Matrix3x2.Impl matrix /// The source vector. /// The matrix. /// The transformed vector. - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Vector2 TransformNormal(Vector2 normal, Matrix4x4 matrix) - { - return TransformNormal(normal, in matrix.AsImpl()); - } + public static Vector2 TransformNormal(Vector2 normal, Matrix4x4 matrix) => TransformNormal(normal, in matrix.AsImpl()); [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static Vector2 TransformNormal(Vector2 normal, in Matrix4x4.Impl matrix) @@ -653,11 +562,7 @@ public readonly bool TryCopyTo(Span destination) /// The object to compare with the current instance. /// if the current instance and are equal; otherwise, . If is , the method returns . /// The current instance and are equal if is a object and their and elements are equal. - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public override readonly bool Equals([NotNullWhen(true)] object? obj) - { - return (obj is Vector2 other) && Equals(other); - } + public override readonly bool Equals([NotNullWhen(true)] object? obj) => (obj is Vector2 other) && Equals(other); /// Returns a value that indicates whether this instance and another vector are equal. /// The other vector. @@ -689,40 +594,25 @@ static bool SoftwareFallback(in Vector2 self, Vector2 other) /// Returns the hash code for this instance. /// The hash code. - public override readonly int GetHashCode() - { - return HashCode.Combine(X, Y); - } + public override readonly int GetHashCode() => HashCode.Combine(X, Y); /// Returns the length of the vector. /// The vector's length. /// [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public readonly float Length() - { - float lengthSquared = LengthSquared(); - return MathF.Sqrt(lengthSquared); - } + public readonly float Length() => MathF.Sqrt(LengthSquared()); /// Returns the length of the vector squared. /// The vector's length squared. /// This operation offers better performance than a call to the method. /// [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public readonly float LengthSquared() - { - return Dot(this, this); - } + public readonly float LengthSquared() => Dot(this, this); /// Returns the string representation of the current instance using default formatting. /// The string representation of the current instance. /// This method returns a string in which each element of the vector is formatted using the "G" (general) format string and the formatting conventions of the current thread culture. The "<" and ">" characters are used to begin and end the string, and the current culture's property followed by a space is used to separate each element. - public override readonly string ToString() - { - return ToString("G", CultureInfo.CurrentCulture); - } + public override readonly string ToString() => ToString("G", CultureInfo.CurrentCulture); /// Returns the string representation of the current instance using the specified format string to format individual elements. /// A standard or custom numeric format string that defines the format of individual elements. @@ -730,10 +620,7 @@ public override readonly string ToString() /// This method returns a string in which each element of the vector is formatted using and the current culture's formatting conventions. The "<" and ">" characters are used to begin and end the string, and the current culture's property followed by a space is used to separate each element. /// Standard Numeric Format Strings /// Custom Numeric Format Strings - public readonly string ToString([StringSyntax(StringSyntaxAttribute.NumericFormat)] string? format) - { - return ToString(format, CultureInfo.CurrentCulture); - } + public readonly string ToString([StringSyntax(StringSyntaxAttribute.NumericFormat)] string? format) => ToString(format, CultureInfo.CurrentCulture); /// Returns the string representation of the current instance using the specified format string to format individual elements and the specified format provider to define culture-specific formatting. /// A standard or custom numeric format string that defines the format of individual elements. diff --git a/src/libraries/System.Private.CoreLib/src/System/Numerics/Vector3.cs b/src/libraries/System.Private.CoreLib/src/System/Numerics/Vector3.cs index 382b6838193bdd..7dc4994040eaa0 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Numerics/Vector3.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Numerics/Vector3.cs @@ -114,10 +114,8 @@ public static Vector3 UnitZ public float this[int index] { [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] readonly get => this.GetElement(index); - [MethodImpl(MethodImplOptions.AggressiveInlining)] set => this = this.WithElement(index, value); } @@ -159,11 +157,7 @@ public float this[int index] /// The result of the division. /// The method defines the division operation for objects. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Vector3 operator /(Vector3 value1, float value2) - { - return value1 / new Vector3(value2); - } + public static Vector3 operator /(Vector3 value1, float value2) => value1 / new Vector3(value2); /// Returns a value that indicates whether each pair of elements in two specified vectors is equal. /// The first vector to compare. @@ -184,11 +178,7 @@ public float this[int index] /// The second vector to compare. /// if and are not equal; otherwise, . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static bool operator !=(Vector3 left, Vector3 right) - { - return !(left == right); - } + public static bool operator !=(Vector3 left, Vector3 right) => !(left == right); /// Returns a new vector whose values are the product of each pair of elements in two specified vectors. /// The first vector. @@ -212,11 +202,7 @@ public float this[int index] /// The scaled vector. /// The method defines the multiplication operation for objects. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Vector3 operator *(Vector3 left, float right) - { - return left * new Vector3(right); - } + public static Vector3 operator *(Vector3 left, float right) => left * new Vector3(right); /// Multiplies the scalar value by the specified vector. /// The vector. @@ -224,11 +210,7 @@ public float this[int index] /// The scaled vector. /// The method defines the multiplication operation for objects. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Vector3 operator *(float left, Vector3 right) - { - return right * left; - } + public static Vector3 operator *(float left, Vector3 right) => right * left; /// Subtracts the second vector from the first. /// The first vector. @@ -251,11 +233,7 @@ public float this[int index] /// The negated vector. /// The method defines the unary negation operation for objects. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Vector3 operator -(Vector3 value) - { - return Zero - value; - } + public static Vector3 operator -(Vector3 value) => Zero - value; /// Returns a vector whose elements are the absolute values of each of the specified vector's elements. /// A vector. @@ -276,11 +254,7 @@ public static Vector3 Abs(Vector3 value) /// The second vector to add. /// The summed vector. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Vector3 Add(Vector3 left, Vector3 right) - { - return left + right; - } + public static Vector3 Add(Vector3 left, Vector3 right) => left + right; /// Restricts a vector between a minimum and a maximum value. /// The vector to restrict. @@ -288,7 +262,6 @@ public static Vector3 Add(Vector3 left, Vector3 right) /// The maximum value. /// The restricted vector. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector3 Clamp(Vector3 value1, Vector3 min, Vector3 max) { // We must follow HLSL behavior in the case user specified min value is bigger than max value. @@ -314,46 +287,28 @@ public static Vector3 Cross(Vector3 vector1, Vector3 vector2) /// The second point. /// The distance. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static float Distance(Vector3 value1, Vector3 value2) - { - float distanceSquared = DistanceSquared(value1, value2); - return MathF.Sqrt(distanceSquared); - } + public static float Distance(Vector3 value1, Vector3 value2) => MathF.Sqrt(DistanceSquared(value1, value2)); /// Returns the Euclidean distance squared between two specified points. /// The first point. /// The second point. /// The distance squared. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static float DistanceSquared(Vector3 value1, Vector3 value2) - { - Vector3 difference = value1 - value2; - return Dot(difference, difference); - } + public static float DistanceSquared(Vector3 value1, Vector3 value2) => (value1 - value2).LengthSquared(); /// Divides the first vector by the second. /// The first vector. /// The second vector. /// The vector resulting from the division. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Vector3 Divide(Vector3 left, Vector3 right) - { - return left / right; - } + public static Vector3 Divide(Vector3 left, Vector3 right) => left / right; /// Divides the specified vector by a specified scalar value. /// The vector. /// The scalar value. /// The vector that results from the division. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Vector3 Divide(Vector3 left, float divisor) - { - return left / divisor; - } + public static Vector3 Divide(Vector3 left, float divisor) => left / divisor; /// Returns the dot product of two vectors. /// The first vector. @@ -387,10 +342,7 @@ public static Vector3 FusedMultiplyAdd(Vector3 left, Vector3 right, Vector3 adde /// The interpolated vector. [Intrinsic] [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Vector3 Lerp(Vector3 value1, Vector3 value2, float amount) - { - return (value1 * (1.0f - amount)) + (value2 * amount); - } + public static Vector3 Lerp(Vector3 value1, Vector3 value2, float amount) => (value1 * (1.0f - amount)) + (value2 * amount); /// Returns a vector whose elements are the maximum of each of the pairs of elements in two specified vectors. /// The first vector. @@ -427,33 +379,21 @@ public static Vector3 Min(Vector3 value1, Vector3 value2) /// The second vector. /// The element-wise product vector. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Vector3 Multiply(Vector3 left, Vector3 right) - { - return left * right; - } + public static Vector3 Multiply(Vector3 left, Vector3 right) => left * right; /// Multiplies a vector by a specified scalar. /// The vector to multiply. /// The scalar value. /// The scaled vector. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Vector3 Multiply(Vector3 left, float right) - { - return left * right; - } + public static Vector3 Multiply(Vector3 left, float right) => left * right; /// Multiplies a scalar value by a specified vector. /// The scaled value. /// The vector. /// The scaled vector. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Vector3 Multiply(float left, Vector3 right) - { - return left * right; - } + public static Vector3 Multiply(float left, Vector3 right) => left * right; /// [Intrinsic] @@ -471,32 +411,20 @@ public static Vector3 MultiplyAddEstimate(Vector3 left, Vector3 right, Vector3 a /// The vector to negate. /// The negated vector. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Vector3 Negate(Vector3 value) - { - return -value; - } + public static Vector3 Negate(Vector3 value) => -value; /// Returns a vector with the same direction as the specified vector, but with a length of one. /// The vector to normalize. /// The normalized vector. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Vector3 Normalize(Vector3 value) - { - return value / value.Length(); - } + public static Vector3 Normalize(Vector3 value) => value / value.Length(); /// Returns the reflection of a vector off a surface that has the specified normal. /// The source vector. /// The normal of the surface being reflected off. /// The reflected vector. [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Vector3 Reflect(Vector3 vector, Vector3 normal) - { - float dot = Dot(vector, normal); - return vector - (2.0f * (dot * normal)); - } + public static Vector3 Reflect(Vector3 vector, Vector3 normal) => vector - (2.0f * (Dot(vector, normal) * normal)); /// Returns a vector whose elements are the square root of each of a specified vector's elements. /// A vector. @@ -517,21 +445,14 @@ public static Vector3 SquareRoot(Vector3 value) /// The second vector. /// The difference vector. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Vector3 Subtract(Vector3 left, Vector3 right) - { - return left - right; - } + public static Vector3 Subtract(Vector3 left, Vector3 right) => left - right; /// Transforms a vector by a specified 4x4 matrix. /// The vector to transform. /// The transformation matrix. /// The transformed vector. [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Vector3 Transform(Vector3 position, Matrix4x4 matrix) - { - return Vector4.Transform(position, in matrix.AsImpl()).AsVector128().AsVector3(); - } + public static Vector3 Transform(Vector3 position, Matrix4x4 matrix) => Vector4.Transform(position, in matrix.AsImpl()).AsVector128().AsVector3(); /// Transforms a vector by the specified Quaternion rotation value. /// The vector to rotate. @@ -566,10 +487,7 @@ public static Vector3 Transform(Vector3 value, Quaternion rotation) /// The matrix. /// The transformed vector. [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Vector3 TransformNormal(Vector3 normal, Matrix4x4 matrix) - { - return TransformNormal(normal, in matrix.AsImpl()); - } + public static Vector3 TransformNormal(Vector3 normal, Matrix4x4 matrix) => TransformNormal(normal, in matrix.AsImpl()); [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static Vector3 TransformNormal(Vector3 normal, in Matrix4x4.Impl matrix) @@ -662,11 +580,7 @@ public readonly bool TryCopyTo(Span destination) /// The object to compare with the current instance. /// if the current instance and are equal; otherwise, . If is , the method returns . /// The current instance and are equal if is a object and their corresponding elements are equal. - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public override readonly bool Equals([NotNullWhen(true)] object? obj) - { - return (obj is Vector3 other) && Equals(other); - } + public override readonly bool Equals([NotNullWhen(true)] object? obj) => (obj is Vector3 other) && Equals(other); /// Returns a value that indicates whether this instance and another vector are equal. /// The other vector. @@ -695,40 +609,25 @@ static bool SoftwareFallback(in Vector3 self, Vector3 other) /// Returns the hash code for this instance. /// The hash code. - public override readonly int GetHashCode() - { - return HashCode.Combine(X, Y, Z); - } + public override readonly int GetHashCode() => HashCode.Combine(X, Y, Z); /// Returns the length of this vector object. /// The vector's length. /// [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public readonly float Length() - { - float lengthSquared = LengthSquared(); - return MathF.Sqrt(lengthSquared); - } + public readonly float Length() => MathF.Sqrt(LengthSquared()); /// Returns the length of the vector squared. /// The vector's length squared. /// This operation offers better performance than a call to the method. /// [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public readonly float LengthSquared() - { - return Dot(this, this); - } + public readonly float LengthSquared() => Dot(this, this); /// Returns the string representation of the current instance using default formatting. /// The string representation of the current instance. /// This method returns a string in which each element of the vector is formatted using the "G" (general) format string and the formatting conventions of the current thread culture. The "<" and ">" characters are used to begin and end the string, and the current culture's property followed by a space is used to separate each element. - public override readonly string ToString() - { - return ToString("G", CultureInfo.CurrentCulture); - } + public override readonly string ToString() => ToString("G", CultureInfo.CurrentCulture); /// Returns the string representation of the current instance using the specified format string to format individual elements. /// A standard or custom numeric format string that defines the format of individual elements. @@ -736,10 +635,7 @@ public override readonly string ToString() /// This method returns a string in which each element of the vector is formatted using and the current culture's formatting conventions. The "<" and ">" characters are used to begin and end the string, and the current culture's property followed by a space is used to separate each element. /// Standard Numeric Format Strings /// Custom Numeric Format Strings - public readonly string ToString([StringSyntax(StringSyntaxAttribute.NumericFormat)] string? format) - { - return ToString(format, CultureInfo.CurrentCulture); - } + public readonly string ToString([StringSyntax(StringSyntaxAttribute.NumericFormat)] string? format) => ToString(format, CultureInfo.CurrentCulture); /// Returns the string representation of the current instance using the specified format string to format individual elements and the specified format provider to define culture-specific formatting. /// A standard or custom numeric format string that defines the format of individual elements. diff --git a/src/libraries/System.Private.CoreLib/src/System/Numerics/Vector4.Extensions.cs b/src/libraries/System.Private.CoreLib/src/System/Numerics/Vector4.Extensions.cs index 143d003b960223..5e276425a0e537 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Numerics/Vector4.Extensions.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Numerics/Vector4.Extensions.cs @@ -3,27 +3,43 @@ using System.Diagnostics; using System.Runtime.CompilerServices; +using System.Runtime.Intrinsics; namespace System.Numerics { public static unsafe partial class Vector { + /// Reinterprets a as a new . + /// The vector to reinterpret. + /// reinterpreted as a new . + internal static Plane AsPlane(this Vector4 value) + { +#if MONO + return Unsafe.As(ref value); +#else + return Unsafe.BitCast(value); +#endif + } + + /// Reinterprets a as a new . + /// The vector to reinterpret. + /// reinterpreted as a new . + internal static Quaternion AsQuaternion(this Vector4 value) + { +#if MONO + return Unsafe.As(ref value); +#else + return Unsafe.BitCast(value); +#endif + } + /// Gets the element at the specified index. /// The vector to get the element from. /// The index of the element to get. /// The value of the element at . /// was less than zero or greater than the number of elements. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] - internal static float GetElement(this Vector4 vector, int index) - { - if ((uint)(index) >= (uint)(Vector4.Count)) - { - ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.index); - } - - return vector.GetElementUnsafe(index); - } + internal static float GetElement(this Vector4 vector, int index) => vector.AsVector128().GetElement(index); /// Creates a new with the element at the specified index set to the specified value and the remaining elements set to the same value as that in the given vector. /// The vector to get the remaining elements from. @@ -32,17 +48,8 @@ internal static float GetElement(this Vector4 vector, int index) /// A with the value of the element at set to and the remaining elements set to the same value as that in . /// was less than zero or greater than the number of elements. [Intrinsic] - internal static Vector4 WithElement(this Vector4 vector, int index, float value) - { - if ((uint)(index) >= (uint)(Vector4.Count)) - { - ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.index); - } - - Vector4 result = vector; - result.SetElementUnsafe(index, value); - return result; - } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static Vector4 WithElement(this Vector4 vector, int index, float value) => vector.AsVector128().WithElement(index, value).AsVector4(); [MethodImpl(MethodImplOptions.AggressiveInlining)] private static float GetElementUnsafe(in this Vector4 vector, int index) diff --git a/src/libraries/System.Private.CoreLib/src/System/Numerics/Vector4.cs b/src/libraries/System.Private.CoreLib/src/System/Numerics/Vector4.cs index 6a1a1c39c869c3..f6893396cc4fcb 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Numerics/Vector4.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Numerics/Vector4.cs @@ -3,6 +3,7 @@ using System.Diagnostics.CodeAnalysis; using System.Globalization; +using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Intrinsics; @@ -34,8 +35,9 @@ public partial struct Vector4 : IEquatable, IFormattable /// Creates a new object whose four elements have the same value. /// The value to assign to all four elements. [Intrinsic] - public Vector4(float value) : this(value, value, value, value) + public Vector4(float value) { + this = Vector128.Create(value).AsVector4(); } /// Creates a new object from the specified object and a Z and a W component. @@ -43,16 +45,23 @@ public Vector4(float value) : this(value, value, value, value) /// The Z component. /// The W component. [Intrinsic] - public Vector4(Vector2 value, float z, float w) : this(value.X, value.Y, z, w) + public Vector4(Vector2 value, float z, float w) { + this = value.AsVector128() + .WithElement(2, z) + .WithElement(3, w) + .AsVector4(); } /// Constructs a new object from the specified object and a W component. /// The vector to use for the X, Y, and Z components. /// The W component. [Intrinsic] - public Vector4(Vector3 value, float w) : this(value.X, value.Y, value.Z, w) + public Vector4(Vector3 value, float w) { + this = value.AsVector128() + .WithElement(3, w) + .AsVector4(); } /// Creates a vector whose elements have the specified values. @@ -63,22 +72,14 @@ public Vector4(Vector3 value, float w) : this(value.X, value.Y, value.Z, w) [Intrinsic] public Vector4(float x, float y, float z, float w) { - X = x; - Y = y; - Z = z; - W = w; + this = Vector128.Create(x, y, z, w).AsVector4(); } /// Constructs a vector from the given . The span must contain at least 4 elements. /// The span of elements to assign to the vector. public Vector4(ReadOnlySpan values) { - if (values.Length < 4) - { - ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.values); - } - - this = Unsafe.ReadUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(values))); + this = Vector128.Create(values).AsVector4(); } /// Gets a vector whose 4 elements are equal to zero. @@ -95,7 +96,7 @@ public static Vector4 Zero public static Vector4 One { [Intrinsic] - get => new Vector4(1.0f); + get => new Vector4(1); } /// Gets the vector (1,0,0,0). @@ -137,10 +138,8 @@ public static Vector4 UnitW public float this[int index] { [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] readonly get => this.GetElement(index); - [MethodImpl(MethodImplOptions.AggressiveInlining)] set => this = this.WithElement(index, value); } @@ -151,15 +150,7 @@ public float this[int index] /// The method defines the addition operation for objects. [Intrinsic] [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Vector4 operator +(Vector4 left, Vector4 right) - { - return new Vector4( - left.X + right.X, - left.Y + right.Y, - left.Z + right.Z, - left.W + right.W - ); - } + public static Vector4 operator +(Vector4 left, Vector4 right) => (left.AsVector128() + right.AsVector128()).AsVector4(); /// Divides the first vector by the second. /// The first vector. @@ -168,15 +159,7 @@ public float this[int index] /// The method defines the division operation for objects. [Intrinsic] [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Vector4 operator /(Vector4 left, Vector4 right) - { - return new Vector4( - left.X / right.X, - left.Y / right.Y, - left.Z / right.Z, - left.W / right.W - ); - } + public static Vector4 operator /(Vector4 left, Vector4 right) => (left.AsVector128() / right.AsVector128()).AsVector4(); /// Divides the specified vector by a specified scalar value. /// The vector. @@ -184,11 +167,7 @@ public float this[int index] /// The result of the division. /// The method defines the division operation for objects. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Vector4 operator /(Vector4 value1, float value2) - { - return value1 / new Vector4(value2); - } + public static Vector4 operator /(Vector4 value1, float value2) => value1 / new Vector4(value2); /// Returns a value that indicates whether each pair of elements in two specified vectors is equal. /// The first vector to compare. @@ -197,24 +176,14 @@ public float this[int index] /// Two objects are equal if each element in is equal to the corresponding element in . [Intrinsic] [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static bool operator ==(Vector4 left, Vector4 right) - { - return (left.X == right.X) - && (left.Y == right.Y) - && (left.Z == right.Z) - && (left.W == right.W); - } + public static bool operator ==(Vector4 left, Vector4 right) => left.AsVector128() == right.AsVector128(); /// Returns a value that indicates whether two specified vectors are not equal. /// The first vector to compare. /// The second vector to compare. /// if and are not equal; otherwise, . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static bool operator !=(Vector4 left, Vector4 right) - { - return !(left == right); - } + public static bool operator !=(Vector4 left, Vector4 right) => !(left == right); /// Returns a new vector whose values are the product of each pair of elements in two specified vectors. /// The first vector. @@ -223,15 +192,7 @@ public float this[int index] /// The method defines the multiplication operation for objects. [Intrinsic] [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Vector4 operator *(Vector4 left, Vector4 right) - { - return new Vector4( - left.X * right.X, - left.Y * right.Y, - left.Z * right.Z, - left.W * right.W - ); - } + public static Vector4 operator *(Vector4 left, Vector4 right) => (left.AsVector128() * right.AsVector128()).AsVector4(); /// Multiplies the specified vector by the specified scalar value. /// The vector. @@ -239,11 +200,7 @@ public float this[int index] /// The scaled vector. /// The method defines the multiplication operation for objects. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Vector4 operator *(Vector4 left, float right) - { - return left * new Vector4(right); - } + public static Vector4 operator *(Vector4 left, float right) => left * new Vector4(right); /// Multiplies the scalar value by the specified vector. /// The vector. @@ -251,11 +208,7 @@ public float this[int index] /// The scaled vector. /// The method defines the multiplication operation for objects. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Vector4 operator *(float left, Vector4 right) - { - return right * left; - } + public static Vector4 operator *(float left, Vector4 right) => right * left; /// Subtracts the second vector from the first. /// The first vector. @@ -264,15 +217,7 @@ public float this[int index] /// The method defines the subtraction operation for objects. [Intrinsic] [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Vector4 operator -(Vector4 left, Vector4 right) - { - return new Vector4( - left.X - right.X, - left.Y - right.Y, - left.Z - right.Z, - left.W - right.W - ); - } + public static Vector4 operator -(Vector4 left, Vector4 right) => (left.AsVector128() - right.AsVector128()).AsVector4(); /// Negates the specified vector. /// The vector to negate. @@ -280,36 +225,21 @@ public float this[int index] /// The method defines the unary negation operation for objects. [Intrinsic] [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Vector4 operator -(Vector4 value) - { - return Zero - value; - } + public static Vector4 operator -(Vector4 value) => (-value.AsVector128()).AsVector4(); /// Returns a vector whose elements are the absolute values of each of the specified vector's elements. /// A vector. /// The absolute value vector. [Intrinsic] [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Vector4 Abs(Vector4 value) - { - return new Vector4( - MathF.Abs(value.X), - MathF.Abs(value.Y), - MathF.Abs(value.Z), - MathF.Abs(value.W) - ); - } + public static Vector4 Abs(Vector4 value) => Vector128.Abs(value.AsVector128()).AsVector4(); /// Adds two vectors together. /// The first vector to add. /// The second vector to add. /// The summed vector. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Vector4 Add(Vector4 left, Vector4 right) - { - return left + right; - } + public static Vector4 Add(Vector4 left, Vector4 right) => left + right; /// Restricts a vector between a minimum and a maximum value. /// The vector to restrict. @@ -317,7 +247,6 @@ public static Vector4 Add(Vector4 left, Vector4 right) /// The maximum value. /// The restricted vector. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector4 Clamp(Vector4 value1, Vector4 min, Vector4 max) { // We must follow HLSL behavior in the case user specified min value is bigger than max value. @@ -329,46 +258,28 @@ public static Vector4 Clamp(Vector4 value1, Vector4 min, Vector4 max) /// The second point. /// The distance. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static float Distance(Vector4 value1, Vector4 value2) - { - float distanceSquared = DistanceSquared(value1, value2); - return MathF.Sqrt(distanceSquared); - } + public static float Distance(Vector4 value1, Vector4 value2) => MathF.Sqrt(DistanceSquared(value1, value2)); /// Returns the Euclidean distance squared between two specified points. /// The first point. /// The second point. /// The distance squared. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static float DistanceSquared(Vector4 value1, Vector4 value2) - { - Vector4 difference = value1 - value2; - return Dot(difference, difference); - } + public static float DistanceSquared(Vector4 value1, Vector4 value2) => (value1 - value2).LengthSquared(); /// Divides the first vector by the second. /// The first vector. /// The second vector. /// The vector resulting from the division. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Vector4 Divide(Vector4 left, Vector4 right) - { - return left / right; - } + public static Vector4 Divide(Vector4 left, Vector4 right) => left / right; /// Divides the specified vector by a specified scalar value. /// The vector. /// The scalar value. /// The vector that results from the division. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Vector4 Divide(Vector4 left, float divisor) - { - return left / divisor; - } + public static Vector4 Divide(Vector4 left, float divisor) => left / divisor; /// Returns the dot product of two vectors. /// The first vector. @@ -376,26 +287,12 @@ public static Vector4 Divide(Vector4 left, float divisor) /// The dot product. [Intrinsic] [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static float Dot(Vector4 vector1, Vector4 vector2) - { - return (vector1.X * vector2.X) - + (vector1.Y * vector2.Y) - + (vector1.Z * vector2.Z) - + (vector1.W * vector2.W); - } + public static float Dot(Vector4 vector1, Vector4 vector2) => Vector128.Dot(vector1.AsVector128(), vector2.AsVector128()); /// [Intrinsic] [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Vector4 FusedMultiplyAdd(Vector4 left, Vector4 right, Vector4 addend) - { - return new Vector4( - float.FusedMultiplyAdd(left.X, right.X, addend.X), - float.FusedMultiplyAdd(left.Y, right.Y, addend.Y), - float.FusedMultiplyAdd(left.Z, right.Z, addend.Z), - float.FusedMultiplyAdd(left.W, right.W, addend.W) - ); - } + public static Vector4 FusedMultiplyAdd(Vector4 left, Vector4 right, Vector4 addend) => Vector128.FusedMultiplyAdd(left.AsVector128(), right.AsVector128(), addend.AsVector128()).AsVector4(); /// Performs a linear interpolation between two vectors based on the given weighting. /// The first vector. @@ -407,10 +304,7 @@ public static Vector4 FusedMultiplyAdd(Vector4 left, Vector4 right, Vector4 adde /// ]]> [Intrinsic] [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Vector4 Lerp(Vector4 value1, Vector4 value2, float amount) - { - return (value1 * (1.0f - amount)) + (value2 * amount); - } + public static Vector4 Lerp(Vector4 value1, Vector4 value2, float amount) => (value1 * (1.0f - amount)) + (value2 * amount); /// Returns a vector whose elements are the maximum of each of the pairs of elements in two specified vectors. /// The first vector. @@ -418,15 +312,7 @@ public static Vector4 Lerp(Vector4 value1, Vector4 value2, float amount) /// The maximized vector. [Intrinsic] [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Vector4 Max(Vector4 value1, Vector4 value2) - { - return new Vector4( - (value1.X > value2.X) ? value1.X : value2.X, - (value1.Y > value2.Y) ? value1.Y : value2.Y, - (value1.Z > value2.Z) ? value1.Z : value2.Z, - (value1.W > value2.W) ? value1.W : value2.W - ); - } + public static Vector4 Max(Vector4 value1, Vector4 value2) => Vector128.Max(value1.AsVector128(), value2.AsVector128()).AsVector4(); /// Returns a vector whose elements are the minimum of each of the pairs of elements in two specified vectors. /// The first vector. @@ -434,115 +320,65 @@ public static Vector4 Max(Vector4 value1, Vector4 value2) /// The minimized vector. [Intrinsic] [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Vector4 Min(Vector4 value1, Vector4 value2) - { - return new Vector4( - (value1.X < value2.X) ? value1.X : value2.X, - (value1.Y < value2.Y) ? value1.Y : value2.Y, - (value1.Z < value2.Z) ? value1.Z : value2.Z, - (value1.W < value2.W) ? value1.W : value2.W - ); - } + public static Vector4 Min(Vector4 value1, Vector4 value2) => Vector128.Min(value1.AsVector128(), value2.AsVector128()).AsVector4(); /// Returns a new vector whose values are the product of each pair of elements in two specified vectors. /// The first vector. /// The second vector. /// The element-wise product vector. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Vector4 Multiply(Vector4 left, Vector4 right) - { - return left * right; - } + public static Vector4 Multiply(Vector4 left, Vector4 right) => left * right; /// Multiplies a vector by a specified scalar. /// The vector to multiply. /// The scalar value. /// The scaled vector. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Vector4 Multiply(Vector4 left, float right) - { - return left * right; - } + public static Vector4 Multiply(Vector4 left, float right) => left * right; /// Multiplies a scalar value by a specified vector. /// The scaled value. /// The vector. /// The scaled vector. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Vector4 Multiply(float left, Vector4 right) - { - return left * right; - } + public static Vector4 Multiply(float left, Vector4 right) => left * right; /// [Intrinsic] [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Vector4 MultiplyAddEstimate(Vector4 left, Vector4 right, Vector4 addend) - { - return new Vector4( - float.MultiplyAddEstimate(left.X, right.X, addend.X), - float.MultiplyAddEstimate(left.Y, right.Y, addend.Y), - float.MultiplyAddEstimate(left.Z, right.Z, addend.Z), - float.MultiplyAddEstimate(left.W, right.W, addend.W) - ); - } + public static Vector4 MultiplyAddEstimate(Vector4 left, Vector4 right, Vector4 addend) => Vector128.MultiplyAddEstimate(left.AsVector128(), right.AsVector128(), addend.AsVector128()).AsVector4(); /// Negates a specified vector. /// The vector to negate. /// The negated vector. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Vector4 Negate(Vector4 value) - { - return -value; - } + public static Vector4 Negate(Vector4 value) => -value; /// Returns a vector with the same direction as the specified vector, but with a length of one. /// The vector to normalize. /// The normalized vector. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Vector4 Normalize(Vector4 vector) - { - return vector / vector.Length(); - } + public static Vector4 Normalize(Vector4 vector) => vector / vector.Length(); /// Returns a vector whose elements are the square root of each of a specified vector's elements. /// A vector. /// The square root vector. [Intrinsic] [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Vector4 SquareRoot(Vector4 value) - { - return new Vector4( - MathF.Sqrt(value.X), - MathF.Sqrt(value.Y), - MathF.Sqrt(value.Z), - MathF.Sqrt(value.W) - ); - } + public static Vector4 SquareRoot(Vector4 value) => Vector128.Sqrt(value.AsVector128()).AsVector4(); /// Subtracts the second vector from the first. /// The first vector. /// The second vector. /// The difference vector. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Vector4 Subtract(Vector4 left, Vector4 right) - { - return left - right; - } + public static Vector4 Subtract(Vector4 left, Vector4 right) => left - right; /// Transforms a two-dimensional vector by a specified 4x4 matrix. /// The vector to transform. /// The transformation matrix. /// The transformed vector. - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Vector4 Transform(Vector2 position, Matrix4x4 matrix) - => Transform(position, in matrix.AsImpl()); + public static Vector4 Transform(Vector2 position, Matrix4x4 matrix) => Transform(position, in matrix.AsImpl()); [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static Vector4 Transform(Vector2 position, in Matrix4x4.Impl matrix) @@ -588,9 +424,7 @@ public static Vector4 Transform(Vector2 value, Quaternion rotation) /// The vector to transform. /// The transformation matrix. /// The transformed vector. - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Vector4 Transform(Vector3 position, Matrix4x4 matrix) - => Transform(position, in matrix.AsImpl()); + public static Vector4 Transform(Vector3 position, Matrix4x4 matrix) => Transform(position, in matrix.AsImpl()); [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static Vector4 Transform(Vector3 position, in Matrix4x4.Impl matrix) @@ -637,9 +471,7 @@ public static Vector4 Transform(Vector3 value, Quaternion rotation) /// The vector to transform. /// The transformation matrix. /// The transformed vector. - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Vector4 Transform(Vector4 vector, Matrix4x4 matrix) - => Transform(vector, in matrix.AsImpl()); + public static Vector4 Transform(Vector4 vector, Matrix4x4 matrix) => Transform(vector, in matrix.AsImpl()); [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static Vector4 Transform(Vector4 vector, in Matrix4x4.Impl matrix) @@ -687,18 +519,7 @@ public static Vector4 Transform(Vector4 value, Quaternion rotation) /// is . /// The number of elements in the current instance is greater than in the array. /// is multidimensional. - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public readonly void CopyTo(float[] array) - { - // We explicitly don't check for `null` because historically this has thrown `NullReferenceException` for perf reasons - - if (array.Length < Count) - { - ThrowHelper.ThrowArgumentException_DestinationTooShort(); - } - - Unsafe.WriteUnaligned(ref Unsafe.As(ref array[0]), this); - } + public readonly void CopyTo(float[] array) => this.AsVector128().CopyTo(array); /// Copies the elements of the vector to a specified array starting at a specified index position. /// The destination array. @@ -710,125 +531,52 @@ public readonly void CopyTo(float[] array) /// -or- /// is greater than or equal to the array length. /// is multidimensional. - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public readonly void CopyTo(float[] array, int index) - { - // We explicitly don't check for `null` because historically this has thrown `NullReferenceException` for perf reasons - - if ((uint)index >= (uint)array.Length) - { - ThrowHelper.ThrowStartIndexArgumentOutOfRange_ArgumentOutOfRange_IndexMustBeLess(); - } - - if ((array.Length - index) < Count) - { - ThrowHelper.ThrowArgumentException_DestinationTooShort(); - } - - Unsafe.WriteUnaligned(ref Unsafe.As(ref array[index]), this); - } + public readonly void CopyTo(float[] array, int index) => this.AsVector128().CopyTo(array, index); /// Copies the vector to the given . The length of the destination span must be at least 4. /// The destination span which the values are copied into. /// If number of elements in source vector is greater than those available in destination span. - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public readonly void CopyTo(Span destination) - { - if (destination.Length < Count) - { - ThrowHelper.ThrowArgumentException_DestinationTooShort(); - } - - Unsafe.WriteUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(destination)), this); - } + public readonly void CopyTo(Span destination) => this.AsVector128().CopyTo(destination); /// Attempts to copy the vector to the given . The length of the destination span must be at least 4. /// The destination span which the values are copied into. /// if the source vector was successfully copied to . if is not large enough to hold the source vector. - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public readonly bool TryCopyTo(Span destination) - { - if (destination.Length < Count) - { - return false; - } - - Unsafe.WriteUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(destination)), this); - return true; - } + public readonly bool TryCopyTo(Span destination) => this.AsVector128().TryCopyTo(destination); /// Returns a value that indicates whether this instance and another vector are equal. /// The other vector. /// if the two vectors are equal; otherwise, . /// Two vectors are equal if their , , , and elements are equal. [MethodImpl(MethodImplOptions.AggressiveInlining)] - public readonly bool Equals(Vector4 other) - { - // This function needs to account for floating-point equality around NaN - // and so must behave equivalently to the underlying float/double.Equals - - if (Vector128.IsHardwareAccelerated) - { - return this.AsVector128().Equals(other.AsVector128()); - } - - return SoftwareFallback(in this, other); - - static bool SoftwareFallback(in Vector4 self, Vector4 other) - { - return self.X.Equals(other.X) - && self.Y.Equals(other.Y) - && self.Z.Equals(other.Z) - && self.W.Equals(other.W); - } - } + public readonly bool Equals(Vector4 other) => this.AsVector128().Equals(other.AsVector128()); /// Returns a value that indicates whether this instance and a specified object are equal. /// The object to compare with the current instance. /// if the current instance and are equal; otherwise, . If is , the method returns . /// The current instance and are equal if is a object and their corresponding elements are equal. - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public override readonly bool Equals([NotNullWhen(true)] object? obj) - { - return (obj is Vector4 other) && Equals(other); - } + public override readonly bool Equals([NotNullWhen(true)] object? obj) => (obj is Vector4 other) && Equals(other); /// Returns the hash code for this instance. /// The hash code. - public override readonly int GetHashCode() - { - return HashCode.Combine(X, Y, Z, W); - } + public override readonly int GetHashCode() => HashCode.Combine(X, Y, Z, W); /// Returns the length of this vector object. /// The vector's length. /// [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public readonly float Length() - { - float lengthSquared = LengthSquared(); - return MathF.Sqrt(lengthSquared); - } + public readonly float Length() => MathF.Sqrt(LengthSquared()); /// Returns the length of the vector squared. /// The vector's length squared. /// This operation offers better performance than a call to the method. /// [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public readonly float LengthSquared() - { - return Dot(this, this); - } + public readonly float LengthSquared() => Dot(this, this); /// Returns the string representation of the current instance using default formatting. /// The string representation of the current instance. /// This method returns a string in which each element of the vector is formatted using the "G" (general) format string and the formatting conventions of the current thread culture. The "<" and ">" characters are used to begin and end the string, and the current culture's property followed by a space is used to separate each element. - public override readonly string ToString() - { - return ToString("G", CultureInfo.CurrentCulture); - } + public override readonly string ToString() => ToString("G", CultureInfo.CurrentCulture); /// Returns the string representation of the current instance using the specified format string to format individual elements. /// A standard or custom numeric format string that defines the format of individual elements. @@ -836,10 +584,7 @@ public override readonly string ToString() /// This method returns a string in which each element of the vector is formatted using and the current culture's formatting conventions. The "<" and ">" characters are used to begin and end the string, and the current culture's property followed by a space is used to separate each element. /// Standard Numeric Format Strings /// Custom Numeric Format Strings - public readonly string ToString([StringSyntax(StringSyntaxAttribute.NumericFormat)] string? format) - { - return ToString(format, CultureInfo.CurrentCulture); - } + public readonly string ToString([StringSyntax(StringSyntaxAttribute.NumericFormat)] string? format) => ToString(format, CultureInfo.CurrentCulture); /// Returns the string representation of the current instance using the specified format string to format individual elements and the specified format provider to define culture-specific formatting. /// A standard or custom numeric format string that defines the format of individual elements. diff --git a/src/libraries/System.Private.CoreLib/src/System/Numerics/Vector_1.cs b/src/libraries/System.Private.CoreLib/src/System/Numerics/Vector_1.cs index 4ad327aebc9ee4..4009387a4f796c 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Numerics/Vector_1.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Numerics/Vector_1.cs @@ -124,7 +124,6 @@ public unsafe Vector(ReadOnlySpan values) /// The span from which the vector is created. /// A new with its elements set to the first elements from . /// The length of is less than . - [MethodImpl(MethodImplOptions.AggressiveInlining)] public Vector(Span values) : this((ReadOnlySpan)values) { } @@ -134,12 +133,7 @@ public Vector(Span values) : this((ReadOnlySpan)values) public static Vector AllBitsSet { [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - T scalar = Scalar.AllBitsSet; - return new Vector(scalar); - } + get => new Vector(Scalar.AllBitsSet); } #pragma warning disable CS8500 // This takes the address of, gets the size of, or declares a pointer to a managed type ('T') @@ -148,7 +142,6 @@ public static Vector AllBitsSet public static unsafe int Count { [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] get { ThrowHelper.ThrowForUnsupportedNumericsVectorBaseType(); @@ -202,12 +195,7 @@ public static bool IsSupported public static Vector One { [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - T scalar = Scalar.One; - return new Vector(scalar); - } + get => new Vector(Scalar.One); } /// Gets a new with all elements initialized to zero. @@ -215,7 +203,6 @@ public static Vector One public static Vector Zero { [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] get { ThrowHelper.ThrowForUnsupportedNumericsVectorBaseType(); @@ -223,13 +210,7 @@ public static Vector Zero } } - internal string DisplayString - { - get - { - return IsSupported ? ToString() : SR.NotSupported_Type; - } - } + internal string DisplayString => IsSupported ? ToString() : SR.NotSupported_Type; /// Gets the element at the specified index. /// The index of the element to get. @@ -239,11 +220,7 @@ internal string DisplayString public T this[int index] { [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return this.GetElement(index); - } + get => this.GetElement(index); } /// Adds two vectors to compute their sum. @@ -395,7 +372,6 @@ public T this[int index] /// reinterpreted as a new . /// The type of () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static explicit operator Vector(Vector value) => value.As(); /// Reinterprets a as a new . @@ -403,7 +379,6 @@ public T this[int index] /// reinterpreted as a new . /// The type of () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static explicit operator Vector(Vector value) => value.As(); /// Reinterprets a as a new . @@ -411,7 +386,6 @@ public T this[int index] /// reinterpreted as a new . /// The type of () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static explicit operator Vector(Vector value) => value.As(); /// Reinterprets a as a new . @@ -419,7 +393,6 @@ public T this[int index] /// reinterpreted as a new . /// The type of () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static explicit operator Vector(Vector value) => value.As(); /// Reinterprets a as a new . @@ -427,7 +400,6 @@ public T this[int index] /// reinterpreted as a new . /// The type of () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static explicit operator Vector(Vector value) => value.As(); /// Reinterprets a as a new . @@ -435,7 +407,6 @@ public T this[int index] /// reinterpreted as a new . /// The type of () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static explicit operator Vector(Vector value) => value.As(); /// Reinterprets a as a new . @@ -444,7 +415,6 @@ public T this[int index] /// The type of () is not supported. [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static explicit operator Vector(Vector value) => value.As(); /// Reinterprets a as a new . @@ -453,7 +423,6 @@ public T this[int index] /// The type of () is not supported. [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static explicit operator Vector(Vector value) => value.As(); /// Reinterprets a as a new . @@ -461,7 +430,6 @@ public T this[int index] /// reinterpreted as a new . /// The type of () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static explicit operator Vector(Vector value) => value.As(); /// Reinterprets a as a new . @@ -470,7 +438,6 @@ public T this[int index] /// The type of () is not supported. [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static explicit operator Vector(Vector value) => value.As(); /// Reinterprets a as a new . @@ -479,7 +446,6 @@ public T this[int index] /// The type of () is not supported. [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static explicit operator Vector(Vector value) => value.As(); /// Reinterprets a as a new . @@ -488,7 +454,6 @@ public T this[int index] /// The type of () is not supported. [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static explicit operator Vector(Vector value) => value.As(); /// Compares two vectors to determine if any elements are not equal. @@ -496,18 +461,7 @@ public T this[int index] /// The vector to compare with . /// true if any elements in was not equal to the corresponding element in . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static bool operator !=(Vector left, Vector right) - { - for (int index = 0; index < Count; index++) - { - if (!Scalar.Equals(left.GetElementUnsafe(index), right.GetElementUnsafe(index))) - { - return true; - } - } - return false; - } + public static bool operator !=(Vector left, Vector right) => !(left == right); /// Shifts each element of a vector left by the specified amount. /// The vector whose elements are to be shifted. @@ -552,26 +506,13 @@ public T this[int index] /// The scalar to multiply with . /// The product of and . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Vector operator *(Vector value, T factor) - { - Unsafe.SkipInit(out Vector result); - - for (int index = 0; index < Count; index++) - { - T element = Scalar.Multiply(value.GetElementUnsafe(index), factor); - result.SetElementUnsafe(index, element); - } - - return result; - } + public static Vector operator *(Vector value, T factor) => value * new Vector(factor); /// Multiplies a vector by a scalar to compute their product. /// The scalar to multiply with . /// The vector to multiply with . /// The product of and . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector operator *(T factor, Vector value) => value * factor; /// Computes the ones-complement of a vector. @@ -637,7 +578,6 @@ public static Vector operator >>(Vector value, int shiftCount) /// The vector to negate. /// A vector whose elements are the unary negation of the corresponding elements in . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector operator -(Vector value) => Zero - value; /// Returns a given vector unchanged. @@ -645,7 +585,6 @@ public static Vector operator >>(Vector value, int shiftCount) /// /// The type of the vector () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector operator +(Vector value) { ThrowHelper.ThrowForUnsupportedNumericsVectorBaseType(); @@ -745,7 +684,6 @@ public void CopyTo(Span destination) /// Returns a boolean indicating whether the given Object is equal to this vector instance. /// The Object to compare against. /// True if the Object is equal to this vector; False otherwise. - [MethodImpl(MethodImplOptions.AggressiveInlining)] public override bool Equals([NotNullWhen(true)] object? obj) => (obj is Vector other) && Equals(other); /// Returns a boolean indicating whether the given vector is equal to this vector instance. diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector128.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector128.cs index 1cb989eedba4d2..7f83b8c09d79e7 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector128.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector128.cs @@ -71,7 +71,6 @@ public static Vector128 Abs(Vector128 vector) /// The sum of and . /// The type of and () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector128 Add(Vector128 left, Vector128 right) => left + right; /// Computes the bitwise-and of a given vector and the ones complement of another vector. @@ -102,7 +101,11 @@ public static Vector128 As(this Vector128 vector) ThrowHelper.ThrowForUnsupportedIntrinsicsVector128BaseType(); ThrowHelper.ThrowForUnsupportedIntrinsicsVector128BaseType(); +#if MONO return Unsafe.As, Vector128>(ref vector); +#else + return Unsafe.BitCast, Vector128>(vector); +#endif } /// Reinterprets a as a new . @@ -111,7 +114,6 @@ public static Vector128 As(this Vector128 vector) /// reinterpreted as a new . /// The type of () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector128 AsByte(this Vector128 vector) => vector.As(); /// Reinterprets a as a new . @@ -120,7 +122,6 @@ public static Vector128 As(this Vector128 vector) /// reinterpreted as a new . /// The type of () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector128 AsDouble(this Vector128 vector) => vector.As(); /// Reinterprets a as a new . @@ -129,7 +130,6 @@ public static Vector128 As(this Vector128 vector) /// reinterpreted as a new . /// The type of () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector128 AsInt16(this Vector128 vector) => vector.As(); /// Reinterprets a as a new . @@ -138,7 +138,6 @@ public static Vector128 As(this Vector128 vector) /// reinterpreted as a new . /// The type of () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector128 AsInt32(this Vector128 vector) => vector.As(); /// Reinterprets a as a new . @@ -147,7 +146,6 @@ public static Vector128 As(this Vector128 vector) /// reinterpreted as a new . /// The type of () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector128 AsInt64(this Vector128 vector) => vector.As(); /// Reinterprets a as a new . @@ -156,7 +154,6 @@ public static Vector128 As(this Vector128 vector) /// reinterpreted as a new . /// The type of () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector128 AsNInt(this Vector128 vector) => vector.As(); /// Reinterprets a as a new . @@ -166,9 +163,32 @@ public static Vector128 As(this Vector128 vector) /// The type of () is not supported. [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector128 AsNUInt(this Vector128 vector) => vector.As(); + /// Reinterprets a as a new . + /// The vector to reinterpret. + /// reinterpreted as a new . + internal static Plane AsPlane(this Vector128 value) + { +#if MONO + return Unsafe.As, Plane>(ref value); +#else + return Unsafe.BitCast, Plane>(value); +#endif + } + + /// Reinterprets a as a new . + /// The vector to reinterpret. + /// reinterpreted as a new . + internal static Quaternion AsQuaternion(this Vector128 value) + { +#if MONO + return Unsafe.As, Quaternion>(ref value); +#else + return Unsafe.BitCast, Quaternion>(value); +#endif + } + /// Reinterprets a as a new . /// The type of the elements in the vector. /// The vector to reinterpret. @@ -176,7 +196,6 @@ public static Vector128 As(this Vector128 vector) /// The type of () is not supported. [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector128 AsSByte(this Vector128 vector) => vector.As(); /// Reinterprets a as a new . @@ -185,7 +204,6 @@ public static Vector128 As(this Vector128 vector) /// reinterpreted as a new . /// The type of () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector128 AsSingle(this Vector128 vector) => vector.As(); /// Reinterprets a as a new . @@ -195,7 +213,6 @@ public static Vector128 As(this Vector128 vector) /// The type of () is not supported. [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector128 AsUInt16(this Vector128 vector) => vector.As(); /// Reinterprets a as a new . @@ -205,7 +222,6 @@ public static Vector128 As(this Vector128 vector) /// The type of () is not supported. [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector128 AsUInt32(this Vector128 vector) => vector.As(); /// Reinterprets a as a new . @@ -215,48 +231,58 @@ public static Vector128 As(this Vector128 vector) /// The type of () is not supported. [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector128 AsUInt64(this Vector128 vector) => vector.As(); /// Reinterprets a as a new . /// The plane to reinterpret. /// reinterpreted as a new . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static Vector128 AsVector128(this Plane value) - => Unsafe.As>(ref value); + { +#if MONO + return Unsafe.As>(ref value); +#else + return Unsafe.BitCast>(value); +#endif + } /// Reinterprets a as a new . /// The quaternion to reinterpret. /// reinterpreted as a new . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static Vector128 AsVector128(this Quaternion value) - => Unsafe.As>(ref value); + { +#if MONO + return Unsafe.As>(ref value); +#else + return Unsafe.BitCast>(value); +#endif + } /// Reinterprets a as a new . /// The vector to reinterpret. /// reinterpreted as a new . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Vector128 AsVector128(this Vector2 value) - => new Vector4(value, 0.0f, 0.0f).AsVector128(); + public static Vector128 AsVector128(this Vector2 value) => new Vector4(value.X, value.Y, 0.0f, 0.0f).AsVector128(); /// Reinterprets a as a new . /// The vector to reinterpret. /// reinterpreted as a new . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Vector128 AsVector128(this Vector3 value) - => new Vector4(value, 0.0f).AsVector128(); + public static Vector128 AsVector128(this Vector3 value) => new Vector4(value.X, value.Y, value.Z, 0.0f).AsVector128(); /// Reinterprets a as a new . /// The vector to reinterpret. /// reinterpreted as a new . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector128 AsVector128(this Vector4 value) - => Unsafe.As>(ref value); + { +#if MONO + return Unsafe.As>(ref value); +#else + return Unsafe.BitCast>(value); +#endif + } /// Reinterprets a as a new . /// The type of the elements in the vector. @@ -300,9 +326,14 @@ public static Vector3 AsVector3(this Vector128 value) /// The vector to reinterpret. /// reinterpreted as a new . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector4 AsVector4(this Vector128 value) - => Unsafe.As, Vector4>(ref value); + { +#if MONO + return Unsafe.As, Vector4>(ref value); +#else + return Unsafe.BitCast, Vector4>(value); +#endif + } /// Reinterprets a as a new . /// The type of the elements in the vector. @@ -328,7 +359,6 @@ public static Vector AsVector(this Vector128 value) /// The bitwise-and of and . /// The type of and () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector128 BitwiseAnd(Vector128 left, Vector128 right) => left & right; /// Computes the bitwise-or of two vectors. @@ -338,7 +368,6 @@ public static Vector AsVector(this Vector128 value) /// The bitwise-or of and . /// The type of and () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector128 BitwiseOr(Vector128 left, Vector128 right) => left | right; /// Computes the ceiling of each element in a vector. @@ -359,7 +388,6 @@ internal static Vector128 Ceiling(Vector128 vector) /// A vector whose elements are the ceiling of the elements in . /// [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector128 Ceiling(Vector128 vector) => Ceiling(vector); /// Computes the ceiling of each element in a vector. @@ -367,7 +395,6 @@ internal static Vector128 Ceiling(Vector128 vector) /// A vector whose elements are the ceiling of the elements in . /// [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector128 Ceiling(Vector128 vector) => Ceiling(vector); /// Conditionally selects a value from two vectors on a bitwise basis. @@ -716,7 +743,6 @@ public static void CopyTo(this Vector128 vector, Span destination) /// A new with all elements initialized to . /// The type of () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe Vector128 Create(T value) { Vector64 vector = Vector64.Create(value); @@ -728,7 +754,6 @@ public static unsafe Vector128 Create(T value) /// A new with all elements initialized to . /// On x86, this method corresponds to __m128i _mm_set1_epi8 [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe Vector128 Create(byte value) => Create(value); /// Creates a new instance with all elements initialized to the specified value. @@ -736,7 +761,6 @@ public static unsafe Vector128 Create(T value) /// A new with all elements initialized to . /// On x86, this method corresponds to __m128d _mm_set1_pd [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe Vector128 Create(double value) => Create(value); /// Creates a new instance with all elements initialized to the specified value. @@ -744,7 +768,6 @@ public static unsafe Vector128 Create(T value) /// A new with all elements initialized to . /// On x86, this method corresponds to __m128i _mm_set1_epi16 [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe Vector128 Create(short value) => Create(value); /// Creates a new instance with all elements initialized to the specified value. @@ -752,7 +775,6 @@ public static unsafe Vector128 Create(T value) /// A new with all elements initialized to . /// On x86, this method corresponds to __m128i _mm_set1_epi32 [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe Vector128 Create(int value) => Create(value); /// Creates a new instance with all elements initialized to the specified value. @@ -760,14 +782,12 @@ public static unsafe Vector128 Create(T value) /// A new with all elements initialized to . /// On x86, this method corresponds to __m128i _mm_set1_epi64x [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe Vector128 Create(long value) => Create(value); /// Creates a new instance with all elements initialized to the specified value. /// The value that all elements will be initialized to. /// A new with all elements initialized to . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe Vector128 Create(nint value) => Create(value); /// Creates a new instance with all elements initialized to the specified value. @@ -775,7 +795,6 @@ public static unsafe Vector128 Create(T value) /// A new with all elements initialized to . [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe Vector128 Create(nuint value) => Create(value); /// Creates a new instance with all elements initialized to the specified value. @@ -784,7 +803,6 @@ public static unsafe Vector128 Create(T value) /// On x86, this method corresponds to __m128i _mm_set1_epi8 [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe Vector128 Create(sbyte value) => Create(value); /// Creates a new instance with all elements initialized to the specified value. @@ -792,7 +810,6 @@ public static unsafe Vector128 Create(T value) /// A new with all elements initialized to . /// On x86, this method corresponds to __m128 _mm_set1_ps [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe Vector128 Create(float value) => Create(value); /// Creates a new instance with all elements initialized to the specified value. @@ -801,7 +818,6 @@ public static unsafe Vector128 Create(T value) /// On x86, this method corresponds to __m128i _mm_set1_epi16 [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe Vector128 Create(ushort value) => Create(value); /// Creates a new instance with all elements initialized to the specified value. @@ -810,7 +826,6 @@ public static unsafe Vector128 Create(T value) /// On x86, this method corresponds to __m128i _mm_set1_epi32 [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe Vector128 Create(uint value) => Create(value); /// Creates a new instance with all elements initialized to the specified value. @@ -819,7 +834,6 @@ public static unsafe Vector128 Create(T value) /// On x86, this method corresponds to __m128i _mm_set1_epi64x [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe Vector128 Create(ulong value) => Create(value); /// Creates a new from a given array. @@ -1109,21 +1123,18 @@ public static Vector128 Create(Vector64 lower, Vector64 upper) /// The value that the lower 64-bits will be initialized to. /// The value that the upper 64-bits will be initialized to. /// A new initialized from and . - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe Vector128 Create(Vector64 lower, Vector64 upper) => Create(lower, upper); /// Creates a new instance from two instances. /// The value that the lower 64-bits will be initialized to. /// The value that the upper 64-bits will be initialized to. /// A new initialized from and . - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe Vector128 Create(Vector64 lower, Vector64 upper) => Create(lower, upper); /// Creates a new instance from two instances. /// The value that the lower 64-bits will be initialized to. /// The value that the upper 64-bits will be initialized to. /// A new initialized from and . - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe Vector128 Create(Vector64 lower, Vector64 upper) => Create(lower, upper); /// Creates a new instance from two instances. @@ -1131,21 +1142,18 @@ public static Vector128 Create(Vector64 lower, Vector64 upper) /// The value that the upper 64-bits will be initialized to. /// On x86, this method corresponds to __m128i _mm_setr_epi64 /// A new initialized from and . - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe Vector128 Create(Vector64 lower, Vector64 upper) => Create(lower, upper); /// Creates a new instance from two instances. /// The value that the lower 64-bits will be initialized to. /// The value that the upper 64-bits will be initialized to. /// A new initialized from and . - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe Vector128 Create(Vector64 lower, Vector64 upper) => Create(lower, upper); /// Creates a new instance from two instances. /// The value that the lower 64-bits will be initialized to. /// The value that the upper 64-bits will be initialized to. /// A new initialized from and . - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe Vector128 Create(Vector64 lower, Vector64 upper) => Create(lower, upper); /// Creates a new instance from two instances. @@ -1153,7 +1161,6 @@ public static Vector128 Create(Vector64 lower, Vector64 upper) /// The value that the upper 64-bits will be initialized to. /// A new initialized from and . [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe Vector128 Create(Vector64 lower, Vector64 upper) => Create(lower, upper); /// Creates a new instance from two instances. @@ -1161,14 +1168,12 @@ public static Vector128 Create(Vector64 lower, Vector64 upper) /// The value that the upper 64-bits will be initialized to. /// A new initialized from and . [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe Vector128 Create(Vector64 lower, Vector64 upper) => Create(lower, upper); /// Creates a new instance from two instances. /// The value that the lower 64-bits will be initialized to. /// The value that the upper 64-bits will be initialized to. /// A new initialized from and . - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe Vector128 Create(Vector64 lower, Vector64 upper) => Create(lower, upper); /// Creates a new instance from two instances. @@ -1176,7 +1181,6 @@ public static Vector128 Create(Vector64 lower, Vector64 upper) /// The value that the upper 64-bits will be initialized to. /// A new initialized from and . [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe Vector128 Create(Vector64 lower, Vector64 upper) => Create(lower, upper); /// Creates a new instance from two instances. @@ -1185,7 +1189,6 @@ public static Vector128 Create(Vector64 lower, Vector64 upper) /// On x86, this method corresponds to __m128i _mm_setr_epi64 /// A new initialized from and . [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe Vector128 Create(Vector64 lower, Vector64 upper) => Create(lower, upper); /// Creates a new instance from two instances. @@ -1193,7 +1196,6 @@ public static Vector128 Create(Vector64 lower, Vector64 upper) /// The value that the upper 64-bits will be initialized to. /// A new initialized from and . [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe Vector128 Create(Vector64 lower, Vector64 upper) => Create(lower, upper); /// Creates a new instance with the first element initialized to the specified value and the remaining elements initialized to zero. @@ -1202,49 +1204,42 @@ public static Vector128 Create(Vector64 lower, Vector64 upper) /// A new instance with the first element initialized to and the remaining elements initialized to zero. /// The type of () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe Vector128 CreateScalar(T value) => Vector64.CreateScalar(value).ToVector128(); /// Creates a new instance with the first element initialized to the specified value and the remaining elements initialized to zero. /// The value that element 0 will be initialized to. /// A new instance with the first element initialized to and the remaining elements initialized to zero. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe Vector128 CreateScalar(byte value) => CreateScalar(value); /// Creates a new instance with the first element initialized to the specified value and the remaining elements initialized to zero. /// The value that element 0 will be initialized to. /// A new instance with the first element initialized to and the remaining elements initialized to zero. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe Vector128 CreateScalar(double value) => CreateScalar(value); /// Creates a new instance with the first element initialized to the specified value and the remaining elements initialized to zero. /// The value that element 0 will be initialized to. /// A new instance with the first element initialized to and the remaining elements initialized to zero. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe Vector128 CreateScalar(short value) => CreateScalar(value); /// Creates a new instance with the first element initialized to the specified value and the remaining elements initialized to zero. /// The value that element 0 will be initialized to. /// A new instance with the first element initialized to and the remaining elements initialized to zero. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe Vector128 CreateScalar(int value) => CreateScalar(value); /// Creates a new instance with the first element initialized to the specified value and the remaining elements initialized to zero. /// The value that element 0 will be initialized to. /// A new instance with the first element initialized to and the remaining elements initialized to zero. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe Vector128 CreateScalar(long value) => CreateScalar(value); /// Creates a new instance with the first element initialized to the specified value and the remaining elements initialized to zero. /// The value that element 0 will be initialized to. /// A new instance with the first element initialized to and the remaining elements initialized to zero. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe Vector128 CreateScalar(nint value) => CreateScalar(value); /// Creates a new instance with the first element initialized to the specified value and the remaining elements initialized to zero. @@ -1252,7 +1247,6 @@ public static Vector128 Create(Vector64 lower, Vector64 upper) /// A new instance with the first element initialized to and the remaining elements initialized to zero. [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe Vector128 CreateScalar(nuint value) => CreateScalar(value); /// Creates a new instance with the first element initialized to the specified value and the remaining elements initialized to zero. @@ -1260,14 +1254,12 @@ public static Vector128 Create(Vector64 lower, Vector64 upper) /// A new instance with the first element initialized to and the remaining elements initialized to zero. [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe Vector128 CreateScalar(sbyte value) => CreateScalar(value); /// Creates a new instance with the first element initialized to the specified value and the remaining elements initialized to zero. /// The value that element 0 will be initialized to. /// A new instance with the first element initialized to and the remaining elements initialized to zero. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe Vector128 CreateScalar(float value) => CreateScalar(value); /// Creates a new instance with the first element initialized to the specified value and the remaining elements initialized to zero. @@ -1275,7 +1267,6 @@ public static Vector128 Create(Vector64 lower, Vector64 upper) /// A new instance with the first element initialized to and the remaining elements initialized to zero. [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe Vector128 CreateScalar(ushort value) => CreateScalar(value); /// Creates a new instance with the first element initialized to the specified value and the remaining elements initialized to zero. @@ -1283,7 +1274,6 @@ public static Vector128 Create(Vector64 lower, Vector64 upper) /// A new instance with the first element initialized to and the remaining elements initialized to zero. [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe Vector128 CreateScalar(uint value) => CreateScalar(value); /// Creates a new instance with the first element initialized to the specified value and the remaining elements initialized to zero. @@ -1291,7 +1281,6 @@ public static Vector128 Create(Vector64 lower, Vector64 upper) /// A new instance with the first element initialized to and the remaining elements initialized to zero. [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe Vector128 CreateScalar(ulong value) => CreateScalar(value); /// Creates a new instance with the first element initialized to the specified value and the remaining elements left uninitialized. @@ -1317,42 +1306,36 @@ public static Vector128 CreateScalarUnsafe(T value) /// The value that element 0 will be initialized to. /// A new instance with the first element initialized to and the remaining elements left uninitialized. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe Vector128 CreateScalarUnsafe(byte value) => CreateScalarUnsafe(value); /// Creates a new instance with the first element initialized to the specified value and the remaining elements left uninitialized. /// The value that element 0 will be initialized to. /// A new instance with the first element initialized to and the remaining elements left uninitialized. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe Vector128 CreateScalarUnsafe(double value) => CreateScalarUnsafe(value); /// Creates a new instance with the first element initialized to the specified value and the remaining elements left uninitialized. /// The value that element 0 will be initialized to. /// A new instance with the first element initialized to and the remaining elements left uninitialized. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe Vector128 CreateScalarUnsafe(short value) => CreateScalarUnsafe(value); /// Creates a new instance with the first element initialized to the specified value and the remaining elements left uninitialized. /// The value that element 0 will be initialized to. /// A new instance with the first element initialized to and the remaining elements left uninitialized. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe Vector128 CreateScalarUnsafe(int value) => CreateScalarUnsafe(value); /// Creates a new instance with the first element initialized to the specified value and the remaining elements left uninitialized. /// The value that element 0 will be initialized to. /// A new instance with the first element initialized to and the remaining elements left uninitialized. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe Vector128 CreateScalarUnsafe(long value) => CreateScalarUnsafe(value); /// Creates a new instance with the first element initialized to the specified value and the remaining elements left uninitialized. /// The value that element 0 will be initialized to. /// A new instance with the first element initialized to and the remaining elements left uninitialized. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe Vector128 CreateScalarUnsafe(nint value) => CreateScalarUnsafe(value); /// Creates a new instance with the first element initialized to the specified value and the remaining elements left uninitialized. @@ -1360,7 +1343,6 @@ public static Vector128 CreateScalarUnsafe(T value) /// A new instance with the first element initialized to and the remaining elements left uninitialized. [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe Vector128 CreateScalarUnsafe(nuint value) => CreateScalarUnsafe(value); /// Creates a new instance with the first element initialized to the specified value and the remaining elements left uninitialized. @@ -1368,14 +1350,12 @@ public static Vector128 CreateScalarUnsafe(T value) /// A new instance with the first element initialized to and the remaining elements left uninitialized. [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe Vector128 CreateScalarUnsafe(sbyte value) => CreateScalarUnsafe(value); /// Creates a new instance with the first element initialized to the specified value and the remaining elements left uninitialized. /// The value that element 0 will be initialized to. /// A new instance with the first element initialized to and the remaining elements left uninitialized. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe Vector128 CreateScalarUnsafe(float value) => CreateScalarUnsafe(value); /// Creates a new instance with the first element initialized to the specified value and the remaining elements left uninitialized. @@ -1383,7 +1363,6 @@ public static Vector128 CreateScalarUnsafe(T value) /// A new instance with the first element initialized to and the remaining elements left uninitialized. [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe Vector128 CreateScalarUnsafe(ushort value) => CreateScalarUnsafe(value); /// Creates a new instance with the first element initialized to the specified value and the remaining elements left uninitialized. @@ -1391,7 +1370,6 @@ public static Vector128 CreateScalarUnsafe(T value) /// A new instance with the first element initialized to and the remaining elements left uninitialized. [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe Vector128 CreateScalarUnsafe(uint value) => CreateScalarUnsafe(value); /// Creates a new instance with the first element initialized to the specified value and the remaining elements left uninitialized. @@ -1399,7 +1377,6 @@ public static Vector128 CreateScalarUnsafe(T value) /// A new instance with the first element initialized to and the remaining elements left uninitialized. [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe Vector128 CreateScalarUnsafe(ulong value) => CreateScalarUnsafe(value); /// Creates a new instance where the elements begin at a specified value and which are spaced apart according to another specified value. @@ -1418,7 +1395,6 @@ public static Vector128 CreateScalarUnsafe(T value) /// The quotient of divided by . /// The type of and () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector128 Divide(Vector128 left, Vector128 right) => left / right; /// Divides a vector by a scalar to compute the per-element quotient. @@ -1427,7 +1403,6 @@ public static Vector128 CreateScalarUnsafe(T value) /// The type of the elements in the vector. /// The quotient of divided by . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector128 Divide(Vector128 left, T right) => left / right; /// Computes the dot product of two vectors. @@ -1472,7 +1447,6 @@ public static Vector128 Equals(Vector128 left, Vector128 right) /// true if all elements in were equal to the corresponding element in . /// The type of and () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static bool EqualsAll(Vector128 left, Vector128 right) => left == right; /// Compares two vectors to determine if any elements are equal. @@ -1556,7 +1530,6 @@ internal static Vector128 Floor(Vector128 vector) /// A vector whose elements are the floor of the elements in . /// [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector128 Floor(Vector128 vector) => Floor(vector); /// Computes the floor of each element in a vector. @@ -1564,7 +1537,6 @@ internal static Vector128 Floor(Vector128 vector) /// A vector whose elements are the floor of the elements in . /// [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector128 Floor(Vector128 vector) => Floor(vector); /// @@ -1616,7 +1588,6 @@ public static T GetElement(this Vector128 vector, int index) /// The value of the lower 64-bits as a new . /// The type of () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector64 GetLower(this Vector128 vector) { ThrowHelper.ThrowForUnsupportedIntrinsicsVector128BaseType(); @@ -1629,7 +1600,6 @@ public static Vector64 GetLower(this Vector128 vector) /// The value of the upper 64-bits as a new . /// The type of () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector64 GetUpper(this Vector128 vector) { ThrowHelper.ThrowForUnsupportedIntrinsicsVector128BaseType(); @@ -1820,7 +1790,6 @@ public static bool LessThanOrEqualAny(Vector128 left, Vector128 right) /// The type of () is not supported. [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe Vector128 Load(T* source) => LoadUnsafe(ref *source); /// Loads a vector from the given aligned source. @@ -1851,7 +1820,6 @@ public static unsafe Vector128 LoadAligned(T* source) /// The type of () is not supported. [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe Vector128 LoadAlignedNonTemporal(T* source) => LoadAligned(source); #pragma warning restore CS8500 // This takes the address of, gets the size of, or declares a pointer to a managed type ('T') @@ -1888,17 +1856,13 @@ public static Vector128 LoadUnsafe(ref readonly T source, nuint elementOff /// Loads a vector from the given source and reinterprets it as . /// The source from which the vector will be loaded. /// The vector loaded from . - [MethodImpl(MethodImplOptions.AggressiveInlining)] - internal static Vector128 LoadUnsafe(ref char source) => - LoadUnsafe(ref Unsafe.As(ref source)); + internal static Vector128 LoadUnsafe(ref char source) => LoadUnsafe(ref Unsafe.As(ref source)); /// Loads a vector from the given source and element offset and reinterprets it as . /// The source to which will be added before loading the vector. /// The element offset from from which the vector will be loaded. /// The vector loaded from plus . - [MethodImpl(MethodImplOptions.AggressiveInlining)] - internal static Vector128 LoadUnsafe(ref char source, nuint elementOffset) => - LoadUnsafe(ref Unsafe.As(ref source), elementOffset); + internal static Vector128 LoadUnsafe(ref char source, nuint elementOffset) => LoadUnsafe(ref Unsafe.As(ref source), elementOffset); /// [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -2007,7 +1971,6 @@ public static Vector128 Min(Vector128 left, Vector128 right) /// The element-wise product of and . /// The type of and () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector128 Multiply(Vector128 left, Vector128 right) => left * right; /// Multiplies a vector by a scalar to compute their product. @@ -2017,7 +1980,6 @@ public static Vector128 Min(Vector128 left, Vector128 right) /// The product of and . /// The type of and () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector128 Multiply(Vector128 left, T right) => left * right; /// Multiplies a vector by a scalar to compute their product. @@ -2027,7 +1989,6 @@ public static Vector128 Min(Vector128 left, Vector128 right) /// The product of and . /// The type of and () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector128 Multiply(T left, Vector128 right) => left * right; /// @@ -2160,7 +2121,6 @@ public static unsafe Vector128 Narrow(Vector128 lower, Vector128
    A vector whose elements are the negation of the corresponding elements in . /// The type of () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector128 Negate(Vector128 vector) => -vector; /// Computes the ones-complement of a vector. @@ -2169,7 +2129,6 @@ public static unsafe Vector128 Narrow(Vector128 lower, Vector128
      A vector whose elements are the ones-complement of the corresponding elements in . /// The type of () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector128 OnesComplement(Vector128 vector) => ~vector; /// Shifts each element of a vector left by the specified amount. @@ -2177,7 +2136,6 @@ public static unsafe Vector128 Narrow(Vector128 lower, Vector128
        The number of bits by which to shift each element. /// A vector whose elements where shifted left by . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static Vector128 ShiftLeft(Vector128 vector, int shiftCount) => vector << shiftCount; /// Shifts each element of a vector left by the specified amount. @@ -2185,7 +2143,6 @@ public static unsafe Vector128 Narrow(Vector128 lower, Vector128
          The number of bits by which to shift each element. /// A vector whose elements where shifted left by . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector128 ShiftLeft(Vector128 vector, int shiftCount) => vector << shiftCount; /// Shifts each element of a vector left by the specified amount. @@ -2193,7 +2150,6 @@ public static unsafe Vector128 Narrow(Vector128 lower, Vector128
            The number of bits by which to shift each element. /// A vector whose elements where shifted left by . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector128 ShiftLeft(Vector128 vector, int shiftCount) => vector << shiftCount; /// Shifts each element of a vector left by the specified amount. @@ -2201,7 +2157,6 @@ public static unsafe Vector128 Narrow(Vector128 lower, Vector128
              The number of bits by which to shift each element. /// A vector whose elements where shifted left by . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector128 ShiftLeft(Vector128 vector, int shiftCount) => vector << shiftCount; /// Shifts each element of a vector left by the specified amount. @@ -2209,7 +2164,6 @@ public static unsafe Vector128 Narrow(Vector128 lower, Vector128
                The number of bits by which to shift each element. /// A vector whose elements where shifted left by . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector128 ShiftLeft(Vector128 vector, int shiftCount) => vector << shiftCount; /// Shifts each element of a vector left by the specified amount. @@ -2217,7 +2171,6 @@ public static unsafe Vector128 Narrow(Vector128 lower, Vector128
                  The number of bits by which to shift each element. /// A vector whose elements where shifted left by . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector128 ShiftLeft(Vector128 vector, int shiftCount) => vector << shiftCount; /// Shifts each element of a vector left by the specified amount. @@ -2226,7 +2179,6 @@ public static unsafe Vector128 Narrow(Vector128 lower, Vector128
                    A vector whose elements where shifted left by . [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector128 ShiftLeft(Vector128 vector, int shiftCount) => vector << shiftCount; /// Shifts each element of a vector left by the specified amount. @@ -2235,7 +2187,6 @@ public static unsafe Vector128 Narrow(Vector128 lower, Vector128
                      A vector whose elements where shifted left by . [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector128 ShiftLeft(Vector128 vector, int shiftCount) => vector << shiftCount; /// Shifts each element of a vector left by the specified amount. @@ -2244,7 +2195,6 @@ public static unsafe Vector128 Narrow(Vector128 lower, Vector128
                        A vector whose elements where shifted left by . [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector128 ShiftLeft(Vector128 vector, int shiftCount) => vector << shiftCount; /// Shifts each element of a vector left by the specified amount. @@ -2253,7 +2203,6 @@ public static unsafe Vector128 Narrow(Vector128 lower, Vector128
                          A vector whose elements where shifted left by . [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector128 ShiftLeft(Vector128 vector, int shiftCount) => vector << shiftCount; /// Shifts each element of a vector left by the specified amount. @@ -2262,7 +2211,6 @@ public static unsafe Vector128 Narrow(Vector128 lower, Vector128
                            A vector whose elements where shifted left by . [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector128 ShiftLeft(Vector128 vector, int shiftCount) => vector << shiftCount; /// Shifts (signed) each element of a vector right by the specified amount. @@ -2270,7 +2218,6 @@ public static unsafe Vector128 Narrow(Vector128 lower, Vector128
                              The number of bits by which to shift each element. /// A vector whose elements where shifted right by . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static Vector128 ShiftRightArithmetic(Vector128 vector, int shiftCount) => vector >> shiftCount; /// Shifts (signed) each element of a vector right by the specified amount. @@ -2278,7 +2225,6 @@ public static unsafe Vector128 Narrow(Vector128 lower, Vector128
                                The number of bits by which to shift each element. /// A vector whose elements where shifted right by . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector128 ShiftRightArithmetic(Vector128 vector, int shiftCount) => vector >> shiftCount; /// Shifts (signed) each element of a vector right by the specified amount. @@ -2286,7 +2232,6 @@ public static unsafe Vector128 Narrow(Vector128 lower, Vector128
                                  The number of bits by which to shift each element. /// A vector whose elements where shifted right by . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector128 ShiftRightArithmetic(Vector128 vector, int shiftCount) => vector >> shiftCount; /// Shifts (signed) each element of a vector right by the specified amount. @@ -2294,7 +2239,6 @@ public static unsafe Vector128 Narrow(Vector128 lower, Vector128
                                    The number of bits by which to shift each element. /// A vector whose elements where shifted right by . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector128 ShiftRightArithmetic(Vector128 vector, int shiftCount) => vector >> shiftCount; /// Shifts (signed) each element of a vector right by the specified amount. @@ -2302,7 +2246,6 @@ public static unsafe Vector128 Narrow(Vector128 lower, Vector128
                                      The number of bits by which to shift each element. /// A vector whose elements where shifted right by . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector128 ShiftRightArithmetic(Vector128 vector, int shiftCount) => vector >> shiftCount; /// Shifts (signed) each element of a vector right by the specified amount. @@ -2311,7 +2254,6 @@ public static unsafe Vector128 Narrow(Vector128 lower, Vector128
                                        A vector whose elements where shifted right by . [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector128 ShiftRightArithmetic(Vector128 vector, int shiftCount) => vector >> shiftCount; /// Shifts (unsigned) each element of a vector right by the specified amount. @@ -2319,7 +2261,6 @@ public static unsafe Vector128 Narrow(Vector128 lower, Vector128
                                          The number of bits by which to shift each element. /// A vector whose elements where shifted right by . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static Vector128 ShiftRightLogical(Vector128 vector, int shiftCount) => vector >>> shiftCount; /// Shifts (unsigned) each element of a vector right by the specified amount. @@ -2327,7 +2268,6 @@ public static unsafe Vector128 Narrow(Vector128 lower, Vector128
                                            The number of bits by which to shift each element. /// A vector whose elements where shifted right by . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector128 ShiftRightLogical(Vector128 vector, int shiftCount) => vector >>> shiftCount; /// Shifts (unsigned) each element of a vector right by the specified amount. @@ -2335,7 +2275,6 @@ public static unsafe Vector128 Narrow(Vector128 lower, Vector128
                                              The number of bits by which to shift each element. /// A vector whose elements where shifted right by . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector128 ShiftRightLogical(Vector128 vector, int shiftCount) => vector >>> shiftCount; /// Shifts (unsigned) each element of a vector right by the specified amount. @@ -2343,7 +2282,6 @@ public static unsafe Vector128 Narrow(Vector128 lower, Vector128
                                                The number of bits by which to shift each element. /// A vector whose elements where shifted right by . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector128 ShiftRightLogical(Vector128 vector, int shiftCount) => vector >>> shiftCount; /// Shifts (unsigned) each element of a vector right by the specified amount. @@ -2351,7 +2289,6 @@ public static unsafe Vector128 Narrow(Vector128 lower, Vector128
                                                  The number of bits by which to shift each element. /// A vector whose elements where shifted right by . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector128 ShiftRightLogical(Vector128 vector, int shiftCount) => vector >>> shiftCount; /// Shifts (unsigned) each element of a vector right by the specified amount. @@ -2359,7 +2296,6 @@ public static unsafe Vector128 Narrow(Vector128 lower, Vector128
                                                    The number of bits by which to shift each element. /// A vector whose elements where shifted right by . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector128 ShiftRightLogical(Vector128 vector, int shiftCount) => vector >>> shiftCount; /// Shifts (unsigned) each element of a vector right by the specified amount. @@ -2368,7 +2304,6 @@ public static unsafe Vector128 Narrow(Vector128 lower, Vector128
                                                      A vector whose elements where shifted right by . [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector128 ShiftRightLogical(Vector128 vector, int shiftCount) => vector >>> shiftCount; /// Shifts (unsigned) each element of a vector right by the specified amount. @@ -2377,7 +2312,6 @@ public static unsafe Vector128 Narrow(Vector128 lower, Vector128
                                                        A vector whose elements where shifted right by . [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector128 ShiftRightLogical(Vector128 vector, int shiftCount) => vector >>> shiftCount; /// Shifts (unsigned) each element of a vector right by the specified amount. @@ -2386,7 +2320,6 @@ public static unsafe Vector128 Narrow(Vector128 lower, Vector128
                                                          A vector whose elements where shifted right by . [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector128 ShiftRightLogical(Vector128 vector, int shiftCount) => vector >>> shiftCount; /// Shifts (unsigned) each element of a vector right by the specified amount. @@ -2395,7 +2328,6 @@ public static unsafe Vector128 Narrow(Vector128 lower, Vector128
                                                            A vector whose elements where shifted right by . [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector128 ShiftRightLogical(Vector128 vector, int shiftCount) => vector >>> shiftCount; /// Shifts (unsigned) each element of a vector right by the specified amount. @@ -2404,7 +2336,6 @@ public static unsafe Vector128 Narrow(Vector128 lower, Vector128
                                                              A vector whose elements where shifted right by . [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector128 ShiftRightLogical(Vector128 vector, int shiftCount) => vector >>> shiftCount; /// Creates a new vector by selecting values from an input vector using a set of indices. @@ -2706,7 +2637,6 @@ public static Vector128 Sqrt(Vector128 vector) /// The type of () is not supported. [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void Store(this Vector128 source, T* destination) => source.StoreUnsafe(ref *destination); /// Stores a vector at the given aligned destination. @@ -2737,7 +2667,6 @@ public static unsafe void StoreAligned(this Vector128 source, T* destinati /// The type of () is not supported. [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void StoreAlignedNonTemporal(this Vector128 source, T* destination) => source.StoreAligned(destination); #pragma warning restore CS8500 // This takes the address of, gets the size of, or declares a pointer to a managed type ('T') @@ -2795,7 +2724,6 @@ public static void StoreUnsafe(this Vector128 source, ref T destination, n /// The difference of and . /// The type of and () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector128 Subtract(Vector128 left, Vector128 right) => left - right; /// Computes the sum of all elements in a vector. @@ -2823,7 +2751,6 @@ public static T Sum(Vector128 vector) /// A scalar containing the value of the first element. /// The type of () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static T ToScalar(this Vector128 vector) { ThrowHelper.ThrowForUnsupportedIntrinsicsVector128BaseType(); @@ -3210,7 +3137,6 @@ public static Vector128 WithUpper(this Vector128 vector, Vector64 va /// The exclusive-or of and . /// The type of and () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector128 Xor(Vector128 left, Vector128 right) => left ^ right; [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -3230,16 +3156,10 @@ internal static void SetElementUnsafe(in this Vector128 vector, int index, } [MethodImpl(MethodImplOptions.AggressiveInlining)] - internal static void SetLowerUnsafe(in this Vector128 vector, Vector64 value) - { - Unsafe.AsRef(in vector._lower) = value; - } + internal static void SetLowerUnsafe(in this Vector128 vector, Vector64 value) => Unsafe.AsRef(in vector._lower) = value; [MethodImpl(MethodImplOptions.AggressiveInlining)] - internal static void SetUpperUnsafe(in this Vector128 vector, Vector64 value) - { - Unsafe.AsRef(in vector._upper) = value; - } + internal static void SetUpperUnsafe(in this Vector128 vector, Vector64 value) => Unsafe.AsRef(in vector._upper) = value; [MethodImpl(MethodImplOptions.AggressiveInlining)] [CompExactlyDependsOn(typeof(AdvSimd.Arm64))] diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector128_1.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector128_1.cs index 23f027f12f7184..c9f1b6e3f21efd 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector128_1.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector128_1.cs @@ -39,7 +39,6 @@ namespace System.Runtime.Intrinsics public static Vector128 AllBitsSet { [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] get { Vector64 vector = Vector64.AllBitsSet; @@ -52,11 +51,7 @@ public static Vector128 AllBitsSet public static int Count { [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return Vector64.Count * 2; - } + get => Vector64.Count * 2; } /// Gets a new with the elements set to their index. @@ -107,7 +102,6 @@ public static bool IsSupported public static Vector128 One { [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] get { Vector64 vector = Vector64.One; @@ -120,7 +114,6 @@ public static Vector128 One public static Vector128 Zero { [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] get { ThrowHelper.ThrowForUnsupportedIntrinsicsVector128BaseType(); @@ -128,27 +121,14 @@ public static Vector128 Zero } } - internal string DisplayString - { - get - { - return IsSupported ? ToString() : SR.NotSupported_Type; - } - } + internal string DisplayString => IsSupported ? ToString() : SR.NotSupported_Type; /// Gets the element at the specified index. /// The index of the element to get. /// The value of the element at . /// was less than zero or greater than the number of elements. /// The type of the vector () is not supported. - public T this[int index] - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return this.GetElement(index); - } - } + public T this[int index] => this.GetElement(index); /// Adds two vectors to compute their sum. /// The vector to add with . @@ -258,12 +238,7 @@ public T this[int index] /// true if any elements in was not equal to the corresponding element in . /// The type of the vector () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static bool operator !=(Vector128 left, Vector128 right) - { - return (left._lower != right._lower) - || (left._upper != right._upper); - } + public static bool operator !=(Vector128 left, Vector128 right) => !(left == right); /// Shifts each element of a vector left by the specified amount. /// The vector whose elements are to be shifted. @@ -380,7 +355,6 @@ public static Vector128 operator >>(Vector128 value, int shiftCount) /// /// The type of the vector () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector128 operator +(Vector128 value) { ThrowHelper.ThrowForUnsupportedIntrinsicsVector128BaseType(); @@ -405,14 +379,13 @@ public static Vector128 operator >>>(Vector128 value, int shiftCount) /// The object to compare with the current instance. /// true if is a and is equal to the current instance; otherwise, false. /// The type of the vector () is not supported. - [MethodImpl(MethodImplOptions.AggressiveInlining)] public override bool Equals([NotNullWhen(true)] object? obj) => (obj is Vector128 other) && Equals(other); // Account for floating-point equality around NaN // This is in a separate method so it can be optimized by the mono interpreter/jiterpreter [Intrinsic] [MethodImpl(MethodImplOptions.AggressiveInlining)] - internal static bool EqualsFloatingPoint (Vector128 lhs, Vector128 rhs) + internal static bool EqualsFloatingPoint(Vector128 lhs, Vector128 rhs) { Vector128 result = Vector128.Equals(lhs, rhs) | ~(Vector128.Equals(lhs, lhs) | Vector128.Equals(rhs, rhs)); return result.AsInt32() == Vector128.AllBitsSet; @@ -464,7 +437,6 @@ public override int GetHashCode() /// Converts the current instance to an equivalent string representation. /// An equivalent string representation of the current instance. /// The type of the vector () is not supported. - [MethodImpl(MethodImplOptions.AggressiveInlining)] public override string ToString() => ToString("G", CultureInfo.InvariantCulture); private string ToString([StringSyntax(StringSyntaxAttribute.NumericFormat)] string? format, IFormatProvider? formatProvider) @@ -692,15 +664,9 @@ private string ToString([StringSyntax(StringSyntaxAttribute.NumericFormat)] stri // New Surface Area // - static bool ISimdVector, T>.AnyWhereAllBitsSet(Vector128 vector) - { - return Vector128.EqualsAny(vector, Vector128.AllBitsSet); - } + static bool ISimdVector, T>.AnyWhereAllBitsSet(Vector128 vector) => Vector128.EqualsAny(vector, AllBitsSet); - static bool ISimdVector, T>.Any(Vector128 vector, T value) - { - return Vector128.EqualsAny(vector, Vector128.Create((T)value)); - } + static bool ISimdVector, T>.Any(Vector128 vector, T value) => Vector128.EqualsAny(vector, Vector128.Create(value)); static int ISimdVector, T>.IndexOfLastMatch(Vector128 vector) { diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector256.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector256.cs index 01591e0aa20cbc..e8f16472b3695f 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector256.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector256.cs @@ -75,7 +75,6 @@ public static Vector256 Abs(Vector256 vector) /// The sum of and . /// The type of and () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 Add(Vector256 left, Vector256 right) => left + right; /// Computes the bitwise-and of a given vector and the ones complement of another vector. @@ -107,7 +106,11 @@ public static Vector256 As(this Vector256 vector) ThrowHelper.ThrowForUnsupportedIntrinsicsVector256BaseType(); ThrowHelper.ThrowForUnsupportedIntrinsicsVector256BaseType(); +#if MONO return Unsafe.As, Vector256>(ref vector); +#else + return Unsafe.BitCast, Vector256>(vector); +#endif } /// Reinterprets a as a new . @@ -116,7 +119,6 @@ public static Vector256 As(this Vector256 vector) /// reinterpreted as a new . /// The type of () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 AsByte(this Vector256 vector) => vector.As(); /// Reinterprets a as a new . @@ -125,7 +127,6 @@ public static Vector256 As(this Vector256 vector) /// reinterpreted as a new . /// The type of () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 AsDouble(this Vector256 vector) => vector.As(); /// Reinterprets a as a new . @@ -134,7 +135,6 @@ public static Vector256 As(this Vector256 vector) /// reinterpreted as a new . /// The type of () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 AsInt16(this Vector256 vector) => vector.As(); /// Reinterprets a as a new . @@ -143,7 +143,6 @@ public static Vector256 As(this Vector256 vector) /// reinterpreted as a new . /// The type of () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 AsInt32(this Vector256 vector) => vector.As(); /// Reinterprets a as a new . @@ -152,7 +151,6 @@ public static Vector256 As(this Vector256 vector) /// reinterpreted as a new . /// The type of () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 AsInt64(this Vector256 vector) => vector.As(); /// Reinterprets a as a new . @@ -161,7 +159,6 @@ public static Vector256 As(this Vector256 vector) /// reinterpreted as a new . /// The type of () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 AsNInt(this Vector256 vector) => vector.As(); /// Reinterprets a as a new . @@ -171,7 +168,6 @@ public static Vector256 As(this Vector256 vector) /// The type of () is not supported. [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 AsNUInt(this Vector256 vector) => vector.As(); /// Reinterprets a as a new . @@ -181,7 +177,6 @@ public static Vector256 As(this Vector256 vector) /// The type of () is not supported. [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 AsSByte(this Vector256 vector) => vector.As(); /// Reinterprets a as a new . @@ -190,7 +185,6 @@ public static Vector256 As(this Vector256 vector) /// reinterpreted as a new . /// The type of () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 AsSingle(this Vector256 vector) => vector.As(); /// Reinterprets a as a new . @@ -200,7 +194,6 @@ public static Vector256 As(this Vector256 vector) /// The type of () is not supported. [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 AsUInt16(this Vector256 vector) => vector.As(); /// Reinterprets a as a new . @@ -210,7 +203,6 @@ public static Vector256 As(this Vector256 vector) /// The type of () is not supported. [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 AsUInt32(this Vector256 vector) => vector.As(); /// Reinterprets a as a new . @@ -220,7 +212,6 @@ public static Vector256 As(this Vector256 vector) /// The type of () is not supported. [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 AsUInt64(this Vector256 vector) => vector.As(); /// Reinterprets a as a new . @@ -263,7 +254,6 @@ public static Vector AsVector(this Vector256 value) /// The bitwise-and of and . /// The type of and () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 BitwiseAnd(Vector256 left, Vector256 right) => left & right; /// Computes the bitwise-or of two vectors. @@ -273,7 +263,6 @@ public static Vector AsVector(this Vector256 value) /// The bitwise-or of and . /// The type of and () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 BitwiseOr(Vector256 left, Vector256 right) => left | right; /// Computes the ceiling of each element in a vector. @@ -294,7 +283,6 @@ internal static Vector256 Ceiling(Vector256 vector) /// A vector whose elements are the ceiling of the elements in . /// [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 Ceiling(Vector256 vector) => Ceiling(vector); /// Computes the ceiling of each element in a vector. @@ -302,7 +290,6 @@ internal static Vector256 Ceiling(Vector256 vector) /// A vector whose elements are the ceiling of the elements in . /// [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 Ceiling(Vector256 vector) => Ceiling(vector); /// Conditionally selects a value from two vectors on a bitwise basis. @@ -625,7 +612,6 @@ public static void CopyTo(this Vector256 vector, Span destination) /// A new with all elements initialized to . /// The type of () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 Create(T value) { Vector128 vector = Vector128.Create(value); @@ -637,7 +623,6 @@ public static Vector256 Create(T value) /// A new with all elements initialized to . /// On x86, this method corresponds to __m256i _mm256_set1_epi8 [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 Create(byte value) => Create(value); /// Creates a new instance with all elements initialized to the specified value. @@ -645,7 +630,6 @@ public static Vector256 Create(T value) /// A new with all elements initialized to . /// On x86, this method corresponds to __m256d _mm256_set1_pd [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 Create(double value) => Create(value); /// Creates a new instance with all elements initialized to the specified value. @@ -653,7 +637,6 @@ public static Vector256 Create(T value) /// A new with all elements initialized to . /// On x86, this method corresponds to __m256i _mm256_set1_epi16 [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 Create(short value) => Create(value); /// Creates a new instance with all elements initialized to the specified value. @@ -661,7 +644,6 @@ public static Vector256 Create(T value) /// A new with all elements initialized to . /// On x86, this method corresponds to __m256i _mm256_set1_epi32 [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 Create(int value) => Create(value); /// Creates a new instance with all elements initialized to the specified value. @@ -669,14 +651,12 @@ public static Vector256 Create(T value) /// A new with all elements initialized to . /// On x86, this method corresponds to __m256i _mm256_set1_epi64x [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 Create(long value) => Create(value); /// Creates a new instance with all elements initialized to the specified value. /// The value that all elements will be initialized to. /// A new with all elements initialized to . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 Create(nint value) => Create(value); /// Creates a new instance with all elements initialized to the specified value. @@ -684,7 +664,6 @@ public static Vector256 Create(T value) /// A new with all elements initialized to . [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 Create(nuint value) => Create(value); /// Creates a new instance with all elements initialized to the specified value. @@ -693,7 +672,6 @@ public static Vector256 Create(T value) /// On x86, this method corresponds to __m256i _mm256_set1_epi8 [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 Create(sbyte value) => Create(value); /// Creates a new instance with all elements initialized to the specified value. @@ -701,7 +679,6 @@ public static Vector256 Create(T value) /// A new with all elements initialized to . /// On x86, this method corresponds to __m256 _mm256_set1_ps [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 Create(float value) => Create(value); /// Creates a new instance with all elements initialized to the specified value. @@ -710,7 +687,6 @@ public static Vector256 Create(T value) /// On x86, this method corresponds to __m256i _mm256_set1_epi16 [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 Create(ushort value) => Create(value); /// Creates a new instance with all elements initialized to the specified value. @@ -719,7 +695,6 @@ public static Vector256 Create(T value) /// On x86, this method corresponds to __m256i _mm256_set1_epi32 [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 Create(uint value) => Create(value); /// Creates a new instance with all elements initialized to the specified value. @@ -728,7 +703,6 @@ public static Vector256 Create(T value) /// On x86, this method corresponds to __m256i _mm256_set1_epi64x [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 Create(ulong value) => Create(value); /// Creates a new from a given array. @@ -1087,7 +1061,6 @@ public static Vector256 Create(Vector128 lower, Vector128 upper) /// The value that the lower 128-bits will be initialized to. /// The value that the upper 128-bits will be initialized to. /// A new initialized from and . - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 Create(Vector128 lower, Vector128 upper) => Create(lower, upper); /// Creates a new instance from two instances. @@ -1095,14 +1068,12 @@ public static Vector256 Create(Vector128 lower, Vector128 upper) /// The value that the upper 128-bits will be initialized to. /// A new initialized from and . /// On x86, this method corresponds to __m256d _mm256_setr_m128d (__m128d lo, __m128d hi) - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 Create(Vector128 lower, Vector128 upper) => Create(lower, upper); /// Creates a new instance from two instances. /// The value that the lower 128-bits will be initialized to. /// The value that the upper 128-bits will be initialized to. /// A new initialized from and . - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 Create(Vector128 lower, Vector128 upper) => Create(lower, upper); /// Creates a new instance from two instances. @@ -1110,21 +1081,18 @@ public static Vector256 Create(Vector128 lower, Vector128 upper) /// The value that the upper 128-bits will be initialized to. /// A new initialized from and . /// On x86, this method corresponds to __m256i _mm256_setr_m128i (__m128i lo, __m128i hi) - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 Create(Vector128 lower, Vector128 upper) => Create(lower, upper); /// Creates a new instance from two instances. /// The value that the lower 128-bits will be initialized to. /// The value that the upper 128-bits will be initialized to. /// A new initialized from and . - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 Create(Vector128 lower, Vector128 upper) => Create(lower, upper); /// Creates a new instance from two instances. /// The value that the lower 128-bits will be initialized to. /// The value that the upper 128-bits will be initialized to. /// A new initialized from and . - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 Create(Vector128 lower, Vector128 upper) => Create(lower, upper); /// Creates a new instance from two instances. @@ -1132,7 +1100,6 @@ public static Vector256 Create(Vector128 lower, Vector128 upper) /// The value that the upper 128-bits will be initialized to. /// A new initialized from and . [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 Create(Vector128 lower, Vector128 upper) => Create(lower, upper); /// Creates a new instance from two instances. @@ -1140,7 +1107,6 @@ public static Vector256 Create(Vector128 lower, Vector128 upper) /// The value that the upper 128-bits will be initialized to. /// A new initialized from and . [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 Create(Vector128 lower, Vector128 upper) => Create(lower, upper); /// Creates a new instance from two instances. @@ -1148,7 +1114,6 @@ public static Vector256 Create(Vector128 lower, Vector128 upper) /// The value that the upper 128-bits will be initialized to. /// A new initialized from and . /// On x86, this method corresponds to __m256 _mm256_setr_m128 (__m128 lo, __m128 hi) - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 Create(Vector128 lower, Vector128 upper) => Create(lower, upper); /// Creates a new instance from two instances. @@ -1156,7 +1121,6 @@ public static Vector256 Create(Vector128 lower, Vector128 upper) /// The value that the upper 128-bits will be initialized to. /// A new initialized from and . [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 Create(Vector128 lower, Vector128 upper) => Create(lower, upper); /// Creates a new instance from two instances. @@ -1165,7 +1129,6 @@ public static Vector256 Create(Vector128 lower, Vector128 upper) /// A new initialized from and . /// On x86, this method corresponds to __m256i _mm256_setr_m128i (__m128i lo, __m128i hi) [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 Create(Vector128 lower, Vector128 upper) => Create(lower, upper); /// Creates a new instance from two instances. @@ -1173,7 +1136,6 @@ public static Vector256 Create(Vector128 lower, Vector128 upper) /// The value that the upper 128-bits will be initialized to. /// A new initialized from and . [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 Create(Vector128 lower, Vector128 upper) => Create(lower, upper); /// Creates a new instance with the first element initialized to the specified value and the remaining elements initialized to zero. @@ -1182,49 +1144,42 @@ public static Vector256 Create(Vector128 lower, Vector128 upper) /// A new instance with the first element initialized to and the remaining elements initialized to zero. /// The type of () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 CreateScalar(T value) => Vector128.CreateScalar(value).ToVector256(); /// Creates a new instance with the first element initialized to the specified value and the remaining elements initialized to zero. /// The value that element 0 will be initialized to. /// A new instance with the first element initialized to and the remaining elements initialized to zero. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 CreateScalar(byte value) => CreateScalar(value); /// Creates a new instance with the first element initialized to the specified value and the remaining elements initialized to zero. /// The value that element 0 will be initialized to. /// A new instance with the first element initialized to and the remaining elements initialized to zero. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 CreateScalar(double value) => CreateScalar(value); /// Creates a new instance with the first element initialized to the specified value and the remaining elements initialized to zero. /// The value that element 0 will be initialized to. /// A new instance with the first element initialized to and the remaining elements initialized to zero. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 CreateScalar(short value) => CreateScalar(value); /// Creates a new instance with the first element initialized to the specified value and the remaining elements initialized to zero. /// The value that element 0 will be initialized to. /// A new instance with the first element initialized to and the remaining elements initialized to zero. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 CreateScalar(int value) => CreateScalar(value); /// Creates a new instance with the first element initialized to the specified value and the remaining elements initialized to zero. /// The value that element 0 will be initialized to. /// A new instance with the first element initialized to and the remaining elements initialized to zero. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 CreateScalar(long value) => CreateScalar(value); /// Creates a new instance with the first element initialized to the specified value and the remaining elements initialized to zero. /// The value that element 0 will be initialized to. /// A new instance with the first element initialized to and the remaining elements initialized to zero. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 CreateScalar(nint value) => CreateScalar(value); /// Creates a new instance with the first element initialized to the specified value and the remaining elements initialized to zero. @@ -1232,7 +1187,6 @@ public static Vector256 Create(Vector128 lower, Vector128 upper) /// A new instance with the first element initialized to and the remaining elements initialized to zero. [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 CreateScalar(nuint value) => CreateScalar(value); /// Creates a new instance with the first element initialized to the specified value and the remaining elements initialized to zero. @@ -1240,14 +1194,12 @@ public static Vector256 Create(Vector128 lower, Vector128 upper) /// A new instance with the first element initialized to and the remaining elements initialized to zero. [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 CreateScalar(sbyte value) => CreateScalar(value); /// Creates a new instance with the first element initialized to the specified value and the remaining elements initialized to zero. /// The value that element 0 will be initialized to. /// A new instance with the first element initialized to and the remaining elements initialized to zero. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 CreateScalar(float value) => CreateScalar(value); /// Creates a new instance with the first element initialized to the specified value and the remaining elements initialized to zero. @@ -1255,7 +1207,6 @@ public static Vector256 Create(Vector128 lower, Vector128 upper) /// A new instance with the first element initialized to and the remaining elements initialized to zero. [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 CreateScalar(ushort value) => CreateScalar(value); /// Creates a new instance with the first element initialized to the specified value and the remaining elements initialized to zero. @@ -1263,7 +1214,6 @@ public static Vector256 Create(Vector128 lower, Vector128 upper) /// A new instance with the first element initialized to and the remaining elements initialized to zero. [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 CreateScalar(uint value) => CreateScalar(value); /// Creates a new instance with the first element initialized to the specified value and the remaining elements initialized to zero. @@ -1271,7 +1221,6 @@ public static Vector256 Create(Vector128 lower, Vector128 upper) /// A new instance with the first element initialized to and the remaining elements initialized to zero. [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 CreateScalar(ulong value) => CreateScalar(value); /// Creates a new instance with the first element initialized to the specified value and the remaining elements left uninitialized. @@ -1297,42 +1246,36 @@ public static Vector256 CreateScalarUnsafe(T value) /// The value that element 0 will be initialized to. /// A new instance with the first element initialized to and the remaining elements left uninitialized. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 CreateScalarUnsafe(byte value) => CreateScalarUnsafe(value); /// Creates a new instance with the first element initialized to the specified value and the remaining elements left uninitialized. /// The value that element 0 will be initialized to. /// A new instance with the first element initialized to and the remaining elements left uninitialized. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 CreateScalarUnsafe(double value) => CreateScalarUnsafe(value); /// Creates a new instance with the first element initialized to the specified value and the remaining elements left uninitialized. /// The value that element 0 will be initialized to. /// A new instance with the first element initialized to and the remaining elements left uninitialized. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 CreateScalarUnsafe(short value) => CreateScalarUnsafe(value); /// Creates a new instance with the first element initialized to the specified value and the remaining elements left uninitialized. /// The value that element 0 will be initialized to. /// A new instance with the first element initialized to and the remaining elements left uninitialized. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 CreateScalarUnsafe(int value) => CreateScalarUnsafe(value); /// Creates a new instance with the first element initialized to the specified value and the remaining elements left uninitialized. /// The value that element 0 will be initialized to. /// A new instance with the first element initialized to and the remaining elements left uninitialized. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 CreateScalarUnsafe(long value) => CreateScalarUnsafe(value); /// Creates a new instance with the first element initialized to the specified value and the remaining elements left uninitialized. /// The value that element 0 will be initialized to. /// A new instance with the first element initialized to and the remaining elements left uninitialized. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 CreateScalarUnsafe(nint value) => CreateScalarUnsafe(value); /// Creates a new instance with the first element initialized to the specified value and the remaining elements left uninitialized. @@ -1340,7 +1283,6 @@ public static Vector256 CreateScalarUnsafe(T value) /// A new instance with the first element initialized to and the remaining elements left uninitialized. [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 CreateScalarUnsafe(nuint value) => CreateScalarUnsafe(value); /// Creates a new instance with the first element initialized to the specified value and the remaining elements left uninitialized. @@ -1348,14 +1290,12 @@ public static Vector256 CreateScalarUnsafe(T value) /// A new instance with the first element initialized to and the remaining elements left uninitialized. [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 CreateScalarUnsafe(sbyte value) => CreateScalarUnsafe(value); /// Creates a new instance with the first element initialized to the specified value and the remaining elements left uninitialized. /// The value that element 0 will be initialized to. /// A new instance with the first element initialized to and the remaining elements left uninitialized. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 CreateScalarUnsafe(float value) => CreateScalarUnsafe(value); /// Creates a new instance with the first element initialized to the specified value and the remaining elements left uninitialized. @@ -1363,7 +1303,6 @@ public static Vector256 CreateScalarUnsafe(T value) /// A new instance with the first element initialized to and the remaining elements left uninitialized. [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 CreateScalarUnsafe(ushort value) => CreateScalarUnsafe(value); /// Creates a new instance with the first element initialized to the specified value and the remaining elements left uninitialized. @@ -1371,7 +1310,6 @@ public static Vector256 CreateScalarUnsafe(T value) /// A new instance with the first element initialized to and the remaining elements left uninitialized. [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 CreateScalarUnsafe(uint value) => CreateScalarUnsafe(value); /// Creates a new instance with the first element initialized to the specified value and the remaining elements left uninitialized. @@ -1379,7 +1317,6 @@ public static Vector256 CreateScalarUnsafe(T value) /// A new instance with the first element initialized to and the remaining elements left uninitialized. [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 CreateScalarUnsafe(ulong value) => CreateScalarUnsafe(value); /// Creates a new instance where the elements begin at a specified value and which are spaced apart according to another specified value. @@ -1398,7 +1335,6 @@ public static Vector256 CreateScalarUnsafe(T value) /// The quotient of divided by . /// The type of and () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 Divide(Vector256 left, Vector256 right) => left / right; /// Divides a vector by a scalar to compute the per-element quotient. @@ -1407,7 +1343,6 @@ public static Vector256 CreateScalarUnsafe(T value) /// The type of the elements in the vector. /// The quotient of divided by . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 Divide(Vector256 left, T right) => left / right; /// Computes the dot product of two vectors. @@ -1452,7 +1387,6 @@ public static Vector256 Equals(Vector256 left, Vector256 right) /// true if all elements in were equal to the corresponding element in . /// The type of and () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static bool EqualsAll(Vector256 left, Vector256 right) => left == right; /// Compares two vectors to determine if any elements are equal. @@ -1536,7 +1470,6 @@ internal static Vector256 Floor(Vector256 vector) /// A vector whose elements are the floor of the elements in . /// [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 Floor(Vector256 vector) => Floor(vector); /// Computes the floor of each element in a vector. @@ -1544,7 +1477,6 @@ internal static Vector256 Floor(Vector256 vector) /// A vector whose elements are the floor of the elements in . /// [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 Floor(Vector256 vector) => Floor(vector); /// @@ -1594,7 +1526,6 @@ public static T GetElement(this Vector256 vector, int index) /// The value of the lower 128-bits as a new . /// The type of () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector128 GetLower(this Vector256 vector) { ThrowHelper.ThrowForUnsupportedIntrinsicsVector256BaseType(); @@ -1607,7 +1538,6 @@ public static Vector128 GetLower(this Vector256 vector) /// The value of the upper 128-bits as a new . /// The type of () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector128 GetUpper(this Vector256 vector) { ThrowHelper.ThrowForUnsupportedIntrinsicsVector256BaseType(); @@ -1798,7 +1728,6 @@ public static bool LessThanOrEqualAny(Vector256 left, Vector256 right) /// The type of () is not supported. [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 Load(T* source) => LoadUnsafe(ref *source); /// Loads a vector from the given aligned source. @@ -1829,7 +1758,6 @@ public static Vector256 LoadAligned(T* source) /// This method may bypass the cache on certain platforms. [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 LoadAlignedNonTemporal(T* source) => LoadAligned(source); #pragma warning restore CS8500 // This takes the address of, gets the size of, or declares a pointer to a managed type ('T') @@ -1866,17 +1794,13 @@ public static Vector256 LoadUnsafe(ref readonly T source, nuint elementOff /// Loads a vector from the given source and reinterprets it as . /// The source from which the vector will be loaded. /// The vector loaded from . - [MethodImpl(MethodImplOptions.AggressiveInlining)] - internal static Vector256 LoadUnsafe(ref char source) => - LoadUnsafe(ref Unsafe.As(ref source)); + internal static Vector256 LoadUnsafe(ref char source) => LoadUnsafe(ref Unsafe.As(ref source)); /// Loads a vector from the given source and element offset and reinterprets it as . /// The source to which will be added before loading the vector. /// The element offset from from which the vector will be loaded. /// The vector loaded from plus . - [MethodImpl(MethodImplOptions.AggressiveInlining)] - internal static Vector256 LoadUnsafe(ref char source, nuint elementOffset) => - LoadUnsafe(ref Unsafe.As(ref source), elementOffset); + internal static Vector256 LoadUnsafe(ref char source, nuint elementOffset) => LoadUnsafe(ref Unsafe.As(ref source), elementOffset); /// [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -1985,7 +1909,6 @@ public static Vector256 Min(Vector256 left, Vector256 right) /// The element-wise product of and . /// The type of and () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 Multiply(Vector256 left, Vector256 right) => left * right; /// Multiplies a vector by a scalar to compute their product. @@ -1995,7 +1918,6 @@ public static Vector256 Min(Vector256 left, Vector256 right) /// The product of and . /// The type of and () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 Multiply(Vector256 left, T right) => left * right; /// Multiplies a vector by a scalar to compute their product. @@ -2005,7 +1927,6 @@ public static Vector256 Min(Vector256 left, Vector256 right) /// The product of and . /// The type of and () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 Multiply(T left, Vector256 right) => left * right; /// @@ -2138,7 +2059,6 @@ public static Vector256 Narrow(Vector256 lower, Vector256 up /// A vector whose elements are the negation of the corresponding elements in . /// The type of () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 Negate(Vector256 vector) => -vector; /// Computes the ones-complement of a vector. @@ -2147,7 +2067,6 @@ public static Vector256 Narrow(Vector256 lower, Vector256 up /// A vector whose elements are the ones-complement of the corresponding elements in . /// The type of () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 OnesComplement(Vector256 vector) { return Create( @@ -2161,7 +2080,6 @@ public static Vector256 OnesComplement(Vector256 vector) /// The number of bits by which to shift each element. /// A vector whose elements where shifted left by . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static Vector256 ShiftLeft(Vector256 vector, int shiftCount) => vector << shiftCount; /// Shifts each element of a vector left by the specified amount. @@ -2169,7 +2087,6 @@ public static Vector256 OnesComplement(Vector256 vector) /// The number of bits by which to shift each element. /// A vector whose elements where shifted left by . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 ShiftLeft(Vector256 vector, int shiftCount) => vector << shiftCount; /// Shifts each element of a vector left by the specified amount. @@ -2177,7 +2094,6 @@ public static Vector256 OnesComplement(Vector256 vector) /// The number of bits by which to shift each element. /// A vector whose elements where shifted left by . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 ShiftLeft(Vector256 vector, int shiftCount) => vector << shiftCount; /// Shifts each element of a vector left by the specified amount. @@ -2185,7 +2101,6 @@ public static Vector256 OnesComplement(Vector256 vector) /// The number of bits by which to shift each element. /// A vector whose elements where shifted left by . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 ShiftLeft(Vector256 vector, int shiftCount) => vector << shiftCount; /// Shifts each element of a vector left by the specified amount. @@ -2193,7 +2108,6 @@ public static Vector256 OnesComplement(Vector256 vector) /// The number of bits by which to shift each element. /// A vector whose elements where shifted left by . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 ShiftLeft(Vector256 vector, int shiftCount) => vector << shiftCount; /// Shifts each element of a vector left by the specified amount. @@ -2201,7 +2115,6 @@ public static Vector256 OnesComplement(Vector256 vector) /// The number of bits by which to shift each element. /// A vector whose elements where shifted left by . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 ShiftLeft(Vector256 vector, int shiftCount) => vector << shiftCount; /// Shifts each element of a vector left by the specified amount. @@ -2210,7 +2123,6 @@ public static Vector256 OnesComplement(Vector256 vector) /// A vector whose elements where shifted left by . [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 ShiftLeft(Vector256 vector, int shiftCount) => vector << shiftCount; /// Shifts each element of a vector left by the specified amount. @@ -2219,7 +2131,6 @@ public static Vector256 OnesComplement(Vector256 vector) /// A vector whose elements where shifted left by . [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 ShiftLeft(Vector256 vector, int shiftCount) => vector << shiftCount; /// Shifts each element of a vector left by the specified amount. @@ -2228,7 +2139,6 @@ public static Vector256 OnesComplement(Vector256 vector) /// A vector whose elements where shifted left by . [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 ShiftLeft(Vector256 vector, int shiftCount) => vector << shiftCount; /// Shifts each element of a vector left by the specified amount. @@ -2237,7 +2147,6 @@ public static Vector256 OnesComplement(Vector256 vector) /// A vector whose elements where shifted left by . [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 ShiftLeft(Vector256 vector, int shiftCount) => vector << shiftCount; /// Shifts each element of a vector left by the specified amount. @@ -2246,7 +2155,6 @@ public static Vector256 OnesComplement(Vector256 vector) /// A vector whose elements where shifted left by . [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 ShiftLeft(Vector256 vector, int shiftCount) => vector << shiftCount; /// Shifts (signed) each element of a vector right by the specified amount. @@ -2254,7 +2162,6 @@ public static Vector256 OnesComplement(Vector256 vector) /// The number of bits by which to shift each element. /// A vector whose elements where shifted right by . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static Vector256 ShiftRightArithmetic(Vector256 vector, int shiftCount) => vector >> shiftCount; /// Shifts (signed) each element of a vector right by the specified amount. @@ -2262,7 +2169,6 @@ public static Vector256 OnesComplement(Vector256 vector) /// The number of bits by which to shift each element. /// A vector whose elements where shifted right by . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 ShiftRightArithmetic(Vector256 vector, int shiftCount) => vector >> shiftCount; /// Shifts (signed) each element of a vector right by the specified amount. @@ -2270,7 +2176,6 @@ public static Vector256 OnesComplement(Vector256 vector) /// The number of bits by which to shift each element. /// A vector whose elements where shifted right by . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 ShiftRightArithmetic(Vector256 vector, int shiftCount) => vector >> shiftCount; /// Shifts (signed) each element of a vector right by the specified amount. @@ -2278,7 +2183,6 @@ public static Vector256 OnesComplement(Vector256 vector) /// The number of bits by which to shift each element. /// A vector whose elements where shifted right by . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 ShiftRightArithmetic(Vector256 vector, int shiftCount) => vector >> shiftCount; /// Shifts (signed) each element of a vector right by the specified amount. @@ -2286,7 +2190,6 @@ public static Vector256 OnesComplement(Vector256 vector) /// The number of bits by which to shift each element. /// A vector whose elements where shifted right by . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 ShiftRightArithmetic(Vector256 vector, int shiftCount) => vector >> shiftCount; /// Shifts (signed) each element of a vector right by the specified amount. @@ -2295,7 +2198,6 @@ public static Vector256 OnesComplement(Vector256 vector) /// A vector whose elements where shifted right by . [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 ShiftRightArithmetic(Vector256 vector, int shiftCount) => vector >> shiftCount; /// Shifts (unsigned) each element of a vector right by the specified amount. @@ -2303,7 +2205,6 @@ public static Vector256 OnesComplement(Vector256 vector) /// The number of bits by which to shift each element. /// A vector whose elements where shifted right by . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static Vector256 ShiftRightLogical(Vector256 vector, int shiftCount) => vector >>> shiftCount; /// Shifts (unsigned) each element of a vector right by the specified amount. @@ -2311,7 +2212,6 @@ public static Vector256 OnesComplement(Vector256 vector) /// The number of bits by which to shift each element. /// A vector whose elements where shifted right by . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 ShiftRightLogical(Vector256 vector, int shiftCount) => vector >>> shiftCount; /// Shifts (unsigned) each element of a vector right by the specified amount. @@ -2319,7 +2219,6 @@ public static Vector256 OnesComplement(Vector256 vector) /// The number of bits by which to shift each element. /// A vector whose elements where shifted right by . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 ShiftRightLogical(Vector256 vector, int shiftCount) => vector >>> shiftCount; /// Shifts (unsigned) each element of a vector right by the specified amount. @@ -2327,7 +2226,6 @@ public static Vector256 OnesComplement(Vector256 vector) /// The number of bits by which to shift each element. /// A vector whose elements where shifted right by . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 ShiftRightLogical(Vector256 vector, int shiftCount) => vector >>> shiftCount; /// Shifts (unsigned) each element of a vector right by the specified amount. @@ -2335,7 +2233,6 @@ public static Vector256 OnesComplement(Vector256 vector) /// The number of bits by which to shift each element. /// A vector whose elements where shifted right by . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 ShiftRightLogical(Vector256 vector, int shiftCount) => vector >>> shiftCount; /// Shifts (unsigned) each element of a vector right by the specified amount. @@ -2343,7 +2240,6 @@ public static Vector256 OnesComplement(Vector256 vector) /// The number of bits by which to shift each element. /// A vector whose elements where shifted right by . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 ShiftRightLogical(Vector256 vector, int shiftCount) => vector >>> shiftCount; /// Shifts (unsigned) each element of a vector right by the specified amount. @@ -2352,7 +2248,6 @@ public static Vector256 OnesComplement(Vector256 vector) /// A vector whose elements where shifted right by . [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 ShiftRightLogical(Vector256 vector, int shiftCount) => vector >>> shiftCount; /// Shifts (unsigned) each element of a vector right by the specified amount. @@ -2361,7 +2256,6 @@ public static Vector256 OnesComplement(Vector256 vector) /// A vector whose elements where shifted right by . [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 ShiftRightLogical(Vector256 vector, int shiftCount) => vector >>> shiftCount; /// Shifts (unsigned) each element of a vector right by the specified amount. @@ -2370,7 +2264,6 @@ public static Vector256 OnesComplement(Vector256 vector) /// A vector whose elements where shifted right by . [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 ShiftRightLogical(Vector256 vector, int shiftCount) => vector >>> shiftCount; /// Shifts (unsigned) each element of a vector right by the specified amount. @@ -2379,7 +2272,6 @@ public static Vector256 OnesComplement(Vector256 vector) /// A vector whose elements where shifted right by . [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 ShiftRightLogical(Vector256 vector, int shiftCount) => vector >>> shiftCount; /// Shifts (unsigned) each element of a vector right by the specified amount. @@ -2388,7 +2280,6 @@ public static Vector256 OnesComplement(Vector256 vector) /// A vector whose elements where shifted right by . [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 ShiftRightLogical(Vector256 vector, int shiftCount) => vector >>> shiftCount; /// Creates a new vector by selecting values from an input vector using a set of indices. @@ -2658,7 +2549,6 @@ public static Vector256 Sqrt(Vector256 vector) /// The type of and () is not supported. [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void Store(this Vector256 source, T* destination) => source.StoreUnsafe(ref *destination); /// Stores a vector at the given aligned destination. @@ -2689,7 +2579,6 @@ public static void StoreAligned(this Vector256 source, T* destination) /// This method may bypass the cache on certain platforms. [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void StoreAlignedNonTemporal(this Vector256 source, T* destination) => source.StoreAligned(destination); #pragma warning restore CS8500 // This takes the address of, gets the size of, or declares a pointer to a managed type ('T') @@ -2730,7 +2619,6 @@ public static void StoreUnsafe(this Vector256 source, ref T destination, n /// The difference of and . /// The type of and () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 Subtract(Vector256 left, Vector256 right) => left - right; /// Computes the sum of all elements in a vector. @@ -2757,7 +2645,6 @@ public static T Sum(Vector256 vector) /// A scalar containing the value of the first element. /// The type of () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static T ToScalar(this Vector256 vector) { ThrowHelper.ThrowForUnsupportedIntrinsicsVector256BaseType(); @@ -3140,7 +3027,6 @@ public static Vector256 WithUpper(this Vector256 vector, Vector128 v /// The exclusive-or of and . /// The type of and () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 Xor(Vector256 left, Vector256 right) => left ^ right; [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -3159,16 +3045,8 @@ internal static void SetElementUnsafe(in this Vector256 vector, int index, Unsafe.Add(ref address, index) = value; } - [MethodImpl(MethodImplOptions.AggressiveInlining)] - internal static void SetLowerUnsafe(in this Vector256 vector, Vector128 value) - { - Unsafe.AsRef(in vector._lower) = value; - } + internal static void SetLowerUnsafe(in this Vector256 vector, Vector128 value) => Unsafe.AsRef(in vector._lower) = value; - [MethodImpl(MethodImplOptions.AggressiveInlining)] - internal static void SetUpperUnsafe(in this Vector256 vector, Vector128 value) - { - Unsafe.AsRef(in vector._upper) = value; - } + internal static void SetUpperUnsafe(in this Vector256 vector, Vector128 value) => Unsafe.AsRef(in vector._upper) = value; } } diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector256_1.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector256_1.cs index d506b0da02776b..36b704682d3202 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector256_1.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector256_1.cs @@ -38,7 +38,6 @@ namespace System.Runtime.Intrinsics public static Vector256 AllBitsSet { [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] get { Vector128 vector = Vector128.AllBitsSet; @@ -51,11 +50,7 @@ public static Vector256 AllBitsSet public static int Count { [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return Vector128.Count * 2; - } + get => Vector128.Count * 2; } /// Gets a new with the elements set to their index. @@ -106,7 +101,6 @@ public static bool IsSupported public static Vector256 One { [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] get { Vector128 vector = Vector128.One; @@ -119,7 +113,6 @@ public static Vector256 One public static Vector256 Zero { [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] get { ThrowHelper.ThrowForUnsupportedIntrinsicsVector256BaseType(); @@ -127,27 +120,14 @@ public static Vector256 Zero } } - internal string DisplayString - { - get - { - return IsSupported ? ToString() : SR.NotSupported_Type; - } - } + internal string DisplayString => IsSupported ? ToString() : SR.NotSupported_Type; /// Gets the element at the specified index. /// The index of the element to get. /// The value of the element at . /// was less than zero or greater than the number of elements. /// The type of the vector () is not supported. - public T this[int index] - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return this.GetElement(index); - } - } + public T this[int index] => this.GetElement(index); /// Adds two vectors to compute their sum. /// The vector to add with . @@ -257,12 +237,7 @@ public T this[int index] /// true if any elements in was not equal to the corresponding element in . /// The type of the vector () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static bool operator !=(Vector256 left, Vector256 right) - { - return (left._lower != right._lower) - || (left._upper != right._upper); - } + public static bool operator !=(Vector256 left, Vector256 right) => !(left == right); /// Shifts each element of a vector left by the specified amount. /// The vector whose elements are to be shifted. @@ -314,7 +289,6 @@ public T this[int index] /// The product of and . /// The type of the vector () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 operator *(T left, Vector256 right) => right * left; /// Computes the ones-complement of a vector. @@ -379,7 +353,6 @@ public static Vector256 operator >>(Vector256 value, int shiftCount) /// /// The type of the vector () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 operator +(Vector256 value) { ThrowHelper.ThrowForUnsupportedIntrinsicsVector256BaseType(); @@ -403,7 +376,6 @@ public static Vector256 operator >>>(Vector256 value, int shiftCount) /// Determines whether the specified object is equal to the current instance. /// The object to compare with the current instance. /// true if is a and is equal to the current instance; otherwise, false. - [MethodImpl(MethodImplOptions.AggressiveInlining)] public override bool Equals([NotNullWhen(true)] object? obj) => (obj is Vector256 other) && Equals(other); /// Determines whether the specified is equal to the current instance. @@ -454,7 +426,6 @@ public override int GetHashCode() /// Converts the current instance to an equivalent string representation. /// An equivalent string representation of the current instance. /// The type of the vector () is not supported. - [MethodImpl(MethodImplOptions.AggressiveInlining)] public override string ToString() => ToString("G", CultureInfo.InvariantCulture); private string ToString([StringSyntax(StringSyntaxAttribute.NumericFormat)] string? format, IFormatProvider? formatProvider) @@ -682,15 +653,9 @@ private string ToString([StringSyntax(StringSyntaxAttribute.NumericFormat)] stri // New Surface Area // - static bool ISimdVector, T>.AnyWhereAllBitsSet(Vector256 vector) - { - return Vector256.EqualsAny(vector, Vector256.AllBitsSet); - } + static bool ISimdVector, T>.AnyWhereAllBitsSet(Vector256 vector) => Vector256.EqualsAny(vector, AllBitsSet); - static bool ISimdVector, T>.Any(Vector256 vector, T value) - { - return Vector256.EqualsAny(vector, Vector256.Create((T)value)); - } + static bool ISimdVector, T>.Any(Vector256 vector, T value) => Vector256.EqualsAny(vector, Vector256.Create(value)); static int ISimdVector, T>.IndexOfLastMatch(Vector256 vector) { diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector512.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector512.cs index bf24a68ffc81e2..8d44bf28998417 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector512.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector512.cs @@ -75,7 +75,6 @@ public static Vector512 Abs(Vector512 vector) /// The sum of and . /// The type of and () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 Add(Vector512 left, Vector512 right) => left + right; /// Computes the bitwise-and of a given vector and the ones complement of another vector. @@ -107,7 +106,11 @@ public static Vector512 As(this Vector512 vector) ThrowHelper.ThrowForUnsupportedIntrinsicsVector512BaseType(); ThrowHelper.ThrowForUnsupportedIntrinsicsVector512BaseType(); +#if MONO return Unsafe.As, Vector512>(ref vector); +#else + return Unsafe.BitCast, Vector512>(vector); +#endif } /// Reinterprets a as a new . @@ -116,7 +119,6 @@ public static Vector512 As(this Vector512 vector) /// reinterpreted as a new . /// The type of () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 AsByte(this Vector512 vector) => vector.As(); /// Reinterprets a as a new . @@ -125,7 +127,6 @@ public static Vector512 As(this Vector512 vector) /// reinterpreted as a new . /// The type of () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 AsDouble(this Vector512 vector) => vector.As(); /// Reinterprets a as a new . @@ -134,7 +135,6 @@ public static Vector512 As(this Vector512 vector) /// reinterpreted as a new . /// The type of () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 AsInt16(this Vector512 vector) => vector.As(); /// Reinterprets a as a new . @@ -143,7 +143,6 @@ public static Vector512 As(this Vector512 vector) /// reinterpreted as a new . /// The type of () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 AsInt32(this Vector512 vector) => vector.As(); /// Reinterprets a as a new . @@ -152,7 +151,6 @@ public static Vector512 As(this Vector512 vector) /// reinterpreted as a new . /// The type of () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 AsInt64(this Vector512 vector) => vector.As(); /// Reinterprets a as a new . @@ -161,7 +159,6 @@ public static Vector512 As(this Vector512 vector) /// reinterpreted as a new . /// The type of () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 AsNInt(this Vector512 vector) => vector.As(); /// Reinterprets a as a new . @@ -171,7 +168,6 @@ public static Vector512 As(this Vector512 vector) /// The type of () is not supported. [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 AsNUInt(this Vector512 vector) => vector.As(); /// Reinterprets a as a new . @@ -181,7 +177,6 @@ public static Vector512 As(this Vector512 vector) /// The type of () is not supported. [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 AsSByte(this Vector512 vector) => vector.As(); /// Reinterprets a as a new . @@ -190,7 +185,6 @@ public static Vector512 As(this Vector512 vector) /// reinterpreted as a new . /// The type of () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 AsSingle(this Vector512 vector) => vector.As(); /// Reinterprets a as a new . @@ -200,7 +194,6 @@ public static Vector512 As(this Vector512 vector) /// The type of () is not supported. [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 AsUInt16(this Vector512 vector) => vector.As(); /// Reinterprets a as a new . @@ -210,7 +203,6 @@ public static Vector512 As(this Vector512 vector) /// The type of () is not supported. [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 AsUInt32(this Vector512 vector) => vector.As(); /// Reinterprets a as a new . @@ -220,7 +212,6 @@ public static Vector512 As(this Vector512 vector) /// The type of () is not supported. [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 AsUInt64(this Vector512 vector) => vector.As(); /// Reinterprets a as a new . @@ -263,7 +254,6 @@ public static Vector AsVector(this Vector512 value) /// The bitwise-and of and . /// The type of and () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 BitwiseAnd(Vector512 left, Vector512 right) => left & right; /// Computes the bitwise-or of two vectors. @@ -273,7 +263,6 @@ public static Vector AsVector(this Vector512 value) /// The bitwise-or of and . /// The type of and () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 BitwiseOr(Vector512 left, Vector512 right) => left | right; /// Computes the ceiling of each element in a vector. @@ -294,7 +283,6 @@ internal static Vector512 Ceiling(Vector512 vector) /// A vector whose elements are the ceiling of the elements in . /// [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 Ceiling(Vector512 vector) => Ceiling(vector); /// Computes the ceiling of each element in a vector. @@ -302,7 +290,6 @@ internal static Vector512 Ceiling(Vector512 vector) /// A vector whose elements are the ceiling of the elements in . /// [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 Ceiling(Vector512 vector) => Ceiling(vector); /// Conditionally selects a value from two vectors on a bitwise basis. @@ -551,7 +538,6 @@ public static void CopyTo(this Vector512 vector, Span destination) /// A new with all elements initialized to . /// The type of () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 Create(T value) { Vector256 vector = Vector256.Create(value); @@ -563,7 +549,6 @@ public static Vector512 Create(T value) /// A new with all elements initialized to . /// On x86, this method corresponds to __m512i _mm512_set1_epi8 [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 Create(byte value) => Create(value); /// Creates a new instance with all elements initialized to the specified value. @@ -571,7 +556,6 @@ public static Vector512 Create(T value) /// A new with all elements initialized to . /// On x86, this method corresponds to __m512d _mm512_set1_pd [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 Create(double value) => Create(value); /// Creates a new instance with all elements initialized to the specified value. @@ -579,7 +563,6 @@ public static Vector512 Create(T value) /// A new with all elements initialized to . /// On x86, this method corresponds to __m512i _mm512_set1_epi16 [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 Create(short value) => Create(value); /// Creates a new instance with all elements initialized to the specified value. @@ -587,7 +570,6 @@ public static Vector512 Create(T value) /// A new with all elements initialized to . /// On x86, this method corresponds to __m512i _mm512_set1_epi32 [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 Create(int value) => Create(value); /// Creates a new instance with all elements initialized to the specified value. @@ -595,14 +577,12 @@ public static Vector512 Create(T value) /// A new with all elements initialized to . /// On x86, this method corresponds to __m512i _mm512_set1_epi64x [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 Create(long value) => Create(value); /// Creates a new instance with all elements initialized to the specified value. /// The value that all elements will be initialized to. /// A new with all elements initialized to . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 Create(nint value) => Create(value); /// Creates a new instance with all elements initialized to the specified value. @@ -610,7 +590,6 @@ public static Vector512 Create(T value) /// A new with all elements initialized to . [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 Create(nuint value) => Create(value); /// Creates a new instance with all elements initialized to the specified value. @@ -619,7 +598,6 @@ public static Vector512 Create(T value) /// On x86, this method corresponds to __m512i _mm512_set1_epi8 [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 Create(sbyte value) => Create(value); /// Creates a new instance with all elements initialized to the specified value. @@ -627,7 +605,6 @@ public static Vector512 Create(T value) /// A new with all elements initialized to . /// On x86, this method corresponds to __m512 _mm512_set1_ps [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 Create(float value) => Create(value); /// Creates a new instance with all elements initialized to the specified value. @@ -636,7 +613,6 @@ public static Vector512 Create(T value) /// On x86, this method corresponds to __m512i _mm512_set1_epi16 [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 Create(ushort value) => Create(value); /// Creates a new instance with all elements initialized to the specified value. @@ -645,7 +621,6 @@ public static Vector512 Create(T value) /// On x86, this method corresponds to __m512i _mm512_set1_epi32 [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 Create(uint value) => Create(value); /// Creates a new instance with all elements initialized to the specified value. @@ -654,7 +629,6 @@ public static Vector512 Create(T value) /// On x86, this method corresponds to __m512i _mm512_set1_epi64x [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 Create(ulong value) => Create(value); /// Creates a new from a given array. @@ -1141,7 +1115,6 @@ public static Vector512 Create(Vector256 lower, Vector256 upper) /// The value that the lower 256-bits will be initialized to. /// The value that the upper 256-bits will be initialized to. /// A new initialized from and . - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 Create(Vector256 lower, Vector256 upper) => Create(lower, upper); /// Creates a new instance from two instances. @@ -1149,14 +1122,12 @@ public static Vector512 Create(Vector256 lower, Vector256 upper) /// The value that the upper 256-bits will be initialized to. /// A new initialized from and . /// On x86, this method corresponds to __m512d _mm512_setr_m256d (__m256d lo, __m256d hi) - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 Create(Vector256 lower, Vector256 upper) => Create(lower, upper); /// Creates a new instance from two instances. /// The value that the lower 256-bits will be initialized to. /// The value that the upper 256-bits will be initialized to. /// A new initialized from and . - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 Create(Vector256 lower, Vector256 upper) => Create(lower, upper); /// Creates a new instance from two instances. @@ -1164,21 +1135,18 @@ public static Vector512 Create(Vector256 lower, Vector256 upper) /// The value that the upper 256-bits will be initialized to. /// A new initialized from and . /// On x86, this method corresponds to __m512i _mm512_setr_m256i (__m256i lo, __m256i hi) - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 Create(Vector256 lower, Vector256 upper) => Create(lower, upper); /// Creates a new instance from two instances. /// The value that the lower 256-bits will be initialized to. /// The value that the upper 256-bits will be initialized to. /// A new initialized from and . - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 Create(Vector256 lower, Vector256 upper) => Create(lower, upper); /// Creates a new instance from two instances. /// The value that the lower 256-bits will be initialized to. /// The value that the upper 256-bits will be initialized to. /// A new initialized from and . - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 Create(Vector256 lower, Vector256 upper) => Create(lower, upper); /// Creates a new instance from two instances. @@ -1186,7 +1154,6 @@ public static Vector512 Create(Vector256 lower, Vector256 upper) /// The value that the upper 256-bits will be initialized to. /// A new initialized from and . [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 Create(Vector256 lower, Vector256 upper) => Create(lower, upper); /// Creates a new instance from two instances. @@ -1194,7 +1161,6 @@ public static Vector512 Create(Vector256 lower, Vector256 upper) /// The value that the upper 256-bits will be initialized to. /// A new initialized from and . [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 Create(Vector256 lower, Vector256 upper) => Create(lower, upper); /// Creates a new instance from two instances. @@ -1202,7 +1168,6 @@ public static Vector512 Create(Vector256 lower, Vector256 upper) /// The value that the upper 256-bits will be initialized to. /// A new initialized from and . /// On x86, this method corresponds to __m512 _mm512_setr_m256 (__m256 lo, __m256 hi) - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 Create(Vector256 lower, Vector256 upper) => Create(lower, upper); /// Creates a new instance from two instances. @@ -1210,7 +1175,6 @@ public static Vector512 Create(Vector256 lower, Vector256 upper) /// The value that the upper 256-bits will be initialized to. /// A new initialized from and . [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 Create(Vector256 lower, Vector256 upper) => Create(lower, upper); /// Creates a new instance from two instances. @@ -1219,7 +1183,6 @@ public static Vector512 Create(Vector256 lower, Vector256 upper) /// A new initialized from and . /// On x86, this method corresponds to __m512i _mm512_setr_m256i (__m256i lo, __m256i hi) [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 Create(Vector256 lower, Vector256 upper) => Create(lower, upper); /// Creates a new instance from two instances. @@ -1227,7 +1190,6 @@ public static Vector512 Create(Vector256 lower, Vector256 upper) /// The value that the upper 256-bits will be initialized to. /// A new initialized from and . [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 Create(Vector256 lower, Vector256 upper) => Create(lower, upper); /// Creates a new instance with the first element initialized to the specified value and the remaining elements initialized to zero. @@ -1235,84 +1197,84 @@ public static Vector512 Create(Vector256 lower, Vector256 upper) /// The value that element 0 will be initialized to. /// A new instance with the first element initialized to and the remaining elements initialized to zero. /// The type of () is not supported. - [MethodImpl(MethodImplOptions.AggressiveInlining)] + [Intrinsic] public static Vector512 CreateScalar(T value) => Vector256.CreateScalar(value).ToVector512(); /// Creates a new instance with the first element initialized to the specified value and the remaining elements initialized to zero. /// The value that element 0 will be initialized to. /// A new instance with the first element initialized to and the remaining elements initialized to zero. - [MethodImpl(MethodImplOptions.AggressiveInlining)] + [Intrinsic] public static Vector512 CreateScalar(byte value) => CreateScalar(value); /// Creates a new instance with the first element initialized to the specified value and the remaining elements initialized to zero. /// The value that element 0 will be initialized to. /// A new instance with the first element initialized to and the remaining elements initialized to zero. - [MethodImpl(MethodImplOptions.AggressiveInlining)] + [Intrinsic] public static Vector512 CreateScalar(double value) => CreateScalar(value); /// Creates a new instance with the first element initialized to the specified value and the remaining elements initialized to zero. /// The value that element 0 will be initialized to. /// A new instance with the first element initialized to and the remaining elements initialized to zero. - [MethodImpl(MethodImplOptions.AggressiveInlining)] + [Intrinsic] public static Vector512 CreateScalar(short value) => CreateScalar(value); /// Creates a new instance with the first element initialized to the specified value and the remaining elements initialized to zero. /// The value that element 0 will be initialized to. /// A new instance with the first element initialized to and the remaining elements initialized to zero. - [MethodImpl(MethodImplOptions.AggressiveInlining)] + [Intrinsic] public static Vector512 CreateScalar(int value) => CreateScalar(value); /// Creates a new instance with the first element initialized to the specified value and the remaining elements initialized to zero. /// The value that element 0 will be initialized to. /// A new instance with the first element initialized to and the remaining elements initialized to zero. - [MethodImpl(MethodImplOptions.AggressiveInlining)] + [Intrinsic] public static Vector512 CreateScalar(long value) => CreateScalar(value); /// Creates a new instance with the first element initialized to the specified value and the remaining elements initialized to zero. /// The value that element 0 will be initialized to. /// A new instance with the first element initialized to and the remaining elements initialized to zero. - [MethodImpl(MethodImplOptions.AggressiveInlining)] + [Intrinsic] public static Vector512 CreateScalar(nint value) => CreateScalar(value); /// Creates a new instance with the first element initialized to the specified value and the remaining elements initialized to zero. /// The value that element 0 will be initialized to. /// A new instance with the first element initialized to and the remaining elements initialized to zero. + [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 CreateScalar(nuint value) => CreateScalar(value); /// Creates a new instance with the first element initialized to the specified value and the remaining elements initialized to zero. /// The value that element 0 will be initialized to. /// A new instance with the first element initialized to and the remaining elements initialized to zero. + [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 CreateScalar(sbyte value) => CreateScalar(value); /// Creates a new instance with the first element initialized to the specified value and the remaining elements initialized to zero. /// The value that element 0 will be initialized to. /// A new instance with the first element initialized to and the remaining elements initialized to zero. - [MethodImpl(MethodImplOptions.AggressiveInlining)] + [Intrinsic] public static Vector512 CreateScalar(float value) => CreateScalar(value); /// Creates a new instance with the first element initialized to the specified value and the remaining elements initialized to zero. /// The value that element 0 will be initialized to. /// A new instance with the first element initialized to and the remaining elements initialized to zero. + [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 CreateScalar(ushort value) => CreateScalar(value); /// Creates a new instance with the first element initialized to the specified value and the remaining elements initialized to zero. /// The value that element 0 will be initialized to. /// A new instance with the first element initialized to and the remaining elements initialized to zero. + [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 CreateScalar(uint value) => CreateScalar(value); /// Creates a new instance with the first element initialized to the specified value and the remaining elements initialized to zero. /// The value that element 0 will be initialized to. /// A new instance with the first element initialized to and the remaining elements initialized to zero. + [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 CreateScalar(ulong value) => CreateScalar(value); /// Creates a new instance with the first element initialized to the specified value and the remaining elements left uninitialized. @@ -1338,42 +1300,36 @@ public static Vector512 CreateScalarUnsafe(T value) /// The value that element 0 will be initialized to. /// A new instance with the first element initialized to and the remaining elements left uninitialized. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 CreateScalarUnsafe(byte value) => CreateScalarUnsafe(value); /// Creates a new instance with the first element initialized to the specified value and the remaining elements left uninitialized. /// The value that element 0 will be initialized to. /// A new instance with the first element initialized to and the remaining elements left uninitialized. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 CreateScalarUnsafe(double value) => CreateScalarUnsafe(value); /// Creates a new instance with the first element initialized to the specified value and the remaining elements left uninitialized. /// The value that element 0 will be initialized to. /// A new instance with the first element initialized to and the remaining elements left uninitialized. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 CreateScalarUnsafe(short value) => CreateScalarUnsafe(value); /// Creates a new instance with the first element initialized to the specified value and the remaining elements left uninitialized. /// The value that element 0 will be initialized to. /// A new instance with the first element initialized to and the remaining elements left uninitialized. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 CreateScalarUnsafe(int value) => CreateScalarUnsafe(value); /// Creates a new instance with the first element initialized to the specified value and the remaining elements left uninitialized. /// The value that element 0 will be initialized to. /// A new instance with the first element initialized to and the remaining elements left uninitialized. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 CreateScalarUnsafe(long value) => CreateScalarUnsafe(value); /// Creates a new instance with the first element initialized to the specified value and the remaining elements left uninitialized. /// The value that element 0 will be initialized to. /// A new instance with the first element initialized to and the remaining elements left uninitialized. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 CreateScalarUnsafe(nint value) => CreateScalarUnsafe(value); /// Creates a new instance with the first element initialized to the specified value and the remaining elements left uninitialized. @@ -1381,7 +1337,6 @@ public static Vector512 CreateScalarUnsafe(T value) /// A new instance with the first element initialized to and the remaining elements left uninitialized. [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 CreateScalarUnsafe(nuint value) => CreateScalarUnsafe(value); /// Creates a new instance with the first element initialized to the specified value and the remaining elements left uninitialized. @@ -1389,14 +1344,12 @@ public static Vector512 CreateScalarUnsafe(T value) /// A new instance with the first element initialized to and the remaining elements left uninitialized. [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 CreateScalarUnsafe(sbyte value) => CreateScalarUnsafe(value); /// Creates a new instance with the first element initialized to the specified value and the remaining elements left uninitialized. /// The value that element 0 will be initialized to. /// A new instance with the first element initialized to and the remaining elements left uninitialized. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 CreateScalarUnsafe(float value) => CreateScalarUnsafe(value); /// Creates a new instance with the first element initialized to the specified value and the remaining elements left uninitialized. @@ -1404,7 +1357,6 @@ public static Vector512 CreateScalarUnsafe(T value) /// A new instance with the first element initialized to and the remaining elements left uninitialized. [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 CreateScalarUnsafe(ushort value) => CreateScalarUnsafe(value); /// Creates a new instance with the first element initialized to the specified value and the remaining elements left uninitialized. @@ -1412,7 +1364,6 @@ public static Vector512 CreateScalarUnsafe(T value) /// A new instance with the first element initialized to and the remaining elements left uninitialized. [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 CreateScalarUnsafe(uint value) => CreateScalarUnsafe(value); /// Creates a new instance with the first element initialized to the specified value and the remaining elements left uninitialized. @@ -1420,7 +1371,6 @@ public static Vector512 CreateScalarUnsafe(T value) /// A new instance with the first element initialized to and the remaining elements left uninitialized. [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 CreateScalarUnsafe(ulong value) => CreateScalarUnsafe(value); /// Creates a new instance where the elements begin at a specified value and which are spaced apart according to another specified value. @@ -1454,7 +1404,6 @@ public static Vector512 Divide(Vector512 left, Vector512 right) /// The type of the elements in the vector. /// The quotient of divided by . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 Divide(Vector512 left, T right) => left / right; /// Computes the dot product of two vectors. @@ -1499,7 +1448,6 @@ public static Vector512 Equals(Vector512 left, Vector512 right) /// true if all elements in were equal to the corresponding element in . /// The type of and () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static bool EqualsAll(Vector512 left, Vector512 right) => left == right; /// Compares two vectors to determine if any elements are equal. @@ -1583,7 +1531,6 @@ internal static Vector512 Floor(Vector512 vector) /// A vector whose elements are the floor of the elements in . /// [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 Floor(Vector512 vector) => Floor(vector); /// Computes the floor of each element in a vector. @@ -1591,7 +1538,6 @@ internal static Vector512 Floor(Vector512 vector) /// A vector whose elements are the floor of the elements in . /// [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 Floor(Vector512 vector) => Floor(vector); /// @@ -1641,7 +1587,6 @@ public static T GetElement(this Vector512 vector, int index) /// The value of the lower 256-bits as a new . /// The type of () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 GetLower(this Vector512 vector) { ThrowHelper.ThrowForUnsupportedIntrinsicsVector512BaseType(); @@ -1654,7 +1599,6 @@ public static Vector256 GetLower(this Vector512 vector) /// The value of the upper 256-bits as a new . /// The type of () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 GetUpper(this Vector512 vector) { ThrowHelper.ThrowForUnsupportedIntrinsicsVector512BaseType(); @@ -1845,7 +1789,6 @@ public static bool LessThanOrEqualAny(Vector512 left, Vector512 right) /// The type of () is not supported. [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 Load(T* source) => LoadUnsafe(ref *source); /// Loads a vector from the given aligned source. @@ -1876,7 +1819,6 @@ public static Vector512 LoadAligned(T* source) /// This method may bypass the cache on certain platforms. [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 LoadAlignedNonTemporal(T* source) => LoadAligned(source); #pragma warning restore CS8500 // This takes the address of, gets the size of, or declares a pointer to a managed type ('T') @@ -1913,17 +1855,13 @@ public static Vector512 LoadUnsafe(ref readonly T source, nuint elementOff /// Loads a vector from the given source and reinterprets it as . /// The source from which the vector will be loaded. /// The vector loaded from . - [MethodImpl(MethodImplOptions.AggressiveInlining)] - internal static Vector512 LoadUnsafe(ref char source) => - LoadUnsafe(ref Unsafe.As(ref source)); + internal static Vector512 LoadUnsafe(ref char source) => LoadUnsafe(ref Unsafe.As(ref source)); /// Loads a vector from the given source and element offset and reinterprets it as . /// The source to which will be added before loading the vector. /// The element offset from from which the vector will be loaded. /// The vector loaded from plus . - [MethodImpl(MethodImplOptions.AggressiveInlining)] - internal static Vector512 LoadUnsafe(ref char source, nuint elementOffset) => - LoadUnsafe(ref Unsafe.As(ref source), elementOffset); + internal static Vector512 LoadUnsafe(ref char source, nuint elementOffset) => LoadUnsafe(ref Unsafe.As(ref source), elementOffset); /// [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -2032,7 +1970,6 @@ public static Vector512 Min(Vector512 left, Vector512 right) /// The element-wise product of and . /// The type of and () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 Multiply(Vector512 left, Vector512 right) => left * right; /// Multiplies a vector by a scalar to compute their product. @@ -2042,7 +1979,6 @@ public static Vector512 Min(Vector512 left, Vector512 right) /// The product of and . /// The type of and () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 Multiply(Vector512 left, T right) => left * right; /// Multiplies a vector by a scalar to compute their product. @@ -2052,7 +1988,6 @@ public static Vector512 Min(Vector512 left, Vector512 right) /// The product of and . /// The type of and () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 Multiply(T left, Vector512 right) => left * right; /// @@ -2184,7 +2119,6 @@ public static Vector512 Narrow(Vector512 lower, Vector512 up /// A vector whose elements are the negation of the corresponding elements in . /// The type of () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 Negate(Vector512 vector) => -vector; /// Computes the ones-complement of a vector. @@ -2193,7 +2127,6 @@ public static Vector512 Narrow(Vector512 lower, Vector512 up /// A vector whose elements are the ones-complement of the corresponding elements in . /// The type of () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 OnesComplement(Vector512 vector) { return Create( @@ -2207,7 +2140,6 @@ public static Vector512 OnesComplement(Vector512 vector) /// The number of bits by which to shift each element. /// A vector whose elements where shifted left by . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static Vector512 ShiftLeft(Vector512 vector, int shiftCount) => vector << shiftCount; /// Shifts each element of a vector left by the specified amount. @@ -2215,7 +2147,6 @@ public static Vector512 OnesComplement(Vector512 vector) /// The number of bits by which to shift each element. /// A vector whose elements where shifted left by . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 ShiftLeft(Vector512 vector, int shiftCount) => vector << shiftCount; /// Shifts each element of a vector left by the specified amount. @@ -2223,7 +2154,6 @@ public static Vector512 OnesComplement(Vector512 vector) /// The number of bits by which to shift each element. /// A vector whose elements where shifted left by . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 ShiftLeft(Vector512 vector, int shiftCount) => vector << shiftCount; /// Shifts each element of a vector left by the specified amount. @@ -2231,7 +2161,6 @@ public static Vector512 OnesComplement(Vector512 vector) /// The number of bits by which to shift each element. /// A vector whose elements where shifted left by . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 ShiftLeft(Vector512 vector, int shiftCount) => vector << shiftCount; /// Shifts each element of a vector left by the specified amount. @@ -2239,7 +2168,6 @@ public static Vector512 OnesComplement(Vector512 vector) /// The number of bits by which to shift each element. /// A vector whose elements where shifted left by . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 ShiftLeft(Vector512 vector, int shiftCount) => vector << shiftCount; /// Shifts each element of a vector left by the specified amount. @@ -2247,7 +2175,6 @@ public static Vector512 OnesComplement(Vector512 vector) /// The number of bits by which to shift each element. /// A vector whose elements where shifted left by . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 ShiftLeft(Vector512 vector, int shiftCount) => vector << shiftCount; /// Shifts each element of a vector left by the specified amount. @@ -2256,7 +2183,6 @@ public static Vector512 OnesComplement(Vector512 vector) /// A vector whose elements where shifted left by . [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 ShiftLeft(Vector512 vector, int shiftCount) => vector << shiftCount; /// Shifts each element of a vector left by the specified amount. @@ -2265,7 +2191,6 @@ public static Vector512 OnesComplement(Vector512 vector) /// A vector whose elements where shifted left by . [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 ShiftLeft(Vector512 vector, int shiftCount) => vector << shiftCount; /// Shifts each element of a vector left by the specified amount. @@ -2274,7 +2199,6 @@ public static Vector512 OnesComplement(Vector512 vector) /// A vector whose elements where shifted left by . [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 ShiftLeft(Vector512 vector, int shiftCount) => vector << shiftCount; /// Shifts each element of a vector left by the specified amount. @@ -2283,7 +2207,6 @@ public static Vector512 OnesComplement(Vector512 vector) /// A vector whose elements where shifted left by . [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 ShiftLeft(Vector512 vector, int shiftCount) => vector << shiftCount; /// Shifts each element of a vector left by the specified amount. @@ -2292,7 +2215,6 @@ public static Vector512 OnesComplement(Vector512 vector) /// A vector whose elements where shifted left by . [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 ShiftLeft(Vector512 vector, int shiftCount) => vector << shiftCount; /// Shifts (signed) each element of a vector right by the specified amount. @@ -2300,7 +2222,6 @@ public static Vector512 OnesComplement(Vector512 vector) /// The number of bits by which to shift each element. /// A vector whose elements where shifted right by . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static Vector512 ShiftRightArithmetic(Vector512 vector, int shiftCount) => vector >> shiftCount; /// Shifts (signed) each element of a vector right by the specified amount. @@ -2308,7 +2229,6 @@ public static Vector512 OnesComplement(Vector512 vector) /// The number of bits by which to shift each element. /// A vector whose elements where shifted right by . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 ShiftRightArithmetic(Vector512 vector, int shiftCount) => vector >> shiftCount; /// Shifts (signed) each element of a vector right by the specified amount. @@ -2316,7 +2236,6 @@ public static Vector512 OnesComplement(Vector512 vector) /// The number of bits by which to shift each element. /// A vector whose elements where shifted right by . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 ShiftRightArithmetic(Vector512 vector, int shiftCount) => vector >> shiftCount; /// Shifts (signed) each element of a vector right by the specified amount. @@ -2324,7 +2243,6 @@ public static Vector512 OnesComplement(Vector512 vector) /// The number of bits by which to shift each element. /// A vector whose elements where shifted right by . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 ShiftRightArithmetic(Vector512 vector, int shiftCount) => vector >> shiftCount; /// Shifts (signed) each element of a vector right by the specified amount. @@ -2332,7 +2250,6 @@ public static Vector512 OnesComplement(Vector512 vector) /// The number of bits by which to shift each element. /// A vector whose elements where shifted right by . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 ShiftRightArithmetic(Vector512 vector, int shiftCount) => vector >> shiftCount; /// Shifts (signed) each element of a vector right by the specified amount. @@ -2341,7 +2258,6 @@ public static Vector512 OnesComplement(Vector512 vector) /// A vector whose elements where shifted right by . [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 ShiftRightArithmetic(Vector512 vector, int shiftCount) => vector >> shiftCount; /// Shifts (unsigned) each element of a vector right by the specified amount. @@ -2349,7 +2265,6 @@ public static Vector512 OnesComplement(Vector512 vector) /// The number of bits by which to shift each element. /// A vector whose elements where shifted right by . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static Vector512 ShiftRightLogical(Vector512 vector, int shiftCount) => vector >>> shiftCount; /// Shifts (unsigned) each element of a vector right by the specified amount. @@ -2357,7 +2272,6 @@ public static Vector512 OnesComplement(Vector512 vector) /// The number of bits by which to shift each element. /// A vector whose elements where shifted right by . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 ShiftRightLogical(Vector512 vector, int shiftCount) => vector >>> shiftCount; /// Shifts (unsigned) each element of a vector right by the specified amount. @@ -2365,7 +2279,6 @@ public static Vector512 OnesComplement(Vector512 vector) /// The number of bits by which to shift each element. /// A vector whose elements where shifted right by . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 ShiftRightLogical(Vector512 vector, int shiftCount) => vector >>> shiftCount; /// Shifts (unsigned) each element of a vector right by the specified amount. @@ -2373,7 +2286,6 @@ public static Vector512 OnesComplement(Vector512 vector) /// The number of bits by which to shift each element. /// A vector whose elements where shifted right by . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 ShiftRightLogical(Vector512 vector, int shiftCount) => vector >>> shiftCount; /// Shifts (unsigned) each element of a vector right by the specified amount. @@ -2381,7 +2293,6 @@ public static Vector512 OnesComplement(Vector512 vector) /// The number of bits by which to shift each element. /// A vector whose elements where shifted right by . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 ShiftRightLogical(Vector512 vector, int shiftCount) => vector >>> shiftCount; /// Shifts (unsigned) each element of a vector right by the specified amount. @@ -2389,7 +2300,6 @@ public static Vector512 OnesComplement(Vector512 vector) /// The number of bits by which to shift each element. /// A vector whose elements where shifted right by . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 ShiftRightLogical(Vector512 vector, int shiftCount) => vector >>> shiftCount; /// Shifts (unsigned) each element of a vector right by the specified amount. @@ -2398,7 +2308,6 @@ public static Vector512 OnesComplement(Vector512 vector) /// A vector whose elements where shifted right by . [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 ShiftRightLogical(Vector512 vector, int shiftCount) => vector >>> shiftCount; /// Shifts (unsigned) each element of a vector right by the specified amount. @@ -2407,7 +2316,6 @@ public static Vector512 OnesComplement(Vector512 vector) /// A vector whose elements where shifted right by . [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 ShiftRightLogical(Vector512 vector, int shiftCount) => vector >>> shiftCount; /// Shifts (unsigned) each element of a vector right by the specified amount. @@ -2416,7 +2324,6 @@ public static Vector512 OnesComplement(Vector512 vector) /// A vector whose elements where shifted right by . [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 ShiftRightLogical(Vector512 vector, int shiftCount) => vector >>> shiftCount; /// Shifts (unsigned) each element of a vector right by the specified amount. @@ -2425,7 +2332,6 @@ public static Vector512 OnesComplement(Vector512 vector) /// A vector whose elements where shifted right by . [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 ShiftRightLogical(Vector512 vector, int shiftCount) => vector >>> shiftCount; /// Shifts (unsigned) each element of a vector right by the specified amount. @@ -2434,7 +2340,6 @@ public static Vector512 OnesComplement(Vector512 vector) /// A vector whose elements where shifted right by . [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 ShiftRightLogical(Vector512 vector, int shiftCount) => vector >>> shiftCount; /// Creates a new vector by selecting values from an input vector using a set of indices. @@ -2704,7 +2609,6 @@ public static Vector512 Sqrt(Vector512 vector) /// The type of and () is not supported. [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void Store(this Vector512 source, T* destination) => source.StoreUnsafe(ref *destination); /// Stores a vector at the given aligned destination. @@ -2735,7 +2639,6 @@ public static void StoreAligned(this Vector512 source, T* destination) /// This method may bypass the cache on certain platforms. [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void StoreAlignedNonTemporal(this Vector512 source, T* destination) => source.StoreAligned(destination); #pragma warning restore CS8500 // This takes the address of, gets the size of, or declares a pointer to a managed type ('T') @@ -2776,7 +2679,6 @@ public static void StoreUnsafe(this Vector512 source, ref T destination, n /// The difference of and . /// The type of and () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 Subtract(Vector512 left, Vector512 right) => left - right; /// Computes the sum of all elements in a vector. @@ -2803,7 +2705,6 @@ public static T Sum(Vector512 vector) /// A scalar containing the value of the first element. /// The type of () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static T ToScalar(this Vector512 vector) { ThrowHelper.ThrowForUnsupportedIntrinsicsVector512BaseType(); @@ -3152,7 +3053,6 @@ public static Vector512 WithUpper(this Vector512 vector, Vector256 v /// The exclusive-or of and . /// The type of and () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 Xor(Vector512 left, Vector512 right) => left ^ right; [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -3171,16 +3071,8 @@ internal static void SetElementUnsafe(in this Vector512 vector, int index, Unsafe.Add(ref address, index) = value; } - [MethodImpl(MethodImplOptions.AggressiveInlining)] - internal static void SetLowerUnsafe(in this Vector512 vector, Vector256 value) - { - Unsafe.AsRef(in vector._lower) = value; - } + internal static void SetLowerUnsafe(in this Vector512 vector, Vector256 value) => Unsafe.AsRef(in vector._lower) = value; - [MethodImpl(MethodImplOptions.AggressiveInlining)] - internal static void SetUpperUnsafe(in this Vector512 vector, Vector256 value) - { - Unsafe.AsRef(in vector._upper) = value; - } + internal static void SetUpperUnsafe(in this Vector512 vector, Vector256 value) => Unsafe.AsRef(in vector._upper) = value; } } diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector512_1.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector512_1.cs index b070fc6e54dcba..235871dbe6069b 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector512_1.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector512_1.cs @@ -38,7 +38,6 @@ namespace System.Runtime.Intrinsics public static Vector512 AllBitsSet { [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] get { Vector256 vector = Vector256.AllBitsSet; @@ -51,11 +50,7 @@ public static Vector512 AllBitsSet public static int Count { [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return Vector256.Count * 2; - } + get => Vector256.Count * 2; } /// Gets a new with the elements set to their index. @@ -106,7 +101,6 @@ public static bool IsSupported public static Vector512 One { [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] get { Vector256 vector = Vector256.One; @@ -119,7 +113,6 @@ public static Vector512 One public static Vector512 Zero { [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] get { ThrowHelper.ThrowForUnsupportedIntrinsicsVector512BaseType(); @@ -127,27 +120,14 @@ public static Vector512 Zero } } - internal string DisplayString - { - get - { - return IsSupported ? ToString() : SR.NotSupported_Type; - } - } + internal string DisplayString => IsSupported ? ToString() : SR.NotSupported_Type; /// Gets the element at the specified index. /// The index of the element to get. /// The value of the element at . /// was less than zero or greater than the number of elements. /// The type of the vector () is not supported. - public T this[int index] - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return this.GetElement(index); - } - } + public T this[int index] => this.GetElement(index); /// Adds two vectors to compute their sum. /// The vector to add with . @@ -257,12 +237,7 @@ public T this[int index] /// true if any elements in was not equal to the corresponding element in . /// The type of the vector () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static bool operator !=(Vector512 left, Vector512 right) - { - return (left._lower != right._lower) - || (left._upper != right._upper); - } + public static bool operator !=(Vector512 left, Vector512 right) => !(left == right); /// Shifts each element of a vector left by the specified amount. /// The vector whose elements are to be shifted. @@ -314,7 +289,6 @@ public T this[int index] /// The product of and . /// The type of the vector () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 operator *(T left, Vector512 right) => right * left; /// Computes the ones-complement of a vector. @@ -379,7 +353,6 @@ public static Vector512 operator >>(Vector512 value, int shiftCount) /// /// The type of the vector () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector512 operator +(Vector512 value) { ThrowHelper.ThrowForUnsupportedIntrinsicsVector512BaseType(); @@ -403,7 +376,6 @@ public static Vector512 operator >>>(Vector512 value, int shiftCount) /// Determines whether the specified object is equal to the current instance. /// The object to compare with the current instance. /// true if is a and is equal to the current instance; otherwise, false. - [MethodImpl(MethodImplOptions.AggressiveInlining)] public override bool Equals([NotNullWhen(true)] object? obj) => (obj is Vector512 other) && Equals(other); /// Determines whether the specified is equal to the current instance. @@ -454,7 +426,6 @@ public override int GetHashCode() /// Converts the current instance to an equivalent string representation. /// An equivalent string representation of the current instance. /// The type of the vector () is not supported. - [MethodImpl(MethodImplOptions.AggressiveInlining)] public override string ToString() => ToString("G", CultureInfo.InvariantCulture); private string ToString([StringSyntax(StringSyntaxAttribute.NumericFormat)] string? format, IFormatProvider? formatProvider) @@ -682,15 +653,9 @@ private string ToString([StringSyntax(StringSyntaxAttribute.NumericFormat)] stri // New Surface Area // - static bool ISimdVector, T>.AnyWhereAllBitsSet(Vector512 vector) - { - return Vector512.EqualsAny(vector, Vector512.AllBitsSet); - } + static bool ISimdVector, T>.AnyWhereAllBitsSet(Vector512 vector) => Vector512.EqualsAny(vector, AllBitsSet); - static bool ISimdVector, T>.Any(Vector512 vector, T value) - { - return Vector512.EqualsAny(vector, Vector512.Create((T)value)); - } + static bool ISimdVector, T>.Any(Vector512 vector, T value) => Vector512.EqualsAny(vector, Vector512.Create(value)); static int ISimdVector, T>.IndexOfLastMatch(Vector512 vector) { diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector64.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector64.cs index 78b15f643ac284..743aad0a6503f9 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector64.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector64.cs @@ -65,7 +65,6 @@ public static Vector64 Abs(Vector64 vector) /// The sum of and . /// The type of and () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector64 Add(Vector64 left, Vector64 right) => left + right; /// Computes the bitwise-and of a given vector and the ones complement of another vector. @@ -75,16 +74,7 @@ public static Vector64 Abs(Vector64 vector) /// The bitwise-and of and the ones-complement of . /// The type of and () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Vector64 AndNot(Vector64 left, Vector64 right) - { - ThrowHelper.ThrowForUnsupportedIntrinsicsVector64BaseType(); - - Unsafe.SkipInit(out Vector64 result); - Unsafe.AsRef(in result._00) = left._00 & ~right._00; - - return result; - } + public static Vector64 AndNot(Vector64 left, Vector64 right) => left & ~right; /// Reinterprets a as a new . /// The type of the elements in the input vector. @@ -99,7 +89,11 @@ public static Vector64 As(this Vector64 vector) ThrowHelper.ThrowForUnsupportedIntrinsicsVector64BaseType(); ThrowHelper.ThrowForUnsupportedIntrinsicsVector64BaseType(); +#if MONO return Unsafe.As, Vector64>(ref vector); +#else + return Unsafe.BitCast, Vector64>(vector); +#endif } /// Reinterprets a as a new . @@ -108,7 +102,6 @@ public static Vector64 As(this Vector64 vector) /// reinterpreted as a new . /// The type of () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector64 AsByte(this Vector64 vector) => vector.As(); /// Reinterprets a as a new . @@ -117,7 +110,6 @@ public static Vector64 As(this Vector64 vector) /// reinterpreted as a new . /// The type of () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector64 AsDouble(this Vector64 vector) => vector.As(); /// Reinterprets a as a new . @@ -126,7 +118,6 @@ public static Vector64 As(this Vector64 vector) /// reinterpreted as a new . /// The type of () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector64 AsInt16(this Vector64 vector) => vector.As(); /// Reinterprets a as a new . @@ -135,7 +126,6 @@ public static Vector64 As(this Vector64 vector) /// reinterpreted as a new . /// The type of () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector64 AsInt32(this Vector64 vector) => vector.As(); /// Reinterprets a as a new . @@ -144,7 +134,6 @@ public static Vector64 As(this Vector64 vector) /// reinterpreted as a new . /// The type of () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector64 AsInt64(this Vector64 vector) => vector.As(); /// Reinterprets a as a new . @@ -153,7 +142,6 @@ public static Vector64 As(this Vector64 vector) /// reinterpreted as a new . /// The type of () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector64 AsNInt(this Vector64 vector) => vector.As(); /// Reinterprets a as a new . @@ -163,7 +151,6 @@ public static Vector64 As(this Vector64 vector) /// The type of () is not supported. [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector64 AsNUInt(this Vector64 vector) => vector.As(); /// Reinterprets a as a new . @@ -173,7 +160,6 @@ public static Vector64 As(this Vector64 vector) /// The type of () is not supported. [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector64 AsSByte(this Vector64 vector) => vector.As(); /// Reinterprets a as a new . @@ -182,7 +168,6 @@ public static Vector64 As(this Vector64 vector) /// reinterpreted as a new . /// The type of () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector64 AsSingle(this Vector64 vector) => vector.As(); /// Reinterprets a as a new . @@ -192,7 +177,6 @@ public static Vector64 As(this Vector64 vector) /// The type of () is not supported. [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector64 AsUInt16(this Vector64 vector) => vector.As(); /// Reinterprets a as a new . @@ -202,7 +186,6 @@ public static Vector64 As(this Vector64 vector) /// The type of () is not supported. [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector64 AsUInt32(this Vector64 vector) => vector.As(); /// Reinterprets a as a new . @@ -212,7 +195,6 @@ public static Vector64 As(this Vector64 vector) /// The type of () is not supported. [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector64 AsUInt64(this Vector64 vector) => vector.As(); /// Computes the bitwise-and of two vectors. @@ -222,7 +204,6 @@ public static Vector64 As(this Vector64 vector) /// The bitwise-and of and . /// The type of and () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector64 BitwiseAnd(Vector64 left, Vector64 right) => left & right; /// Computes the bitwise-or of two vectors. @@ -232,7 +213,6 @@ public static Vector64 As(this Vector64 vector) /// The bitwise-or of and . /// The type of and () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector64 BitwiseOr(Vector64 left, Vector64 right) => left | right; /// Computes the ceiling of each element in a vector. @@ -274,7 +254,6 @@ internal static Vector64 Ceiling(Vector64 vector) /// A vector whose elements are the ceiling of the elements in . /// [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector64 Ceiling(Vector64 vector) => Ceiling(vector); /// Computes the ceiling of each element in a vector. @@ -282,7 +261,6 @@ internal static Vector64 Ceiling(Vector64 vector) /// A vector whose elements are the ceiling of the elements in . /// [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector64 Ceiling(Vector64 vector) => Ceiling(vector); /// Conditionally selects a value from two vectors on a bitwise basis. @@ -294,15 +272,7 @@ internal static Vector64 Ceiling(Vector64 vector) /// The type of , , and () is not supported. [Intrinsic] [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Vector64 ConditionalSelect(Vector64 condition, Vector64 left, Vector64 right) - { - ThrowHelper.ThrowForUnsupportedIntrinsicsVector64BaseType(); - - Unsafe.SkipInit(out Vector64 result); - Unsafe.AsRef(in result._00) = (left._00 & condition._00) | (right._00 & ~condition._00); - - return result; - } + public static Vector64 ConditionalSelect(Vector64 condition, Vector64 left, Vector64 right) => (left & condition) | (right & ~condition); /// Converts a to a . /// The vector to convert. @@ -613,14 +583,12 @@ public static unsafe Vector64 Create(T value) /// On x86, this method corresponds to __m64 _mm_set1_pi8 /// A new with all elements initialized to . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe Vector64 Create(byte value) => Create(value); /// Creates a new instance with all elements initialized to the specified value. /// The value that all elements will be initialized to. /// A new with all elements initialized to . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe Vector64 Create(double value) => Create(value); /// Creates a new instance with all elements initialized to the specified value. @@ -628,7 +596,6 @@ public static unsafe Vector64 Create(T value) /// On x86, this method corresponds to __m64 _mm_set1_pi16 /// A new with all elements initialized to . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe Vector64 Create(short value) => Create(value); /// Creates a new instance with all elements initialized to the specified value. @@ -636,21 +603,18 @@ public static unsafe Vector64 Create(T value) /// On x86, this method corresponds to __m64 _mm_set1_pi32 /// A new with all elements initialized to . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe Vector64 Create(int value) => Create(value); /// Creates a new instance with all elements initialized to the specified value. /// The value that all elements will be initialized to. /// A new with all elements initialized to . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe Vector64 Create(long value) => Create(value); /// Creates a new instance with all elements initialized to the specified value. /// The value that all elements will be initialized to. /// A new with all elements initialized to . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe Vector64 Create(nint value) => Create(value); /// Creates a new instance with all elements initialized to the specified value. @@ -658,7 +622,6 @@ public static unsafe Vector64 Create(T value) /// A new with all elements initialized to . [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe Vector64 Create(nuint value) => Create(value); /// Creates a new instance with all elements initialized to the specified value. @@ -667,14 +630,12 @@ public static unsafe Vector64 Create(T value) /// A new with all elements initialized to . [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe Vector64 Create(sbyte value) => Create(value); /// Creates a new instance with all elements initialized to the specified value. /// The value that all elements will be initialized to. /// A new with all elements initialized to . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe Vector64 Create(float value) => Create(value); /// Creates a new instance with all elements initialized to the specified value. @@ -683,7 +644,6 @@ public static unsafe Vector64 Create(T value) /// A new with all elements initialized to . [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe Vector64 Create(ushort value) => Create(value); /// Creates a new instance with all elements initialized to the specified value. @@ -692,7 +652,6 @@ public static unsafe Vector64 Create(T value) /// A new with all elements initialized to . [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe Vector64 Create(uint value) => Create(value); /// Creates a new instance with all elements initialized to the specified value. @@ -700,7 +659,6 @@ public static unsafe Vector64 Create(T value) /// A new with all elements initialized to . [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe Vector64 Create(ulong value) => Create(value); /// Creates a new from a given array. @@ -918,42 +876,36 @@ public static unsafe Vector64 CreateScalar(T value) /// The value that element 0 will be initialized to. /// A new instance with the first element initialized to and the remaining elements initialized to zero. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe Vector64 CreateScalar(byte value) => CreateScalar(value); /// Creates a new instance with the first element initialized to the specified value and the remaining elements initialized to zero. /// The value that element 0 will be initialized to. /// A new instance with the first element initialized to and the remaining elements initialized to zero. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe Vector64 CreateScalar(double value) => CreateScalar(value); /// Creates a new instance with the first element initialized to the specified value and the remaining elements initialized to zero. /// The value that element 0 will be initialized to. /// A new instance with the first element initialized to and the remaining elements initialized to zero. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe Vector64 CreateScalar(short value) => CreateScalar(value); /// Creates a new instance with the first element initialized to the specified value and the remaining elements initialized to zero. /// The value that element 0 will be initialized to. /// A new instance with the first element initialized to and the remaining elements initialized to zero. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe Vector64 CreateScalar(int value) => CreateScalar(value); /// Creates a new instance with the first element initialized to the specified value and the remaining elements initialized to zero. /// The value that element 0 will be initialized to. /// A new instance with the first element initialized to and the remaining elements initialized to zero. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe Vector64 CreateScalar(long value) => CreateScalar(value); /// Creates a new instance with the first element initialized to the specified value and the remaining elements initialized to zero. /// The value that element 0 will be initialized to. /// A new instance with the first element initialized to and the remaining elements initialized to zero. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe Vector64 CreateScalar(nint value) => CreateScalar(value); /// Creates a new instance with the first element initialized to the specified value and the remaining elements initialized to zero. @@ -961,7 +913,6 @@ public static unsafe Vector64 CreateScalar(T value) /// A new instance with the first element initialized to and the remaining elements initialized to zero. [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe Vector64 CreateScalar(nuint value) => CreateScalar(value); /// Creates a new instance with the first element initialized to the specified value and the remaining elements initialized to zero. @@ -969,14 +920,12 @@ public static unsafe Vector64 CreateScalar(T value) /// A new instance with the first element initialized to and the remaining elements initialized to zero. [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe Vector64 CreateScalar(sbyte value) => CreateScalar(value); /// Creates a new instance with the first element initialized to the specified value and the remaining elements initialized to zero. /// The value that element 0 will be initialized to. /// A new instance with the first element initialized to and the remaining elements initialized to zero. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe Vector64 CreateScalar(float value) => CreateScalar(value); /// Creates a new instance with the first element initialized to the specified value and the remaining elements initialized to zero. @@ -984,7 +933,6 @@ public static unsafe Vector64 CreateScalar(T value) /// A new instance with the first element initialized to and the remaining elements initialized to zero. [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe Vector64 CreateScalar(ushort value) => CreateScalar(value); /// Creates a new instance with the first element initialized to the specified value and the remaining elements initialized to zero. @@ -992,7 +940,6 @@ public static unsafe Vector64 CreateScalar(T value) /// A new instance with the first element initialized to and the remaining elements initialized to zero. [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe Vector64 CreateScalar(uint value) => CreateScalar(value); /// Creates a new instance with the first element initialized to the specified value and the remaining elements initialized to zero. @@ -1000,7 +947,6 @@ public static unsafe Vector64 CreateScalar(T value) /// A new instance with the first element initialized to and the remaining elements initialized to zero. [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe Vector64 CreateScalar(ulong value) => CreateScalar(value); /// Creates a new instance with the first element initialized to the specified value and the remaining elements left uninitialized. @@ -1026,42 +972,36 @@ public static Vector64 CreateScalarUnsafe(T value) /// The value that element 0 will be initialized to. /// A new instance with the first element initialized to and the remaining elements left uninitialized. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe Vector64 CreateScalarUnsafe(byte value) => CreateScalarUnsafe(value); /// Creates a new instance with the first element initialized to the specified value and the remaining elements left uninitialized. /// The value that element 0 will be initialized to. /// A new instance with the first element initialized to and the remaining elements left uninitialized. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe Vector64 CreateScalarUnsafe(double value) => CreateScalarUnsafe(value); /// Creates a new instance with the first element initialized to the specified value and the remaining elements left uninitialized. /// The value that element 0 will be initialized to. /// A new instance with the first element initialized to and the remaining elements left uninitialized. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe Vector64 CreateScalarUnsafe(short value) => CreateScalarUnsafe(value); /// Creates a new instance with the first element initialized to the specified value and the remaining elements left uninitialized. /// The value that element 0 will be initialized to. /// A new instance with the first element initialized to and the remaining elements left uninitialized. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe Vector64 CreateScalarUnsafe(int value) => CreateScalarUnsafe(value); /// Creates a new instance with the first element initialized to the specified value and the remaining elements left uninitialized. /// The value that element 0 will be initialized to. /// A new instance with the first element initialized to and the remaining elements left uninitialized. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe Vector64 CreateScalarUnsafe(long value) => CreateScalarUnsafe(value); /// Creates a new instance with the first element initialized to the specified value and the remaining elements left uninitialized. /// The value that element 0 will be initialized to. /// A new instance with the first element initialized to and the remaining elements left uninitialized. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe Vector64 CreateScalarUnsafe(nint value) => CreateScalarUnsafe(value); /// Creates a new instance with the first element initialized to the specified value and the remaining elements left uninitialized. @@ -1069,7 +1009,6 @@ public static Vector64 CreateScalarUnsafe(T value) /// A new instance with the first element initialized to and the remaining elements left uninitialized. [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe Vector64 CreateScalarUnsafe(nuint value) => CreateScalarUnsafe(value); /// Creates a new instance with the first element initialized to the specified value and the remaining elements left uninitialized. @@ -1077,14 +1016,12 @@ public static Vector64 CreateScalarUnsafe(T value) /// A new instance with the first element initialized to and the remaining elements left uninitialized. [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe Vector64 CreateScalarUnsafe(sbyte value) => CreateScalarUnsafe(value); /// Creates a new instance with the first element initialized to the specified value and the remaining elements left uninitialized. /// The value that element 0 will be initialized to. /// A new instance with the first element initialized to and the remaining elements left uninitialized. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe Vector64 CreateScalarUnsafe(float value) => CreateScalarUnsafe(value); /// Creates a new instance with the first element initialized to the specified value and the remaining elements left uninitialized. @@ -1092,7 +1029,6 @@ public static Vector64 CreateScalarUnsafe(T value) /// A new instance with the first element initialized to and the remaining elements left uninitialized. [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe Vector64 CreateScalarUnsafe(ushort value) => CreateScalarUnsafe(value); /// Creates a new instance with the first element initialized to the specified value and the remaining elements left uninitialized. @@ -1100,7 +1036,6 @@ public static Vector64 CreateScalarUnsafe(T value) /// A new instance with the first element initialized to and the remaining elements left uninitialized. [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe Vector64 CreateScalarUnsafe(uint value) => CreateScalarUnsafe(value); /// Creates a new instance with the first element initialized to the specified value and the remaining elements left uninitialized. @@ -1108,7 +1043,6 @@ public static Vector64 CreateScalarUnsafe(T value) /// A new instance with the first element initialized to and the remaining elements left uninitialized. [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe Vector64 CreateScalarUnsafe(ulong value) => CreateScalarUnsafe(value); /// Creates a new instance where the elements begin at a specified value and which are spaced apart according to another specified value. @@ -1127,7 +1061,6 @@ public static Vector64 CreateScalarUnsafe(T value) /// The quotient of divided by . /// The type of and () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector64 Divide(Vector64 left, Vector64 right) => left / right; /// Divides a vector by a scalar to compute the per-element quotient. @@ -1136,7 +1069,6 @@ public static Vector64 CreateScalarUnsafe(T value) /// The type of the elements in the vector. /// The quotient of divided by . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector64 Divide(Vector64 left, T right) => left / right; /// Computes the dot product of two vectors. @@ -1146,34 +1078,7 @@ public static Vector64 CreateScalarUnsafe(T value) /// The dot product of and . /// The type of and () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static T Dot(Vector64 left, Vector64 right) - { - T result = default!; - - // Doing this as pairs is important for floating-point determinism - // This is because the underlying dpps instruction on x86/x64 will do this equivalently - // and otherwise the software vs accelerated implementations may differ in returned result. - - if (Vector64.Count != 1) - { - for (int index = 0; index < Vector64.Count; index += 2) - { - T value = Scalar.Add( - Scalar.Multiply(left.GetElementUnsafe(index + 0), right.GetElementUnsafe(index + 0)), - Scalar.Multiply(left.GetElementUnsafe(index + 1), right.GetElementUnsafe(index + 1)) - ); - - result = Scalar.Add(result, value); - } - } - else - { - result = Scalar.Multiply(left.GetElementUnsafe(0), right.GetElementUnsafe(0)); - } - - return result; - } + public static T Dot(Vector64 left, Vector64 right) => Sum(left * right); /// Compares two vectors to determine if they are equal on a per-element basis. /// The type of the elements in the vector. @@ -1203,7 +1108,6 @@ public static Vector64 Equals(Vector64 left, Vector64 right) /// true if all elements in were equal to the corresponding element in . /// The type of and () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static bool EqualsAll(Vector64 left, Vector64 right) => left == right; /// Compares two vectors to determine if any elements are equal. @@ -1333,7 +1237,6 @@ internal static Vector64 Floor(Vector64 vector) /// A vector whose elements are the floor of the elements in . /// [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector64 Floor(Vector64 vector) => Floor(vector); /// Computes the floor of each element in a vector. @@ -1341,7 +1244,6 @@ internal static Vector64 Floor(Vector64 vector) /// A vector whose elements are the floor of the elements in . /// [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector64 Floor(Vector64 vector) => Floor(vector); /// Computes ( * ) + , rounded as one ternary operation. @@ -1671,7 +1573,6 @@ public static bool LessThanOrEqualAny(Vector64 left, Vector64 right) /// The type of () is not supported. [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe Vector64 Load(T* source) => LoadUnsafe(ref *source); /// Loads a vector from the given aligned source. @@ -1702,7 +1603,6 @@ public static unsafe Vector64 LoadAligned(T* source) /// The type of () is not supported. [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe Vector64 LoadAlignedNonTemporal(T* source) => LoadAligned(source); #pragma warning restore CS8500 // This takes the address of, gets the size of, or declares a pointer to a managed type ('T') @@ -1877,7 +1777,6 @@ public static Vector64 Min(Vector64 left, Vector64 right) /// The element-wise product of and . /// The type of and () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector64 Multiply(Vector64 left, Vector64 right) => left * right; /// Multiplies a vector by a scalar to compute their product. @@ -1887,7 +1786,6 @@ public static Vector64 Min(Vector64 left, Vector64 right) /// The product of and . /// The type of and () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector64 Multiply(Vector64 left, T right) => left * right; /// Multiplies a vector by a scalar to compute their product. @@ -1897,7 +1795,6 @@ public static Vector64 Min(Vector64 left, Vector64 right) /// The product of and . /// The type of and () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector64 Multiply(T left, Vector64 right) => left * right; /// Computes an estimate of ( * ) + . @@ -2133,7 +2030,6 @@ public static unsafe Vector64 Narrow(Vector64 lower, Vector64A vector whose elements are the negation of the corresponding elements in . /// The type of () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector64 Negate(Vector64 vector) => -vector; /// Computes the ones-complement of a vector. @@ -2142,7 +2038,6 @@ public static unsafe Vector64 Narrow(Vector64 lower, Vector64A vector whose elements are the ones-complement of the corresponding elements in . /// The type of () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector64 OnesComplement(Vector64 vector) => ~vector; /// Shifts each element of a vector left by the specified amount. @@ -2150,7 +2045,6 @@ public static unsafe Vector64 Narrow(Vector64 lower, Vector64The number of bits by which to shift each element. /// A vector whose elements where shifted left by . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static Vector64 ShiftLeft(Vector64 vector, int shiftCount) => vector << shiftCount; /// Shifts each element of a vector left by the specified amount. @@ -2158,7 +2052,6 @@ public static unsafe Vector64 Narrow(Vector64 lower, Vector64The number of bits by which to shift each element. /// A vector whose elements where shifted left by . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector64 ShiftLeft(Vector64 vector, int shiftCount) => vector << shiftCount; /// Shifts each element of a vector left by the specified amount. @@ -2166,7 +2059,6 @@ public static unsafe Vector64 Narrow(Vector64 lower, Vector64The number of bits by which to shift each element. /// A vector whose elements where shifted left by . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector64 ShiftLeft(Vector64 vector, int shiftCount) => vector << shiftCount; /// Shifts each element of a vector left by the specified amount. @@ -2174,7 +2066,6 @@ public static unsafe Vector64 Narrow(Vector64 lower, Vector64The number of bits by which to shift each element. /// A vector whose elements where shifted left by . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector64 ShiftLeft(Vector64 vector, int shiftCount) => vector << shiftCount; /// Shifts each element of a vector left by the specified amount. @@ -2182,7 +2073,6 @@ public static unsafe Vector64 Narrow(Vector64 lower, Vector64The number of bits by which to shift each element. /// A vector whose elements where shifted left by . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector64 ShiftLeft(Vector64 vector, int shiftCount) => vector << shiftCount; /// Shifts each element of a vector left by the specified amount. @@ -2190,7 +2080,6 @@ public static unsafe Vector64 Narrow(Vector64 lower, Vector64The number of bits by which to shift each element. /// A vector whose elements where shifted left by . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector64 ShiftLeft(Vector64 vector, int shiftCount) => vector << shiftCount; /// Shifts each element of a vector left by the specified amount. @@ -2199,7 +2088,6 @@ public static unsafe Vector64 Narrow(Vector64 lower, Vector64A vector whose elements where shifted left by . [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector64 ShiftLeft(Vector64 vector, int shiftCount) => vector << shiftCount; /// Shifts each element of a vector left by the specified amount. @@ -2208,7 +2096,6 @@ public static unsafe Vector64 Narrow(Vector64 lower, Vector64A vector whose elements where shifted left by . [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector64 ShiftLeft(Vector64 vector, int shiftCount) => vector << shiftCount; /// Shifts each element of a vector left by the specified amount. @@ -2217,7 +2104,6 @@ public static unsafe Vector64 Narrow(Vector64 lower, Vector64A vector whose elements where shifted left by . [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector64 ShiftLeft(Vector64 vector, int shiftCount) => vector << shiftCount; /// Shifts each element of a vector left by the specified amount. @@ -2226,7 +2112,6 @@ public static unsafe Vector64 Narrow(Vector64 lower, Vector64A vector whose elements where shifted left by . [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector64 ShiftLeft(Vector64 vector, int shiftCount) => vector << shiftCount; /// Shifts each element of a vector left by the specified amount. @@ -2235,7 +2120,6 @@ public static unsafe Vector64 Narrow(Vector64 lower, Vector64A vector whose elements where shifted left by . [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector64 ShiftLeft(Vector64 vector, int shiftCount) => vector << shiftCount; /// Shifts (signed) each element of a vector right by the specified amount. @@ -2243,7 +2127,6 @@ public static unsafe Vector64 Narrow(Vector64 lower, Vector64The number of bits by which to shift each element. /// A vector whose elements where shifted right by . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static Vector64 ShiftRightArithmetic(Vector64 vector, int shiftCount) => vector >> shiftCount; /// Shifts (signed) each element of a vector right by the specified amount. @@ -2251,7 +2134,6 @@ public static unsafe Vector64 Narrow(Vector64 lower, Vector64The number of bits by which to shift each element. /// A vector whose elements where shifted right by . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector64 ShiftRightArithmetic(Vector64 vector, int shiftCount) => vector >> shiftCount; /// Shifts (signed) each element of a vector right by the specified amount. @@ -2259,7 +2141,6 @@ public static unsafe Vector64 Narrow(Vector64 lower, Vector64The number of bits by which to shift each element. /// A vector whose elements where shifted right by . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector64 ShiftRightArithmetic(Vector64 vector, int shiftCount) => vector >> shiftCount; /// Shifts (signed) each element of a vector right by the specified amount. @@ -2267,7 +2148,6 @@ public static unsafe Vector64 Narrow(Vector64 lower, Vector64The number of bits by which to shift each element. /// A vector whose elements where shifted right by . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector64 ShiftRightArithmetic(Vector64 vector, int shiftCount) => vector >> shiftCount; /// Shifts (signed) each element of a vector right by the specified amount. @@ -2275,7 +2155,6 @@ public static unsafe Vector64 Narrow(Vector64 lower, Vector64The number of bits by which to shift each element. /// A vector whose elements where shifted right by . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector64 ShiftRightArithmetic(Vector64 vector, int shiftCount) => vector >> shiftCount; /// Shifts (signed) each element of a vector right by the specified amount. @@ -2284,7 +2163,6 @@ public static unsafe Vector64 Narrow(Vector64 lower, Vector64A vector whose elements where shifted right by . [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector64 ShiftRightArithmetic(Vector64 vector, int shiftCount) => vector >> shiftCount; /// Shifts (unsigned) each element of a vector right by the specified amount. @@ -2292,7 +2170,6 @@ public static unsafe Vector64 Narrow(Vector64 lower, Vector64The number of bits by which to shift each element. /// A vector whose elements where shifted right by . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static Vector64 ShiftRightLogical(Vector64 vector, int shiftCount) => vector >>> shiftCount; /// Shifts (unsigned) each element of a vector right by the specified amount. @@ -2300,7 +2177,6 @@ public static unsafe Vector64 Narrow(Vector64 lower, Vector64The number of bits by which to shift each element. /// A vector whose elements where shifted right by . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector64 ShiftRightLogical(Vector64 vector, int shiftCount) => vector >>> shiftCount; /// Shifts (unsigned) each element of a vector right by the specified amount. @@ -2308,7 +2184,6 @@ public static unsafe Vector64 Narrow(Vector64 lower, Vector64The number of bits by which to shift each element. /// A vector whose elements where shifted right by . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector64 ShiftRightLogical(Vector64 vector, int shiftCount) => vector >>> shiftCount; /// Shifts (unsigned) each element of a vector right by the specified amount. @@ -2316,7 +2191,6 @@ public static unsafe Vector64 Narrow(Vector64 lower, Vector64The number of bits by which to shift each element. /// A vector whose elements where shifted right by . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector64 ShiftRightLogical(Vector64 vector, int shiftCount) => vector >>> shiftCount; /// Shifts (unsigned) each element of a vector right by the specified amount. @@ -2324,7 +2198,6 @@ public static unsafe Vector64 Narrow(Vector64 lower, Vector64The number of bits by which to shift each element. /// A vector whose elements where shifted right by . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector64 ShiftRightLogical(Vector64 vector, int shiftCount) => vector >>> shiftCount; /// Shifts (unsigned) each element of a vector right by the specified amount. @@ -2332,7 +2205,6 @@ public static unsafe Vector64 Narrow(Vector64 lower, Vector64The number of bits by which to shift each element. /// A vector whose elements where shifted right by . [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector64 ShiftRightLogical(Vector64 vector, int shiftCount) => vector >>> shiftCount; /// Shifts (unsigned) each element of a vector right by the specified amount. @@ -2341,7 +2213,6 @@ public static unsafe Vector64 Narrow(Vector64 lower, Vector64A vector whose elements where shifted right by . [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector64 ShiftRightLogical(Vector64 vector, int shiftCount) => vector >>> shiftCount; /// Shifts (unsigned) each element of a vector right by the specified amount. @@ -2350,7 +2221,6 @@ public static unsafe Vector64 Narrow(Vector64 lower, Vector64A vector whose elements where shifted right by . [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector64 ShiftRightLogical(Vector64 vector, int shiftCount) => vector >>> shiftCount; /// Shifts (unsigned) each element of a vector right by the specified amount. @@ -2359,7 +2229,6 @@ public static unsafe Vector64 Narrow(Vector64 lower, Vector64A vector whose elements where shifted right by . [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector64 ShiftRightLogical(Vector64 vector, int shiftCount) => vector >>> shiftCount; /// Shifts (unsigned) each element of a vector right by the specified amount. @@ -2368,7 +2237,6 @@ public static unsafe Vector64 Narrow(Vector64 lower, Vector64A vector whose elements where shifted right by . [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector64 ShiftRightLogical(Vector64 vector, int shiftCount) => vector >>> shiftCount; /// Shifts (unsigned) each element of a vector right by the specified amount. @@ -2377,7 +2245,6 @@ public static unsafe Vector64 Narrow(Vector64 lower, Vector64A vector whose elements where shifted right by . [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector64 ShiftRightLogical(Vector64 vector, int shiftCount) => vector >>> shiftCount; /// Creates a new vector by selecting values from an input vector using a set of indices. @@ -2579,7 +2446,6 @@ public static Vector64 Sqrt(Vector64 vector) /// The type of () is not supported. [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void Store(this Vector64 source, T* destination) => source.StoreUnsafe(ref *destination); /// Stores a vector at the given aligned destination. @@ -2610,7 +2476,6 @@ public static unsafe void StoreAligned(this Vector64 source, T* destinatio /// The type of () is not supported. [Intrinsic] [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void StoreAlignedNonTemporal(this Vector64 source, T* destination) => source.StoreAligned(destination); #pragma warning restore CS8500 // This takes the address of, gets the size of, or declares a pointer to a managed type ('T') @@ -2651,7 +2516,6 @@ public static void StoreUnsafe(this Vector64 source, ref T destination, nu /// The difference of and . /// The type of and () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector64 Subtract(Vector64 left, Vector64 right) => left - right; /// Computes the sum of all elements in a vector. @@ -2679,7 +2543,6 @@ public static T Sum(Vector64 vector) /// A scalar containing the value of the first element. /// The type of () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static T ToScalar(this Vector64 vector) { ThrowHelper.ThrowForUnsupportedIntrinsicsVector64BaseType(); @@ -3074,7 +2937,6 @@ public static Vector64 WithElement(this Vector64 vector, int index, T v /// The exclusive-or of and . /// The type of and () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector64 Xor(Vector64 left, Vector64 right) => left ^ right; [MethodImpl(MethodImplOptions.AggressiveInlining)] diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector64_1.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector64_1.cs index 362977a3b22754..23730bb5b00900 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector64_1.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector64_1.cs @@ -56,7 +56,6 @@ public static Vector64 AllBitsSet public static unsafe int Count { [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] get { ThrowHelper.ThrowForUnsupportedIntrinsicsVector64BaseType(); @@ -113,12 +112,7 @@ public static bool IsSupported public static Vector64 One { [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - T scalar = Scalar.One; - return Vector64.Create(scalar); - } + get => Vector64.Create(Scalar.One); } /// Gets a new with all elements initialized to zero. @@ -126,7 +120,6 @@ public static Vector64 One public static Vector64 Zero { [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] get { ThrowHelper.ThrowForUnsupportedIntrinsicsVector64BaseType(); @@ -134,27 +127,14 @@ public static Vector64 Zero } } - internal string DisplayString - { - get - { - return IsSupported ? ToString() : SR.NotSupported_Type; - } - } + internal string DisplayString => IsSupported ? ToString() : SR.NotSupported_Type; /// Gets the element at the specified index. /// The index of the element to get. /// The value of the element at . /// was less than zero or greater than the number of elements. /// The type of the vector () is not supported. - public T this[int index] - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return this.GetElement(index); - } - } + public T this[int index] => this.GetElement(index); /// Adds two vectors to compute their sum. /// The vector to add with . @@ -291,18 +271,7 @@ public T this[int index] /// true if any elements in was not equal to the corresponding element in . /// The type of the vector () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static bool operator !=(Vector64 left, Vector64 right) - { - for (int index = 0; index < Count; index++) - { - if (!Scalar.Equals(left.GetElementUnsafe(index), right.GetElementUnsafe(index))) - { - return true; - } - } - return false; - } + public static bool operator !=(Vector64 left, Vector64 right) => !(left == right); /// Shifts each element of a vector left by the specified amount. /// The vector whose elements are to be shifted. @@ -369,7 +338,6 @@ public T this[int index] /// The product of and . /// The type of the vector () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector64 operator *(T left, Vector64 right) => right * left; /// Computes the ones-complement of a vector. @@ -432,7 +400,6 @@ public static Vector64 operator >>(Vector64 value, int shiftCount) /// A vector whose elements are the unary negation of the corresponding elements in . /// The type of the vector () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector64 operator -(Vector64 vector) => Zero - vector; /// Returns a given vector unchanged. @@ -440,7 +407,6 @@ public static Vector64 operator >>(Vector64 value, int shiftCount) /// /// The type of the vector () is not supported. [Intrinsic] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector64 operator +(Vector64 value) { ThrowHelper.ThrowForUnsupportedIntrinsicsVector64BaseType(); @@ -469,7 +435,6 @@ public static Vector64 operator >>>(Vector64 value, int shiftCount) /// Determines whether the specified object is equal to the current instance. /// The object to compare with the current instance. /// true if is a and is equal to the current instance; otherwise, false. - [MethodImpl(MethodImplOptions.AggressiveInlining)] public override bool Equals([NotNullWhen(true)] object? obj) => (obj is Vector64 other) && Equals(other); /// Determines whether the specified is equal to the current instance. @@ -529,7 +494,6 @@ public override int GetHashCode() /// Converts the current instance to an equivalent string representation. /// An equivalent string representation of the current instance. /// The type of the vector () is not supported. - [MethodImpl(MethodImplOptions.AggressiveInlining)] public override string ToString() => ToString("G", CultureInfo.InvariantCulture); private string ToString([StringSyntax(StringSyntaxAttribute.NumericFormat)] string? format, IFormatProvider? formatProvider) @@ -757,15 +721,9 @@ private string ToString([StringSyntax(StringSyntaxAttribute.NumericFormat)] stri // New Surface Area // - static bool ISimdVector, T>.AnyWhereAllBitsSet(Vector64 vector) - { - return Vector64.EqualsAny(vector, Vector64.AllBitsSet); - } + static bool ISimdVector, T>.AnyWhereAllBitsSet(Vector64 vector) => Vector64.EqualsAny(vector, AllBitsSet); - static bool ISimdVector, T>.Any(Vector64 vector, T value) - { - return Vector64.EqualsAny(vector, Vector64.Create((T)value)); - } + static bool ISimdVector, T>.Any(Vector64 vector, T value) => Vector64.EqualsAny(vector, Vector64.Create(value)); static int ISimdVector, T>.IndexOfLastMatch(Vector64 vector) {