Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Sve.VectorTableLookup() #103989

Merged
merged 4 commits into from
Jun 26, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/coreclr/jit/hwintrinsiclistarm64sve.h
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ HARDWARE_INTRINSIC(Sve, TransposeEven,
HARDWARE_INTRINSIC(Sve, TransposeOdd, -1, 2, true, {INS_sve_trn2, INS_sve_trn2, INS_sve_trn2, INS_sve_trn2, INS_sve_trn2, INS_sve_trn2, INS_sve_trn2, INS_sve_trn2, INS_sve_trn2, INS_sve_trn2}, HW_Category_SIMD, HW_Flag_Scalable|HW_Flag_SpecialCodeGen)
HARDWARE_INTRINSIC(Sve, UnzipEven, -1, 2, true, {INS_sve_uzp1, INS_sve_uzp1, INS_sve_uzp1, INS_sve_uzp1, INS_sve_uzp1, INS_sve_uzp1, INS_sve_uzp1, INS_sve_uzp1, INS_sve_uzp1, INS_sve_uzp1}, HW_Category_SIMD, HW_Flag_Scalable|HW_Flag_SpecialCodeGen)
HARDWARE_INTRINSIC(Sve, UnzipOdd, -1, 2, true, {INS_sve_uzp2, INS_sve_uzp2, INS_sve_uzp2, INS_sve_uzp2, INS_sve_uzp2, INS_sve_uzp2, INS_sve_uzp2, INS_sve_uzp2, INS_sve_uzp2, INS_sve_uzp2}, HW_Category_SIMD, HW_Flag_Scalable|HW_Flag_SpecialCodeGen)
HARDWARE_INTRINSIC(Sve, VectorTableLookup, -1, 2, true, {INS_sve_tbl, INS_sve_tbl, INS_sve_tbl, INS_sve_tbl, INS_sve_tbl, INS_sve_tbl, INS_sve_tbl, INS_sve_tbl, INS_sve_tbl, INS_sve_tbl}, HW_Category_SIMD, HW_Flag_Scalable)
HARDWARE_INTRINSIC(Sve, Xor, -1, -1, false, {INS_sve_eor, INS_sve_eor, INS_sve_eor, INS_sve_eor, INS_sve_eor, INS_sve_eor, INS_sve_eor, INS_sve_eor, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_Scalable|HW_Flag_OptionalEmbeddedMaskedOperation|HW_Flag_HasRMWSemantics|HW_Flag_LowMaskedOperation)
HARDWARE_INTRINSIC(Sve, XorAcross, -1, -1, false, {INS_sve_eorv, INS_sve_eorv, INS_sve_eorv, INS_sve_eorv, INS_sve_eorv, INS_sve_eorv, INS_sve_eorv, INS_sve_eorv, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_Scalable|HW_Flag_EmbeddedMaskedOperation|HW_Flag_LowMaskedOperation)
HARDWARE_INTRINSIC(Sve, ZeroExtend16, -1, -1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_sve_uxth, INS_invalid, INS_sve_uxth, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_Scalable|HW_Flag_EmbeddedMaskedOperation|HW_Flag_LowMaskedOperation)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6624,6 +6624,69 @@ internal Arm64() { }
public static unsafe Vector<ulong> UnzipOdd(Vector<ulong> left, Vector<ulong> right) { throw new PlatformNotSupportedException(); }


/// Table lookup in single-vector table

/// <summary>
/// svuint8_t svtbl[_u8](svuint8_t data, svuint8_t indices)
/// TBL Zresult.B, Zdata.B, Zindices.B
/// </summary>
public static unsafe Vector<byte> VectorTableLookup(Vector<byte> data, Vector<byte> indices) { throw new PlatformNotSupportedException(); }

/// <summary>
/// svfloat64_t svtbl[_f64](svfloat64_t data, svuint64_t indices)
/// TBL Zresult.D, Zdata.D, Zindices.D
/// </summary>
public static unsafe Vector<double> VectorTableLookup(Vector<double> data, Vector<ulong> indices) { throw new PlatformNotSupportedException(); }

/// <summary>
/// svint16_t svtbl[_s16](svint16_t data, svuint16_t indices)
/// TBL Zresult.H, Zdata.H, Zindices.H
/// </summary>
public static unsafe Vector<short> VectorTableLookup(Vector<short> data, Vector<ushort> indices) { throw new PlatformNotSupportedException(); }

/// <summary>
/// svint32_t svtbl[_s32](svint32_t data, svuint32_t indices)
/// TBL Zresult.S, Zdata.S, Zindices.S
/// </summary>
public static unsafe Vector<int> VectorTableLookup(Vector<int> data, Vector<uint> indices) { throw new PlatformNotSupportedException(); }

/// <summary>
/// svint64_t svtbl[_s64](svint64_t data, svuint64_t indices)
/// TBL Zresult.D, Zdata.D, Zindices.D
SwapnilGaikwad marked this conversation as resolved.
Show resolved Hide resolved
/// </summary>
public static unsafe Vector<long> VectorTableLookup(Vector<long> data, Vector<ulong> indices) { throw new PlatformNotSupportedException(); }

/// <summary>
/// svint8_t svtbl[_s8](svint8_t data, svuint8_t indices)
/// TBL Zresult.B, Zdata.B, Zindices.B
/// </summary>
public static unsafe Vector<sbyte> VectorTableLookup(Vector<sbyte> data, Vector<byte> indices) { throw new PlatformNotSupportedException(); }

/// <summary>
/// svfloat32_t svtbl[_f32](svfloat32_t data, svuint32_t indices)
/// TBL Zresult.S, Zdata.S, Zindices.S
/// </summary>
public static unsafe Vector<float> VectorTableLookup(Vector<float> data, Vector<uint> indices) { throw new PlatformNotSupportedException(); }

/// <summary>
/// svuint16_t svtbl[_u16](svuint16_t data, svuint16_t indices)
/// TBL Zresult.H, Zdata.H, Zindices.H
/// </summary>
public static unsafe Vector<ushort> VectorTableLookup(Vector<ushort> data, Vector<ushort> indices) { throw new PlatformNotSupportedException(); }

/// <summary>
/// svuint32_t svtbl[_u32](svuint32_t data, svuint32_t indices)
/// TBL Zresult.S, Zdata.S, Zindices.S
/// </summary>
public static unsafe Vector<uint> VectorTableLookup(Vector<uint> data, Vector<uint> indices) { throw new PlatformNotSupportedException(); }

/// <summary>
/// svuint64_t svtbl[_u64](svuint64_t data, svuint64_t indices)
/// TBL Zresult.D, Zdata.D, Zindices.D
/// </summary>
public static unsafe Vector<ulong> VectorTableLookup(Vector<ulong> data, Vector<ulong> indices) { throw new PlatformNotSupportedException(); }


/// Xor : Bitwise exclusive OR

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6694,6 +6694,69 @@ internal Arm64() { }
public static unsafe Vector<ulong> UnzipOdd(Vector<ulong> left, Vector<ulong> right) => UnzipOdd(left, right);


/// Table lookup in single-vector table

/// <summary>
/// svuint8_t svtbl[_u8](svuint8_t data, svuint8_t indices)
/// TBL Zresult.B, {Zdata.B}, Zindices.B
/// </summary>
public static unsafe Vector<byte> VectorTableLookup(Vector<byte> data, Vector<byte> indices) => VectorTableLookup(data, indices);

/// <summary>
/// svfloat64_t svtbl[_f64](svfloat64_t data, svuint64_t indices)
/// TBL Zresult.D, {Zdata.D}, Zindices.D
/// </summary>
public static unsafe Vector<double> VectorTableLookup(Vector<double> data, Vector<ulong> indices) => VectorTableLookup(data, indices);

/// <summary>
/// svint16_t svtbl[_s16](svint16_t data, svuint16_t indices)
/// TBL Zresult.H, {Zdata.H}, Zindices.H
/// </summary>
public static unsafe Vector<short> VectorTableLookup(Vector<short> data, Vector<ushort> indices) => VectorTableLookup(data, indices);

/// <summary>
/// svint32_t svtbl[_s32](svint32_t data, svuint32_t indices)
/// TBL Zresult.S, {Zdata.S}, Zindices.S
/// </summary>
public static unsafe Vector<int> VectorTableLookup(Vector<int> data, Vector<uint> indices) => VectorTableLookup(data, indices);

/// <summary>
/// svint64_t svtbl[_s64](svint64_t data, svuint64_t indices)
/// TBL Zresult.D, {Zdata.D}, Zindices.D
/// </summary>
public static unsafe Vector<long> VectorTableLookup(Vector<long> data, Vector<ulong> indices) => VectorTableLookup(data, indices);

/// <summary>
/// svint8_t svtbl[_s8](svint8_t data, svuint8_t indices)
/// TBL Zresult.B, {Zdata.B}, Zindices.B
/// </summary>
public static unsafe Vector<sbyte> VectorTableLookup(Vector<sbyte> data, Vector<byte> indices) => VectorTableLookup(data, indices);

/// <summary>
/// svfloat32_t svtbl[_f32](svfloat32_t data, svuint32_t indices)
/// TBL Zresult.S, {Zdata.S}, Zindices.S
/// </summary>
public static unsafe Vector<float> VectorTableLookup(Vector<float> data, Vector<uint> indices) => VectorTableLookup(data, indices);

/// <summary>
/// svuint16_t svtbl[_u16](svuint16_t data, svuint16_t indices)
/// TBL Zresult.H, {Zdata.H}, Zindices.H
/// </summary>
public static unsafe Vector<ushort> VectorTableLookup(Vector<ushort> data, Vector<ushort> indices) => VectorTableLookup(data, indices);

/// <summary>
/// svuint32_t svtbl[_u32](svuint32_t data, svuint32_t indices)
/// TBL Zresult.S, {Zdata.S}, Zindices.S
/// </summary>
public static unsafe Vector<uint> VectorTableLookup(Vector<uint> data, Vector<uint> indices) => VectorTableLookup(data, indices);

/// <summary>
/// svuint64_t svtbl[_u64](svuint64_t data, svuint64_t indices)
/// TBL Zresult.D, {Zdata.D}, Zindices.D
/// </summary>
public static unsafe Vector<ulong> VectorTableLookup(Vector<ulong> data, Vector<ulong> indices) => VectorTableLookup(data, indices);


/// Xor : Bitwise exclusive OR

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5167,6 +5167,17 @@ internal Arm64() { }
public static System.Numerics.Vector<uint> UnzipOdd(System.Numerics.Vector<uint> left, System.Numerics.Vector<uint> right) { throw null; }
public static System.Numerics.Vector<ulong> UnzipOdd(System.Numerics.Vector<ulong> left, System.Numerics.Vector<ulong> right) { throw null; }

public static System.Numerics.Vector<byte> VectorTableLookup(System.Numerics.Vector<byte> data, System.Numerics.Vector<byte> indices) { throw null; }
public static System.Numerics.Vector<double> VectorTableLookup(System.Numerics.Vector<double> data, System.Numerics.Vector<ulong> indices) { throw null; }
public static System.Numerics.Vector<short> VectorTableLookup(System.Numerics.Vector<short> data, System.Numerics.Vector<ushort> indices) { throw null; }
public static System.Numerics.Vector<int> VectorTableLookup(System.Numerics.Vector<int> data, System.Numerics.Vector<uint> indices) { throw null; }
public static System.Numerics.Vector<long> VectorTableLookup(System.Numerics.Vector<long> data, System.Numerics.Vector<ulong> indices) { throw null; }
public static System.Numerics.Vector<sbyte> VectorTableLookup(System.Numerics.Vector<sbyte> data, System.Numerics.Vector<byte> indices) { throw null; }
public static System.Numerics.Vector<float> VectorTableLookup(System.Numerics.Vector<float> data, System.Numerics.Vector<uint> indices) { throw null; }
public static System.Numerics.Vector<ushort> VectorTableLookup(System.Numerics.Vector<ushort> data, System.Numerics.Vector<ushort> indices) { throw null; }
public static System.Numerics.Vector<uint> VectorTableLookup(System.Numerics.Vector<uint> data, System.Numerics.Vector<uint> indices) { throw null; }
public static System.Numerics.Vector<ulong> VectorTableLookup(System.Numerics.Vector<ulong> data, System.Numerics.Vector<ulong> indices) { throw null; }

public static System.Numerics.Vector<byte> Xor(System.Numerics.Vector<byte> left, System.Numerics.Vector<byte> right) { throw null; }
public static System.Numerics.Vector<short> Xor(System.Numerics.Vector<short> left, System.Numerics.Vector<short> right) { throw null; }
public static System.Numerics.Vector<int> Xor(System.Numerics.Vector<int> left, System.Numerics.Vector<int> right) { throw null; }
Expand Down
Loading
Loading