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.UnzipEven/Odd & Sve.ZipHighLow #101294

Merged
merged 5 commits into from
Apr 26, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
9 changes: 9 additions & 0 deletions src/coreclr/jit/hwintrinsiccodegenarm64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1443,6 +1443,15 @@ void CodeGen::genHWIntrinsic(GenTreeHWIntrinsic* node)
break;
}

case NI_Sve_UnzipEven:
case NI_Sve_UnzipOdd:
case NI_Sve_ZipHigh:
case NI_Sve_ZipLow:
// Use non-predicated version explicitly
GetEmitter()->emitIns_R_R_R(ins, emitSize, targetReg, op1Reg, op2Reg, opt,
INS_SCALABLE_OPTS_UNPREDICATED);
break;

default:
unreached();
}
Expand Down
5 changes: 5 additions & 0 deletions src/coreclr/jit/hwintrinsiclistarm64sve.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ HARDWARE_INTRINSIC(Sve, LoadVectorUInt16ZeroExtendToUInt64,
HARDWARE_INTRINSIC(Sve, LoadVectorUInt32ZeroExtendToInt64, -1, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_sve_ld1w, INS_invalid, INS_invalid, INS_invalid}, HW_Category_MemoryLoad, HW_Flag_Scalable|HW_Flag_ExplicitMaskedOperation|HW_Flag_LowMaskedOperation)
HARDWARE_INTRINSIC(Sve, LoadVectorUInt32ZeroExtendToUInt64, -1, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_sve_ld1w, INS_invalid, INS_invalid}, HW_Category_MemoryLoad, HW_Flag_Scalable|HW_Flag_ExplicitMaskedOperation|HW_Flag_LowMaskedOperation)

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, ZipHigh, -1, 2, true, {INS_sve_zip2, INS_sve_zip2, INS_sve_zip2, INS_sve_zip2, INS_sve_zip2, INS_sve_zip2, INS_sve_zip2, INS_sve_zip2, INS_sve_zip2, INS_sve_zip2}, HW_Category_SIMD, HW_Flag_Scalable|HW_Flag_SpecialCodeGen)
HARDWARE_INTRINSIC(Sve, ZipLow, -1, 2, true, {INS_sve_zip1, INS_sve_zip1, INS_sve_zip1, INS_sve_zip1, INS_sve_zip1, INS_sve_zip1, INS_sve_zip1, INS_sve_zip1, INS_sve_zip1, INS_sve_zip1}, HW_Category_SIMD, HW_Flag_Scalable|HW_Flag_SpecialCodeGen)


// ***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
// ISA Function name SIMD size NumArg EncodesExtraTypeArg Instructions Category Flags
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -806,5 +806,260 @@ internal Arm64() { }
public static unsafe Vector<ulong> LoadVectorUInt32ZeroExtendToUInt64(Vector<ulong> mask, uint* address) { throw new PlatformNotSupportedException(); }


/// UnzipEven : Concatenate even elements from two inputs

/// <summary>
/// svint8_t svuzp1[_s8](svint8_t op1, svint8_t op2)
/// </summary>
public static unsafe Vector<sbyte> UnzipEven(Vector<sbyte> left, Vector<sbyte> right) { throw new PlatformNotSupportedException(); }

/// <summary>
/// svint16_t svuzp1[_s16](svint16_t op1, svint16_t op2)
/// </summary>
public static unsafe Vector<short> UnzipEven(Vector<short> left, Vector<short> right) { throw new PlatformNotSupportedException(); }

/// <summary>
/// svint32_t svuzp1[_s32](svint32_t op1, svint32_t op2)
/// </summary>
public static unsafe Vector<int> UnzipEven(Vector<int> left, Vector<int> right) { throw new PlatformNotSupportedException(); }

/// <summary>
/// svint64_t svuzp1[_s64](svint64_t op1, svint64_t op2)
/// </summary>
public static unsafe Vector<long> UnzipEven(Vector<long> left, Vector<long> right) { throw new PlatformNotSupportedException(); }

/// <summary>
/// svuint8_t svuzp1[_u8](svuint8_t op1, svuint8_t op2)
/// svbool_t svuzp1_b8(svbool_t op1, svbool_t op2)
/// </summary>
public static unsafe Vector<byte> UnzipEven(Vector<byte> left, Vector<byte> right) { throw new PlatformNotSupportedException(); }

