diff --git a/src/coreclr/jit/gentree.cpp b/src/coreclr/jit/gentree.cpp index 6d3d670b2dc7de..fb9f15669f2832 100644 --- a/src/coreclr/jit/gentree.cpp +++ b/src/coreclr/jit/gentree.cpp @@ -27449,6 +27449,10 @@ bool GenTreeHWIntrinsic::OperIsMemoryLoad(GenTree** pAddr) const addr = Op(2); break; + case NI_Sve_GatherPrefetch8Bit: + case NI_Sve_GatherPrefetch16Bit: + case NI_Sve_GatherPrefetch32Bit: + case NI_Sve_GatherPrefetch64Bit: case NI_Sve_GatherVector: case NI_Sve_GatherVectorByteZeroExtend: case NI_Sve_GatherVectorInt16SignExtend: diff --git a/src/coreclr/jit/hwintrinsic.cpp b/src/coreclr/jit/hwintrinsic.cpp index 4f016940840b2c..eb48a9b041ae99 100644 --- a/src/coreclr/jit/hwintrinsic.cpp +++ b/src/coreclr/jit/hwintrinsic.cpp @@ -1856,6 +1856,14 @@ GenTree* Compiler::impHWIntrinsic(NamedIntrinsic intrinsic, break; #elif defined(TARGET_ARM64) + case NI_Sve_GatherPrefetch8Bit: + case NI_Sve_GatherPrefetch16Bit: + case NI_Sve_GatherPrefetch32Bit: + case NI_Sve_GatherPrefetch64Bit: + assert(varTypeIsSIMD(op2->TypeGet())); + retNode->AsHWIntrinsic()->SetAuxiliaryJitType(getBaseJitTypeOfSIMDType(sigReader.op2ClsHnd)); + break; + case NI_Sve_GatherVector: case NI_Sve_GatherVectorByteZeroExtend: case NI_Sve_GatherVectorInt16SignExtend: @@ -1885,6 +1893,22 @@ GenTree* Compiler::impHWIntrinsic(NamedIntrinsic intrinsic, assert(!isScalar); retNode = gtNewSimdHWIntrinsicNode(nodeRetType, op1, op2, op3, op4, intrinsic, simdBaseJitType, simdSize); + +#if defined(TARGET_ARM64) + switch (intrinsic) + { + case NI_Sve_GatherPrefetch8Bit: + case NI_Sve_GatherPrefetch16Bit: + case NI_Sve_GatherPrefetch32Bit: + case NI_Sve_GatherPrefetch64Bit: + assert(varTypeIsSIMD(op3->TypeGet())); + retNode->AsHWIntrinsic()->SetAuxiliaryJitType(getBaseJitTypeOfSIMDType(sigReader.op3ClsHnd)); + break; + + default: + break; + } +#endif break; } diff --git a/src/coreclr/jit/hwintrinsicarm64.cpp b/src/coreclr/jit/hwintrinsicarm64.cpp index e7619f3c2c85d0..99757f6e75b188 100644 --- a/src/coreclr/jit/hwintrinsicarm64.cpp +++ b/src/coreclr/jit/hwintrinsicarm64.cpp @@ -492,6 +492,10 @@ void HWIntrinsicInfo::lookupImmBounds( } break; + case NI_Sve_GatherPrefetch8Bit: + case NI_Sve_GatherPrefetch16Bit: + case NI_Sve_GatherPrefetch32Bit: + case NI_Sve_GatherPrefetch64Bit: case NI_Sve_PrefetchBytes: case NI_Sve_PrefetchInt16: case NI_Sve_PrefetchInt32: diff --git a/src/coreclr/jit/hwintrinsiccodegenarm64.cpp b/src/coreclr/jit/hwintrinsiccodegenarm64.cpp index 2a27eef99c38ec..2b251ea7c98e50 100644 --- a/src/coreclr/jit/hwintrinsiccodegenarm64.cpp +++ b/src/coreclr/jit/hwintrinsiccodegenarm64.cpp @@ -1615,22 +1615,11 @@ void CodeGen::genHWIntrinsic(GenTreeHWIntrinsic* node) { assert(hasImmediateOperand); assert(HWIntrinsicInfo::HasEnumOperand(intrin.id)); - if (intrin.op3->IsCnsIntOrI()) - { - GetEmitter()->emitIns_PRFOP_R_R_I(ins, emitSize, - (insSvePrfop)intrin.op3->AsIntConCommon()->IconValue(), op1Reg, - op2Reg, 0); - } - else + HWIntrinsicImmOpHelper helper(this, intrin.op3, node); + for (helper.EmitBegin(); !helper.Done(); helper.EmitCaseEnd()) { - assert(!intrin.op3->isContainedIntOrIImmed()); - - HWIntrinsicImmOpHelper helper(this, intrin.op3, node); - for (helper.EmitBegin(); !helper.Done(); helper.EmitCaseEnd()) - { - const insSvePrfop prfop = (insSvePrfop)helper.ImmValue(); - GetEmitter()->emitIns_PRFOP_R_R_I(ins, emitSize, prfop, op1Reg, op2Reg, 0); - } + const insSvePrfop prfop = (insSvePrfop)helper.ImmValue(); + GetEmitter()->emitIns_PRFOP_R_R_I(ins, emitSize, prfop, op1Reg, op2Reg, 0); } break; } @@ -1992,6 +1981,61 @@ void CodeGen::genHWIntrinsic(GenTreeHWIntrinsic* node) break; } + case NI_Sve_GatherPrefetch8Bit: + case NI_Sve_GatherPrefetch16Bit: + case NI_Sve_GatherPrefetch32Bit: + case NI_Sve_GatherPrefetch64Bit: + { + assert(hasImmediateOperand); + + if (!varTypeIsSIMD(intrin.op2->gtType)) + { + // GatherPrefetch...(Vector mask, T* address, Vector indices, SvePrefetchType prefetchType) + + assert(intrin.numOperands == 4); + emitAttr baseSize = emitActualTypeSize(intrin.baseType); + insScalableOpts sopt = INS_SCALABLE_OPTS_NONE; + + if (baseSize == EA_8BYTE) + { + // Index is multiplied. + sopt = (ins == INS_sve_prfb) ? INS_SCALABLE_OPTS_NONE : INS_SCALABLE_OPTS_LSL_N; + } + else + { + // Index is sign or zero extended to 64bits, then multiplied. + assert(baseSize == EA_4BYTE); + opt = varTypeIsUnsigned(node->GetAuxiliaryType()) ? INS_OPTS_SCALABLE_S_UXTW + : INS_OPTS_SCALABLE_S_SXTW; + + sopt = (ins == INS_sve_prfb) ? INS_SCALABLE_OPTS_NONE : INS_SCALABLE_OPTS_MOD_N; + } + + HWIntrinsicImmOpHelper helper(this, intrin.op4, node); + for (helper.EmitBegin(); !helper.Done(); helper.EmitCaseEnd()) + { + const insSvePrfop prfop = (insSvePrfop)helper.ImmValue(); + GetEmitter()->emitIns_PRFOP_R_R_R(ins, emitSize, prfop, op1Reg, op2Reg, op3Reg, opt, sopt); + } + } + else + { + // GatherPrefetch...(Vector mask, Vector addresses, SvePrefetchType prefetchType) + + opt = emitter::optGetSveInsOpt(emitTypeSize(node->GetAuxiliaryType())); + + assert(intrin.numOperands == 3); + HWIntrinsicImmOpHelper helper(this, intrin.op3, node); + for (helper.EmitBegin(); !helper.Done(); helper.EmitCaseEnd()) + { + const insSvePrfop prfop = (insSvePrfop)helper.ImmValue(); + GetEmitter()->emitIns_PRFOP_R_R_I(ins, emitSize, prfop, op1Reg, op2Reg, 0, opt); + } + } + + break; + } + case NI_Sve_GatherVector: case NI_Sve_GatherVectorByteZeroExtend: case NI_Sve_GatherVectorInt16SignExtend: @@ -2009,14 +2053,14 @@ void CodeGen::genHWIntrinsic(GenTreeHWIntrinsic* node) // GatherVector...(Vector mask, T* address, Vector indices) assert(intrin.numOperands == 3); - emitAttr baseSize = emitActualTypeSize(intrin.baseType); + emitAttr baseSize = emitActualTypeSize(intrin.baseType); + insScalableOpts sopt = INS_SCALABLE_OPTS_NONE; if (baseSize == EA_8BYTE) { // Index is multiplied. - insScalableOpts sopt = (ins == INS_sve_ld1b || ins == INS_sve_ld1sb) ? INS_SCALABLE_OPTS_NONE - : INS_SCALABLE_OPTS_LSL_N; - GetEmitter()->emitIns_R_R_R_R(ins, emitSize, targetReg, op1Reg, op2Reg, op3Reg, opt, sopt); + sopt = (ins == INS_sve_ld1b || ins == INS_sve_ld1sb) ? INS_SCALABLE_OPTS_NONE + : INS_SCALABLE_OPTS_LSL_N; } else { @@ -2025,10 +2069,11 @@ void CodeGen::genHWIntrinsic(GenTreeHWIntrinsic* node) opt = varTypeIsUnsigned(node->GetAuxiliaryType()) ? INS_OPTS_SCALABLE_S_UXTW : INS_OPTS_SCALABLE_S_SXTW; - insScalableOpts sopt = (ins == INS_sve_ld1b || ins == INS_sve_ld1sb) ? INS_SCALABLE_OPTS_NONE - : INS_SCALABLE_OPTS_MOD_N; - GetEmitter()->emitIns_R_R_R_R(ins, emitSize, targetReg, op1Reg, op2Reg, op3Reg, opt, sopt); + sopt = (ins == INS_sve_ld1b || ins == INS_sve_ld1sb) ? INS_SCALABLE_OPTS_NONE + : INS_SCALABLE_OPTS_MOD_N; } + + GetEmitter()->emitIns_R_R_R_R(ins, emitSize, targetReg, op1Reg, op2Reg, op3Reg, opt, sopt); } else { diff --git a/src/coreclr/jit/hwintrinsiclistarm64sve.h b/src/coreclr/jit/hwintrinsiclistarm64sve.h index 6a18de1253114f..c0357ddc9075bb 100644 --- a/src/coreclr/jit/hwintrinsiclistarm64sve.h +++ b/src/coreclr/jit/hwintrinsiclistarm64sve.h @@ -84,6 +84,10 @@ HARDWARE_INTRINSIC(Sve, FusedMultiplyAddNegated, HARDWARE_INTRINSIC(Sve, FusedMultiplySubtract, -1, -1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_sve_fmls, INS_sve_fmls}, HW_Category_SIMD, HW_Flag_Scalable|HW_Flag_EmbeddedMaskedOperation|HW_Flag_HasRMWSemantics|HW_Flag_LowMaskedOperation|HW_Flag_FmaIntrinsic|HW_Flag_SpecialCodeGen) HARDWARE_INTRINSIC(Sve, FusedMultiplySubtractBySelectedScalar, -1, 4, true, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_sve_fmls, INS_sve_fmls}, HW_Category_SIMDByIndexedElement, HW_Flag_Scalable|HW_Flag_HasImmediateOperand|HW_Flag_HasRMWSemantics|HW_Flag_FmaIntrinsic|HW_Flag_LowVectorOperation) HARDWARE_INTRINSIC(Sve, FusedMultiplySubtractNegated, -1, -1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_sve_fnmls, INS_sve_fnmls}, HW_Category_SIMD, HW_Flag_Scalable|HW_Flag_EmbeddedMaskedOperation|HW_Flag_HasRMWSemantics|HW_Flag_LowMaskedOperation|HW_Flag_FmaIntrinsic|HW_Flag_SpecialCodeGen) +HARDWARE_INTRINSIC(Sve, GatherPrefetch16Bit, -1, -1, false, {INS_invalid, INS_invalid, INS_sve_prfh, INS_sve_prfh, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_MemoryLoad, HW_Flag_Scalable|HW_Flag_BaseTypeFromFirstArg|HW_Flag_SpecialCodeGen|HW_Flag_ExplicitMaskedOperation|HW_Flag_LowMaskedOperation|HW_Flag_HasImmediateOperand|HW_Flag_HasEnumOperand) +HARDWARE_INTRINSIC(Sve, GatherPrefetch32Bit, -1, -1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_sve_prfw, INS_sve_prfw, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_MemoryLoad, HW_Flag_Scalable|HW_Flag_BaseTypeFromFirstArg|HW_Flag_SpecialCodeGen|HW_Flag_ExplicitMaskedOperation|HW_Flag_LowMaskedOperation|HW_Flag_HasImmediateOperand|HW_Flag_HasEnumOperand) +HARDWARE_INTRINSIC(Sve, GatherPrefetch64Bit, -1, -1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_sve_prfd, INS_sve_prfd, INS_invalid, INS_invalid}, HW_Category_MemoryLoad, HW_Flag_Scalable|HW_Flag_BaseTypeFromFirstArg|HW_Flag_SpecialCodeGen|HW_Flag_ExplicitMaskedOperation|HW_Flag_LowMaskedOperation|HW_Flag_HasImmediateOperand|HW_Flag_HasEnumOperand) +HARDWARE_INTRINSIC(Sve, GatherPrefetch8Bit, -1, -1, false, {INS_sve_prfb, INS_sve_prfb, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_MemoryLoad, HW_Flag_Scalable|HW_Flag_BaseTypeFromFirstArg|HW_Flag_SpecialCodeGen|HW_Flag_ExplicitMaskedOperation|HW_Flag_LowMaskedOperation|HW_Flag_HasImmediateOperand|HW_Flag_HasEnumOperand) HARDWARE_INTRINSIC(Sve, GatherVector, -1, -1, false, {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) HARDWARE_INTRINSIC(Sve, GatherVectorByteZeroExtend, -1, -1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_sve_ld1b, INS_sve_ld1b, INS_sve_ld1b, INS_sve_ld1b, INS_invalid, INS_invalid}, HW_Category_MemoryLoad, HW_Flag_Scalable|HW_Flag_SpecialCodeGen|HW_Flag_ExplicitMaskedOperation|HW_Flag_LowMaskedOperation) HARDWARE_INTRINSIC(Sve, GatherVectorInt16SignExtend, -1, -1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_sve_ld1sh, INS_sve_ld1sh, INS_sve_ld1sh, INS_sve_ld1sh, INS_invalid, INS_invalid}, HW_Category_MemoryLoad, HW_Flag_Scalable|HW_Flag_SpecialCodeGen|HW_Flag_ExplicitMaskedOperation|HW_Flag_LowMaskedOperation) diff --git a/src/coreclr/jit/lowerarmarch.cpp b/src/coreclr/jit/lowerarmarch.cpp index b98eb4d68d0595..5d837b3783bff3 100644 --- a/src/coreclr/jit/lowerarmarch.cpp +++ b/src/coreclr/jit/lowerarmarch.cpp @@ -3427,6 +3427,29 @@ void Lowering::ContainCheckHWIntrinsic(GenTreeHWIntrinsic* node) } break; + case NI_Sve_GatherPrefetch8Bit: + case NI_Sve_GatherPrefetch16Bit: + case NI_Sve_GatherPrefetch32Bit: + case NI_Sve_GatherPrefetch64Bit: + assert(hasImmediateOperand); + if (!varTypeIsSIMD(intrin.op2->gtType)) + { + assert(varTypeIsIntegral(intrin.op4)); + if (intrin.op4->IsCnsIntOrI()) + { + MakeSrcContained(node, intrin.op4); + } + } + else + { + assert(varTypeIsIntegral(intrin.op3)); + if (intrin.op3->IsCnsIntOrI()) + { + MakeSrcContained(node, intrin.op3); + } + } + break; + case NI_Sve_SaturatingDecrementBy16BitElementCount: case NI_Sve_SaturatingDecrementBy32BitElementCount: case NI_Sve_SaturatingDecrementBy64BitElementCount: diff --git a/src/coreclr/jit/lsraarm64.cpp b/src/coreclr/jit/lsraarm64.cpp index c344596f632e55..bcb8bbd948272f 100644 --- a/src/coreclr/jit/lsraarm64.cpp +++ b/src/coreclr/jit/lsraarm64.cpp @@ -1475,6 +1475,20 @@ int LinearScan::BuildHWIntrinsic(GenTreeHWIntrinsic* intrinsicTree, int* pDstCou needBranchTargetReg = !intrin.op1->isContainedIntOrIImmed(); break; + case NI_Sve_GatherPrefetch8Bit: + case NI_Sve_GatherPrefetch16Bit: + case NI_Sve_GatherPrefetch32Bit: + case NI_Sve_GatherPrefetch64Bit: + if (!varTypeIsSIMD(intrin.op2->gtType)) + { + needBranchTargetReg = !intrin.op4->isContainedIntOrIImmed(); + } + else + { + needBranchTargetReg = !intrin.op3->isContainedIntOrIImmed(); + } + break; + case NI_Sve_SaturatingDecrementBy16BitElementCount: case NI_Sve_SaturatingDecrementBy32BitElementCount: case NI_Sve_SaturatingDecrementBy64BitElementCount: @@ -2005,6 +2019,29 @@ int LinearScan::BuildHWIntrinsic(GenTreeHWIntrinsic* intrinsicTree, int* pDstCou srcCount += BuildAddrUses(intrin.op2); break; + case NI_Sve_GatherPrefetch8Bit: + case NI_Sve_GatherPrefetch16Bit: + case NI_Sve_GatherPrefetch32Bit: + case NI_Sve_GatherPrefetch64Bit: + case NI_Sve_GatherVector: + case NI_Sve_GatherVectorByteZeroExtend: + case NI_Sve_GatherVectorInt16SignExtend: + case NI_Sve_GatherVectorInt16WithByteOffsetsSignExtend: + case NI_Sve_GatherVectorInt32SignExtend: + case NI_Sve_GatherVectorInt32WithByteOffsetsSignExtend: + case NI_Sve_GatherVectorSByteSignExtend: + case NI_Sve_GatherVectorUInt16WithByteOffsetsZeroExtend: + case NI_Sve_GatherVectorUInt16ZeroExtend: + case NI_Sve_GatherVectorUInt32WithByteOffsetsZeroExtend: + case NI_Sve_GatherVectorUInt32ZeroExtend: + assert(intrinsicTree->OperIsMemoryLoadOrStore()); + if (!varTypeIsSIMD(intrin.op2->gtType)) + { + srcCount += BuildAddrUses(intrin.op2); + break; + } + FALLTHROUGH; + default: { SingleTypeRegSet candidates = lowVectorOperandNum == 2 ? lowVectorCandidates : RBM_NONE; diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Arm/Sve.PlatformNotSupported.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Arm/Sve.PlatformNotSupported.cs index 86517af978167e..c7368c9057cd8d 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Arm/Sve.PlatformNotSupported.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Arm/Sve.PlatformNotSupported.cs @@ -1940,6 +1940,306 @@ internal Arm64() { } public static unsafe Vector FusedMultiplySubtractNegated(Vector minuend, Vector left, Vector right) { throw new PlatformNotSupportedException(); } + /// Prefetch halfwords + + /// + /// void svprfh_gather_[s32]index(svbool_t pg, const void *base, svint32_t indices, enum svprfop op) + /// PRFH op, Pg, [Xbase, Zindices.S, SXTW #1] + /// + public static unsafe void GatherPrefetch16Bit(Vector mask, void* address, Vector indices, [ConstantExpected] SvePrefetchType prefetchType) { throw new PlatformNotSupportedException(); } + + /// + /// void svprfh_gather_[s64]index(svbool_t pg, const void *base, svint64_t indices, enum svprfop op) + /// PRFH op, Pg, [Xbase, Zindices.D, LSL #1] + /// + public static unsafe void GatherPrefetch16Bit(Vector mask, void* address, Vector indices, [ConstantExpected] SvePrefetchType prefetchType) { throw new PlatformNotSupportedException(); } + + /// + /// void svprfh_gather[_u32base](svbool_t pg, svuint32_t bases, enum svprfop op) + /// PRFH op, Pg, [Zbases.S, #0] + /// + public static unsafe void GatherPrefetch16Bit(Vector mask, Vector addresses, [ConstantExpected] SvePrefetchType prefetchType) { throw new PlatformNotSupportedException(); } + + /// + /// void svprfh_gather_[u32]index(svbool_t pg, const void *base, svuint32_t indices, enum svprfop op) + /// PRFH op, Pg, [Xbase, Zindices.S, UXTW #1] + /// + public static unsafe void GatherPrefetch16Bit(Vector mask, void* address, Vector indices, [ConstantExpected] SvePrefetchType prefetchType) { throw new PlatformNotSupportedException(); } + + /// + /// void svprfh_gather[_u64base](svbool_t pg, svuint64_t bases, enum svprfop op) + /// PRFH op, Pg, [Zbases.D, #0] + /// + public static unsafe void GatherPrefetch16Bit(Vector mask, Vector addresses, [ConstantExpected] SvePrefetchType prefetchType) { throw new PlatformNotSupportedException(); } + + /// + /// void svprfh_gather_[u64]index(svbool_t pg, const void *base, svuint64_t indices, enum svprfop op) + /// PRFH op, Pg, [Xbase, Zindices.D, LSL #1] + /// + public static unsafe void GatherPrefetch16Bit(Vector mask, void* address, Vector indices, [ConstantExpected] SvePrefetchType prefetchType) { throw new PlatformNotSupportedException(); } + + /// + /// void svprfh_gather_[s32]index(svbool_t pg, const void *base, svint32_t indices, enum svprfop op) + /// PRFH op, Pg, [Xbase, Zindices.S, SXTW #1] + /// + public static unsafe void GatherPrefetch16Bit(Vector mask, void* address, Vector indices, [ConstantExpected] SvePrefetchType prefetchType) { throw new PlatformNotSupportedException(); } + + /// + /// void svprfh_gather_[s64]index(svbool_t pg, const void *base, svint64_t indices, enum svprfop op) + /// PRFH op, Pg, [Xbase, Zindices.D, LSL #1] + /// + public static unsafe void GatherPrefetch16Bit(Vector mask, void* address, Vector indices, [ConstantExpected] SvePrefetchType prefetchType) { throw new PlatformNotSupportedException(); } + + /// + /// void svprfh_gather[_u32base](svbool_t pg, svuint32_t bases, enum svprfop op) + /// PRFH op, Pg, [Zbases.S, #0] + /// + public static unsafe void GatherPrefetch16Bit(Vector mask, Vector addresses, [ConstantExpected] SvePrefetchType prefetchType) { throw new PlatformNotSupportedException(); } + + /// + /// void svprfh_gather_[u32]index(svbool_t pg, const void *base, svuint32_t indices, enum svprfop op) + /// PRFH op, Pg, [Xbase, Zindices.S, UXTW #1] + /// + public static unsafe void GatherPrefetch16Bit(Vector mask, void* address, Vector indices, [ConstantExpected] SvePrefetchType prefetchType) { throw new PlatformNotSupportedException(); } + + /// + /// void svprfh_gather[_u64base](svbool_t pg, svuint64_t bases, enum svprfop op) + /// PRFH op, Pg, [Zbases.D, #0] + /// + public static unsafe void GatherPrefetch16Bit(Vector mask, Vector addresses, [ConstantExpected] SvePrefetchType prefetchType) { throw new PlatformNotSupportedException(); } + + /// + /// void svprfh_gather_[u64]index(svbool_t pg, const void *base, svuint64_t indices, enum svprfop op) + /// PRFH op, Pg, [Xbase, Zindices.D, LSL #1] + /// + public static unsafe void GatherPrefetch16Bit(Vector mask, void* address, Vector indices, [ConstantExpected] SvePrefetchType prefetchType) { throw new PlatformNotSupportedException(); } + + + /// Prefetch words + + /// + /// void svprfw_gather_[s32]index(svbool_t pg, const void *base, svint32_t indices, enum svprfop op) + /// PRFW op, Pg, [Xbase, Zindices.S, SXTW #2] + /// + public static unsafe void GatherPrefetch32Bit(Vector mask, void* address, Vector indices, [ConstantExpected] SvePrefetchType prefetchType) { throw new PlatformNotSupportedException(); } + + /// + /// void svprfw_gather_[s64]index(svbool_t pg, const void *base, svint64_t indices, enum svprfop op) + /// PRFW op, Pg, [Xbase, Zindices.D, LSL #2] + /// + public static unsafe void GatherPrefetch32Bit(Vector mask, void* address, Vector indices, [ConstantExpected] SvePrefetchType prefetchType) { throw new PlatformNotSupportedException(); } + + /// + /// void svprfw_gather[_u32base](svbool_t pg, svuint32_t bases, enum svprfop op) + /// PRFW op, Pg, [Zbases.S, #0] + /// + public static unsafe void GatherPrefetch32Bit(Vector mask, Vector addresses, [ConstantExpected] SvePrefetchType prefetchType) { throw new PlatformNotSupportedException(); } + + /// + /// void svprfw_gather_[u32]index(svbool_t pg, const void *base, svuint32_t indices, enum svprfop op) + /// PRFW op, Pg, [Xbase, Zindices.S, UXTW #2] + /// + public static unsafe void GatherPrefetch32Bit(Vector mask, void* address, Vector indices, [ConstantExpected] SvePrefetchType prefetchType) { throw new PlatformNotSupportedException(); } + + /// + /// void svprfw_gather[_u64base](svbool_t pg, svuint64_t bases, enum svprfop op) + /// PRFW op, Pg, [Zbases.D, #0] + /// + public static unsafe void GatherPrefetch32Bit(Vector mask, Vector addresses, [ConstantExpected] SvePrefetchType prefetchType) { throw new PlatformNotSupportedException(); } + + /// + /// void svprfw_gather_[u64]index(svbool_t pg, const void *base, svuint64_t indices, enum svprfop op) + /// PRFW op, Pg, [Xbase, Zindices.D, LSL #2] + /// + public static unsafe void GatherPrefetch32Bit(Vector mask, void* address, Vector indices, [ConstantExpected] SvePrefetchType prefetchType) { throw new PlatformNotSupportedException(); } + + /// + /// void svprfw_gather_[s32]index(svbool_t pg, const void *base, svint32_t indices, enum svprfop op) + /// PRFW op, Pg, [Xbase, Zindices.S, SXTW #2] + /// + public static unsafe void GatherPrefetch32Bit(Vector mask, void* address, Vector indices, [ConstantExpected] SvePrefetchType prefetchType) { throw new PlatformNotSupportedException(); } + + /// + /// void svprfw_gather_[s64]index(svbool_t pg, const void *base, svint64_t indices, enum svprfop op) + /// PRFW op, Pg, [Xbase, Zindices.D, LSL #2] + /// + public static unsafe void GatherPrefetch32Bit(Vector mask, void* address, Vector indices, [ConstantExpected] SvePrefetchType prefetchType) { throw new PlatformNotSupportedException(); } + + /// + /// void svprfw_gather[_u32base](svbool_t pg, svuint32_t bases, enum svprfop op) + /// PRFW op, Pg, [Zbases.S, #0] + /// + public static unsafe void GatherPrefetch32Bit(Vector mask, Vector addresses, [ConstantExpected] SvePrefetchType prefetchType) { throw new PlatformNotSupportedException(); } + + /// + /// void svprfw_gather_[u32]index(svbool_t pg, const void *base, svuint32_t indices, enum svprfop op) + /// PRFW op, Pg, [Xbase, Zindices.S, UXTW #2] + /// + public static unsafe void GatherPrefetch32Bit(Vector mask, void* address, Vector indices, [ConstantExpected] SvePrefetchType prefetchType) { throw new PlatformNotSupportedException(); } + + /// + /// void svprfw_gather[_u64base](svbool_t pg, svuint64_t bases, enum svprfop op) + /// PRFW op, Pg, [Zbases.D, #0] + /// + public static unsafe void GatherPrefetch32Bit(Vector mask, Vector addresses, [ConstantExpected] SvePrefetchType prefetchType) { throw new PlatformNotSupportedException(); } + + /// + /// void svprfw_gather_[u64]index(svbool_t pg, const void *base, svuint64_t indices, enum svprfop op) + /// PRFW op, Pg, [Xbase, Zindices.D, LSL #2] + /// + public static unsafe void GatherPrefetch32Bit(Vector mask, void* address, Vector indices, [ConstantExpected] SvePrefetchType prefetchType) { throw new PlatformNotSupportedException(); } + + + /// Prefetch doublewords + + /// + /// void svprfd_gather_[s32]index(svbool_t pg, const void *base, svint32_t indices, enum svprfop op) + /// PRFD op, Pg, [Xbase, Zindices.S, SXTW #3] + /// + public static unsafe void GatherPrefetch64Bit(Vector mask, void* address, Vector indices, [ConstantExpected] SvePrefetchType prefetchType) { throw new PlatformNotSupportedException(); } + + /// + /// void svprfd_gather_[s64]index(svbool_t pg, const void *base, svint64_t indices, enum svprfop op) + /// PRFD op, Pg, [Xbase, Zindices.D, LSL #3] + /// + public static unsafe void GatherPrefetch64Bit(Vector mask, void* address, Vector indices, [ConstantExpected] SvePrefetchType prefetchType) { throw new PlatformNotSupportedException(); } + + /// + /// void svprfd_gather[_u32base](svbool_t pg, svuint32_t bases, enum svprfop op) + /// PRFD op, Pg, [Zbases.S, #0] + /// + public static unsafe void GatherPrefetch64Bit(Vector mask, Vector addresses, [ConstantExpected] SvePrefetchType prefetchType) { throw new PlatformNotSupportedException(); } + + /// + /// void svprfd_gather_[u32]index(svbool_t pg, const void *base, svuint32_t indices, enum svprfop op) + /// PRFD op, Pg, [Xbase, Zindices.S, UXTW #3] + /// + public static unsafe void GatherPrefetch64Bit(Vector mask, void* address, Vector indices, [ConstantExpected] SvePrefetchType prefetchType) { throw new PlatformNotSupportedException(); } + + /// + /// void svprfd_gather[_u64base](svbool_t pg, svuint64_t bases, enum svprfop op) + /// PRFD op, Pg, [Zbases.D, #0] + /// + public static unsafe void GatherPrefetch64Bit(Vector mask, Vector addresses, [ConstantExpected] SvePrefetchType prefetchType) { throw new PlatformNotSupportedException(); } + + /// + /// void svprfd_gather_[u64]index(svbool_t pg, const void *base, svuint64_t indices, enum svprfop op) + /// PRFD op, Pg, [Xbase, Zindices.D, LSL #3] + /// + public static unsafe void GatherPrefetch64Bit(Vector mask, void* address, Vector indices, [ConstantExpected] SvePrefetchType prefetchType) { throw new PlatformNotSupportedException(); } + + /// + /// void svprfd_gather_[s32]index(svbool_t pg, const void *base, svint32_t indices, enum svprfop op) + /// PRFD op, Pg, [Xbase, Zindices.S, SXTW #3] + /// + public static unsafe void GatherPrefetch64Bit(Vector mask, void* address, Vector indices, [ConstantExpected] SvePrefetchType prefetchType) { throw new PlatformNotSupportedException(); } + + /// + /// void svprfd_gather_[s64]index(svbool_t pg, const void *base, svint64_t indices, enum svprfop op) + /// PRFD op, Pg, [Xbase, Zindices.D, LSL #3] + /// + public static unsafe void GatherPrefetch64Bit(Vector mask, void* address, Vector indices, [ConstantExpected] SvePrefetchType prefetchType) { throw new PlatformNotSupportedException(); } + + /// + /// void svprfd_gather[_u32base](svbool_t pg, svuint32_t bases, enum svprfop op) + /// PRFD op, Pg, [Zbases.S, #0] + /// + public static unsafe void GatherPrefetch64Bit(Vector mask, Vector addresses, [ConstantExpected] SvePrefetchType prefetchType) { throw new PlatformNotSupportedException(); } + + /// + /// void svprfd_gather_[u32]index(svbool_t pg, const void *base, svuint32_t indices, enum svprfop op) + /// PRFD op, Pg, [Xbase, Zindices.S, UXTW #3] + /// + public static unsafe void GatherPrefetch64Bit(Vector mask, void* address, Vector indices, [ConstantExpected] SvePrefetchType prefetchType) { throw new PlatformNotSupportedException(); } + + /// + /// void svprfd_gather[_u64base](svbool_t pg, svuint64_t bases, enum svprfop op) + /// PRFD op, Pg, [Zbases.D, #0] + /// + public static unsafe void GatherPrefetch64Bit(Vector mask, Vector addresses, [ConstantExpected] SvePrefetchType prefetchType) { throw new PlatformNotSupportedException(); } + + /// + /// void svprfd_gather_[u64]index(svbool_t pg, const void *base, svuint64_t indices, enum svprfop op) + /// PRFD op, Pg, [Xbase, Zindices.D, LSL #3] + /// + public static unsafe void GatherPrefetch64Bit(Vector mask, void* address, Vector indices, [ConstantExpected] SvePrefetchType prefetchType) { throw new PlatformNotSupportedException(); } + + + /// Prefetch bytes + + /// + /// void svprfb_gather_[s32]offset(svbool_t pg, const void *base, svint32_t offsets, enum svprfop op) + /// PRFB op, Pg, [Xbase, Zoffsets.S, SXTW] + /// + public static unsafe void GatherPrefetch8Bit(Vector mask, void* address, Vector offsets, [ConstantExpected] SvePrefetchType prefetchType) { throw new PlatformNotSupportedException(); } + + /// + /// void svprfb_gather_[s64]offset(svbool_t pg, const void *base, svint64_t offsets, enum svprfop op) + /// PRFB op, Pg, [Xbase, Zoffsets.D] + /// + public static unsafe void GatherPrefetch8Bit(Vector mask, void* address, Vector offsets, [ConstantExpected] SvePrefetchType prefetchType) { throw new PlatformNotSupportedException(); } + + /// + /// void svprfb_gather[_u32base](svbool_t pg, svuint32_t bases, enum svprfop op) + /// PRFB op, Pg, [Zbases.S, #0] + /// + public static unsafe void GatherPrefetch8Bit(Vector mask, Vector addresses, [ConstantExpected] SvePrefetchType prefetchType) { throw new PlatformNotSupportedException(); } + + /// + /// void svprfb_gather_[u32]offset(svbool_t pg, const void *base, svuint32_t offsets, enum svprfop op) + /// PRFB op, Pg, [Xbase, Zoffsets.S, UXTW] + /// + public static unsafe void GatherPrefetch8Bit(Vector mask, void* address, Vector offsets, [ConstantExpected] SvePrefetchType prefetchType) { throw new PlatformNotSupportedException(); } + + /// + /// void svprfb_gather[_u64base](svbool_t pg, svuint64_t bases, enum svprfop op) + /// PRFB op, Pg, [Zbases.D, #0] + /// + public static unsafe void GatherPrefetch8Bit(Vector mask, Vector addresses, [ConstantExpected] SvePrefetchType prefetchType) { throw new PlatformNotSupportedException(); } + + /// + /// void svprfb_gather_[u64]offset(svbool_t pg, const void *base, svuint64_t offsets, enum svprfop op) + /// PRFB op, Pg, [Xbase, Zoffsets.D] + /// + public static unsafe void GatherPrefetch8Bit(Vector mask, void* address, Vector offsets, [ConstantExpected] SvePrefetchType prefetchType) { throw new PlatformNotSupportedException(); } + + /// + /// void svprfb_gather_[s32]offset(svbool_t pg, const void *base, svint32_t offsets, enum svprfop op) + /// PRFB op, Pg, [Xbase, Zoffsets.S, SXTW] + /// + public static unsafe void GatherPrefetch8Bit(Vector mask, void* address, Vector offsets, [ConstantExpected] SvePrefetchType prefetchType) { throw new PlatformNotSupportedException(); } + + /// + /// void svprfb_gather_[s64]offset(svbool_t pg, const void *base, svint64_t offsets, enum svprfop op) + /// PRFB op, Pg, [Xbase, Zoffsets.D] + /// + public static unsafe void GatherPrefetch8Bit(Vector mask, void* address, Vector offsets, [ConstantExpected] SvePrefetchType prefetchType) { throw new PlatformNotSupportedException(); } + + /// + /// void svprfb_gather[_u32base](svbool_t pg, svuint32_t bases, enum svprfop op) + /// PRFB op, Pg, [Zbases.S, #0] + /// + public static unsafe void GatherPrefetch8Bit(Vector mask, Vector addresses, [ConstantExpected] SvePrefetchType prefetchType) { throw new PlatformNotSupportedException(); } + + /// + /// void svprfb_gather_[u32]offset(svbool_t pg, const void *base, svuint32_t offsets, enum svprfop op) + /// PRFB op, Pg, [Xbase, Zoffsets.S, UXTW] + /// + public static unsafe void GatherPrefetch8Bit(Vector mask, void* address, Vector offsets, [ConstantExpected] SvePrefetchType prefetchType) { throw new PlatformNotSupportedException(); } + + /// + /// void svprfb_gather[_u64base](svbool_t pg, svuint64_t bases, enum svprfop op) + /// PRFB op, Pg, [Zbases.D, #0] + /// + public static unsafe void GatherPrefetch8Bit(Vector mask, Vector addresses, [ConstantExpected] SvePrefetchType prefetchType) { throw new PlatformNotSupportedException(); } + + /// + /// void svprfb_gather_[u64]offset(svbool_t pg, const void *base, svuint64_t offsets, enum svprfop op) + /// PRFB op, Pg, [Xbase, Zoffsets.D] + /// + public static unsafe void GatherPrefetch8Bit(Vector mask, void* address, Vector offsets, [ConstantExpected] SvePrefetchType prefetchType) { throw new PlatformNotSupportedException(); } + + /// Unextended load /// diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Arm/Sve.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Arm/Sve.cs index fa6a76e39bb67a..cca7048747ee82 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Arm/Sve.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Arm/Sve.cs @@ -1997,6 +1997,306 @@ internal Arm64() { } public static unsafe Vector FusedMultiplySubtractNegated(Vector minuend, Vector left, Vector right) => FusedMultiplySubtractNegated(minuend, left, right); + /// Prefetch halfwords + + /// + /// void svprfh_gather_[s32]index(svbool_t pg, const void *base, svint32_t indices, enum svprfop op) + /// PRFH op, Pg, [Xbase, Zindices.S, SXTW #1] + /// + public static unsafe void GatherPrefetch16Bit(Vector mask, void* address, Vector indices, [ConstantExpected] SvePrefetchType prefetchType) => GatherPrefetch16Bit(mask, address, indices, prefetchType); + + /// + /// void svprfh_gather_[s64]index(svbool_t pg, const void *base, svint64_t indices, enum svprfop op) + /// PRFH op, Pg, [Xbase, Zindices.D, LSL #1] + /// + public static unsafe void GatherPrefetch16Bit(Vector mask, void* address, Vector indices, [ConstantExpected] SvePrefetchType prefetchType) => GatherPrefetch16Bit(mask, address, indices, prefetchType); + + /// + /// void svprfh_gather[_u32base](svbool_t pg, svuint32_t bases, enum svprfop op) + /// PRFH op, Pg, [Zbases.S, #0] + /// + public static unsafe void GatherPrefetch16Bit(Vector mask, Vector addresses, [ConstantExpected] SvePrefetchType prefetchType) => GatherPrefetch16Bit(mask, addresses, prefetchType); + + /// + /// void svprfh_gather_[u32]index(svbool_t pg, const void *base, svuint32_t indices, enum svprfop op) + /// PRFH op, Pg, [Xbase, Zindices.S, UXTW #1] + /// + public static unsafe void GatherPrefetch16Bit(Vector mask, void* address, Vector indices, [ConstantExpected] SvePrefetchType prefetchType) => GatherPrefetch16Bit(mask, address, indices, prefetchType); + + /// + /// void svprfh_gather[_u64base](svbool_t pg, svuint64_t bases, enum svprfop op) + /// PRFH op, Pg, [Zbases.D, #0] + /// + public static unsafe void GatherPrefetch16Bit(Vector mask, Vector addresses, [ConstantExpected] SvePrefetchType prefetchType) => GatherPrefetch16Bit(mask, addresses, prefetchType); + + /// + /// void svprfh_gather_[u64]index(svbool_t pg, const void *base, svuint64_t indices, enum svprfop op) + /// PRFH op, Pg, [Xbase, Zindices.D, LSL #1] + /// + public static unsafe void GatherPrefetch16Bit(Vector mask, void* address, Vector indices, [ConstantExpected] SvePrefetchType prefetchType) => GatherPrefetch16Bit(mask, address, indices, prefetchType); + + /// + /// void svprfh_gather_[s32]index(svbool_t pg, const void *base, svint32_t indices, enum svprfop op) + /// PRFH op, Pg, [Xbase, Zindices.S, SXTW #1] + /// + public static unsafe void GatherPrefetch16Bit(Vector mask, void* address, Vector indices, [ConstantExpected] SvePrefetchType prefetchType) => GatherPrefetch16Bit(mask, address, indices, prefetchType); + + /// + /// void svprfh_gather_[s64]index(svbool_t pg, const void *base, svint64_t indices, enum svprfop op) + /// PRFH op, Pg, [Xbase, Zindices.D, LSL #1] + /// + public static unsafe void GatherPrefetch16Bit(Vector mask, void* address, Vector indices, [ConstantExpected] SvePrefetchType prefetchType) => GatherPrefetch16Bit(mask, address, indices, prefetchType); + + /// + /// void svprfh_gather[_u32base](svbool_t pg, svuint32_t bases, enum svprfop op) + /// PRFH op, Pg, [Zbases.S, #0] + /// + public static unsafe void GatherPrefetch16Bit(Vector mask, Vector addresses, [ConstantExpected] SvePrefetchType prefetchType) => GatherPrefetch16Bit(mask, addresses, prefetchType); + + /// + /// void svprfh_gather_[u32]index(svbool_t pg, const void *base, svuint32_t indices, enum svprfop op) + /// PRFH op, Pg, [Xbase, Zindices.S, UXTW #1] + /// + public static unsafe void GatherPrefetch16Bit(Vector mask, void* address, Vector indices, [ConstantExpected] SvePrefetchType prefetchType) => GatherPrefetch16Bit(mask, address, indices, prefetchType); + + /// + /// void svprfh_gather[_u64base](svbool_t pg, svuint64_t bases, enum svprfop op) + /// PRFH op, Pg, [Zbases.D, #0] + /// + public static unsafe void GatherPrefetch16Bit(Vector mask, Vector addresses, [ConstantExpected] SvePrefetchType prefetchType) => GatherPrefetch16Bit(mask, addresses, prefetchType); + + /// + /// void svprfh_gather_[u64]index(svbool_t pg, const void *base, svuint64_t indices, enum svprfop op) + /// PRFH op, Pg, [Xbase, Zindices.D, LSL #1] + /// + public static unsafe void GatherPrefetch16Bit(Vector mask, void* address, Vector indices, [ConstantExpected] SvePrefetchType prefetchType) => GatherPrefetch16Bit(mask, address, indices, prefetchType); + + + /// Prefetch words + + /// + /// void svprfw_gather_[s32]index(svbool_t pg, const void *base, svint32_t indices, enum svprfop op) + /// PRFW op, Pg, [Xbase, Zindices.S, SXTW #2] + /// + public static unsafe void GatherPrefetch32Bit(Vector mask, void* address, Vector indices, [ConstantExpected] SvePrefetchType prefetchType) => GatherPrefetch32Bit(mask, address, indices, prefetchType); + + /// + /// void svprfw_gather_[s64]index(svbool_t pg, const void *base, svint64_t indices, enum svprfop op) + /// PRFW op, Pg, [Xbase, Zindices.D, LSL #2] + /// + public static unsafe void GatherPrefetch32Bit(Vector mask, void* address, Vector indices, [ConstantExpected] SvePrefetchType prefetchType) => GatherPrefetch32Bit(mask, address, indices, prefetchType); + + /// + /// void svprfw_gather[_u32base](svbool_t pg, svuint32_t bases, enum svprfop op) + /// PRFW op, Pg, [Zbases.S, #0] + /// + public static unsafe void GatherPrefetch32Bit(Vector mask, Vector addresses, [ConstantExpected] SvePrefetchType prefetchType) => GatherPrefetch32Bit(mask, addresses, prefetchType); + + /// + /// void svprfw_gather_[u32]index(svbool_t pg, const void *base, svuint32_t indices, enum svprfop op) + /// PRFW op, Pg, [Xbase, Zindices.S, UXTW #2] + /// + public static unsafe void GatherPrefetch32Bit(Vector mask, void* address, Vector indices, [ConstantExpected] SvePrefetchType prefetchType) => GatherPrefetch32Bit(mask, address, indices, prefetchType); + + /// + /// void svprfw_gather[_u64base](svbool_t pg, svuint64_t bases, enum svprfop op) + /// PRFW op, Pg, [Zbases.D, #0] + /// + public static unsafe void GatherPrefetch32Bit(Vector mask, Vector addresses, [ConstantExpected] SvePrefetchType prefetchType) => GatherPrefetch32Bit(mask, addresses, prefetchType); + + /// + /// void svprfw_gather_[u64]index(svbool_t pg, const void *base, svuint64_t indices, enum svprfop op) + /// PRFW op, Pg, [Xbase, Zindices.D, LSL #2] + /// + public static unsafe void GatherPrefetch32Bit(Vector mask, void* address, Vector indices, [ConstantExpected] SvePrefetchType prefetchType) => GatherPrefetch32Bit(mask, address, indices, prefetchType); + + /// + /// void svprfw_gather_[s32]index(svbool_t pg, const void *base, svint32_t indices, enum svprfop op) + /// PRFW op, Pg, [Xbase, Zindices.S, SXTW #2] + /// + public static unsafe void GatherPrefetch32Bit(Vector mask, void* address, Vector indices, [ConstantExpected] SvePrefetchType prefetchType) => GatherPrefetch32Bit(mask, address, indices, prefetchType); + + /// + /// void svprfw_gather_[s64]index(svbool_t pg, const void *base, svint64_t indices, enum svprfop op) + /// PRFW op, Pg, [Xbase, Zindices.D, LSL #2] + /// + public static unsafe void GatherPrefetch32Bit(Vector mask, void* address, Vector indices, [ConstantExpected] SvePrefetchType prefetchType) => GatherPrefetch32Bit(mask, address, indices, prefetchType); + + /// + /// void svprfw_gather[_u32base](svbool_t pg, svuint32_t bases, enum svprfop op) + /// PRFW op, Pg, [Zbases.S, #0] + /// + public static unsafe void GatherPrefetch32Bit(Vector mask, Vector addresses, [ConstantExpected] SvePrefetchType prefetchType) => GatherPrefetch32Bit(mask, addresses, prefetchType); + + /// + /// void svprfw_gather_[u32]index(svbool_t pg, const void *base, svuint32_t indices, enum svprfop op) + /// PRFW op, Pg, [Xbase, Zindices.S, UXTW #2] + /// + public static unsafe void GatherPrefetch32Bit(Vector mask, void* address, Vector indices, [ConstantExpected] SvePrefetchType prefetchType) => GatherPrefetch32Bit(mask, address, indices, prefetchType); + + /// + /// void svprfw_gather[_u64base](svbool_t pg, svuint64_t bases, enum svprfop op) + /// PRFW op, Pg, [Zbases.D, #0] + /// + public static unsafe void GatherPrefetch32Bit(Vector mask, Vector addresses, [ConstantExpected] SvePrefetchType prefetchType) => GatherPrefetch32Bit(mask, addresses, prefetchType); + + /// + /// void svprfw_gather_[u64]index(svbool_t pg, const void *base, svuint64_t indices, enum svprfop op) + /// PRFW op, Pg, [Xbase, Zindices.D, LSL #2] + /// + public static unsafe void GatherPrefetch32Bit(Vector mask, void* address, Vector indices, [ConstantExpected] SvePrefetchType prefetchType) => GatherPrefetch32Bit(mask, address, indices, prefetchType); + + + /// Prefetch doublewords + + /// + /// void svprfd_gather_[s32]index(svbool_t pg, const void *base, svint32_t indices, enum svprfop op) + /// PRFD op, Pg, [Xbase, Zindices.S, SXTW #3] + /// + public static unsafe void GatherPrefetch64Bit(Vector mask, void* address, Vector indices, [ConstantExpected] SvePrefetchType prefetchType) => GatherPrefetch64Bit(mask, address, indices, prefetchType); + + /// + /// void svprfd_gather_[s64]index(svbool_t pg, const void *base, svint64_t indices, enum svprfop op) + /// PRFD op, Pg, [Xbase, Zindices.D, LSL #3] + /// + public static unsafe void GatherPrefetch64Bit(Vector mask, void* address, Vector indices, [ConstantExpected] SvePrefetchType prefetchType) => GatherPrefetch64Bit(mask, address, indices, prefetchType); + + /// + /// void svprfd_gather[_u32base](svbool_t pg, svuint32_t bases, enum svprfop op) + /// PRFD op, Pg, [Zbases.S, #0] + /// + public static unsafe void GatherPrefetch64Bit(Vector mask, Vector addresses, [ConstantExpected] SvePrefetchType prefetchType) => GatherPrefetch64Bit(mask, addresses, prefetchType); + + /// + /// void svprfd_gather_[u32]index(svbool_t pg, const void *base, svuint32_t indices, enum svprfop op) + /// PRFD op, Pg, [Xbase, Zindices.S, UXTW #3] + /// + public static unsafe void GatherPrefetch64Bit(Vector mask, void* address, Vector indices, [ConstantExpected] SvePrefetchType prefetchType) => GatherPrefetch64Bit(mask, address, indices, prefetchType); + + /// + /// void svprfd_gather[_u64base](svbool_t pg, svuint64_t bases, enum svprfop op) + /// PRFD op, Pg, [Zbases.D, #0] + /// + public static unsafe void GatherPrefetch64Bit(Vector mask, Vector addresses, [ConstantExpected] SvePrefetchType prefetchType) => GatherPrefetch64Bit(mask, addresses, prefetchType); + + /// + /// void svprfd_gather_[u64]index(svbool_t pg, const void *base, svuint64_t indices, enum svprfop op) + /// PRFD op, Pg, [Xbase, Zindices.D, LSL #3] + /// + public static unsafe void GatherPrefetch64Bit(Vector mask, void* address, Vector indices, [ConstantExpected] SvePrefetchType prefetchType) => GatherPrefetch64Bit(mask, address, indices, prefetchType); + + /// + /// void svprfd_gather_[s32]index(svbool_t pg, const void *base, svint32_t indices, enum svprfop op) + /// PRFD op, Pg, [Xbase, Zindices.S, SXTW #3] + /// + public static unsafe void GatherPrefetch64Bit(Vector mask, void* address, Vector indices, [ConstantExpected] SvePrefetchType prefetchType) => GatherPrefetch64Bit(mask, address, indices, prefetchType); + + /// + /// void svprfd_gather_[s64]index(svbool_t pg, const void *base, svint64_t indices, enum svprfop op) + /// PRFD op, Pg, [Xbase, Zindices.D, LSL #3] + /// + public static unsafe void GatherPrefetch64Bit(Vector mask, void* address, Vector indices, [ConstantExpected] SvePrefetchType prefetchType) => GatherPrefetch64Bit(mask, address, indices, prefetchType); + + /// + /// void svprfd_gather[_u32base](svbool_t pg, svuint32_t bases, enum svprfop op) + /// PRFD op, Pg, [Zbases.S, #0] + /// + public static unsafe void GatherPrefetch64Bit(Vector mask, Vector addresses, [ConstantExpected] SvePrefetchType prefetchType) => GatherPrefetch64Bit(mask, addresses, prefetchType); + + /// + /// void svprfd_gather_[u32]index(svbool_t pg, const void *base, svuint32_t indices, enum svprfop op) + /// PRFD op, Pg, [Xbase, Zindices.S, UXTW #3] + /// + public static unsafe void GatherPrefetch64Bit(Vector mask, void* address, Vector indices, [ConstantExpected] SvePrefetchType prefetchType) => GatherPrefetch64Bit(mask, address, indices, prefetchType); + + /// + /// void svprfd_gather[_u64base](svbool_t pg, svuint64_t bases, enum svprfop op) + /// PRFD op, Pg, [Zbases.D, #0] + /// + public static unsafe void GatherPrefetch64Bit(Vector mask, Vector addresses, [ConstantExpected] SvePrefetchType prefetchType) => GatherPrefetch64Bit(mask, addresses, prefetchType); + + /// + /// void svprfd_gather_[u64]index(svbool_t pg, const void *base, svuint64_t indices, enum svprfop op) + /// PRFD op, Pg, [Xbase, Zindices.D, LSL #3] + /// + public static unsafe void GatherPrefetch64Bit(Vector mask, void* address, Vector indices, [ConstantExpected] SvePrefetchType prefetchType) => GatherPrefetch64Bit(mask, address, indices, prefetchType); + + + /// Prefetch bytes + + /// + /// void svprfb_gather_[s32]offset(svbool_t pg, const void *base, svint32_t offsets, enum svprfop op) + /// PRFB op, Pg, [Xbase, Zoffsets.S, SXTW] + /// + public static unsafe void GatherPrefetch8Bit(Vector mask, void* address, Vector offsets, [ConstantExpected] SvePrefetchType prefetchType) => GatherPrefetch8Bit(mask, address, offsets, prefetchType); + + /// + /// void svprfb_gather_[s64]offset(svbool_t pg, const void *base, svint64_t offsets, enum svprfop op) + /// PRFB op, Pg, [Xbase, Zoffsets.D] + /// + public static unsafe void GatherPrefetch8Bit(Vector mask, void* address, Vector offsets, [ConstantExpected] SvePrefetchType prefetchType) => GatherPrefetch8Bit(mask, address, offsets, prefetchType); + + /// + /// void svprfb_gather[_u32base](svbool_t pg, svuint32_t bases, enum svprfop op) + /// PRFB op, Pg, [Zbases.S, #0] + /// + public static unsafe void GatherPrefetch8Bit(Vector mask, Vector addresses, [ConstantExpected] SvePrefetchType prefetchType) => GatherPrefetch8Bit(mask, addresses, prefetchType); + + /// + /// void svprfb_gather_[u32]offset(svbool_t pg, const void *base, svuint32_t offsets, enum svprfop op) + /// PRFB op, Pg, [Xbase, Zoffsets.S, UXTW] + /// + public static unsafe void GatherPrefetch8Bit(Vector mask, void* address, Vector offsets, [ConstantExpected] SvePrefetchType prefetchType) => GatherPrefetch8Bit(mask, address, offsets, prefetchType); + + /// + /// void svprfb_gather[_u64base](svbool_t pg, svuint64_t bases, enum svprfop op) + /// PRFB op, Pg, [Zbases.D, #0] + /// + public static unsafe void GatherPrefetch8Bit(Vector mask, Vector addresses, [ConstantExpected] SvePrefetchType prefetchType) => GatherPrefetch8Bit(mask, addresses, prefetchType); + + /// + /// void svprfb_gather_[u64]offset(svbool_t pg, const void *base, svuint64_t offsets, enum svprfop op) + /// PRFB op, Pg, [Xbase, Zoffsets.D] + /// + public static unsafe void GatherPrefetch8Bit(Vector mask, void* address, Vector offsets, [ConstantExpected] SvePrefetchType prefetchType) => GatherPrefetch8Bit(mask, address, offsets, prefetchType); + + /// + /// void svprfb_gather_[s32]offset(svbool_t pg, const void *base, svint32_t offsets, enum svprfop op) + /// PRFB op, Pg, [Xbase, Zoffsets.S, SXTW] + /// + public static unsafe void GatherPrefetch8Bit(Vector mask, void* address, Vector offsets, [ConstantExpected] SvePrefetchType prefetchType) => GatherPrefetch8Bit(mask, address, offsets, prefetchType); + + /// + /// void svprfb_gather_[s64]offset(svbool_t pg, const void *base, svint64_t offsets, enum svprfop op) + /// PRFB op, Pg, [Xbase, Zoffsets.D] + /// + public static unsafe void GatherPrefetch8Bit(Vector mask, void* address, Vector offsets, [ConstantExpected] SvePrefetchType prefetchType) => GatherPrefetch8Bit(mask, address, offsets, prefetchType); + + /// + /// void svprfb_gather[_u32base](svbool_t pg, svuint32_t bases, enum svprfop op) + /// PRFB op, Pg, [Zbases.S, #0] + /// + public static unsafe void GatherPrefetch8Bit(Vector mask, Vector addresses, [ConstantExpected] SvePrefetchType prefetchType) => GatherPrefetch8Bit(mask, addresses, prefetchType); + + /// + /// void svprfb_gather_[u32]offset(svbool_t pg, const void *base, svuint32_t offsets, enum svprfop op) + /// PRFB op, Pg, [Xbase, Zoffsets.S, UXTW] + /// + public static unsafe void GatherPrefetch8Bit(Vector mask, void* address, Vector offsets, [ConstantExpected] SvePrefetchType prefetchType) => GatherPrefetch8Bit(mask, address, offsets, prefetchType); + + /// + /// void svprfb_gather[_u64base](svbool_t pg, svuint64_t bases, enum svprfop op) + /// PRFB op, Pg, [Zbases.D, #0] + /// + public static unsafe void GatherPrefetch8Bit(Vector mask, Vector addresses, [ConstantExpected] SvePrefetchType prefetchType) => GatherPrefetch8Bit(mask, addresses, prefetchType); + + /// + /// void svprfb_gather_[u64]offset(svbool_t pg, const void *base, svuint64_t offsets, enum svprfop op) + /// PRFB op, Pg, [Xbase, Zoffsets.D] + /// + public static unsafe void GatherPrefetch8Bit(Vector mask, void* address, Vector offsets, [ConstantExpected] SvePrefetchType prefetchType) => GatherPrefetch8Bit(mask, address, offsets, prefetchType); + + /// Unextended load /// 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 7827cdf52eb82b..27597db25aca95 100644 --- a/src/libraries/System.Runtime.Intrinsics/ref/System.Runtime.Intrinsics.cs +++ b/src/libraries/System.Runtime.Intrinsics/ref/System.Runtime.Intrinsics.cs @@ -4477,6 +4477,55 @@ internal Arm64() { } public static System.Numerics.Vector FusedMultiplySubtractNegated(System.Numerics.Vector minuend, System.Numerics.Vector left, System.Numerics.Vector right) { throw null; } public static System.Numerics.Vector FusedMultiplySubtractNegated(System.Numerics.Vector minuend, System.Numerics.Vector left, System.Numerics.Vector right) { throw null; } + public static unsafe void GatherPrefetch16Bit(System.Numerics.Vector mask, void* address, System.Numerics.Vector indices, [ConstantExpected] SvePrefetchType prefetchType) { throw null; } + public static unsafe void GatherPrefetch16Bit(System.Numerics.Vector mask, void* address, System.Numerics.Vector indices, [ConstantExpected] SvePrefetchType prefetchType) { throw null; } + public static void GatherPrefetch16Bit(System.Numerics.Vector mask, System.Numerics.Vector addresses, [ConstantExpected] SvePrefetchType prefetchType) { throw null; } + public static unsafe void GatherPrefetch16Bit(System.Numerics.Vector mask, void* address, System.Numerics.Vector indices, [ConstantExpected] SvePrefetchType prefetchType) { throw null; } + public static void GatherPrefetch16Bit(System.Numerics.Vector mask, System.Numerics.Vector addresses, [ConstantExpected] SvePrefetchType prefetchType) { throw null; } + public static unsafe void GatherPrefetch16Bit(System.Numerics.Vector mask, void* address, System.Numerics.Vector indices, [ConstantExpected] SvePrefetchType prefetchType) { throw null; } + public static unsafe void GatherPrefetch16Bit(System.Numerics.Vector mask, void* address, System.Numerics.Vector indices, [ConstantExpected] SvePrefetchType prefetchType) { throw null; } + public static unsafe void GatherPrefetch16Bit(System.Numerics.Vector mask, void* address, System.Numerics.Vector indices, [ConstantExpected] SvePrefetchType prefetchType) { throw null; } + public static void GatherPrefetch16Bit(System.Numerics.Vector mask, System.Numerics.Vector addresses, [ConstantExpected] SvePrefetchType prefetchType) { throw null; } + public static unsafe void GatherPrefetch16Bit(System.Numerics.Vector mask, void* address, System.Numerics.Vector indices, [ConstantExpected] SvePrefetchType prefetchType) { throw null; } + public static void GatherPrefetch16Bit(System.Numerics.Vector mask, System.Numerics.Vector addresses, [ConstantExpected] SvePrefetchType prefetchType) { throw null; } + public static unsafe void GatherPrefetch16Bit(System.Numerics.Vector mask, void* address, System.Numerics.Vector indices, [ConstantExpected] SvePrefetchType prefetchType) { throw null; } + public static unsafe void GatherPrefetch32Bit(System.Numerics.Vector mask, void* address, System.Numerics.Vector indices, [ConstantExpected] SvePrefetchType prefetchType) { throw null; } + public static unsafe void GatherPrefetch32Bit(System.Numerics.Vector mask, void* address, System.Numerics.Vector indices, [ConstantExpected] SvePrefetchType prefetchType) { throw null; } + public static void GatherPrefetch32Bit(System.Numerics.Vector mask, System.Numerics.Vector addresses, [ConstantExpected] SvePrefetchType prefetchType) { throw null; } + public static unsafe void GatherPrefetch32Bit(System.Numerics.Vector mask, void* address, System.Numerics.Vector indices, [ConstantExpected] SvePrefetchType prefetchType) { throw null; } + public static void GatherPrefetch32Bit(System.Numerics.Vector mask, System.Numerics.Vector addresses, [ConstantExpected] SvePrefetchType prefetchType) { throw null; } + public static unsafe void GatherPrefetch32Bit(System.Numerics.Vector mask, void* address, System.Numerics.Vector indices, [ConstantExpected] SvePrefetchType prefetchType) { throw null; } + public static unsafe void GatherPrefetch32Bit(System.Numerics.Vector mask, void* address, System.Numerics.Vector indices, [ConstantExpected] SvePrefetchType prefetchType) { throw null; } + public static unsafe void GatherPrefetch32Bit(System.Numerics.Vector mask, void* address, System.Numerics.Vector indices, [ConstantExpected] SvePrefetchType prefetchType) { throw null; } + public static void GatherPrefetch32Bit(System.Numerics.Vector mask, System.Numerics.Vector addresses, [ConstantExpected] SvePrefetchType prefetchType) { throw null; } + public static unsafe void GatherPrefetch32Bit(System.Numerics.Vector mask, void* address, System.Numerics.Vector indices, [ConstantExpected] SvePrefetchType prefetchType) { throw null; } + public static void GatherPrefetch32Bit(System.Numerics.Vector mask, System.Numerics.Vector addresses, [ConstantExpected] SvePrefetchType prefetchType) { throw null; } + public static unsafe void GatherPrefetch32Bit(System.Numerics.Vector mask, void* address, System.Numerics.Vector indices, [ConstantExpected] SvePrefetchType prefetchType) { throw null; } + public static unsafe void GatherPrefetch64Bit(System.Numerics.Vector mask, void* address, System.Numerics.Vector indices, [ConstantExpected] SvePrefetchType prefetchType) { throw null; } + public static unsafe void GatherPrefetch64Bit(System.Numerics.Vector mask, void* address, System.Numerics.Vector indices, [ConstantExpected] SvePrefetchType prefetchType) { throw null; } + public static void GatherPrefetch64Bit(System.Numerics.Vector mask, System.Numerics.Vector addresses, [ConstantExpected] SvePrefetchType prefetchType) { throw null; } + public static unsafe void GatherPrefetch64Bit(System.Numerics.Vector mask, void* address, System.Numerics.Vector indices, [ConstantExpected] SvePrefetchType prefetchType) { throw null; } + public static void GatherPrefetch64Bit(System.Numerics.Vector mask, System.Numerics.Vector addresses, [ConstantExpected] SvePrefetchType prefetchType) { throw null; } + public static unsafe void GatherPrefetch64Bit(System.Numerics.Vector mask, void* address, System.Numerics.Vector indices, [ConstantExpected] SvePrefetchType prefetchType) { throw null; } + public static unsafe void GatherPrefetch64Bit(System.Numerics.Vector mask, void* address, System.Numerics.Vector indices, [ConstantExpected] SvePrefetchType prefetchType) { throw null; } + public static unsafe void GatherPrefetch64Bit(System.Numerics.Vector mask, void* address, System.Numerics.Vector indices, [ConstantExpected] SvePrefetchType prefetchType) { throw null; } + public static void GatherPrefetch64Bit(System.Numerics.Vector mask, System.Numerics.Vector addresses, [ConstantExpected] SvePrefetchType prefetchType) { throw null; } + public static unsafe void GatherPrefetch64Bit(System.Numerics.Vector mask, void* address, System.Numerics.Vector indices, [ConstantExpected] SvePrefetchType prefetchType) { throw null; } + public static void GatherPrefetch64Bit(System.Numerics.Vector mask, System.Numerics.Vector addresses, [ConstantExpected] SvePrefetchType prefetchType) { throw null; } + public static unsafe void GatherPrefetch64Bit(System.Numerics.Vector mask, void* address, System.Numerics.Vector indices, [ConstantExpected] SvePrefetchType prefetchType) { throw null; } + public static unsafe void GatherPrefetch8Bit(System.Numerics.Vector mask, void* address, System.Numerics.Vector offsets, [ConstantExpected] SvePrefetchType prefetchType) { throw null; } + public static unsafe void GatherPrefetch8Bit(System.Numerics.Vector mask, void* address, System.Numerics.Vector offsets, [ConstantExpected] SvePrefetchType prefetchType) { throw null; } + public static void GatherPrefetch8Bit(System.Numerics.Vector mask, System.Numerics.Vector addresses, [ConstantExpected] SvePrefetchType prefetchType) { throw null; } + public static unsafe void GatherPrefetch8Bit(System.Numerics.Vector mask, void* address, System.Numerics.Vector offsets, [ConstantExpected] SvePrefetchType prefetchType) { throw null; } + public static void GatherPrefetch8Bit(System.Numerics.Vector mask, System.Numerics.Vector addresses, [ConstantExpected] SvePrefetchType prefetchType) { throw null; } + public static unsafe void GatherPrefetch8Bit(System.Numerics.Vector mask, void* address, System.Numerics.Vector offsets, [ConstantExpected] SvePrefetchType prefetchType) { throw null; } + public static unsafe void GatherPrefetch8Bit(System.Numerics.Vector mask, void* address, System.Numerics.Vector offsets, [ConstantExpected] SvePrefetchType prefetchType) { throw null; } + public static unsafe void GatherPrefetch8Bit(System.Numerics.Vector mask, void* address, System.Numerics.Vector offsets, [ConstantExpected] SvePrefetchType prefetchType) { throw null; } + public static void GatherPrefetch8Bit(System.Numerics.Vector mask, System.Numerics.Vector addresses, [ConstantExpected] SvePrefetchType prefetchType) { throw null; } + public static unsafe void GatherPrefetch8Bit(System.Numerics.Vector mask, void* address, System.Numerics.Vector offsets, [ConstantExpected] SvePrefetchType prefetchType) { throw null; } + public static void GatherPrefetch8Bit(System.Numerics.Vector mask, System.Numerics.Vector addresses, [ConstantExpected] SvePrefetchType prefetchType) { throw null; } + public static unsafe void GatherPrefetch8Bit(System.Numerics.Vector mask, void* address, System.Numerics.Vector offsets, [ConstantExpected] SvePrefetchType prefetchType) { throw null; } + public static unsafe System.Numerics.Vector GatherVector(System.Numerics.Vector mask, double* address, System.Numerics.Vector indices) { throw null; } public static System.Numerics.Vector GatherVector(System.Numerics.Vector mask, System.Numerics.Vector addresses) { throw null; } public static unsafe System.Numerics.Vector GatherVector(System.Numerics.Vector mask, double* address, System.Numerics.Vector indices) { throw null; } diff --git a/src/tests/Common/GenerateHWIntrinsicTests/GenerateHWIntrinsicTests_Arm.cs b/src/tests/Common/GenerateHWIntrinsicTests/GenerateHWIntrinsicTests_Arm.cs index 47dd86be195db0..4dc99a943baa67 100644 --- a/src/tests/Common/GenerateHWIntrinsicTests/GenerateHWIntrinsicTests_Arm.cs +++ b/src/tests/Common/GenerateHWIntrinsicTests/GenerateHWIntrinsicTests_Arm.cs @@ -3222,6 +3222,55 @@ ("SveCreateTrueMaskTest.template", new Dictionary { ["TestName"] = "Sve_CreateTrueMaskUInt32", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "CreateTrueMaskUInt32", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt32", ["Op1Type"] = "SveMaskPattern"}), ("SveCreateTrueMaskTest.template", new Dictionary { ["TestName"] = "Sve_CreateTrueMaskUInt64", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "CreateTrueMaskUInt64", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt64", ["Op1Type"] = "SveMaskPattern"}), + ("SveGatherPrefetchVectorBases.template", new Dictionary { ["TestName"] = "Sve_GatherPrefetch16Bit_Bases_ushort_uint", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "GatherPrefetch16Bit", ["RetBaseType"] = "void", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt32", ["Op3BaseType"] = "SvePrefetchType",["LargestVectorSize"] = "64", ["NextValueOp1"] = "Helpers.getMaskUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidPrefetch"] = "SvePrefetchType.LoadL1NonTemporal", ["InvalidPrefetch"] = "(SvePrefetchType)100"}), + ("SveGatherPrefetchVectorBases.template", new Dictionary { ["TestName"] = "Sve_GatherPrefetch16Bit_Bases_short_uint", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "GatherPrefetch16Bit", ["RetBaseType"] = "void", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt32", ["Op3BaseType"] = "SvePrefetchType",["LargestVectorSize"] = "64", ["NextValueOp1"] = "Helpers.getMaskInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidPrefetch"] = "SvePrefetchType.LoadL2NonTemporal", ["InvalidPrefetch"] = "(SvePrefetchType)16"}), + ("SveGatherPrefetchVectorBases.template", new Dictionary { ["TestName"] = "Sve_GatherPrefetch16Bit_Bases_ushort_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "GatherPrefetch16Bit", ["RetBaseType"] = "void", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["Op3BaseType"] = "SvePrefetchType",["LargestVectorSize"] = "64", ["NextValueOp1"] = "Helpers.getMaskUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidPrefetch"] = "SvePrefetchType.StoreL1Temporal", ["InvalidPrefetch"] = "(SvePrefetchType)58"}), + ("SveGatherPrefetchVectorBases.template", new Dictionary { ["TestName"] = "Sve_GatherPrefetch16Bit_Bases_short_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "GatherPrefetch16Bit", ["RetBaseType"] = "void", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["Op3BaseType"] = "SvePrefetchType",["LargestVectorSize"] = "64", ["NextValueOp1"] = "Helpers.getMaskInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidPrefetch"] = "SvePrefetchType.StoreL2NonTemporal", ["InvalidPrefetch"] = "(SvePrefetchType)123"}), + ("SveGatherPrefetchIndices.template", new Dictionary { ["TestName"] = "Sve_GatherPrefetch16Bit_Indices_ushort_int", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "GatherPrefetch16Bit", ["RetBaseType"] = "void", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt16", ["Op2BaseType"] = "void", ["Op3VectorType"] = "Vector", ["Op3BaseType"] = "Int32",["Op4BaseType"] = "SvePrefetchType",["LargestVectorSize"] = "64", ["NextValueOp1"] = "Helpers.getMaskUInt16()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt32()", ["ValidPrefetch"] = "SvePrefetchType.LoadL1NonTemporal", ["InvalidPrefetch"] = "(SvePrefetchType)100"}), + ("SveGatherPrefetchIndices.template", new Dictionary { ["TestName"] = "Sve_GatherPrefetch16Bit_Indices_short_int", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "GatherPrefetch16Bit", ["RetBaseType"] = "void", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int16", ["Op2BaseType"] = "void", ["Op3VectorType"] = "Vector", ["Op3BaseType"] = "Int32",["Op4BaseType"] = "SvePrefetchType",["LargestVectorSize"] = "64", ["NextValueOp1"] = "Helpers.getMaskInt16()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt32()", ["ValidPrefetch"] = "SvePrefetchType.LoadL1Temporal", ["InvalidPrefetch"] = "(SvePrefetchType)54"}), + ("SveGatherPrefetchIndices.template", new Dictionary { ["TestName"] = "Sve_GatherPrefetch16Bit_Indices_ushort_uint", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "GatherPrefetch16Bit", ["RetBaseType"] = "void", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt16", ["Op2BaseType"] = "void", ["Op3VectorType"] = "Vector", ["Op3BaseType"] = "UInt32",["Op4BaseType"] = "SvePrefetchType",["LargestVectorSize"] = "64", ["NextValueOp1"] = "Helpers.getMaskUInt16()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt32()", ["ValidPrefetch"] = "SvePrefetchType.StoreL3NonTemporal", ["InvalidPrefetch"] = "(SvePrefetchType)32"}), + ("SveGatherPrefetchIndices.template", new Dictionary { ["TestName"] = "Sve_GatherPrefetch16Bit_Indices_short_uint", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "GatherPrefetch16Bit", ["RetBaseType"] = "void", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int16", ["Op2BaseType"] = "void", ["Op3VectorType"] = "Vector", ["Op3BaseType"] = "UInt32",["Op4BaseType"] = "SvePrefetchType",["LargestVectorSize"] = "64", ["NextValueOp1"] = "Helpers.getMaskInt16()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt32()", ["ValidPrefetch"] = "SvePrefetchType.LoadL1Temporal", ["InvalidPrefetch"] = "(SvePrefetchType)17"}), + ("SveGatherPrefetchIndices.template", new Dictionary { ["TestName"] = "Sve_GatherPrefetch16Bit_Indices_ushort_long", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "GatherPrefetch16Bit", ["RetBaseType"] = "void", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt16", ["Op2BaseType"] = "void", ["Op3VectorType"] = "Vector", ["Op3BaseType"] = "Int64",["Op4BaseType"] = "SvePrefetchType",["LargestVectorSize"] = "64", ["NextValueOp1"] = "Helpers.getMaskUInt16()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt64()", ["ValidPrefetch"] = "SvePrefetchType.StoreL1Temporal", ["InvalidPrefetch"] = "(SvePrefetchType)56"}), + ("SveGatherPrefetchIndices.template", new Dictionary { ["TestName"] = "Sve_GatherPrefetch16Bit_Indices_short_long", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "GatherPrefetch16Bit", ["RetBaseType"] = "void", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int16", ["Op2BaseType"] = "void", ["Op3VectorType"] = "Vector", ["Op3BaseType"] = "Int64",["Op4BaseType"] = "SvePrefetchType",["LargestVectorSize"] = "64", ["NextValueOp1"] = "Helpers.getMaskInt16()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt64()", ["ValidPrefetch"] = "SvePrefetchType.StoreL3Temporal", ["InvalidPrefetch"] = "(SvePrefetchType)123"}), + ("SveGatherPrefetchIndices.template", new Dictionary { ["TestName"] = "Sve_GatherPrefetch16Bit_Indices_ushort_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "GatherPrefetch16Bit", ["RetBaseType"] = "void", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt16", ["Op2BaseType"] = "void", ["Op3VectorType"] = "Vector", ["Op3BaseType"] = "UInt64",["Op4BaseType"] = "SvePrefetchType",["LargestVectorSize"] = "64", ["NextValueOp1"] = "Helpers.getMaskUInt16()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt64()", ["ValidPrefetch"] = "SvePrefetchType.LoadL1Temporal", ["InvalidPrefetch"] = "(SvePrefetchType)99"}), + ("SveGatherPrefetchIndices.template", new Dictionary { ["TestName"] = "Sve_GatherPrefetch16Bit_Indices_short_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "GatherPrefetch16Bit", ["RetBaseType"] = "void", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int16", ["Op2BaseType"] = "void", ["Op3VectorType"] = "Vector", ["Op3BaseType"] = "UInt64",["Op4BaseType"] = "SvePrefetchType",["LargestVectorSize"] = "64", ["NextValueOp1"] = "Helpers.getMaskInt16()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt64()", ["ValidPrefetch"] = "SvePrefetchType.LoadL1Temporal", ["InvalidPrefetch"] = "(SvePrefetchType)254"}), + ("SveGatherPrefetchVectorBases.template", new Dictionary { ["TestName"] = "Sve_GatherPrefetch32Bit_Bases_uint_uint", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "GatherPrefetch32Bit", ["RetBaseType"] = "void", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt32", ["Op3BaseType"] = "SvePrefetchType",["LargestVectorSize"] = "64", ["NextValueOp1"] = "Helpers.getMaskUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidPrefetch"] = "SvePrefetchType.LoadL1Temporal", ["InvalidPrefetch"] = "(SvePrefetchType)230"}), + ("SveGatherPrefetchVectorBases.template", new Dictionary { ["TestName"] = "Sve_GatherPrefetch32Bit_Bases_int_uint", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "GatherPrefetch32Bit", ["RetBaseType"] = "void", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt32", ["Op3BaseType"] = "SvePrefetchType",["LargestVectorSize"] = "64", ["NextValueOp1"] = "Helpers.getMaskInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidPrefetch"] = "SvePrefetchType.LoadL2Temporal", ["InvalidPrefetch"] = "(SvePrefetchType)23"}), + ("SveGatherPrefetchVectorBases.template", new Dictionary { ["TestName"] = "Sve_GatherPrefetch32Bit_Bases_uint_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "GatherPrefetch32Bit", ["RetBaseType"] = "void", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["Op3BaseType"] = "SvePrefetchType",["LargestVectorSize"] = "64", ["NextValueOp1"] = "Helpers.getMaskUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidPrefetch"] = "SvePrefetchType.LoadL3Temporal", ["InvalidPrefetch"] = "(SvePrefetchType)22"}), + ("SveGatherPrefetchVectorBases.template", new Dictionary { ["TestName"] = "Sve_GatherPrefetch32Bit_Bases_int_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "GatherPrefetch32Bit", ["RetBaseType"] = "void", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["Op3BaseType"] = "SvePrefetchType",["LargestVectorSize"] = "64", ["NextValueOp1"] = "Helpers.getMaskInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidPrefetch"] = "SvePrefetchType.StoreL3Temporal", ["InvalidPrefetch"] = "(SvePrefetchType)99"}), + ("SveGatherPrefetchIndices.template", new Dictionary { ["TestName"] = "Sve_GatherPrefetch32Bit_Indices_uint_int", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "GatherPrefetch32Bit", ["RetBaseType"] = "void", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt32", ["Op2BaseType"] = "void", ["Op3VectorType"] = "Vector", ["Op3BaseType"] = "Int32",["Op4BaseType"] = "SvePrefetchType",["LargestVectorSize"] = "64", ["NextValueOp1"] = "Helpers.getMaskUInt32()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt32()", ["ValidPrefetch"] = "SvePrefetchType.StoreL1NonTemporal", ["InvalidPrefetch"] = "(SvePrefetchType)16"}), + ("SveGatherPrefetchIndices.template", new Dictionary { ["TestName"] = "Sve_GatherPrefetch32Bit_Indices_int_int", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "GatherPrefetch32Bit", ["RetBaseType"] = "void", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int32", ["Op2BaseType"] = "void", ["Op3VectorType"] = "Vector", ["Op3BaseType"] = "Int32",["Op4BaseType"] = "SvePrefetchType",["LargestVectorSize"] = "64", ["NextValueOp1"] = "Helpers.getMaskInt32()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt32()", ["ValidPrefetch"] = "SvePrefetchType.LoadL1Temporal", ["InvalidPrefetch"] = "(SvePrefetchType)101"}), + ("SveGatherPrefetchIndices.template", new Dictionary { ["TestName"] = "Sve_GatherPrefetch32Bit_Indices_uint_uint", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "GatherPrefetch32Bit", ["RetBaseType"] = "void", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt32", ["Op2BaseType"] = "void", ["Op3VectorType"] = "Vector", ["Op3BaseType"] = "UInt32",["Op4BaseType"] = "SvePrefetchType",["LargestVectorSize"] = "64", ["NextValueOp1"] = "Helpers.getMaskUInt32()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt32()", ["ValidPrefetch"] = "SvePrefetchType.LoadL2NonTemporal", ["InvalidPrefetch"] = "(SvePrefetchType)165"}), + ("SveGatherPrefetchIndices.template", new Dictionary { ["TestName"] = "Sve_GatherPrefetch32Bit_Indices_int_uint", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "GatherPrefetch32Bit", ["RetBaseType"] = "void", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int32", ["Op2BaseType"] = "void", ["Op3VectorType"] = "Vector", ["Op3BaseType"] = "UInt32",["Op4BaseType"] = "SvePrefetchType",["LargestVectorSize"] = "64", ["NextValueOp1"] = "Helpers.getMaskInt32()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt32()", ["ValidPrefetch"] = "SvePrefetchType.LoadL2NonTemporal", ["InvalidPrefetch"] = "(SvePrefetchType)82"}), + ("SveGatherPrefetchIndices.template", new Dictionary { ["TestName"] = "Sve_GatherPrefetch32Bit_Indices_uint_long", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "GatherPrefetch32Bit", ["RetBaseType"] = "void", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt32", ["Op2BaseType"] = "void", ["Op3VectorType"] = "Vector", ["Op3BaseType"] = "Int64",["Op4BaseType"] = "SvePrefetchType",["LargestVectorSize"] = "64", ["NextValueOp1"] = "Helpers.getMaskUInt32()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt64()", ["ValidPrefetch"] = "SvePrefetchType.StoreL3NonTemporal", ["InvalidPrefetch"] = "(SvePrefetchType)35"}), + ("SveGatherPrefetchIndices.template", new Dictionary { ["TestName"] = "Sve_GatherPrefetch32Bit_Indices_int_long", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "GatherPrefetch32Bit", ["RetBaseType"] = "void", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int32", ["Op2BaseType"] = "void", ["Op3VectorType"] = "Vector", ["Op3BaseType"] = "Int64",["Op4BaseType"] = "SvePrefetchType",["LargestVectorSize"] = "64", ["NextValueOp1"] = "Helpers.getMaskInt32()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt64()", ["ValidPrefetch"] = "SvePrefetchType.LoadL1Temporal", ["InvalidPrefetch"] = "(SvePrefetchType)134"}), + ("SveGatherPrefetchIndices.template", new Dictionary { ["TestName"] = "Sve_GatherPrefetch32Bit_Indices_uint_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "GatherPrefetch32Bit", ["RetBaseType"] = "void", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt32", ["Op2BaseType"] = "void", ["Op3VectorType"] = "Vector", ["Op3BaseType"] = "UInt64",["Op4BaseType"] = "SvePrefetchType",["LargestVectorSize"] = "64", ["NextValueOp1"] = "Helpers.getMaskUInt32()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt64()", ["ValidPrefetch"] = "SvePrefetchType.LoadL3NonTemporal", ["InvalidPrefetch"] = "(SvePrefetchType)35"}), + ("SveGatherPrefetchIndices.template", new Dictionary { ["TestName"] = "Sve_GatherPrefetch32Bit_Indices_int_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "GatherPrefetch32Bit", ["RetBaseType"] = "void", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int32", ["Op2BaseType"] = "void", ["Op3VectorType"] = "Vector", ["Op3BaseType"] = "UInt64",["Op4BaseType"] = "SvePrefetchType",["LargestVectorSize"] = "64", ["NextValueOp1"] = "Helpers.getMaskInt32()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt64()", ["ValidPrefetch"] = "SvePrefetchType.StoreL3NonTemporal", ["InvalidPrefetch"] = "(SvePrefetchType)153"}), + ("SveGatherPrefetchVectorBases.template", new Dictionary { ["TestName"] = "Sve_GatherPrefetch64Bit_Bases_ulong_uint", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "GatherPrefetch64Bit", ["RetBaseType"] = "void", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt32", ["Op3BaseType"] = "SvePrefetchType",["LargestVectorSize"] = "64", ["NextValueOp1"] = "Helpers.getMaskUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidPrefetch"] = "SvePrefetchType.StoreL2NonTemporal", ["InvalidPrefetch"] = "(SvePrefetchType)100"}), + ("SveGatherPrefetchVectorBases.template", new Dictionary { ["TestName"] = "Sve_GatherPrefetch64Bit_Bases_long_uint", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "GatherPrefetch64Bit", ["RetBaseType"] = "void", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt32", ["Op3BaseType"] = "SvePrefetchType",["LargestVectorSize"] = "64", ["NextValueOp1"] = "Helpers.getMaskInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidPrefetch"] = "SvePrefetchType.StoreL2Temporal", ["InvalidPrefetch"] = "(SvePrefetchType)100"}), + ("SveGatherPrefetchVectorBases.template", new Dictionary { ["TestName"] = "Sve_GatherPrefetch64Bit_Bases_ulong_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "GatherPrefetch64Bit", ["RetBaseType"] = "void", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["Op3BaseType"] = "SvePrefetchType",["LargestVectorSize"] = "64", ["NextValueOp1"] = "Helpers.getMaskUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidPrefetch"] = "SvePrefetchType.LoadL3NonTemporal", ["InvalidPrefetch"] = "(SvePrefetchType)100"}), + ("SveGatherPrefetchVectorBases.template", new Dictionary { ["TestName"] = "Sve_GatherPrefetch64Bit_Bases_long_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "GatherPrefetch64Bit", ["RetBaseType"] = "void", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["Op3BaseType"] = "SvePrefetchType",["LargestVectorSize"] = "64", ["NextValueOp1"] = "Helpers.getMaskInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidPrefetch"] = "SvePrefetchType.LoadL2NonTemporal", ["InvalidPrefetch"] = "(SvePrefetchType)100"}), + ("SveGatherPrefetchIndices.template", new Dictionary { ["TestName"] = "Sve_GatherPrefetch64Bit_Indices_ulong_int", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "GatherPrefetch64Bit", ["RetBaseType"] = "void", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt64", ["Op2BaseType"] = "void", ["Op3VectorType"] = "Vector", ["Op3BaseType"] = "Int32",["Op4BaseType"] = "SvePrefetchType",["LargestVectorSize"] = "64", ["NextValueOp1"] = "Helpers.getMaskUInt64()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt32()", ["ValidPrefetch"] = "SvePrefetchType.StoreL3Temporal", ["InvalidPrefetch"] = "(SvePrefetchType)242"}), + ("SveGatherPrefetchIndices.template", new Dictionary { ["TestName"] = "Sve_GatherPrefetch64Bit_Indices_long_int", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "GatherPrefetch64Bit", ["RetBaseType"] = "void", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int64", ["Op2BaseType"] = "void", ["Op3VectorType"] = "Vector", ["Op3BaseType"] = "Int32",["Op4BaseType"] = "SvePrefetchType",["LargestVectorSize"] = "64", ["NextValueOp1"] = "Helpers.getMaskInt64()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt32()", ["ValidPrefetch"] = "SvePrefetchType.StoreL1NonTemporal", ["InvalidPrefetch"] = "(SvePrefetchType)232"}), + ("SveGatherPrefetchIndices.template", new Dictionary { ["TestName"] = "Sve_GatherPrefetch64Bit_Indices_ulong_uint", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "GatherPrefetch64Bit", ["RetBaseType"] = "void", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt64", ["Op2BaseType"] = "void", ["Op3VectorType"] = "Vector", ["Op3BaseType"] = "UInt32",["Op4BaseType"] = "SvePrefetchType",["LargestVectorSize"] = "64", ["NextValueOp1"] = "Helpers.getMaskUInt64()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt32()", ["ValidPrefetch"] = "SvePrefetchType.StoreL1NonTemporal", ["InvalidPrefetch"] = "(SvePrefetchType)223"}), + ("SveGatherPrefetchIndices.template", new Dictionary { ["TestName"] = "Sve_GatherPrefetch64Bit_Indices_long_uint", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "GatherPrefetch64Bit", ["RetBaseType"] = "void", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int64", ["Op2BaseType"] = "void", ["Op3VectorType"] = "Vector", ["Op3BaseType"] = "UInt32",["Op4BaseType"] = "SvePrefetchType",["LargestVectorSize"] = "64", ["NextValueOp1"] = "Helpers.getMaskInt64()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt32()", ["ValidPrefetch"] = "SvePrefetchType.LoadL1Temporal", ["InvalidPrefetch"] = "(SvePrefetchType)62"}), + ("SveGatherPrefetchIndices.template", new Dictionary { ["TestName"] = "Sve_GatherPrefetch64Bit_Indices_ulong_long", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "GatherPrefetch64Bit", ["RetBaseType"] = "void", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt64", ["Op2BaseType"] = "void", ["Op3VectorType"] = "Vector", ["Op3BaseType"] = "Int64",["Op4BaseType"] = "SvePrefetchType",["LargestVectorSize"] = "64", ["NextValueOp1"] = "Helpers.getMaskUInt64()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt64()", ["ValidPrefetch"] = "SvePrefetchType.StoreL1Temporal", ["InvalidPrefetch"] = "(SvePrefetchType)43"}), + ("SveGatherPrefetchIndices.template", new Dictionary { ["TestName"] = "Sve_GatherPrefetch64Bit_Indices_long_long", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "GatherPrefetch64Bit", ["RetBaseType"] = "void", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int64", ["Op2BaseType"] = "void", ["Op3VectorType"] = "Vector", ["Op3BaseType"] = "Int64",["Op4BaseType"] = "SvePrefetchType",["LargestVectorSize"] = "64", ["NextValueOp1"] = "Helpers.getMaskInt64()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt64()", ["ValidPrefetch"] = "SvePrefetchType.LoadL3NonTemporal", ["InvalidPrefetch"] = "(SvePrefetchType)166"}), + ("SveGatherPrefetchIndices.template", new Dictionary { ["TestName"] = "Sve_GatherPrefetch64Bit_Indices_ulong_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "GatherPrefetch64Bit", ["RetBaseType"] = "void", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt64", ["Op2BaseType"] = "void", ["Op3VectorType"] = "Vector", ["Op3BaseType"] = "UInt64",["Op4BaseType"] = "SvePrefetchType",["LargestVectorSize"] = "64", ["NextValueOp1"] = "Helpers.getMaskUInt64()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt64()", ["ValidPrefetch"] = "SvePrefetchType.LoadL2NonTemporal", ["InvalidPrefetch"] = "(SvePrefetchType)234"}), + ("SveGatherPrefetchIndices.template", new Dictionary { ["TestName"] = "Sve_GatherPrefetch64Bit_Indices_long_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "GatherPrefetch64Bit", ["RetBaseType"] = "void", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int64", ["Op2BaseType"] = "void", ["Op3VectorType"] = "Vector", ["Op3BaseType"] = "UInt64",["Op4BaseType"] = "SvePrefetchType",["LargestVectorSize"] = "64", ["NextValueOp1"] = "Helpers.getMaskInt64()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt64()", ["ValidPrefetch"] = "SvePrefetchType.StoreL1NonTemporal", ["InvalidPrefetch"] = "(SvePrefetchType)46"}), + ("SveGatherPrefetchVectorBases.template", new Dictionary { ["TestName"] = "Sve_GatherPrefetch8Bit_Bases_byte_uint", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "GatherPrefetch8Bit", ["RetBaseType"] = "void", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt32", ["Op3BaseType"] = "SvePrefetchType",["LargestVectorSize"] = "64", ["NextValueOp1"] = "Helpers.getMaskByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidPrefetch"] = "SvePrefetchType.StoreL2Temporal", ["InvalidPrefetch"] = "(SvePrefetchType)100"}), + ("SveGatherPrefetchVectorBases.template", new Dictionary { ["TestName"] = "Sve_GatherPrefetch8Bit_Bases_sbyte_uint", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "GatherPrefetch8Bit", ["RetBaseType"] = "void", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt32", ["Op3BaseType"] = "SvePrefetchType",["LargestVectorSize"] = "64", ["NextValueOp1"] = "Helpers.getMaskSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidPrefetch"] = "SvePrefetchType.LoadL3NonTemporal", ["InvalidPrefetch"] = "(SvePrefetchType)100"}), + ("SveGatherPrefetchVectorBases.template", new Dictionary { ["TestName"] = "Sve_GatherPrefetch8Bit_Bases_byte_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "GatherPrefetch8Bit", ["RetBaseType"] = "void", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["Op3BaseType"] = "SvePrefetchType",["LargestVectorSize"] = "64", ["NextValueOp1"] = "Helpers.getMaskByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidPrefetch"] = "SvePrefetchType.LoadL1NonTemporal", ["InvalidPrefetch"] = "(SvePrefetchType)100"}), + ("SveGatherPrefetchVectorBases.template", new Dictionary { ["TestName"] = "Sve_GatherPrefetch8Bit_Bases_sbyte_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "GatherPrefetch8Bit", ["RetBaseType"] = "void", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["Op3BaseType"] = "SvePrefetchType",["LargestVectorSize"] = "64", ["NextValueOp1"] = "Helpers.getMaskSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidPrefetch"] = "SvePrefetchType.StoreL2NonTemporal", ["InvalidPrefetch"] = "(SvePrefetchType)100"}), + ("SveGatherPrefetchIndices.template", new Dictionary { ["TestName"] = "Sve_GatherPrefetch8Bit_Indices_byte_int", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "GatherPrefetch8Bit", ["RetBaseType"] = "void", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Byte", ["Op2BaseType"] = "void", ["Op3VectorType"] = "Vector", ["Op3BaseType"] = "Int32",["Op4BaseType"] = "SvePrefetchType",["LargestVectorSize"] = "64", ["NextValueOp1"] = "Helpers.getMaskByte()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt32()", ["ValidPrefetch"] = "SvePrefetchType.StoreL3Temporal", ["InvalidPrefetch"] = "(SvePrefetchType)51"}), + ("SveGatherPrefetchIndices.template", new Dictionary { ["TestName"] = "Sve_GatherPrefetch8Bit_Indices_sbyte_int", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "GatherPrefetch8Bit", ["RetBaseType"] = "void", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "SByte", ["Op2BaseType"] = "void", ["Op3VectorType"] = "Vector", ["Op3BaseType"] = "Int32",["Op4BaseType"] = "SvePrefetchType",["LargestVectorSize"] = "64", ["NextValueOp1"] = "Helpers.getMaskSByte()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt32()", ["ValidPrefetch"] = "SvePrefetchType.StoreL1Temporal", ["InvalidPrefetch"] = "(SvePrefetchType)82"}), + ("SveGatherPrefetchIndices.template", new Dictionary { ["TestName"] = "Sve_GatherPrefetch8Bit_Indices_byte_uint", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "GatherPrefetch8Bit", ["RetBaseType"] = "void", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Byte", ["Op2BaseType"] = "void", ["Op3VectorType"] = "Vector", ["Op3BaseType"] = "UInt32",["Op4BaseType"] = "SvePrefetchType",["LargestVectorSize"] = "64", ["NextValueOp1"] = "Helpers.getMaskByte()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt32()", ["ValidPrefetch"] = "SvePrefetchType.LoadL2Temporal", ["InvalidPrefetch"] = "(SvePrefetchType)236"}), + ("SveGatherPrefetchIndices.template", new Dictionary { ["TestName"] = "Sve_GatherPrefetch8Bit_Indices_sbyte_uint", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "GatherPrefetch8Bit", ["RetBaseType"] = "void", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "SByte", ["Op2BaseType"] = "void", ["Op3VectorType"] = "Vector", ["Op3BaseType"] = "UInt32",["Op4BaseType"] = "SvePrefetchType",["LargestVectorSize"] = "64", ["NextValueOp1"] = "Helpers.getMaskSByte()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt32()", ["ValidPrefetch"] = "SvePrefetchType.LoadL1NonTemporal", ["InvalidPrefetch"] = "(SvePrefetchType)45"}), + ("SveGatherPrefetchIndices.template", new Dictionary { ["TestName"] = "Sve_GatherPrefetch8Bit_Indices_byte_long", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "GatherPrefetch8Bit", ["RetBaseType"] = "void", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Byte", ["Op2BaseType"] = "void", ["Op3VectorType"] = "Vector", ["Op3BaseType"] = "Int64",["Op4BaseType"] = "SvePrefetchType",["LargestVectorSize"] = "64", ["NextValueOp1"] = "Helpers.getMaskByte()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt64()", ["ValidPrefetch"] = "SvePrefetchType.LoadL1Temporal", ["InvalidPrefetch"] = "(SvePrefetchType)34"}), + ("SveGatherPrefetchIndices.template", new Dictionary { ["TestName"] = "Sve_GatherPrefetch8Bit_Indices_sbyte_long", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "GatherPrefetch8Bit", ["RetBaseType"] = "void", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "SByte", ["Op2BaseType"] = "void", ["Op3VectorType"] = "Vector", ["Op3BaseType"] = "Int64",["Op4BaseType"] = "SvePrefetchType",["LargestVectorSize"] = "64", ["NextValueOp1"] = "Helpers.getMaskSByte()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt64()", ["ValidPrefetch"] = "SvePrefetchType.StoreL3NonTemporal", ["InvalidPrefetch"] = "(SvePrefetchType)43"}), + ("SveGatherPrefetchIndices.template", new Dictionary { ["TestName"] = "Sve_GatherPrefetch8Bit_Indices_byte_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "GatherPrefetch8Bit", ["RetBaseType"] = "void", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Byte", ["Op2BaseType"] = "void", ["Op3VectorType"] = "Vector", ["Op3BaseType"] = "UInt64",["Op4BaseType"] = "SvePrefetchType",["LargestVectorSize"] = "64", ["NextValueOp1"] = "Helpers.getMaskByte()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt64()", ["ValidPrefetch"] = "SvePrefetchType.StoreL3Temporal", ["InvalidPrefetch"] = "(SvePrefetchType)234"}), + ("SveGatherPrefetchIndices.template", new Dictionary { ["TestName"] = "Sve_GatherPrefetch8Bit_Indices_sbyte_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "GatherPrefetch8Bit", ["RetBaseType"] = "void", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "SByte", ["Op2BaseType"] = "void", ["Op3VectorType"] = "Vector", ["Op3BaseType"] = "UInt64",["Op4BaseType"] = "SvePrefetchType",["LargestVectorSize"] = "64", ["NextValueOp1"] = "Helpers.getMaskSByte()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt64()", ["ValidPrefetch"] = "SvePrefetchType.StoreL1Temporal", ["InvalidPrefetch"] = "(SvePrefetchType)86"}), + ("SveVecImmUnOpTest.template", new Dictionary { ["TestName"] = "Sve_DuplicateSelectedScalarToVector_float", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "DuplicateSelectedScalarToVector", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["InvalidImm"] = "16", ["Imm"] = "TestLibrary.Generator.GetByte() % 16", ["ValidateIterResult"] = "result[i] != (imm < Op1ElementCount ? firstOp[imm] : 0)", ["GetIterResult"] = "(Single)(imm < Op1ElementCount ? firstOp[imm] : 0)"}), ("SveVecImmUnOpTest.template", new Dictionary { ["TestName"] = "Sve_DuplicateSelectedScalarToVector_double", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "DuplicateSelectedScalarToVector", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["InvalidImm"] = "8", ["Imm"] = "TestLibrary.Generator.GetByte() % 8", ["ValidateIterResult"] = "result[i] != (imm < Op1ElementCount ? firstOp[imm] : 0)", ["GetIterResult"] = "(Double)(imm < Op1ElementCount ? firstOp[imm] : 0)"}), ("SveVecImmUnOpTest.template", new Dictionary { ["TestName"] = "Sve_DuplicateSelectedScalarToVector_sbyte", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "DuplicateSelectedScalarToVector", ["RetVectorType"] = "Vector", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "SByte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["InvalidImm"] = "64", ["Imm"] = "TestLibrary.Generator.GetByte() % 64", ["ValidateIterResult"] = "result[i] != (imm < Op1ElementCount ? firstOp[imm] : 0)", ["GetIterResult"] = "(SByte)(imm < Op1ElementCount ? firstOp[imm] : 0)"}), diff --git a/src/tests/JIT/HardwareIntrinsics/Arm/Shared/SveGatherPrefetchIndices.template b/src/tests/JIT/HardwareIntrinsics/Arm/Shared/SveGatherPrefetchIndices.template new file mode 100644 index 00000000000000..c0db6e80431b78 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/Arm/Shared/SveGatherPrefetchIndices.template @@ -0,0 +1,347 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +/****************************************************************************** + * This file is auto-generated from a template file by the GenerateTests.csx * + * script in tests\src\JIT\HardwareIntrinsics\Arm\Shared. In order to make * + * changes, please update the corresponding template and run according to the * + * directions listed in the file. * + ******************************************************************************/ + +using System; +using System.Numerics; +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Runtime.Intrinsics; +using System.Runtime.Intrinsics.Arm; +using Xunit; + +namespace JIT.HardwareIntrinsics.Arm +{ + public static partial class Program + { + [Fact] + public static void {TestName}() + { + var test = new SveGatherPrefetchIndices__{TestName}(); + + if (test.IsSupported) + { + // Validates basic functionality works, using Unsafe.Read + test.RunBasicScenario_UnsafeRead(); + + // Validates basic functionality works + test.RunBasicScenario_Load(); + + // Validates fully masked out load works. + test.RunBasicScenario_FalseMask(); + + // Validates fully masked out load with invalid address works. + test.RunBasicScenario_NonFaulting(); + + // Validates an invalid immediate fails. + test.RunBasicScenario_Invalid(); + + // Validates calling via reflection works, using Unsafe.Read + test.RunReflectionScenario_UnsafeRead(); + + // Validates passing a local works, using Unsafe.Read + test.RunLclVarScenario_UnsafeRead(); + + // Validates passing an instance member of a class works + test.RunClassFldScenario(); + + // Validates passing the field of a local struct works + test.RunStructLclFldScenario(); + + // Validates passing an instance member of a struct works + test.RunStructFldScenario(); + } + else + { + // Validates we throw on unsupported hardware + test.RunUnsupportedScenario(); + } + + if (!test.Succeeded) + { + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } + + public sealed unsafe class SveGatherPrefetchIndices__{TestName} + { + private struct DataTable + { + private byte[] inArray1; + private byte[] inArray2; + private byte[] inArray3; + + private GCHandle inHandle1; + private GCHandle inHandle2; + private GCHandle inHandle3; + + private ulong alignment; + + public DataTable({Op1BaseType}[] inArray1, byte[] inArray2, {Op3BaseType}[] inArray3, int alignment) + { + int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf<{Op1BaseType}>(); + int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf(); + int sizeOfinArray3 = inArray3.Length * Unsafe.SizeOf<{Op3BaseType}>(); + + if ((alignment != 64 && alignment != 16 && alignment != 8) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray3 ) + { + throw new ArgumentException($"Invalid value of alignment: {alignment}, sizeOfinArray1: {sizeOfinArray1}, sizeOfinArray2: {sizeOfinArray2}, sizeOfinArray3: {sizeOfinArray3},"); + } + + this.inArray1 = new byte[alignment * 2]; + this.inArray2 = new byte[alignment + sizeOfinArray2]; + this.inArray3 = new byte[alignment * 2]; + + this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); + this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); + this.inHandle3 = GCHandle.Alloc(this.inArray3, GCHandleType.Pinned); + + this.alignment = (ulong)alignment; + + Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As<{Op1BaseType}, byte>(ref inArray1[0]), (uint)sizeOfinArray1); + Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As(ref inArray2[0]), (uint)sizeOfinArray2); + Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray3Ptr), ref Unsafe.As<{Op3BaseType}, byte>(ref inArray3[0]), (uint)sizeOfinArray3); + } + + public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); + public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); + public void* inArray3Ptr => Align((byte*)(inHandle3.AddrOfPinnedObject().ToPointer()), alignment); + + public void Dispose() + { + inHandle1.Free(); + inHandle2.Free(); + inHandle3.Free(); + } + + private static unsafe void* Align(byte* buffer, ulong expectedAlignment) + { + return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); + } + } + + private struct TestStruct + { + public {Op1VectorType}<{Op1BaseType}> _fld1; + public byte* _fld2; + public {Op3VectorType}<{Op3BaseType}> _fld3; + + public static TestStruct Create(DataTable _dataTable) + { + var testStruct = new TestStruct(); + + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = {NextValueOp1}; } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = 0; } + + // Ensure all values of _data3 fit within the number of _data2 elements + for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = {NextValueOp3} % ({Op3BaseType})Op2ElementCount; } + + Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op1VectorType}<{Op1BaseType}>, byte>(ref testStruct._fld1), ref Unsafe.As<{Op1BaseType}, byte>(ref _data1[0]), (uint)Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>()); + Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op3VectorType}<{Op3BaseType}>, byte>(ref testStruct._fld3), ref Unsafe.As<{Op3BaseType}, byte>(ref _data3[0]), (uint)Unsafe.SizeOf<{Op3VectorType}<{Op3BaseType}>>()); + + testStruct._fld2 = (byte*)_dataTable.inArray2Ptr; + + return testStruct; + } + + public void RunStructFldScenario(SveGatherPrefetchIndices__{TestName} testClass) + { + {Isa}.{Method}(_fld1, _fld2, _fld3, {ValidPrefetch}); + } + } + + private static readonly int LargestVectorSize = {LargestVectorSize}; + + // A large enough buffer to hold many values. Op3 will index into Op2. + private static readonly int Op2ElementCount = 1024; + + private static readonly int Op1ElementCount = Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>() / sizeof({Op1BaseType}); + private static readonly int Op3ElementCount = Unsafe.SizeOf<{Op3VectorType}<{Op3BaseType}>>() / sizeof({Op3BaseType}); + + private static {Op1BaseType}[] _data1 = new {Op1BaseType}[Op1ElementCount]; + private static byte[] _data2 = new byte[Op2ElementCount]; + private static {Op3BaseType}[] _data3 = new {Op3BaseType}[Op3ElementCount]; + + private {Op1VectorType}<{Op1BaseType}> _fld1; + private byte* _fld2; + private {Op3VectorType}<{Op3BaseType}> _fld3; + + private {Op1VectorType}<{Op1BaseType}> _mask; + private {Op1VectorType}<{Op1BaseType}> _falseFld; + + private DataTable _dataTable; + + public SveGatherPrefetchIndices__{TestName}() + { + Succeeded = true; + + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = {NextValueOp1}; } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = 0; } + + // Ensure all values of _data3 fit within the number of _data2 elements + for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = {NextValueOp3} % ({Op3BaseType})Op2ElementCount; } + + Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op1VectorType}<{Op1BaseType}>, byte>(ref _fld1), ref Unsafe.As<{Op1BaseType}, byte>(ref _data1[0]), (uint)Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>()); + Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op3VectorType}<{Op3BaseType}>, byte>(ref _fld3), ref Unsafe.As<{Op3BaseType}, byte>(ref _data3[0]), (uint)Unsafe.SizeOf<{Op3VectorType}<{Op3BaseType}>>()); + + _dataTable = new DataTable(_data1, _data2, _data3, LargestVectorSize); + + _fld2 = (byte*)_dataTable.inArray2Ptr; + } + + public bool IsSupported => {Isa}.IsSupported; + + public bool Succeeded { get; set; } + + public void RunBasicScenario_UnsafeRead() + { + TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); + + {Isa}.{Method}( + Unsafe.Read<{Op1VectorType}<{Op1BaseType}>>(_dataTable.inArray1Ptr), + (byte*)_dataTable.inArray2Ptr, + Unsafe.Read<{Op3VectorType}<{Op3BaseType}>>(_dataTable.inArray3Ptr), + {ValidPrefetch} + ); + } + + public void RunBasicScenario_Load() + { + TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); + + {Op1VectorType}<{Op1BaseType}> loadMask1 = Sve.CreateTrueMask{Op1BaseType}(SveMaskPattern.All); + {Op3VectorType}<{Op3BaseType}> loadMask3 = Sve.CreateTrueMask{Op3BaseType}(SveMaskPattern.All); + + {Isa}.{Method}( + {LoadIsa}.Load{Op1VectorType}(loadMask1, ({Op1BaseType}*)(_dataTable.inArray1Ptr)), + (byte*)_dataTable.inArray2Ptr, + {LoadIsa}.Load{Op3VectorType}(loadMask3, ({Op3BaseType}*)(_dataTable.inArray3Ptr)), + {ValidPrefetch} + ); + } + + public void RunBasicScenario_FalseMask() + { + TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_FalseMask)); + + {Op1VectorType}<{Op1BaseType}> falseMask = Sve.CreateFalseMask{Op1BaseType}(); + + {Isa}.{Method}( + falseMask, + (byte*)_dataTable.inArray2Ptr, + Unsafe.Read<{Op3VectorType}<{Op3BaseType}>>(_dataTable.inArray3Ptr), + {ValidPrefetch} + ); + } + + public void RunBasicScenario_NonFaulting() + { + TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_NonFaulting)); + + {Op1VectorType}<{Op1BaseType}> falseMask = Sve.CreateFalseMask{Op1BaseType}(); + + try + { + {Isa}.{Method}( + falseMask, + default, + Unsafe.Read<{Op3VectorType}<{Op3BaseType}>>(_dataTable.inArray3Ptr), + {ValidPrefetch} + ); + } + catch + { + Succeeded = false; + } + } + + public void RunBasicScenario_Invalid() + { + TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Invalid)); + + try + { + {Isa}.{Method}( + Unsafe.Read<{Op1VectorType}<{Op1BaseType}>>(_dataTable.inArray1Ptr), + (byte*)_dataTable.inArray2Ptr, + Unsafe.Read<{Op3VectorType}<{Op3BaseType}>>(_dataTable.inArray3Ptr), + {InvalidPrefetch} + ); + Succeeded = false; + } + catch (ArgumentOutOfRangeException) + { + } + } + + public void RunReflectionScenario_UnsafeRead() + { + TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); + + typeof({Isa}).GetMethod(nameof({Isa}.{Method}), new Type[] { typeof({Op1VectorType}<{Op1BaseType}>), typeof({Op2BaseType}*), typeof({Op3VectorType}<{Op3BaseType}>), typeof({Op4BaseType}) }) + .Invoke(null, new object[] { + Unsafe.Read<{Op1VectorType}<{Op1BaseType}>>(_dataTable.inArray1Ptr), + Pointer.Box(_dataTable.inArray2Ptr, typeof(byte*)), + Unsafe.Read<{Op3VectorType}<{Op3BaseType}>>(_dataTable.inArray3Ptr), + {ValidPrefetch} + }); + } + + public void RunLclVarScenario_UnsafeRead() + { + TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); + + var op1 = Unsafe.Read<{Op1VectorType}<{Op1BaseType}>>(_dataTable.inArray1Ptr); + var op2 = (byte*)_dataTable.inArray2Ptr; + var op3 = Unsafe.Read<{Op3VectorType}<{Op3BaseType}>>(_dataTable.inArray3Ptr); + {Isa}.{Method}(op1, op2, op3, {ValidPrefetch}); + } + + public void RunClassFldScenario() + { + TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); + + {Isa}.{Method}(_fld1, _fld2, _fld3, {ValidPrefetch}); + } + + public void RunStructLclFldScenario() + { + TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); + + var test = TestStruct.Create(_dataTable); + {Isa}.{Method}(test._fld1, test._fld2, test._fld3, {ValidPrefetch}); + } + + public void RunStructFldScenario() + { + TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); + + var test = TestStruct.Create(_dataTable); + test.RunStructFldScenario(this); + } + + public void RunUnsupportedScenario() + { + TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); + + Succeeded = false; + + try + { + RunBasicScenario_Load(); + } + catch (PlatformNotSupportedException) + { + Succeeded = true; + } + } + } +} \ No newline at end of file diff --git a/src/tests/JIT/HardwareIntrinsics/Arm/Shared/SveGatherPrefetchVectorBases.template b/src/tests/JIT/HardwareIntrinsics/Arm/Shared/SveGatherPrefetchVectorBases.template new file mode 100644 index 00000000000000..fde49422083e2e --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/Arm/Shared/SveGatherPrefetchVectorBases.template @@ -0,0 +1,340 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +/****************************************************************************** + * This file is auto-generated from a template file by the GenerateTests.csx * + * script in tests\src\JIT\HardwareIntrinsics\Arm\Shared. In order to make * + * changes, please update the corresponding template and run according to the * + * directions listed in the file. * + ******************************************************************************/ + +using System; +using System.Numerics; +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Runtime.Intrinsics; +using System.Runtime.Intrinsics.Arm; +using Xunit; + +namespace JIT.HardwareIntrinsics.Arm +{ + public static partial class Program + { + [Fact] + public static void {TestName}() + { + var test = new SveGatherPrefetchVectorBasesTest__{TestName}(); + + if (test.IsSupported) + { + // Validates basic functionality works, using Unsafe.Read + test.RunBasicScenario_UnsafeRead(); + + // Validates basic functionality works + test.RunBasicScenario_Load(); + + // Validates fully masked out load works. + test.RunBasicScenario_FalseMask(); + + // Validates fully masked out load with invalid address works. + test.RunBasicScenario_NonFaulting(); + + // Validates an invalid immediate fails. + test.RunBasicScenario_Invalid(); + + // Validates calling via reflection works, using Unsafe.Read + test.RunReflectionScenario_UnsafeRead(); + + // Validates passing a local works, using Unsafe.Read + test.RunLclVarScenario_UnsafeRead(); + + // Validates passing an instance member of a class works + test.RunClassFldScenario(); + + // Validates passing the field of a local struct works + test.RunStructLclFldScenario(); + + // Validates passing an instance member of a struct works + test.RunStructFldScenario(); + } + else + { + // Validates we throw on unsupported hardware + test.RunUnsupportedScenario(); + } + + if (!test.Succeeded) + { + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } + + public sealed unsafe class SveGatherPrefetchVectorBasesTest__{TestName} + { + private struct DataTable + { + private byte[] inArray1; + private byte[] inArray2; + private byte[] baseArray; + + private GCHandle inHandle1; + private GCHandle inHandle2; + private GCHandle baseHandle; + + private ulong alignment; + + public DataTable({Op1BaseType}[] inArray1, {Op2BaseType}[] inArray2, byte[] baseArray, int alignment) + { + int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf<{Op1BaseType}>(); + int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf<{Op2BaseType}>(); + int sizeOfBaseArray = baseArray.Length * Unsafe.SizeOf(); + + if ((alignment != 64 && alignment != 16 && alignment != 8) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2) + { + throw new ArgumentException($"Invalid value of alignment: {alignment}, sizeOfinArray1: {sizeOfinArray1}, sizeOfinArray2: {sizeOfinArray2}"); + } + + this.inArray1 = new byte[alignment * 2]; + this.inArray2 = new byte[alignment * 2]; + this.baseArray = new byte[alignment + sizeOfBaseArray]; + + this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); + this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); + this.baseHandle = GCHandle.Alloc(this.baseArray, GCHandleType.Pinned); + + this.alignment = (ulong)alignment; + + Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As<{Op1BaseType}, byte>(ref inArray1[0]), (uint)sizeOfinArray1); + Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(baseArrayPtr), ref Unsafe.As(ref baseArray[0]), (uint)sizeOfBaseArray); + + // Add the base pointer to the offsets within inArray2 to create complete pointers. + for (var i = 0; i < inArray2.Length; i++) { inArray2[i] += ({Op2BaseType})baseArrayPtr; } + Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As<{Op2BaseType}, byte>(ref inArray2[0]), (uint)sizeOfinArray2); + } + + public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); + public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); + public void* baseArrayPtr => Align((byte*)(baseHandle.AddrOfPinnedObject().ToPointer()), alignment); + + public void Dispose() + { + inHandle1.Free(); + inHandle2.Free(); + baseHandle.Free(); + } + + private static unsafe void* Align(byte* buffer, ulong expectedAlignment) + { + return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); + } + } + + private struct TestStruct + { + public {Op1VectorType}<{Op1BaseType}> _fld1; + public {Op2VectorType}<{Op2BaseType}> _fld2; + + public static TestStruct Create(DataTable _dataTable) + { + var testStruct = new TestStruct(); + + for (var i = 0; i < BaseElementCount; i++) { _datab[i] = TestLibrary.Generator.GetByte(); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = {NextValueOp1}; } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = {NextValueOp2}; } + + // Fill full of offsets into the data buffer. + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = {NextValueOp2} % ({Op2BaseType})BaseElementCount; } + + // Add the base pointer to the offsets within inArray2 to create complete pointers. + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] += ({Op2BaseType})_dataTable.baseArrayPtr; } + + Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op1VectorType}<{Op1BaseType}>, byte>(ref testStruct._fld1), ref Unsafe.As<{Op1BaseType}, byte>(ref _data1[0]), (uint)Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>()); + Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op2VectorType}<{Op2BaseType}>, byte>(ref testStruct._fld2), ref Unsafe.As<{Op2BaseType}, byte>(ref _data2[0]), (uint)Unsafe.SizeOf<{Op2VectorType}<{Op2BaseType}>>()); + + return testStruct; + } + + public void RunStructFldScenario(SveGatherPrefetchVectorBasesTest__{TestName} testClass) + { + {Isa}.{Method}(_fld1, _fld2, {ValidPrefetch}); + } + } + + private static readonly int LargestVectorSize = {LargestVectorSize}; + + // A large enough buffer to hold many values. + // Values in Op2 will point to locations within this buffer. + private static readonly int BaseElementCount = 1024; + private static byte[] _datab = new byte[BaseElementCount]; + + private static readonly int Op1ElementCount = Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>() / sizeof({Op1BaseType}); + private static readonly int Op2ElementCount = Unsafe.SizeOf<{Op2VectorType}<{Op2BaseType}>>() / sizeof({Op2BaseType}); + + private static {Op1BaseType}[] _data1 = new {Op1BaseType}[Op1ElementCount]; + private static {Op2BaseType}[] _data2 = new {Op2BaseType}[Op2ElementCount]; + + private {Op1VectorType}<{Op1BaseType}> _fld1; + private {Op2VectorType}<{Op2BaseType}> _fld2; + + private DataTable _dataTable; + + public SveGatherPrefetchVectorBasesTest__{TestName}() + { + Succeeded = true; + + for (var i = 0; i < BaseElementCount; i++) { _datab[i] = TestLibrary.Generator.GetByte(); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = {NextValueOp1}; } + + // Fill full of offsets into the data buffer. They wil be expanded to full pointers inside the DataTable constructor. + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = {NextValueOp2} % ({Op2BaseType})BaseElementCount; } + + _dataTable = new DataTable(_data1, _data2, _datab, LargestVectorSize); + + Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op1VectorType}<{Op1BaseType}>, byte>(ref _fld1), ref Unsafe.As<{Op1BaseType}, byte>(ref _data1[0]), (uint)Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>()); + Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op2VectorType}<{Op2BaseType}>, byte>(ref _fld2), ref Unsafe.As<{Op2BaseType}, byte>(ref _data2[0]), (uint)Unsafe.SizeOf<{Op2VectorType}<{Op2BaseType}>>()); + } + + public bool IsSupported => {Isa}.IsSupported; + + public bool Succeeded { get; set; } + + public void RunBasicScenario_UnsafeRead() + { + TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); + + {Isa}.{Method}( + Unsafe.Read<{Op1VectorType}<{Op1BaseType}>>(_dataTable.inArray1Ptr), + Unsafe.Read<{Op2VectorType}<{Op2BaseType}>>(_dataTable.inArray2Ptr), + {ValidPrefetch} + ); + } + + public void RunBasicScenario_Load() + { + TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); + + {Op1VectorType}<{Op1BaseType}> loadMask1 = Sve.CreateTrueMask{Op1BaseType}(SveMaskPattern.All); + {Op2VectorType}<{Op2BaseType}> loadMask2 = Sve.CreateTrueMask{Op2BaseType}(SveMaskPattern.All); + + {Isa}.{Method}( + {LoadIsa}.Load{Op1VectorType}(loadMask1, ({Op1BaseType}*)(_dataTable.inArray1Ptr)), + {LoadIsa}.Load{Op2VectorType}(loadMask2, ({Op2BaseType}*)(_dataTable.inArray2Ptr)), + {ValidPrefetch} + ); + } + + + public void RunBasicScenario_FalseMask() + { + TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_FalseMask)); + + {Op1VectorType}<{Op1BaseType}> falseMask = Sve.CreateFalseMask{Op1BaseType}(); + + {Isa}.{Method}( + falseMask, + Unsafe.Read<{Op2VectorType}<{Op2BaseType}>>(_dataTable.inArray2Ptr), + {ValidPrefetch} + ); + } + + public void RunBasicScenario_NonFaulting() + { + TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_NonFaulting)); + + {Op1VectorType}<{Op1BaseType}> falseMask = Sve.CreateFalseMask{Op1BaseType}(); + + try + { + {Isa}.{Method}( + falseMask, + {Op2VectorType}<{Op2BaseType}>.Zero, + {ValidPrefetch} + ); + } + catch + { + Succeeded = false; + } + } + + public void RunBasicScenario_Invalid() + { + TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Invalid)); + + try + { + {Isa}.{Method}( + Unsafe.Read<{Op1VectorType}<{Op1BaseType}>>(_dataTable.inArray1Ptr), + Unsafe.Read<{Op2VectorType}<{Op2BaseType}>>(_dataTable.inArray2Ptr), + {InvalidPrefetch} + ); + Succeeded = false; + } + catch (ArgumentOutOfRangeException) + { + } + } + + public void RunReflectionScenario_UnsafeRead() + { + TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); + + typeof({Isa}).GetMethod(nameof({Isa}.{Method}), new Type[] { typeof({Op1VectorType}<{Op1BaseType}>), typeof({Op1VectorType}<{Op2BaseType}>), typeof({Op3BaseType}) }) + .Invoke(null, new object[] { + Unsafe.Read<{Op1VectorType}<{Op1BaseType}>>(_dataTable.inArray1Ptr), + Unsafe.Read<{Op2VectorType}<{Op2BaseType}>>(_dataTable.inArray2Ptr), + {ValidPrefetch} + }); + } + + public void RunLclVarScenario_UnsafeRead() + { + TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); + + var op1 = Unsafe.Read<{Op1VectorType}<{Op1BaseType}>>(_dataTable.inArray1Ptr); + var op2 = Unsafe.Read<{Op2VectorType}<{Op2BaseType}>>(_dataTable.inArray2Ptr); + {Isa}.{Method}(op1, op2, {ValidPrefetch}); + } + + public void RunClassFldScenario() + { + TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); + + {Isa}.{Method}(_fld1, _fld2, {ValidPrefetch}); + } + + public void RunStructLclFldScenario() + { + TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); + + var test = TestStruct.Create(_dataTable); + {Isa}.{Method}(test._fld1, test._fld2, {ValidPrefetch}); + } + + public void RunStructFldScenario() + { + TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); + + var test = TestStruct.Create(_dataTable); + test.RunStructFldScenario(this); + } + + public void RunUnsupportedScenario() + { + TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); + + Succeeded = false; + + try + { + RunBasicScenario_Load(); + } + catch (PlatformNotSupportedException) + { + Succeeded = true; + } + } + } +} \ No newline at end of file