diff --git a/src/coreclr/jit/hwintrinsiclistarm64sve.h b/src/coreclr/jit/hwintrinsiclistarm64sve.h index e70db726ce152f..4cc9f65aa1ec6b 100644 --- a/src/coreclr/jit/hwintrinsiclistarm64sve.h +++ b/src/coreclr/jit/hwintrinsiclistarm64sve.h @@ -332,6 +332,8 @@ HARDWARE_INTRINSIC(Sve2, ShiftLeftLogicalSaturate, HARDWARE_INTRINSIC(Sve2, ShiftLeftLogicalSaturateUnsigned, -1, -1, {INS_invalid, INS_sve_sqshlu, INS_invalid, INS_sve_sqshlu, INS_invalid, INS_sve_sqshlu, INS_invalid, INS_sve_sqshlu, INS_invalid, INS_invalid}, HW_Category_ShiftLeftByImmediate, HW_Flag_Scalable|HW_Flag_EmbeddedMaskedOperation|HW_Flag_HasImmediateOperand|HW_Flag_HasRMWSemantics) HARDWARE_INTRINSIC(Sve2, ShiftLeftLogicalWideningEven, -1, 2, {INS_invalid, INS_invalid, INS_sve_sshllb, INS_sve_ushllb, INS_sve_sshllb, INS_sve_ushllb, INS_sve_sshllb, INS_sve_ushllb, INS_invalid, INS_invalid}, HW_Category_ShiftLeftByImmediate, HW_Flag_Scalable|HW_Flag_HasImmediateOperand) HARDWARE_INTRINSIC(Sve2, ShiftLeftLogicalWideningOdd, -1, 2, {INS_invalid, INS_invalid, INS_sve_sshllt, INS_sve_ushllt, INS_sve_sshllt, INS_sve_ushllt, INS_sve_sshllt, INS_sve_ushllt, INS_invalid, INS_invalid}, HW_Category_ShiftLeftByImmediate, HW_Flag_Scalable|HW_Flag_HasImmediateOperand) +HARDWARE_INTRINSIC(Sve2, ShiftLogicalRounded, -1, -1, {INS_invalid, INS_sve_urshl, INS_invalid, INS_sve_urshl, INS_invalid, INS_sve_urshl, INS_invalid, INS_sve_urshl, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_Scalable|HW_Flag_EmbeddedMaskedOperation|HW_Flag_LowMaskedOperation|HW_Flag_HasRMWSemantics) +HARDWARE_INTRINSIC(Sve2, ShiftLogicalRoundedSaturate, -1, -1, {INS_invalid, INS_sve_uqrshl, INS_invalid, INS_sve_uqrshl, INS_invalid, INS_sve_uqrshl, INS_invalid, INS_sve_uqrshl, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_Scalable|HW_Flag_EmbeddedMaskedOperation|HW_Flag_LowMaskedOperation|HW_Flag_HasRMWSemantics) HARDWARE_INTRINSIC(Sve2, Xor, -1, 3, {INS_sve_eor3, INS_sve_eor3, INS_sve_eor3, INS_sve_eor3, INS_sve_eor3, INS_sve_eor3, INS_sve_eor3, INS_sve_eor3, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_Scalable|HW_Flag_SpecialCodeGen|HW_Flag_HasRMWSemantics) HARDWARE_INTRINSIC(Sve2, XorRotateRight, -1, 3, {INS_sve_xar, INS_sve_xar, INS_sve_xar, INS_sve_xar, INS_sve_xar, INS_sve_xar, INS_sve_xar, INS_sve_xar, INS_invalid, INS_invalid}, HW_Category_ShiftRightByImmediate, HW_Flag_Scalable|HW_Flag_HasRMWSemantics|HW_Flag_HasImmediateOperand) #define LAST_NI_Sve2 NI_Sve2_XorRotateRight diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Arm/Sve2.PlatformNotSupported.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Arm/Sve2.PlatformNotSupported.cs index ff9b4b05b22bb9..e45889ed1f6c21 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Arm/Sve2.PlatformNotSupported.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Arm/Sve2.PlatformNotSupported.cs @@ -796,6 +796,60 @@ internal Arm64() { } public static Vector ShiftLeftLogicalWideningOdd(Vector value, [ConstantExpected] byte count) { throw new PlatformNotSupportedException(); } + // Rounding shift left + + /// + /// svuint8_t svrshl[_u8]_m(svbool_t pg, svuint8_t op1, svint8_t op2) + /// URSHL Ztied1.B, Pg/M, Ztied1.B, Zop2.B + /// + public static Vector ShiftLogicalRounded(Vector value, Vector count) { throw new PlatformNotSupportedException(); } + + /// + /// svuint16_t svrshl[_u16]_m(svbool_t pg, svuint16_t op1, svint16_t op2) + /// URSHL Ztied1.H, Pg/M, Ztied1.H, Zop2.H + /// + public static Vector ShiftLogicalRounded(Vector value, Vector count) { throw new PlatformNotSupportedException(); } + + /// + /// svuint32_t svrshl[_u32]_m(svbool_t pg, svuint32_t op1, svint32_t op2) + /// URSHL Ztied1.S, Pg/M, Ztied1.S, Zop2.S + /// + public static Vector ShiftLogicalRounded(Vector value, Vector count) { throw new PlatformNotSupportedException(); } + + /// + /// svuint64_t svrshl[_u64]_m(svbool_t pg, svuint64_t op1, svint64_t op2) + /// URSHL Ztied1.D, Pg/M, Ztied1.D, Zop2.D + /// + public static Vector ShiftLogicalRounded(Vector value, Vector count) { throw new PlatformNotSupportedException(); } + + + // Saturating rounding shift left + + /// + /// svuint8_t svqrshl[_u8]_m(svbool_t pg, svuint8_t op1, svint8_t op2) + /// UQRSHL Ztied1.B, Pg/M, Ztied1.B, Zop2.B + /// + public static Vector ShiftLogicalRoundedSaturate(Vector value, Vector count) { throw new PlatformNotSupportedException(); } + + /// + /// svuint16_t svqrshl[_u16]_m(svbool_t pg, svuint16_t op1, svint16_t op2) + /// UQRSHL Ztied1.H, Pg/M, Ztied1.H, Zop2.H + /// + public static Vector ShiftLogicalRoundedSaturate(Vector value, Vector count) { throw new PlatformNotSupportedException(); } + + /// + /// svuint32_t svqrshl[_u32]_m(svbool_t pg, svuint32_t op1, svint32_t op2) + /// UQRSHL Ztied1.S, Pg/M, Ztied1.S, Zop2.S + /// + public static Vector ShiftLogicalRoundedSaturate(Vector value, Vector count) { throw new PlatformNotSupportedException(); } + + /// + /// svuint64_t svqrshl[_u64]_m(svbool_t pg, svuint64_t op1, svint64_t op2) + /// UQRSHL Ztied1.D, Pg/M, Ztied1.D, Zop2.D + /// + public static Vector ShiftLogicalRoundedSaturate(Vector value, Vector count) { throw new PlatformNotSupportedException(); } + + // Bitwise exclusive OR of three vectors /// diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Arm/Sve2.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Arm/Sve2.cs index 77bd276cb5bad0..4107ff2e5ee83c 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Arm/Sve2.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Arm/Sve2.cs @@ -796,6 +796,60 @@ internal Arm64() { } public static Vector ShiftLeftLogicalWideningOdd(Vector value, [ConstantExpected] byte count) => ShiftLeftLogicalWideningOdd(value, count); + // Rounding shift left + + /// + /// svuint8_t svrshl[_u8]_m(svbool_t pg, svuint8_t op1, svint8_t op2) + /// URSHL Ztied1.B, Pg/M, Ztied1.B, Zop2.B + /// + public static Vector ShiftLogicalRounded(Vector value, Vector count) => ShiftLogicalRounded(value, count); + + /// + /// svuint16_t svrshl[_u16]_m(svbool_t pg, svuint16_t op1, svint16_t op2) + /// URSHL Ztied1.H, Pg/M, Ztied1.H, Zop2.H + /// + public static Vector ShiftLogicalRounded(Vector value, Vector count) => ShiftLogicalRounded(value, count); + + /// + /// svuint32_t svrshl[_u32]_m(svbool_t pg, svuint32_t op1, svint32_t op2) + /// URSHL Ztied1.S, Pg/M, Ztied1.S, Zop2.S + /// + public static Vector ShiftLogicalRounded(Vector value, Vector count) => ShiftLogicalRounded(value, count); + + /// + /// svuint64_t svrshl[_u64]_m(svbool_t pg, svuint64_t op1, svint64_t op2) + /// URSHL Ztied1.D, Pg/M, Ztied1.D, Zop2.D + /// + public static Vector ShiftLogicalRounded(Vector value, Vector count) => ShiftLogicalRounded(value, count); + + + // Saturating rounding shift left + + /// + /// svuint8_t svqrshl[_u8]_m(svbool_t pg, svuint8_t op1, svint8_t op2) + /// UQRSHL Ztied1.B, Pg/M, Ztied1.B, Zop2.B + /// + public static Vector ShiftLogicalRoundedSaturate(Vector value, Vector count) => ShiftLogicalRoundedSaturate(value, count); + + /// + /// svuint16_t svqrshl[_u16]_m(svbool_t pg, svuint16_t op1, svint16_t op2) + /// UQRSHL Ztied1.H, Pg/M, Ztied1.H, Zop2.H + /// + public static Vector ShiftLogicalRoundedSaturate(Vector value, Vector count) => ShiftLogicalRoundedSaturate(value, count); + + /// + /// svuint32_t svqrshl[_u32]_m(svbool_t pg, svuint32_t op1, svint32_t op2) + /// UQRSHL Ztied1.S, Pg/M, Ztied1.S, Zop2.S + /// + public static Vector ShiftLogicalRoundedSaturate(Vector value, Vector count) => ShiftLogicalRoundedSaturate(value, count); + + /// + /// svuint64_t svqrshl[_u64]_m(svbool_t pg, svuint64_t op1, svint64_t op2) + /// UQRSHL Ztied1.D, Pg/M, Ztied1.D, Zop2.D + /// + public static Vector ShiftLogicalRoundedSaturate(Vector value, Vector count) => ShiftLogicalRoundedSaturate(value, count); + + // Bitwise exclusive OR of three vectors /// diff --git a/src/libraries/System.Runtime.Intrinsics/ref/System.Runtime.Intrinsics.cs b/src/libraries/System.Runtime.Intrinsics/ref/System.Runtime.Intrinsics.cs index 76b5f394db6336..a872083dc21eab 100644 --- a/src/libraries/System.Runtime.Intrinsics/ref/System.Runtime.Intrinsics.cs +++ b/src/libraries/System.Runtime.Intrinsics/ref/System.Runtime.Intrinsics.cs @@ -6204,6 +6204,14 @@ internal Arm64() { } public static System.Numerics.Vector ShiftLeftLogicalWideningOdd(System.Numerics.Vector value, [ConstantExpected] byte count) { throw null; } public static System.Numerics.Vector ShiftLeftLogicalWideningOdd(System.Numerics.Vector value, [ConstantExpected] byte count) { throw null; } public static System.Numerics.Vector ShiftLeftLogicalWideningOdd(System.Numerics.Vector value, [ConstantExpected] byte count) { throw null; } + public static System.Numerics.Vector ShiftLogicalRounded(System.Numerics.Vector value, System.Numerics.Vector count) { throw null; } + public static System.Numerics.Vector ShiftLogicalRounded(System.Numerics.Vector value, System.Numerics.Vector count) { throw null; } + public static System.Numerics.Vector ShiftLogicalRounded(System.Numerics.Vector value, System.Numerics.Vector count) { throw null; } + public static System.Numerics.Vector ShiftLogicalRounded(System.Numerics.Vector value, System.Numerics.Vector count) { throw null; } + public static System.Numerics.Vector ShiftLogicalRoundedSaturate(System.Numerics.Vector value, System.Numerics.Vector count) { throw null; } + public static System.Numerics.Vector ShiftLogicalRoundedSaturate(System.Numerics.Vector value, System.Numerics.Vector count) { throw null; } + public static System.Numerics.Vector ShiftLogicalRoundedSaturate(System.Numerics.Vector value, System.Numerics.Vector count) { throw null; } + public static System.Numerics.Vector ShiftLogicalRoundedSaturate(System.Numerics.Vector value, System.Numerics.Vector count) { throw null; } public static System.Numerics.Vector Xor(System.Numerics.Vector value1, System.Numerics.Vector value2, System.Numerics.Vector value3) { throw null; } public static System.Numerics.Vector Xor(System.Numerics.Vector value1, System.Numerics.Vector value2, System.Numerics.Vector value3) { throw null; } public static System.Numerics.Vector Xor(System.Numerics.Vector value1, System.Numerics.Vector value2, System.Numerics.Vector value3) { throw null; } diff --git a/src/tests/Common/GenerateHWIntrinsicTests/GenerateHWIntrinsicTests_Arm.cs b/src/tests/Common/GenerateHWIntrinsicTests/GenerateHWIntrinsicTests_Arm.cs index f7812710903cb5..ae71ebbd4d57d5 100644 --- a/src/tests/Common/GenerateHWIntrinsicTests/GenerateHWIntrinsicTests_Arm.cs +++ b/src/tests/Common/GenerateHWIntrinsicTests/GenerateHWIntrinsicTests_Arm.cs @@ -4913,6 +4913,16 @@ ("SveVecImmUnOpTest.template", new Dictionary {["TestName"] = "Sve2_ShiftLeftLogicalWideningOdd_uint_ushort", ["Isa"] = "Sve2", ["LoadIsa"] = "Sve2", ["Method"] = "ShiftLeftLogicalWideningOdd", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt16", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["Imm"] = "13", ["InvalidImm"] = "16", ["ValidateIterResult"] = "result[i] != Helpers.ShiftLeftLogicalWidening(firstOp[2*i+1], Imm)", ["GetIterResult"] = "Helpers.ShiftLeftLogicalWidening(firstOp[2*i+1], Imm)",}), ("SveVecImmUnOpTest.template", new Dictionary {["TestName"] = "Sve2_ShiftLeftLogicalWideningOdd_ulong_uint", ["Isa"] = "Sve2", ["LoadIsa"] = "Sve2", ["Method"] = "ShiftLeftLogicalWideningOdd", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt32", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["Imm"] = "20", ["InvalidImm"] = "32", ["ValidateIterResult"] = "result[i] != Helpers.ShiftLeftLogicalWidening(firstOp[2*i+1], Imm)", ["GetIterResult"] = "Helpers.ShiftLeftLogicalWidening(firstOp[2*i+1], Imm)",}), + ("SveVecBinOpDifferentTypesTest.template", new Dictionary { ["TestName"] = "Sve2_ShiftLogicalRounded_byte_sbyte", ["Isa"] = "Sve2", ["LoadIsa"] = "Sve2", ["Method"] = "ShiftLogicalRounded", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "result[i] != Helpers.SveShiftLogicalRounded(left[i], right[i])", ["GetIterResult"] = "Helpers.SveShiftLogicalRounded(left[i], right[i])",}), + ("SveVecBinOpDifferentTypesTest.template", new Dictionary { ["TestName"] = "Sve2_ShiftLogicalRounded_ushort_short", ["Isa"] = "Sve2", ["LoadIsa"] = "Sve2", ["Method"] = "ShiftLogicalRounded", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "result[i] != Helpers.SveShiftLogicalRounded(left[i], right[i])", ["GetIterResult"] = "Helpers.SveShiftLogicalRounded(left[i], right[i])",}), + ("SveVecBinOpDifferentTypesTest.template", new Dictionary { ["TestName"] = "Sve2_ShiftLogicalRounded_uint_int", ["Isa"] = "Sve2", ["LoadIsa"] = "Sve2", ["Method"] = "ShiftLogicalRounded", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "result[i] != Helpers.SveShiftLogicalRounded(left[i], right[i])", ["GetIterResult"] = "Helpers.SveShiftLogicalRounded(left[i], right[i])",}), + ("SveVecBinOpDifferentTypesTest.template", new Dictionary { ["TestName"] = "Sve2_ShiftLogicalRounded_ulong_long", ["Isa"] = "Sve2", ["LoadIsa"] = "Sve2", ["Method"] = "ShiftLogicalRounded", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateIterResult"] = "result[i] != Helpers.SveShiftLogicalRounded(left[i], right[i])", ["GetIterResult"] = "Helpers.SveShiftLogicalRounded(left[i], right[i])",}), + + ("SveVecBinOpDifferentTypesTest.template", new Dictionary {["TestName"] = "Sve2_ShiftLogicalRoundedSaturate_byte_sbyte", ["Isa"] = "Sve2", ["LoadIsa"] = "Sve2", ["Method"] = "ShiftLogicalRoundedSaturate", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "result[i] != Helpers.SveShiftLogicalRoundedSaturate(left[i], right[i])", ["GetIterResult"] = "Helpers.SveShiftLogicalRoundedSaturate(left[i], right[i])",}), + ("SveVecBinOpDifferentTypesTest.template", new Dictionary {["TestName"] = "Sve2_ShiftLogicalRoundedSaturate_ushort_short", ["Isa"] = "Sve2", ["LoadIsa"] = "Sve2", ["Method"] = "ShiftLogicalRoundedSaturate", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "result[i] != Helpers.SveShiftLogicalRoundedSaturate(left[i], right[i])", ["GetIterResult"] = "Helpers.SveShiftLogicalRoundedSaturate(left[i], right[i])",}), + ("SveVecBinOpDifferentTypesTest.template", new Dictionary {["TestName"] = "Sve2_ShiftLogicalRoundedSaturate_uint_int", ["Isa"] = "Sve2", ["LoadIsa"] = "Sve2", ["Method"] = "ShiftLogicalRoundedSaturate", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "result[i] != Helpers.SveShiftLogicalRoundedSaturate(left[i], right[i])", ["GetIterResult"] = "Helpers.SveShiftLogicalRoundedSaturate(left[i], right[i])",}), + ("SveVecBinOpDifferentTypesTest.template", new Dictionary {["TestName"] = "Sve2_ShiftLogicalRoundedSaturate_ulong_long", ["Isa"] = "Sve2", ["LoadIsa"] = "Sve2", ["Method"] = "ShiftLogicalRoundedSaturate", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateIterResult"] = "result[i] != Helpers.SveShiftLogicalRoundedSaturate(left[i], right[i])", ["GetIterResult"] = "Helpers.SveShiftLogicalRoundedSaturate(left[i], right[i])",}), + ("SveVecTernOpTest.template", new Dictionary { ["TestName"] = "Sve2_Xor_sbyte", ["Isa"] = "Sve2", ["LoadIsa"] = "Sve2", ["Method"] = "Xor", ["RetVectorType"] = "Vector", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "SByte", ["Op3VectorType"] = "Vector", ["Op3BaseType"] = "SByte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp3"] = "TestLibrary.Generator.GetSByte()", ["ConvertFunc"] = "", ["ValidateIterResult"] = "result[i] != Helpers.Xor(firstOp[i], secondOp[i], thirdOp[i])", ["GetIterResult"] = "Helpers.Xor(firstOp[i], secondOp[i], thirdOp[i])",}), ("SveVecTernOpTest.template", new Dictionary { ["TestName"] = "Sve2_Xor_short", ["Isa"] = "Sve2", ["LoadIsa"] = "Sve2", ["Method"] = "Xor", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "Int16", ["Op3VectorType"] = "Vector", ["Op3BaseType"] = "Int16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt16()", ["ConvertFunc"] = "", ["ValidateIterResult"] = "result[i] != Helpers.Xor(firstOp[i], secondOp[i], thirdOp[i])", ["GetIterResult"] = "Helpers.Xor(firstOp[i], secondOp[i], thirdOp[i])",}), ("SveVecTernOpTest.template", new Dictionary { ["TestName"] = "Sve2_Xor_int", ["Isa"] = "Sve2", ["LoadIsa"] = "Sve2", ["Method"] = "Xor", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "Int32", ["Op3VectorType"] = "Vector", ["Op3BaseType"] = "Int32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt32()", ["ConvertFunc"] = "", ["ValidateIterResult"] = "result[i] != Helpers.Xor(firstOp[i], secondOp[i], thirdOp[i])", ["GetIterResult"] = "Helpers.Xor(firstOp[i], secondOp[i], thirdOp[i])",}), diff --git a/src/tests/JIT/HardwareIntrinsics/Arm/Shared/Helpers.cs b/src/tests/JIT/HardwareIntrinsics/Arm/Shared/Helpers.cs index 355730e6ddab56..36e24c04a4f4ec 100644 --- a/src/tests/JIT/HardwareIntrinsics/Arm/Shared/Helpers.cs +++ b/src/tests/JIT/HardwareIntrinsics/Arm/Shared/Helpers.cs @@ -2137,9 +2137,9 @@ public static float CompareTest(float left, float right) public static short AbsoluteDifferenceWideningUpperAndAdd(short[] op1, sbyte[] op2, sbyte[] op3, int i) => AbsoluteDifferenceWideningAndAdd(op1[i], op2[i + op2.Length / 2], op3[i + op3.Length / 2]); - public static short AbsoluteDifferenceWideningLowerAndAddEven(short[] op1, sbyte[] op2, sbyte[] op3, int i) => AbsoluteDifferenceWideningAndAdd(op1[i], op2[i*2], op3[i*2]); + public static short AbsoluteDifferenceWideningLowerAndAddEven(short[] op1, sbyte[] op2, sbyte[] op3, int i) => AbsoluteDifferenceWideningAndAdd(op1[i], op2[i * 2], op3[i * 2]); - public static short AbsoluteDifferenceWideningLowerAndAddOdd(short[] op1, sbyte[] op2, sbyte[] op3, int i) => AbsoluteDifferenceWideningAndAdd(op1[i], op2[(i*2) + 1], op3[(i*2) + 1]); + public static short AbsoluteDifferenceWideningLowerAndAddOdd(short[] op1, sbyte[] op2, sbyte[] op3, int i) => AbsoluteDifferenceWideningAndAdd(op1[i], op2[(i * 2) + 1], op3[(i * 2) + 1]); public static short AbsoluteDifferenceWideningEven(sbyte[] op1, sbyte[] op2, int i) => (short) AbsoluteDifferenceWidening(op1[i*2], op2[i*2]); @@ -2277,9 +2277,9 @@ private static long Reduce(Func reduceOp, sbyte[] op1) public static int AbsoluteDifferenceWideningUpperAndAdd(int[] op1, short[] op2, short[] op3, int i) => AbsoluteDifferenceWideningAndAdd(op1[i], op2[i + op2.Length / 2], op3[i + op3.Length / 2]); - public static int AbsoluteDifferenceWideningLowerAndAddEven(int[] op1, short[] op2, short[] op3, int i) => AbsoluteDifferenceWideningAndAdd(op1[i], op2[i*2], op3[i*2]); + public static int AbsoluteDifferenceWideningLowerAndAddEven(int[] op1, short[] op2, short[] op3, int i) => AbsoluteDifferenceWideningAndAdd(op1[i], op2[i * 2], op3[i * 2]); - public static int AbsoluteDifferenceWideningLowerAndAddOdd(int[] op1, short[] op2, short[] op3, int i) => AbsoluteDifferenceWideningAndAdd(op1[i], op2[(i*2) + 1], op3[(i*2) + 1]); + public static int AbsoluteDifferenceWideningLowerAndAddOdd(int[] op1, short[] op2, short[] op3, int i) => AbsoluteDifferenceWideningAndAdd(op1[i], op2[(i * 2) + 1], op3[(i * 2) + 1]); public static int AbsoluteDifferenceWideningEven(short[] op1, short[] op2, int i) => (int) AbsoluteDifferenceWidening(op1[i*2], op2[i*2]); @@ -2401,9 +2401,9 @@ private static long Reduce(Func reduceOp, short[] op1) public static long AbsoluteDifferenceWideningUpperAndAdd(long[] op1, int[] op2, int[] op3, int i) => AbsoluteDifferenceWideningAndAdd(op1[i], op2[i + op2.Length / 2], op3[i + op3.Length / 2]); - public static long AbsoluteDifferenceWideningLowerAndAddEven(long[] op1, int[] op2, int[] op3, int i) => AbsoluteDifferenceWideningAndAdd(op1[i], op2[i*2], op3[i*2]); + public static long AbsoluteDifferenceWideningLowerAndAddEven(long[] op1, int[] op2, int[] op3, int i) => AbsoluteDifferenceWideningAndAdd(op1[i], op2[i * 2], op3[i * 2]); - public static long AbsoluteDifferenceWideningLowerAndAddOdd(long[] op1, int[] op2, int[] op3, int i) => AbsoluteDifferenceWideningAndAdd(op1[i], op2[(i*2) + 1], op3[(i*2) + 1]); + public static long AbsoluteDifferenceWideningLowerAndAddOdd(long[] op1, int[] op2, int[] op3, int i) => AbsoluteDifferenceWideningAndAdd(op1[i], op2[(i * 2) + 1], op3[(i * 2) + 1]); public static long AbsoluteDifferenceWideningEven(int[] op1, int[] op2, int i) => (long) AbsoluteDifferenceWidening(op1[i*2], op2[i*2]); @@ -2554,9 +2554,9 @@ private static long Reduce(Func reduceOp, int[] op1) public static ushort AbsoluteDifferenceWideningUpperAndAdd(ushort[] op1, byte[] op2, byte[] op3, int i) => AbsoluteDifferenceWideningAndAdd(op1[i], op2[i + op2.Length / 2], op3[i + op3.Length / 2]); - public static ushort AbsoluteDifferenceWideningLowerAndAddEven(ushort[] op1, byte[] op2, byte[] op3, int i) => AbsoluteDifferenceWideningAndAdd(op1[i], op2[i*2], op3[i*2]); + public static ushort AbsoluteDifferenceWideningLowerAndAddEven(ushort[] op1, byte[] op2, byte[] op3, int i) => AbsoluteDifferenceWideningAndAdd(op1[i], op2[i * 2], op3[i * 2]); - public static ushort AbsoluteDifferenceWideningLowerAndAddOdd(ushort[] op1, byte[] op2, byte[] op3, int i) => AbsoluteDifferenceWideningAndAdd(op1[i], op2[(i*2) + 1], op3[(i*2) + 1]); + public static ushort AbsoluteDifferenceWideningLowerAndAddOdd(ushort[] op1, byte[] op2, byte[] op3, int i) => AbsoluteDifferenceWideningAndAdd(op1[i], op2[(i * 2) + 1], op3[(i * 2) + 1]); public static ushort AbsoluteDifferenceWideningEven(byte[] op1, byte[] op2, int i) => AbsoluteDifferenceWidening(op1[i*2], op2[i*2]); @@ -2678,9 +2678,9 @@ private static ulong Reduce(Func reduceOp, byte[] op1) public static uint AbsoluteDifferenceWideningUpperAndAdd(uint[] op1, ushort[] op2, ushort[] op3, int i) => AbsoluteDifferenceWideningAndAdd(op1[i], op2[i + op2.Length / 2], op3[i + op3.Length / 2]); - public static uint AbsoluteDifferenceWideningLowerAndAddEven(uint[] op1, ushort[] op2, ushort[] op3, int i) => AbsoluteDifferenceWideningAndAdd(op1[i], op2[i*2], op3[i*2]); + public static uint AbsoluteDifferenceWideningLowerAndAddEven(uint[] op1, ushort[] op2, ushort[] op3, int i) => AbsoluteDifferenceWideningAndAdd(op1[i], op2[i * 2], op3[i * 2]); - public static uint AbsoluteDifferenceWideningLowerAndAddOdd(uint[] op1, ushort[] op2, ushort[] op3, int i) => AbsoluteDifferenceWideningAndAdd(op1[i], op2[(i*2) + 1], op3[(i*2) + 1]); + public static uint AbsoluteDifferenceWideningLowerAndAddOdd(uint[] op1, ushort[] op2, ushort[] op3, int i) => AbsoluteDifferenceWideningAndAdd(op1[i], op2[(i * 2) + 1], op3[(i * 2) + 1]); public static uint AbsoluteDifferenceWideningEven(ushort[] op1, ushort[] op2, int i) => AbsoluteDifferenceWidening(op1[i*2], op2[i*2]); @@ -2802,9 +2802,9 @@ private static ulong Reduce(Func reduceOp, ushort[] op1) public static ulong AbsoluteDifferenceWideningUpperAndAdd(ulong[] op1, uint[] op2, uint[] op3, int i) => AbsoluteDifferenceWideningAndAdd(op1[i], op2[i + op2.Length / 2], op3[i + op3.Length / 2]); - public static ulong AbsoluteDifferenceWideningLowerAndAddEven(ulong[] op1, uint[] op2, uint[] op3, int i) => AbsoluteDifferenceWideningAndAdd(op1[i], op2[i*2], op3[i*2]); + public static ulong AbsoluteDifferenceWideningLowerAndAddEven(ulong[] op1, uint[] op2, uint[] op3, int i) => AbsoluteDifferenceWideningAndAdd(op1[i], op2[i * 2], op3[i * 2]); - public static ulong AbsoluteDifferenceWideningLowerAndAddOdd(ulong[] op1, uint[] op2, uint[] op3, int i) => AbsoluteDifferenceWideningAndAdd(op1[i], op2[(i*2) + 1], op3[(i*2) + 1]); + public static ulong AbsoluteDifferenceWideningLowerAndAddOdd(ulong[] op1, uint[] op2, uint[] op3, int i) => AbsoluteDifferenceWideningAndAdd(op1[i], op2[(i * 2) + 1], op3[(i * 2) + 1]); public static ulong AbsoluteDifferenceWideningEven(uint[] op1, uint[] op2, int i) => AbsoluteDifferenceWidening(op1[i*2], op2[i*2]); @@ -10566,5 +10566,21 @@ public static T XorRotateRight(T op1, T op2, int shift) where T : IBinaryInte public static uint SveShiftLeftLogicalSaturateUnsigned(int op1, byte op2) => UnsignedShift((uint)op1, (sbyte)op2, saturating: true, shiftSat: true); public static ulong SveShiftLeftLogicalSaturateUnsigned(long op1, byte op2) => UnsignedShift((ulong)op1, (sbyte)op2, saturating: true, shiftSat: true); + + public static byte SveShiftLogicalRounded(byte op1, sbyte op2) => UnsignedShift(op1, op2, rounding: true, shiftSat: true); + + public static ushort SveShiftLogicalRounded(ushort op1, short op2) => UnsignedShift(op1, op2, rounding: true, shiftSat: true); + + public static uint SveShiftLogicalRounded(uint op1, int op2) => UnsignedShift(op1, op2, rounding: true, shiftSat: true); + + public static ulong SveShiftLogicalRounded(ulong op1, long op2) => UnsignedShift(op1, op2, rounding: true, shiftSat: true); + + public static byte SveShiftLogicalRoundedSaturate(byte op1, sbyte op2) => UnsignedShift(op1, op2, rounding: true, saturating: true, shiftSat: true); + + public static ushort SveShiftLogicalRoundedSaturate(ushort op1, short op2) => UnsignedShift(op1, op2, rounding: true, saturating: true, shiftSat: true); + + public static uint SveShiftLogicalRoundedSaturate(uint op1, int op2) => UnsignedShift(op1, op2, rounding: true, saturating: true, shiftSat: true); + + public static ulong SveShiftLogicalRoundedSaturate(ulong op1, long op2) => UnsignedShift(op1, op2, rounding: true, saturating: true, shiftSat: true); } }