Skip to content

Commit a8919e3

Browse files
Add GatherVectorWithByteOffsetFirstFaulting
1 parent ad5ec2e commit a8919e3

File tree

11 files changed

+919
-0
lines changed

11 files changed

+919
-0
lines changed

src/coreclr/jit/gentree.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -26548,6 +26548,7 @@ bool GenTreeHWIntrinsic::OperIsMemoryLoad(GenTree** pAddr) const
2654826548
break;
2654926549

2655026550
case NI_Sve_GatherVectorWithByteOffsets:
26551+
case NI_Sve_GatherVectorWithByteOffsetFirstFaulting:
2655126552
case NI_Sve_LoadVector:
2655226553
case NI_Sve_LoadVectorNonTemporal:
2655326554
case NI_Sve_LoadVector128AndReplicateToVector:

src/coreclr/jit/hwintrinsic.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -2228,6 +2228,7 @@ GenTree* Compiler::impHWIntrinsic(NamedIntrinsic intrinsic,
22282228
case NI_Sve_GatherVectorUInt32WithByteOffsetsZeroExtend:
22292229
case NI_Sve_GatherVectorUInt32ZeroExtend:
22302230
case NI_Sve_GatherVectorWithByteOffsets:
2231+
case NI_Sve_GatherVectorWithByteOffsetFirstFaulting:
22312232
assert(varTypeIsSIMD(op3->TypeGet()));
22322233
if (numArgs == 3)
22332234
{

src/coreclr/jit/hwintrinsiccodegenarm64.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -2101,6 +2101,7 @@ void CodeGen::genHWIntrinsic(GenTreeHWIntrinsic* node)
21012101
}
21022102

21032103
case NI_Sve_GatherVectorWithByteOffsets:
2104+
case NI_Sve_GatherVectorWithByteOffsetFirstFaulting:
21042105
{
21052106
assert(!varTypeIsSIMD(intrin.op2->gtType));
21062107
assert(intrin.numOperands == 3);

src/coreclr/jit/hwintrinsiclistarm64sve.h

+1
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ HARDWARE_INTRINSIC(Sve, GatherVectorUInt16WithByteOffsetsZeroExtend,
121121
HARDWARE_INTRINSIC(Sve, GatherVectorUInt16ZeroExtend, -1, -1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_sve_ld1h, INS_sve_ld1h, INS_sve_ld1h, INS_sve_ld1h, INS_invalid, INS_invalid}, HW_Category_MemoryLoad, HW_Flag_Scalable|HW_Flag_SpecialCodeGen|HW_Flag_ExplicitMaskedOperation|HW_Flag_LowMaskedOperation)
122122
HARDWARE_INTRINSIC(Sve, GatherVectorUInt32WithByteOffsetsZeroExtend, -1, -1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_sve_ld1w, INS_sve_ld1w, INS_sve_ld1w, INS_sve_ld1w, INS_invalid, INS_invalid}, HW_Category_MemoryLoad, HW_Flag_Scalable|HW_Flag_SpecialCodeGen|HW_Flag_ExplicitMaskedOperation|HW_Flag_LowMaskedOperation)
123123
HARDWARE_INTRINSIC(Sve, GatherVectorUInt32ZeroExtend, -1, -1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_sve_ld1w, INS_sve_ld1w, INS_sve_ld1w, INS_sve_ld1w, INS_invalid, INS_invalid}, HW_Category_MemoryLoad, HW_Flag_Scalable|HW_Flag_SpecialCodeGen|HW_Flag_ExplicitMaskedOperation|HW_Flag_LowMaskedOperation)
124+
HARDWARE_INTRINSIC(Sve, GatherVectorWithByteOffsetFirstFaulting, -1, 3, true, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_sve_ldff1w, INS_sve_ldff1w, INS_sve_ldff1d, INS_sve_ldff1d, INS_sve_ldff1w, INS_sve_ldff1d}, HW_Category_MemoryLoad, HW_Flag_Scalable|HW_Flag_SpecialCodeGen|HW_Flag_ExplicitMaskedOperation|HW_Flag_LowMaskedOperation|HW_Flag_SpecialSideEffectMask)
124125
HARDWARE_INTRINSIC(Sve, GatherVectorWithByteOffsets, -1, 3, true, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_sve_ld1w, INS_sve_ld1w, INS_sve_ld1d, INS_sve_ld1d, INS_sve_ld1w, INS_sve_ld1d}, HW_Category_MemoryLoad, HW_Flag_Scalable|HW_Flag_SpecialCodeGen|HW_Flag_ExplicitMaskedOperation|HW_Flag_LowMaskedOperation)
125126
HARDWARE_INTRINSIC(Sve, GetActiveElementCount, -1, 2, true, {INS_sve_cntp, INS_sve_cntp, INS_sve_cntp, INS_sve_cntp, INS_sve_cntp, INS_sve_cntp, INS_sve_cntp, INS_sve_cntp, INS_sve_cntp, INS_sve_cntp}, HW_Category_SIMD, HW_Flag_Scalable|HW_Flag_BaseTypeFromFirstArg|HW_Flag_ExplicitMaskedOperation)
126127
HARDWARE_INTRINSIC(Sve, GetFfrByte, -1, 0, false, {INS_invalid, INS_sve_rdffr, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_Scalable|HW_Flag_ReturnsPerElementMask|HW_Flag_SpecialSideEffectMask)

src/coreclr/jit/lsraarm64.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -2081,6 +2081,7 @@ int LinearScan::BuildHWIntrinsic(GenTreeHWIntrinsic* intrinsicTree, int* pDstCou
20812081
case NI_Sve_GatherVectorUInt16ZeroExtend:
20822082
case NI_Sve_GatherVectorUInt32WithByteOffsetsZeroExtend:
20832083
case NI_Sve_GatherVectorUInt32ZeroExtend:
2084+
case NI_Sve_GatherVectorWithByteOffsetFirstFaulting:
20842085
assert(intrinsicTree->OperIsMemoryLoadOrStore());
20852086
FALLTHROUGH;
20862087

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

+75
Original file line numberDiff line numberDiff line change
@@ -4263,6 +4263,81 @@ internal Arm64() { }
42634263
public static unsafe Vector<ulong> GatherVectorUInt32ZeroExtend(Vector<ulong> mask, uint* address, Vector<ulong> indices) { throw new PlatformNotSupportedException(); }
42644264

42654265

4266+
/// Unextended load, first-faulting
4267+
4268+
/// <summary>
4269+
/// svfloat64_t svldff1_gather_[s64]offset[_f64](svbool_t pg, const float64_t *base, svint64_t offsets)
4270+
/// LDFF1D Zresult.D, Pg/Z, [Xbase, Zoffsets.D]
4271+
/// </summary>
4272+
public static unsafe Vector<double> GatherVectorWithByteOffsetFirstFaulting(Vector<double> mask, double* address, Vector<long> offsets) { throw new PlatformNotSupportedException(); }
4273+
4274+
/// <summary>
4275+
/// svfloat64_t svldff1_gather_[u64]offset[_f64](svbool_t pg, const float64_t *base, svuint64_t offsets)
4276+
/// LDFF1D Zresult.D, Pg/Z, [Xbase, Zoffsets.D]
4277+
/// </summary>
4278+
public static unsafe Vector<double> GatherVectorWithByteOffsetFirstFaulting(Vector<double> mask, double* address, Vector<ulong> offsets) { throw new PlatformNotSupportedException(); }
4279+
4280+
/// <summary>
4281+
/// svint32_t svldff1_gather_[s32]offset[_s32](svbool_t pg, const int32_t *base, svint32_t offsets)
4282+
/// LDFF1W Zresult.S, Pg/Z, [Xbase, Zoffsets.S, SXTW]
4283+
/// </summary>
4284+
public static unsafe Vector<int> GatherVectorWithByteOffsetFirstFaulting(Vector<int> mask, int* address, Vector<int> offsets) { throw new PlatformNotSupportedException(); }
4285+
4286+
/// <summary>
4287+
/// svint32_t svldff1_gather_[u32]offset[_s32](svbool_t pg, const int32_t *base, svuint32_t offsets)
4288+
/// LDFF1W Zresult.S, Pg/Z, [Xbase, Zoffsets.S, UXTW]
4289+
/// </summary>
4290+
public static unsafe Vector<int> GatherVectorWithByteOffsetFirstFaulting(Vector<int> mask, int* address, Vector<uint> offsets) { throw new PlatformNotSupportedException(); }
4291+
4292+
/// <summary>
4293+
/// svint64_t svldff1_gather_[s64]offset[_s64](svbool_t pg, const int64_t *base, svint64_t offsets)
4294+
/// LDFF1D Zresult.D, Pg/Z, [Xbase, Zoffsets.D]
4295+
/// </summary>
4296+
public static unsafe Vector<long> GatherVectorWithByteOffsetFirstFaulting(Vector<long> mask, long* address, Vector<long> offsets) { throw new PlatformNotSupportedException(); }
4297+
4298+
/// <summary>
4299+
/// svint64_t svldff1_gather_[u64]offset[_s64](svbool_t pg, const int64_t *base, svuint64_t offsets)
4300+
/// LDFF1D Zresult.D, Pg/Z, [Xbase, Zoffsets.D]
4301+
/// </summary>
4302+
public static unsafe Vector<long> GatherVectorWithByteOffsetFirstFaulting(Vector<long> mask, long* address, Vector<ulong> offsets) { throw new PlatformNotSupportedException(); }
4303+
4304+
/// <summary>
4305+
/// svfloat32_t svldff1_gather_[s32]offset[_f32](svbool_t pg, const float32_t *base, svint32_t offsets)
4306+
/// LDFF1W Zresult.S, Pg/Z, [Xbase, Zoffsets.S, SXTW]
4307+
/// </summary>
4308+
public static unsafe Vector<float> GatherVectorWithByteOffsetFirstFaulting(Vector<float> mask, float* address, Vector<int> offsets) { throw new PlatformNotSupportedException(); }
4309+
4310+
/// <summary>
4311+
/// svfloat32_t svldff1_gather_[u32]offset[_f32](svbool_t pg, const float32_t *base, svuint32_t offsets)
4312+
/// LDFF1W Zresult.S, Pg/Z, [Xbase, Zoffsets.S, UXTW]
4313+
/// </summary>
4314+
public static unsafe Vector<float> GatherVectorWithByteOffsetFirstFaulting(Vector<float> mask, float* address, Vector<uint> offsets) { throw new PlatformNotSupportedException(); }
4315+
4316+
/// <summary>
4317+
/// svuint32_t svldff1_gather_[s32]offset[_u32](svbool_t pg, const uint32_t *base, svint32_t offsets)
4318+
/// LDFF1W Zresult.S, Pg/Z, [Xbase, Zoffsets.S, SXTW]
4319+
/// </summary>
4320+
public static unsafe Vector<uint> GatherVectorWithByteOffsetFirstFaulting(Vector<uint> mask, uint* address, Vector<int> offsets) { throw new PlatformNotSupportedException(); }
4321+
4322+
/// <summary>
4323+
/// svuint32_t svldff1_gather_[u32]offset[_u32](svbool_t pg, const uint32_t *base, svuint32_t offsets)
4324+
/// LDFF1W Zresult.S, Pg/Z, [Xbase, Zoffsets.S, UXTW]
4325+
/// </summary>
4326+
public static unsafe Vector<uint> GatherVectorWithByteOffsetFirstFaulting(Vector<uint> mask, uint* address, Vector<uint> offsets) { throw new PlatformNotSupportedException(); }
4327+
4328+
/// <summary>
4329+
/// svuint64_t svldff1_gather_[s64]offset[_u64](svbool_t pg, const uint64_t *base, svint64_t offsets)
4330+
/// LDFF1D Zresult.D, Pg/Z, [Xbase, Zoffsets.D]
4331+
/// </summary>
4332+
public static unsafe Vector<ulong> GatherVectorWithByteOffsetFirstFaulting(Vector<ulong> mask, ulong* address, Vector<long> offsets) { throw new PlatformNotSupportedException(); }
4333+
4334+
/// <summary>
4335+
/// svuint64_t svldff1_gather_[u64]offset[_u64](svbool_t pg, const uint64_t *base, svuint64_t offsets)
4336+
/// LDFF1D Zresult.D, Pg/Z, [Xbase, Zoffsets.D]
4337+
/// </summary>
4338+
public static unsafe Vector<ulong> GatherVectorWithByteOffsetFirstFaulting(Vector<ulong> mask, ulong* address, Vector<ulong> offsets) { throw new PlatformNotSupportedException(); }
4339+
4340+
42664341
/// Unextended load
42674342

42684343
/// <summary>

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

+75
Original file line numberDiff line numberDiff line change
@@ -4321,6 +4321,81 @@ internal Arm64() { }
43214321
public static unsafe Vector<ulong> GatherVectorUInt32ZeroExtend(Vector<ulong> mask, uint* address, Vector<ulong> indices) => GatherVectorUInt32ZeroExtend(mask, address, indices);
43224322

43234323

4324+
/// Unextended load, first-faulting
4325+
4326+
/// <summary>
4327+
/// svfloat64_t svldff1_gather_[s64]offset[_f64](svbool_t pg, const float64_t *base, svint64_t offsets)
4328+
/// LDFF1D Zresult.D, Pg/Z, [Xbase, Zoffsets.D]
4329+
/// </summary>
4330+
public static unsafe Vector<double> GatherVectorWithByteOffsetFirstFaulting(Vector<double> mask, double* address, Vector<long> offsets) => GatherVectorWithByteOffsetFirstFaulting(mask, address, offsets);
4331+
4332+
/// <summary>
4333+
/// svfloat64_t svldff1_gather_[u64]offset[_f64](svbool_t pg, const float64_t *base, svuint64_t offsets)
4334+
/// LDFF1D Zresult.D, Pg/Z, [Xbase, Zoffsets.D]
4335+
/// </summary>
4336+
public static unsafe Vector<double> GatherVectorWithByteOffsetFirstFaulting(Vector<double> mask, double* address, Vector<ulong> offsets) => GatherVectorWithByteOffsetFirstFaulting(mask, address, offsets);
4337+
4338+
/// <summary>
4339+
/// svint32_t svldff1_gather_[s32]offset[_s32](svbool_t pg, const int32_t *base, svint32_t offsets)
4340+
/// LDFF1W Zresult.S, Pg/Z, [Xbase, Zoffsets.S, SXTW]
4341+
/// </summary>
4342+
public static unsafe Vector<int> GatherVectorWithByteOffsetFirstFaulting(Vector<int> mask, int* address, Vector<int> offsets) => GatherVectorWithByteOffsetFirstFaulting(mask, address, offsets);
4343+
4344+
/// <summary>
4345+
/// svint32_t svldff1_gather_[u32]offset[_s32](svbool_t pg, const int32_t *base, svuint32_t offsets)
4346+
/// LDFF1W Zresult.S, Pg/Z, [Xbase, Zoffsets.S, UXTW]
4347+
/// </summary>
4348+
public static unsafe Vector<int> GatherVectorWithByteOffsetFirstFaulting(Vector<int> mask, int* address, Vector<uint> offsets) => GatherVectorWithByteOffsetFirstFaulting(mask, address, offsets);
4349+
4350+
/// <summary>
4351+
/// svint64_t svldff1_gather_[s64]offset[_s64](svbool_t pg, const int64_t *base, svint64_t offsets)
4352+
/// LDFF1D Zresult.D, Pg/Z, [Xbase, Zoffsets.D]
4353+
/// </summary>
4354+
public static unsafe Vector<long> GatherVectorWithByteOffsetFirstFaulting(Vector<long> mask, long* address, Vector<long> offsets) => GatherVectorWithByteOffsetFirstFaulting(mask, address, offsets);
4355+
4356+
/// <summary>
4357+
/// svint64_t svldff1_gather_[u64]offset[_s64](svbool_t pg, const int64_t *base, svuint64_t offsets)
4358+
/// LDFF1D Zresult.D, Pg/Z, [Xbase, Zoffsets.D]
4359+
/// </summary>
4360+
public static unsafe Vector<long> GatherVectorWithByteOffsetFirstFaulting(Vector<long> mask, long* address, Vector<ulong> offsets) => GatherVectorWithByteOffsetFirstFaulting(mask, address, offsets);
4361+
4362+
/// <summary>
4363+
/// svfloat32_t svldff1_gather_[s32]offset[_f32](svbool_t pg, const float32_t *base, svint32_t offsets)
4364+
/// LDFF1W Zresult.S, Pg/Z, [Xbase, Zoffsets.S, SXTW]
4365+
/// </summary>
4366+
public static unsafe Vector<float> GatherVectorWithByteOffsetFirstFaulting(Vector<float> mask, float* address, Vector<int> offsets) => GatherVectorWithByteOffsetFirstFaulting(mask, address, offsets);
4367+
4368+
/// <summary>
4369+
/// svfloat32_t svldff1_gather_[u32]offset[_f32](svbool_t pg, const float32_t *base, svuint32_t offsets)
4370+
/// LDFF1W Zresult.S, Pg/Z, [Xbase, Zoffsets.S, UXTW]
4371+
/// </summary>
4372+
public static unsafe Vector<float> GatherVectorWithByteOffsetFirstFaulting(Vector<float> mask, float* address, Vector<uint> offsets) => GatherVectorWithByteOffsetFirstFaulting(mask, address, offsets);
4373+
4374+
/// <summary>
4375+
/// svuint32_t svldff1_gather_[s32]offset[_u32](svbool_t pg, const uint32_t *base, svint32_t offsets)
4376+
/// LDFF1W Zresult.S, Pg/Z, [Xbase, Zoffsets.S, SXTW]
4377+
/// </summary>
4378+
public static unsafe Vector<uint> GatherVectorWithByteOffsetFirstFaulting(Vector<uint> mask, uint* address, Vector<int> offsets) => GatherVectorWithByteOffsetFirstFaulting(mask, address, offsets);
4379+
4380+
/// <summary>
4381+
/// svuint32_t svldff1_gather_[u32]offset[_u32](svbool_t pg, const uint32_t *base, svuint32_t offsets)
4382+
/// LDFF1W Zresult.S, Pg/Z, [Xbase, Zoffsets.S, UXTW]
4383+
/// </summary>
4384+
public static unsafe Vector<uint> GatherVectorWithByteOffsetFirstFaulting(Vector<uint> mask, uint* address, Vector<uint> offsets) => GatherVectorWithByteOffsetFirstFaulting(mask, address, offsets);
4385+
4386+
/// <summary>
4387+
/// svuint64_t svldff1_gather_[s64]offset[_u64](svbool_t pg, const uint64_t *base, svint64_t offsets)
4388+
/// LDFF1D Zresult.D, Pg/Z, [Xbase, Zoffsets.D]
4389+
/// </summary>
4390+
public static unsafe Vector<ulong> GatherVectorWithByteOffsetFirstFaulting(Vector<ulong> mask, ulong* address, Vector<long> offsets) => GatherVectorWithByteOffsetFirstFaulting(mask, address, offsets);
4391+
4392+
/// <summary>
4393+
/// svuint64_t svldff1_gather_[u64]offset[_u64](svbool_t pg, const uint64_t *base, svuint64_t offsets)
4394+
/// LDFF1D Zresult.D, Pg/Z, [Xbase, Zoffsets.D]
4395+
/// </summary>
4396+
public static unsafe Vector<ulong> GatherVectorWithByteOffsetFirstFaulting(Vector<ulong> mask, ulong* address, Vector<ulong> offsets) => GatherVectorWithByteOffsetFirstFaulting(mask, address, offsets);
4397+
4398+
43244399
/// Unextended load
43254400

43264401
/// <summary>

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

+13
Original file line numberDiff line numberDiff line change
@@ -4985,6 +4985,19 @@ internal Arm64() { }
49854985
public static System.Numerics.Vector<ulong> GatherVectorUInt32ZeroExtend(System.Numerics.Vector<ulong> mask, System.Numerics.Vector<ulong> addresses) { throw null; }
49864986
public static unsafe System.Numerics.Vector<ulong> GatherVectorUInt32ZeroExtend(System.Numerics.Vector<ulong> mask, uint* address, System.Numerics.Vector<ulong> indices) { throw null; }
49874987

4988+
public static unsafe System.Numerics.Vector<double> GatherVectorWithByteOffsetFirstFaulting(System.Numerics.Vector<double> mask, double* address, System.Numerics.Vector<long> offsets) { throw null; }
4989+
public static unsafe System.Numerics.Vector<double> GatherVectorWithByteOffsetFirstFaulting(System.Numerics.Vector<double> mask, double* address, System.Numerics.Vector<ulong> offsets) { throw null; }
4990+
public static unsafe System.Numerics.Vector<int> GatherVectorWithByteOffsetFirstFaulting(System.Numerics.Vector<int> mask, int* address, System.Numerics.Vector<int> offsets) { throw null; }
4991+
public static unsafe System.Numerics.Vector<int> GatherVectorWithByteOffsetFirstFaulting(System.Numerics.Vector<int> mask, int* address, System.Numerics.Vector<uint> offsets) { throw null; }
4992+
public static unsafe System.Numerics.Vector<long> GatherVectorWithByteOffsetFirstFaulting(System.Numerics.Vector<long> mask, long* address, System.Numerics.Vector<long> offsets) { throw null; }
4993+
public static unsafe System.Numerics.Vector<long> GatherVectorWithByteOffsetFirstFaulting(System.Numerics.Vector<long> mask, long* address, System.Numerics.Vector<ulong> offsets) { throw null; }
4994+
public static unsafe System.Numerics.Vector<float> GatherVectorWithByteOffsetFirstFaulting(System.Numerics.Vector<float> mask, float* address, System.Numerics.Vector<int> offsets) { throw null; }
4995+
public static unsafe System.Numerics.Vector<float> GatherVectorWithByteOffsetFirstFaulting(System.Numerics.Vector<float> mask, float* address, System.Numerics.Vector<uint> offsets) { throw null; }
4996+
public static unsafe System.Numerics.Vector<uint> GatherVectorWithByteOffsetFirstFaulting(System.Numerics.Vector<uint> mask, uint* address, System.Numerics.Vector<int> offsets) { throw null; }
4997+
public static unsafe System.Numerics.Vector<uint> GatherVectorWithByteOffsetFirstFaulting(System.Numerics.Vector<uint> mask, uint* address, System.Numerics.Vector<uint> offsets) { throw null; }
4998+
public static unsafe System.Numerics.Vector<ulong> GatherVectorWithByteOffsetFirstFaulting(System.Numerics.Vector<ulong> mask, ulong* address, System.Numerics.Vector<long> offsets) { throw null; }
4999+
public static unsafe System.Numerics.Vector<ulong> GatherVectorWithByteOffsetFirstFaulting(System.Numerics.Vector<ulong> mask, ulong* address, System.Numerics.Vector<ulong> offsets) { throw null; }
5000+
49885001
public static unsafe System.Numerics.Vector<double> GatherVectorWithByteOffsets(System.Numerics.Vector<double> mask, double* address, System.Numerics.Vector<long> offsets) { throw null; }
49895002
public static unsafe System.Numerics.Vector<double> GatherVectorWithByteOffsets(System.Numerics.Vector<double> mask, double* address, System.Numerics.Vector<ulong> offsets) { throw null; }
49905003
public static unsafe System.Numerics.Vector<int> GatherVectorWithByteOffsets(System.Numerics.Vector<int> mask, int* address, System.Numerics.Vector<int> offsets) { throw null; }

0 commit comments

Comments
 (0)