/// <summary>
/// svuint16_t svuzp1[_u16](svuint16_t op1, svuint16_t op2)
/// svbool_t svuzp1_b16(svbool_t op1, svbool_t op2)
/// </summary>
public static unsafe Vector<ushort> UnzipEven(Vector<ushort> left, Vector<ushort> right) { throw new PlatformNotSupportedException(); }

/// <summary>
/// svuint32_t svuzp1[_u32](svuint32_t op1, svuint32_t op2)
/// svbool_t svuzp1_b32(svbool_t op1, svbool_t op2)
/// </summary>
public static unsafe Vector<uint> UnzipEven(Vector<uint> left, Vector<uint> right) { throw new PlatformNotSupportedException(); }

/// <summary>
/// svuint64_t svuzp1[_u64](svuint64_t op1, svuint64_t op2)
/// svbool_t svuzp1_b64(svbool_t op1, svbool_t op2)
/// </summary>
public static unsafe Vector<ulong> UnzipEven(Vector<ulong> left, Vector<ulong> right) { throw new PlatformNotSupportedException(); }

/// <summary>
/// svfloat32_t svuzp1[_f32](svfloat32_t op1, svfloat32_t op2)
/// </summary>
public static unsafe Vector<float> UnzipEven(Vector<float> left, Vector<float> right) { throw new PlatformNotSupportedException(); }

/// <summary>
/// svfloat64_t svuzp1[_f64](svfloat64_t op1, svfloat64_t op2)
/// </summary>
public static unsafe Vector<double> UnzipEven(Vector<double> left, Vector<double> right) { throw new PlatformNotSupportedException(); }


/// UnzipOdd : Concatenate odd elements from two inputs

/// <summary>
/// svuint8_t svuzp2[_u8](svuint8_t op1, svuint8_t op2)
/// svbool_t svuzp2_b8(svbool_t op1, svbool_t op2)
/// </summary>
public static unsafe Vector<byte> UnzipOdd(Vector<byte> left, Vector<byte> right) { throw new PlatformNotSupportedException(); }

/// <summary>
/// svfloat64_t svuzp2[_f64](svfloat64_t op1, svfloat64_t op2)
/// </summary>
public static unsafe Vector<double> UnzipOdd(Vector<double> left, Vector<double> right) { throw new PlatformNotSupportedException(); }

/// <summary>
/// svint16_t svuzp2[_s16](svint16_t op1, svint16_t op2)
/// UZP2 Zresult.H, Zop1.H, Zop2.H
/// </summary>
public static unsafe Vector<short> UnzipOdd(Vector<short> left, Vector<short> right) { throw new PlatformNotSupportedException(); }

/// <summary>
/// svint32_t svuzp2[_s32](svint32_t op1, svint32_t op2)
/// </summary>
public static unsafe Vector<int> UnzipOdd(Vector<int> left, Vector<int> right) { throw new PlatformNotSupportedException(); }

/// <summary>
/// svint64_t svuzp2[_s64](svint64_t op1, svint64_t op2)
/// </summary>
public static unsafe Vector<long> UnzipOdd(Vector<long> left, Vector<long> right) { throw new PlatformNotSupportedException(); }

/// <summary>
/// svint8_t svuzp2[_s8](svint8_t op1, svint8_t op2)
/// </summary>
public static unsafe Vector<sbyte> UnzipOdd(Vector<sbyte> left, Vector<sbyte> right) { throw new PlatformNotSupportedException(); }

/// <summary>
/// svfloat32_t svuzp2[_f32](svfloat32_t op1, svfloat32_t op2)
/// </summary>
public static unsafe Vector<float> UnzipOdd(Vector<float> left, Vector<float> right) { throw new PlatformNotSupportedException(); }

/// <summary>
/// svuint16_t svuzp2[_u16](svuint16_t op1, svuint16_t op2)
/// svbool_t svuzp2_b16(svbool_t op1, svbool_t op2)
/// </summary>
public static unsafe Vector<ushort> UnzipOdd(Vector<ushort> left, Vector<ushort> right) { throw new PlatformNotSupportedException(); }

/// <summary>
/// svuint32_t svuzp2[_u32](svuint32_t op1, svuint32_t op2)
/// svbool_t svuzp2_b32(svbool_t op1, svbool_t op2)
/// </summary>
public static unsafe Vector<uint> UnzipOdd(Vector<uint> left, Vector<uint> right) { throw new PlatformNotSupportedException(); }

