Skip to content

Commit 0f7b74b

Browse files
SVE: Remove unsigned implementation of ShiftRightArithmeticNarrowingSaturateEven/Odd (dotnet#118338)
The uqshrnb/t instructions perform a logical shift, when the intrinsic is an arithmetic shift. For reference: dotnet#94015
1 parent e1feed8 commit 0f7b74b

File tree

6 files changed

+7
-91
lines changed

6 files changed

+7
-91
lines changed

src/coreclr/inc/jiteeversionguid.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@
3737

3838
#include <minipal/guid.h>
3939

40-
constexpr GUID JITEEVersionIdentifier = { /* 2d40ec46-2e41-4a8b-8349-3c1267b95821 */
41-
0x2d40ec46,
42-
0x2e41,
43-
0x4a8b,
44-
{0x83, 0x49, 0x3c, 0x12, 0x67, 0xb9, 0x58, 0x21}
40+
constexpr GUID JITEEVersionIdentifier = { /* fafeaf26-740f-4e0a-b3f4-852fb3d5ccae */
41+
0xfafeaf26,
42+
0x740f,
43+
0x4e0a,
44+
{0xb3, 0xf4, 0x85, 0x2f, 0xb3, 0xd5, 0xcc, 0xae}
4545
};
4646

4747
#endif // JIT_EE_VERSIONING_GUID_H

src/coreclr/jit/hwintrinsiclistarm64sve.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -402,8 +402,8 @@ HARDWARE_INTRINSIC(Sve2, ShiftLogicalRounded,
402402
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)
403403
HARDWARE_INTRINSIC(Sve2, ShiftRightAndInsert, -1, 3, {INS_sve_sri, INS_sve_sri, INS_sve_sri, INS_sve_sri, INS_sve_sri, INS_sve_sri, INS_sve_sri, INS_sve_sri, INS_invalid, INS_invalid}, HW_Category_ShiftRightByImmediate, HW_Flag_Scalable|HW_Flag_HasImmediateOperand|HW_Flag_HasRMWSemantics)
404404
HARDWARE_INTRINSIC(Sve2, ShiftRightArithmeticAdd, -1, 3, {INS_sve_ssra, INS_invalid, INS_sve_ssra, INS_invalid, INS_sve_ssra, INS_invalid, INS_sve_ssra, INS_invalid, INS_invalid, INS_invalid}, HW_Category_ShiftRightByImmediate, HW_Flag_Scalable|HW_Flag_HasImmediateOperand|HW_Flag_HasRMWSemantics)
405-
HARDWARE_INTRINSIC(Sve2, ShiftRightArithmeticNarrowingSaturateEven, -1, 2, {INS_sve_sqshrnb, INS_sve_uqshrnb, INS_sve_sqshrnb, INS_sve_uqshrnb, INS_sve_sqshrnb, INS_sve_uqshrnb, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_ShiftRightByImmediate, HW_Flag_Scalable|HW_Flag_HasImmediateOperand)
406-
HARDWARE_INTRINSIC(Sve2, ShiftRightArithmeticNarrowingSaturateOdd, -1, 3, {INS_sve_sqshrnt, INS_sve_uqshrnt, INS_sve_sqshrnt, INS_sve_uqshrnt, INS_sve_sqshrnt, INS_sve_uqshrnt, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_ShiftRightByImmediate, HW_Flag_Scalable|HW_Flag_HasImmediateOperand|HW_Flag_HasRMWSemantics)
405+
HARDWARE_INTRINSIC(Sve2, ShiftRightArithmeticNarrowingSaturateEven, -1, 2, {INS_sve_sqshrnb, INS_invalid, INS_sve_sqshrnb, INS_invalid, INS_sve_sqshrnb, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_ShiftRightByImmediate, HW_Flag_Scalable|HW_Flag_HasImmediateOperand)
406+
HARDWARE_INTRINSIC(Sve2, ShiftRightArithmeticNarrowingSaturateOdd, -1, 3, {INS_sve_sqshrnt, INS_invalid, INS_sve_sqshrnt, INS_invalid, INS_sve_sqshrnt, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_ShiftRightByImmediate, HW_Flag_Scalable|HW_Flag_HasImmediateOperand|HW_Flag_HasRMWSemantics)
407407
HARDWARE_INTRINSIC(Sve2, ShiftRightArithmeticNarrowingSaturateUnsignedEven, -1, 2, {INS_invalid, INS_sve_sqshrunb, INS_invalid, INS_sve_sqshrunb, INS_invalid, INS_sve_sqshrunb, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_ShiftRightByImmediate, HW_Flag_Scalable|HW_Flag_HasImmediateOperand)
408408
HARDWARE_INTRINSIC(Sve2, ShiftRightArithmeticNarrowingSaturateUnsignedOdd, -1, 3, {INS_invalid, INS_sve_sqshrunt, INS_invalid, INS_sve_sqshrunt, INS_invalid, INS_sve_sqshrunt, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_ShiftRightByImmediate, HW_Flag_Scalable|HW_Flag_HasImmediateOperand|HW_Flag_HasRMWSemantics)
409409
HARDWARE_INTRINSIC(Sve2, ShiftRightArithmeticRounded, -1, -1, {INS_sve_srshr, INS_invalid, INS_sve_srshr, INS_invalid, INS_sve_srshr, INS_invalid, INS_sve_srshr, INS_invalid, INS_invalid, INS_invalid}, HW_Category_ShiftRightByImmediate, HW_Flag_Scalable|HW_Flag_EmbeddedMaskedOperation|HW_Flag_LowMaskedOperation|HW_Flag_HasRMWSemantics|HW_Flag_HasImmediateOperand)

src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Arm/Sve2.PlatformNotSupported.cs

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -3065,12 +3065,6 @@ internal Arm64() { }
30653065

30663066
// Saturating shift right narrow (bottom)
30673067

3068-
/// <summary>
3069-
/// svuint8_t svqshrnb[_n_u16](svuint16_t op1, uint64_t imm2)
3070-
/// UQSHRNB Zresult.B, Zop1.H, #imm2
3071-
/// </summary>
3072-
public static Vector<byte> ShiftRightArithmeticNarrowingSaturateEven(Vector<ushort> value, [ConstantExpected] byte count) { throw new PlatformNotSupportedException(); }
3073-
30743068
/// <summary>
30753069
/// svint16_t svqshrnb[_n_s32](svint32_t op1, uint64_t imm2)
30763070
/// SQSHRNB Zresult.H, Zop1.S, #imm2
@@ -3089,27 +3083,9 @@ internal Arm64() { }
30893083
/// </summary>
30903084
public static Vector<sbyte> ShiftRightArithmeticNarrowingSaturateEven(Vector<short> value, [ConstantExpected] byte count) { throw new PlatformNotSupportedException(); }
30913085

3092-
/// <summary>
3093-
/// svuint16_t svqshrnb[_n_u32](svuint32_t op1, uint64_t imm2)
3094-
/// UQSHRNB Zresult.H, Zop1.S, #imm2
3095-
/// </summary>
3096-
public static Vector<ushort> ShiftRightArithmeticNarrowingSaturateEven(Vector<uint> value, [ConstantExpected] byte count) { throw new PlatformNotSupportedException(); }
3097-
3098-
/// <summary>
3099-
/// svuint32_t svqshrnb[_n_u64](svuint64_t op1, uint64_t imm2)
3100-
/// UQSHRNB Zresult.S, Zop1.D, #imm2
3101-
/// </summary>
3102-
public static Vector<uint> ShiftRightArithmeticNarrowingSaturateEven(Vector<ulong> value, [ConstantExpected] byte count) { throw new PlatformNotSupportedException(); }
3103-
31043086

31053087
// Saturating shift right narrow (top)
31063088

3107-
/// <summary>
3108-
/// svuint8_t svqshrnt[_n_u16](svuint8_t even, svuint16_t op1, uint64_t imm2)
3109-
/// UQSHRNT Ztied.B, Zop1.H, #imm2
3110-
/// </summary>
3111-
public static Vector<byte> ShiftRightArithmeticNarrowingSaturateOdd(Vector<byte> even, Vector<ushort> value, [ConstantExpected] byte count) { throw new PlatformNotSupportedException(); }
3112-
31133089
/// <summary>
31143090
/// svint16_t svqshrnt[_n_s32](svint16_t even, svint32_t op1, uint64_t imm2)
31153091
/// SQSHRNT Ztied.H, Zop1.S, #imm2
@@ -3128,18 +3104,6 @@ internal Arm64() { }
31283104
/// </summary>
31293105
public static Vector<sbyte> ShiftRightArithmeticNarrowingSaturateOdd(Vector<sbyte> even, Vector<short> value, [ConstantExpected] byte count) { throw new PlatformNotSupportedException(); }
31303106

3131-
/// <summary>
3132-
/// svuint16_t svqshrnt[_n_u32](svuint16_t even, svuint32_t op1, uint64_t imm2)
3133-
/// UQSHRNT Ztied.H, Zop1.S, #imm2
3134-
/// </summary>
3135-
public static Vector<ushort> ShiftRightArithmeticNarrowingSaturateOdd(Vector<ushort> even, Vector<uint> value, [ConstantExpected] byte count) { throw new PlatformNotSupportedException(); }
3136-
3137-
/// <summary>
3138-
/// svuint32_t svqshrnt[_n_u64](svuint32_t even, svuint64_t op1, uint64_t imm2)
3139-
/// UQSHRNT Ztied.S, Zop1.D, #imm2
3140-
/// </summary>
3141-
public static Vector<uint> ShiftRightArithmeticNarrowingSaturateOdd(Vector<uint> even, Vector<ulong> value, [ConstantExpected] byte count) { throw new PlatformNotSupportedException(); }
3142-
31433107

31443108
// Saturating shift right unsigned narrow (bottom)
31453109

src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Arm/Sve2.cs

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -3088,12 +3088,6 @@ internal Arm64() { }
30883088

30893089
// Saturating shift right narrow (bottom)
30903090

3091-
/// <summary>
3092-
/// svuint8_t svqshrnb[_n_u16](svuint16_t op1, uint64_t imm2)
3093-
/// UQSHRNB Zresult.B, Zop1.H, #imm2
3094-
/// </summary>
3095-
public static Vector<byte> ShiftRightArithmeticNarrowingSaturateEven(Vector<ushort> value, [ConstantExpected] byte count) => ShiftRightArithmeticNarrowingSaturateEven(value, count);
3096-
30973091
/// <summary>
30983092
/// svint16_t svqshrnb[_n_s32](svint32_t op1, uint64_t imm2)
30993093
/// SQSHRNB Zresult.H, Zop1.S, #imm2
@@ -3112,27 +3106,9 @@ internal Arm64() { }
31123106
/// </summary>
31133107
public static Vector<sbyte> ShiftRightArithmeticNarrowingSaturateEven(Vector<short> value, [ConstantExpected] byte count) => ShiftRightArithmeticNarrowingSaturateEven(value, count);
31143108

3115-
/// <summary>
3116-
/// svuint16_t svqshrnb[_n_u32](svuint32_t op1, uint64_t imm2)
3117-
/// UQSHRNB Zresult.H, Zop1.S, #imm2
3118-
/// </summary>
3119-
public static Vector<ushort> ShiftRightArithmeticNarrowingSaturateEven(Vector<uint> value, [ConstantExpected] byte count) => ShiftRightArithmeticNarrowingSaturateEven(value, count);
3120-
3121-
/// <summary>
3122-
/// svuint32_t svqshrnb[_n_u64](svuint64_t op1, uint64_t imm2)
3123-
/// UQSHRNB Zresult.S, Zop1.D, #imm2
3124-
/// </summary>
3125-
public static Vector<uint> ShiftRightArithmeticNarrowingSaturateEven(Vector<ulong> value, [ConstantExpected] byte count) => ShiftRightArithmeticNarrowingSaturateEven(value, count);
3126-
31273109

31283110
// Saturating shift right narrow (top)
31293111

3130-
/// <summary>
3131-
/// svuint8_t svqshrnt[_n_u16](svuint8_t even, svuint16_t op1, uint64_t imm2)
3132-
/// UQSHRNT Ztied.B, Zop1.H, #imm2
3133-
/// </summary>
3134-
public static Vector<byte> ShiftRightArithmeticNarrowingSaturateOdd(Vector<byte> even, Vector<ushort> value, [ConstantExpected] byte count) => ShiftRightArithmeticNarrowingSaturateOdd(even, value, count);
3135-
31363112
/// <summary>
31373113
/// svint16_t svqshrnt[_n_s32](svint16_t even, svint32_t op1, uint64_t imm2)
31383114
/// SQSHRNT Ztied.H, Zop1.S, #imm2
@@ -3151,18 +3127,6 @@ internal Arm64() { }
31513127
/// </summary>
31523128
public static Vector<sbyte> ShiftRightArithmeticNarrowingSaturateOdd(Vector<sbyte> even, Vector<short> value, [ConstantExpected] byte count) => ShiftRightArithmeticNarrowingSaturateOdd(even, value, count);
31533129

3154-
/// <summary>
3155-
/// svuint16_t svqshrnt[_n_u32](svuint16_t even, svuint32_t op1, uint64_t imm2)
3156-
/// UQSHRNT Ztied.H, Zop1.S, #imm2
3157-
/// </summary>
3158-
public static Vector<ushort> ShiftRightArithmeticNarrowingSaturateOdd(Vector<ushort> even, Vector<uint> value, [ConstantExpected] byte count) => ShiftRightArithmeticNarrowingSaturateOdd(even, value, count);
3159-
3160-
/// <summary>
3161-
/// svuint32_t svqshrnt[_n_u64](svuint32_t even, svuint64_t op1, uint64_t imm2)
3162-
/// UQSHRNT Ztied.S, Zop1.D, #imm2
3163-
/// </summary>
3164-
public static Vector<uint> ShiftRightArithmeticNarrowingSaturateOdd(Vector<uint> even, Vector<ulong> value, [ConstantExpected] byte count) => ShiftRightArithmeticNarrowingSaturateOdd(even, value, count);
3165-
31663130

31673131
// Saturating shift right unsigned narrow (bottom)
31683132

src/libraries/System.Runtime.Intrinsics/ref/System.Runtime.Intrinsics.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6548,18 +6548,12 @@ internal Arm64() { }
65486548
public static System.Numerics.Vector<int> ShiftRightArithmeticAdd(System.Numerics.Vector<int> addend, System.Numerics.Vector<int> value, [ConstantExpected] byte count) { throw null; }
65496549
public static System.Numerics.Vector<long> ShiftRightArithmeticAdd(System.Numerics.Vector<long> addend, System.Numerics.Vector<long> value, [ConstantExpected] byte count) { throw null; }
65506550
public static System.Numerics.Vector<sbyte> ShiftRightArithmeticAdd(System.Numerics.Vector<sbyte> addend, System.Numerics.Vector<sbyte> value, [ConstantExpected] byte count) { throw null; }
6551-
public static System.Numerics.Vector<byte> ShiftRightArithmeticNarrowingSaturateEven(System.Numerics.Vector<ushort> value, [ConstantExpected] byte count) { throw null; }
65526551
public static System.Numerics.Vector<short> ShiftRightArithmeticNarrowingSaturateEven(System.Numerics.Vector<int> value, [ConstantExpected] byte count) { throw null; }
65536552
public static System.Numerics.Vector<int> ShiftRightArithmeticNarrowingSaturateEven(System.Numerics.Vector<long> value, [ConstantExpected] byte count) { throw null; }
65546553
public static System.Numerics.Vector<sbyte> ShiftRightArithmeticNarrowingSaturateEven(System.Numerics.Vector<short> value, [ConstantExpected] byte count) { throw null; }
6555-
public static System.Numerics.Vector<ushort> ShiftRightArithmeticNarrowingSaturateEven(System.Numerics.Vector<uint> value, [ConstantExpected] byte count) { throw null; }
6556-
public static System.Numerics.Vector<uint> ShiftRightArithmeticNarrowingSaturateEven(System.Numerics.Vector<ulong> value, [ConstantExpected] byte count) { throw null; }
6557-
public static System.Numerics.Vector<byte> ShiftRightArithmeticNarrowingSaturateOdd(System.Numerics.Vector<byte> even, System.Numerics.Vector<ushort> value, [ConstantExpected] byte count) { throw null; }
65586554
public static System.Numerics.Vector<short> ShiftRightArithmeticNarrowingSaturateOdd(System.Numerics.Vector<short> even, System.Numerics.Vector<int> value, [ConstantExpected] byte count) { throw null; }
65596555
public static System.Numerics.Vector<int> ShiftRightArithmeticNarrowingSaturateOdd(System.Numerics.Vector<int> even, System.Numerics.Vector<long> value, [ConstantExpected] byte count) { throw null; }
65606556
public static System.Numerics.Vector<sbyte> ShiftRightArithmeticNarrowingSaturateOdd(System.Numerics.Vector<sbyte> even, System.Numerics.Vector<short> value, [ConstantExpected] byte count) { throw null; }
6561-
public static System.Numerics.Vector<ushort> ShiftRightArithmeticNarrowingSaturateOdd(System.Numerics.Vector<ushort> even, System.Numerics.Vector<uint> value, [ConstantExpected] byte count) { throw null; }
6562-
public static System.Numerics.Vector<uint> ShiftRightArithmeticNarrowingSaturateOdd(System.Numerics.Vector<uint> even, System.Numerics.Vector<ulong> value, [ConstantExpected] byte count) { throw null; }
65636557
public static System.Numerics.Vector<byte> ShiftRightArithmeticNarrowingSaturateUnsignedEven(System.Numerics.Vector<short> value, [ConstantExpected] byte count) { throw null; }
65646558
public static System.Numerics.Vector<ushort> ShiftRightArithmeticNarrowingSaturateUnsignedEven(System.Numerics.Vector<int> value, [ConstantExpected] byte count) { throw null; }
65656559
public static System.Numerics.Vector<uint> ShiftRightArithmeticNarrowingSaturateUnsignedEven(System.Numerics.Vector<long> value, [ConstantExpected] byte count) { throw null; }

0 commit comments

Comments
 (0)