/// <summary>
/// svuint64_t svuzp2[_u64](svuint64_t op1, svuint64_t op2)
/// svbool_t svuzp2_b64(svbool_t op1, svbool_t op2)
/// </summary>
public static unsafe Vector<ulong> UnzipOdd(Vector<ulong> left, Vector<ulong> right) { throw new PlatformNotSupportedException(); }


/// ZipHigh : Interleave elements from high halves of two inputs

/// <summary>
/// svuint8_t svzip2[_u8](svuint8_t op1, svuint8_t op2)
/// ZIP2 Zresult.B, Zop1.B, Zop2.B
/// svbool_t svzip2_b8(svbool_t op1, svbool_t op2)
/// ZIP2 Presult.B, Pop1.B, Pop2.B
/// </summary>
public static unsafe Vector<byte> ZipHigh(Vector<byte> left, Vector<byte> right) { throw new PlatformNotSupportedException(); }

/// <summary>
/// svfloat64_t svzip2[_f64](svfloat64_t op1, svfloat64_t op2)
/// ZIP2 Zresult.D, Zop1.D, Zop2.D
/// </summary>
public static unsafe Vector<double> ZipHigh(Vector<double> left, Vector<double> right) { throw new PlatformNotSupportedException(); }

/// <summary>
/// svint16_t svzip2[_s16](svint16_t op1, svint16_t op2)
/// ZIP2 Zresult.H, Zop1.H, Zop2.H
/// </summary>
public static unsafe Vector<short> ZipHigh(Vector<short> left, Vector<short> right) { throw new PlatformNotSupportedException(); }

/// <summary>
/// svint32_t svzip2[_s32](svint32_t op1, svint32_t op2)
/// ZIP2 Zresult.S, Zop1.S, Zop2.S
/// </summary>
public static unsafe Vector<int> ZipHigh(Vector<int> left, Vector<int> right) { throw new PlatformNotSupportedException(); }

/// <summary>
/// svint64_t svzip2[_s64](svint64_t op1, svint64_t op2)
/// ZIP2 Zresult.D, Zop1.D, Zop2.D
/// </summary>
public static unsafe Vector<long> ZipHigh(Vector<long> left, Vector<long> right) { throw new PlatformNotSupportedException(); }

/// <summary>
/// svint8_t svzip2[_s8](svint8_t op1, svint8_t op2)
/// ZIP2 Zresult.B, Zop1.B, Zop2.B
/// </summary>
public static unsafe Vector<sbyte> ZipHigh(Vector<sbyte> left, Vector<sbyte> right) { throw new PlatformNotSupportedException(); }

/// <summary>
/// svfloat32_t svzip2[_f32](svfloat32_t op1, svfloat32_t op2)
/// ZIP2 Zresult.S, Zop1.S, Zop2.S
/// </summary>
public static unsafe Vector<float> ZipHigh(Vector<float> left, Vector<float> right) { throw new PlatformNotSupportedException(); }

/// <summary>
/// svuint16_t svzip2[_u16](svuint16_t op1, svuint16_t op2)
/// ZIP2 Zresult.H, Zop1.H, Zop2.H
/// svbool_t svzip2_b16(svbool_t op1, svbool_t op2)
/// ZIP2 Presult.H, Pop1.H, Pop2.H
/// </summary>
public static unsafe Vector<ushort> ZipHigh(Vector<ushort> left, Vector<ushort> right) { throw new PlatformNotSupportedException(); }

/// <summary>
/// svuint32_t svzip2[_u32](svuint32_t op1, svuint32_t op2)
/// ZIP2 Zresult.S, Zop1.S, Zop2.S
/// svbool_t svzip2_b32(svbool_t op1, svbool_t op2)
/// ZIP2 Presult.S, Pop1.S, Pop2.S
/// </summary>
public static unsafe Vector<uint> ZipHigh(Vector<uint> left, Vector<uint> right) { throw new PlatformNotSupportedException(); }

/// <summary>
/// svuint64_t svzip2[_u64](svuint64_t op1, svuint64_t op2)
/// ZIP2 Zresult.D, Zop1.D, Zop2.D
/// svbool_t svzip2_b64(svbool_t op1, svbool_t op2)
/// ZIP2 Presult.D, Pop1.D, Pop2.D
/// </summary>
public static unsafe Vector<ulong> ZipHigh(Vector<ulong> left, Vector<ulong> right) { throw new PlatformNotSupportedException(); }


/// ZipLow : Interleave elements from low halves of two inputs

/// <summary>
/// svuint8_t svzip1[_u8](svuint8_t op1, svuint8_t op2)
/// ZIP1 Zresult.B, Zop1.B, Zop2.B
/// svbool_t svzip1_b8(svbool_t op1, svbool_t op2)
/// ZIP1 Presult.B, Pop1.B, Pop2.B
/// </summary>
public static unsafe Vector<byte> ZipLow(Vector<byte> left, Vector<byte> right) { throw new PlatformNotSupportedException(); }

/// <summary>
/// svfloat64_t svzip1[_f64](svfloat64_t op1, svfloat64_t op2)
/// ZIP1 Zresult.D, Zop1.D, Zop2.D
/// </summary>
public static unsafe Vector<double> ZipLow(Vector<double> left, Vector<double> right) { throw new PlatformNotSupportedException(); }

/// <summary>
/// svint16_t svzip1[_s16](svint16_t op1, svint16_t op2)
/// ZIP1 Zresult.H, Zop1.H, Zop2.H
/// </summary>
public static unsafe Vector<short> ZipLow(Vector<short> left, Vector<short> right) { throw new PlatformNotSupportedException(); }

/// <summary>
/// svint32_t svzip1[_s32](svint32_t op1, svint32_t op2)
/// ZIP1 Zresult.S, Zop1.S, Zop2.S
/// </summary>
public static unsafe Vector<int> ZipLow(Vector<int> left, Vector<int> right) { throw new PlatformNotSupportedException(); }

/// <summary>
/// svint64_t svzip1[_s64](svint64_t op1, svint64_t op2)
/// ZIP1 Zresult.D, Zop1.D, Zop2.D
/// </summary>
public static unsafe Vector<long> ZipLow(Vector<long> left, Vector<long> right) { throw new PlatformNotSupportedException(); }

/// <summary>
/// svint8_t svzip1[_s8](svint8_t op1, svint8_t op2)
/// ZIP1 Zresult.B, Zop1.B, Zop2.B
/// </summary>
public static unsafe Vector<sbyte> ZipLow(Vector<sbyte> left, Vector<sbyte> right) { throw new PlatformNotSupportedException(); }

/// <summary>
/// svfloat32_t svzip1[_f32](svfloat32_t op1, svfloat32_t op2)
/// ZIP1 Zresult.S, Zop1.S, Zop2.S
/// </summary>
public static unsafe Vector<float> ZipLow(Vector<float> left, Vector<float> right) { throw new PlatformNotSupportedException(); }

/// <summary>
/// svuint16_t svzip1[_u16](svuint16_t op1, svuint16_t op2)
/// ZIP1 Zresult.H, Zop1.H, Zop2.H
/// svbool_t svzip1_b16(svbool_t op1, svbool_t op2)
/// ZIP1 Presult.H, Pop1.H, Pop2.H
/// </summary>
public static unsafe Vector<ushort> ZipLow(Vector<ushort> left, Vector<ushort> right) { throw new PlatformNotSupportedException(); }

/// <summary>
/// svuint32_t svzip1[_u32](svuint32_t op1, svuint32_t op2)
/// ZIP1 Zresult.S, Zop1.S, Zop2.S
/// svbool_t svzip1_b32(svbool_t op1, svbool_t op2)
/// ZIP1 Presult.S, Pop1.S, Pop2.S
/// </summary>
public static unsafe Vector<uint> ZipLow(Vector<uint> left, Vector<uint> right) { throw new PlatformNotSupportedException(); }

/// <summary>
/// svuint64_t svzip1[_u64](svuint64_t op1, svuint64_t op2)
/// ZIP1 Zresult.D, Zop1.D, Zop2.D
/// svbool_t svzip1_b64(svbool_t op1, svbool_t op2)
/// ZIP1 Presult.D, Pop1.D, Pop2.D
/// </summary>
public static unsafe Vector<ulong> ZipLow(Vector<ulong> left, Vector<ulong> right) { throw new PlatformNotSupportedException(); }
}
}
Loading
Loading