From c92e77c599aef0ab4b96630f6784c30e08ce218c Mon Sep 17 00:00:00 2001 From: Swapnil Gaikwad Date: Wed, 15 May 2024 18:02:26 +0100 Subject: [PATCH 1/3] Add Sve.StoreNarrowing() --- src/coreclr/jit/gentree.cpp | 1 + src/coreclr/jit/hwintrinsicarm64.cpp | 27 ++ src/coreclr/jit/hwintrinsiccodegenarm64.cpp | 9 + src/coreclr/jit/hwintrinsiclistarm64sve.h | 1 + .../Arm/Sve.PlatformNotSupported.cs | 74 ++++ .../src/System/Runtime/Intrinsics/Arm/Sve.cs | 74 ++++ .../ref/System.Runtime.Intrinsics.cs | 13 + .../GenerateHWIntrinsicTests_Arm.cs | 13 + .../Arm/Shared/SveStoreNarrowingTest.template | 332 ++++++++++++++++++ 9 files changed, 544 insertions(+) create mode 100644 src/tests/JIT/HardwareIntrinsics/Arm/Shared/SveStoreNarrowingTest.template diff --git a/src/coreclr/jit/gentree.cpp b/src/coreclr/jit/gentree.cpp index 2b9ec27eb8228..78a6aef4267e1 100644 --- a/src/coreclr/jit/gentree.cpp +++ b/src/coreclr/jit/gentree.cpp @@ -26711,6 +26711,7 @@ bool GenTreeHWIntrinsic::OperIsMemoryStore(GenTree** pAddr) const case NI_Sve_StoreAndZipx2: case NI_Sve_StoreAndZipx3: case NI_Sve_StoreAndZipx4: + case NI_Sve_StoreNarrowing: addr = Op(2); break; #endif // TARGET_ARM64 diff --git a/src/coreclr/jit/hwintrinsicarm64.cpp b/src/coreclr/jit/hwintrinsicarm64.cpp index 5a30c54fe78f5..c2d043aa52180 100644 --- a/src/coreclr/jit/hwintrinsicarm64.cpp +++ b/src/coreclr/jit/hwintrinsicarm64.cpp @@ -2479,6 +2479,33 @@ GenTree* Compiler::impSpecialIntrinsic(NamedIntrinsic intrinsic, break; } + case NI_Sve_StoreNarrowing: + { + assert(sig->numArgs == 3); + assert(retType == TYP_VOID); + + CORINFO_ARG_LIST_HANDLE arg = sig->args; + arg = info.compCompHnd->getArgNext(arg); + CORINFO_CLASS_HANDLE argClass = info.compCompHnd->getArgClass(sig, arg); + CorInfoType ptrType = getBaseJitTypeAndSizeOfSIMDType(argClass); + CORINFO_CLASS_HANDLE tmpClass = NO_CLASS_HANDLE; + + // The size of narrowed target elements is determined from the second argument of StoreNarrowing(). + // Thus, we first extract the datatype of a pointer passed in the second argument and then store it as the auxiliary + // type of intrinsic. This auxiliary type is then used in the codegen to choose the correct instruction to emit. + ptrType = strip(info.compCompHnd->getArgType(sig, arg, &tmpClass)); + assert(ptrType == CORINFO_TYPE_PTR); + ptrType = info.compCompHnd->getChildType(argClass, &tmpClass); + assert(ptrType < simdBaseJitType); + + op3 = impPopStack().val; + op2 = impPopStack().val; + op1 = impPopStack().val; + retNode = gtNewSimdHWIntrinsicNode(retType, op1, op2, op3, intrinsic, simdBaseJitType, simdSize); + retNode->AsHWIntrinsic()->SetAuxiliaryJitType(ptrType); + break; + } + default: { return nullptr; diff --git a/src/coreclr/jit/hwintrinsiccodegenarm64.cpp b/src/coreclr/jit/hwintrinsiccodegenarm64.cpp index 572b6f24e46cc..9536405b8ad29 100644 --- a/src/coreclr/jit/hwintrinsiccodegenarm64.cpp +++ b/src/coreclr/jit/hwintrinsiccodegenarm64.cpp @@ -884,6 +884,10 @@ void CodeGen::genHWIntrinsic(GenTreeHWIntrinsic* node) ins = varTypeIsUnsigned(intrin.baseType) ? INS_umsubl : INS_smsubl; break; + case NI_Sve_StoreNarrowing: + ins = HWIntrinsicInfo::lookupIns(intrin.id, node->GetAuxiliaryType()); + break; + default: ins = HWIntrinsicInfo::lookupIns(intrin.id, intrin.baseType); break; @@ -1773,6 +1777,11 @@ void CodeGen::genHWIntrinsic(GenTreeHWIntrinsic* node) break; } + case NI_Sve_StoreNarrowing: + opt = emitter::optGetSveInsOpt(emitTypeSize(intrin.baseType)); + GetEmitter()->emitIns_R_R_R_I(ins, emitSize, op3Reg, op1Reg, op2Reg, 0, opt); + break; + case NI_Sve_UnzipEven: case NI_Sve_UnzipOdd: case NI_Sve_ZipHigh: diff --git a/src/coreclr/jit/hwintrinsiclistarm64sve.h b/src/coreclr/jit/hwintrinsiclistarm64sve.h index ba1514d65fea6..ad264a6a03867 100644 --- a/src/coreclr/jit/hwintrinsiclistarm64sve.h +++ b/src/coreclr/jit/hwintrinsiclistarm64sve.h @@ -118,6 +118,7 @@ HARDWARE_INTRINSIC(Sve, SignExtend8, HARDWARE_INTRINSIC(Sve, SignExtendWideningLower, -1, 1, true, {INS_sve_sunpklo, INS_invalid, INS_sve_sunpklo, INS_invalid, INS_sve_sunpklo, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_Scalable|HW_Flag_BaseTypeFromFirstArg) HARDWARE_INTRINSIC(Sve, SignExtendWideningUpper, -1, 1, true, {INS_sve_sunpkhi, INS_invalid, INS_sve_sunpkhi, INS_invalid, INS_sve_sunpkhi, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_Scalable|HW_Flag_BaseTypeFromFirstArg) HARDWARE_INTRINSIC(Sve, StoreAndZip, -1, 3, true, {INS_sve_st1b, INS_sve_st1b, INS_sve_st1h, INS_sve_st1h, INS_sve_st1w, INS_sve_st1w, INS_sve_st1d, INS_sve_st1d, INS_sve_st1w, INS_sve_st1d}, HW_Category_MemoryStore, HW_Flag_Scalable|HW_Flag_BaseTypeFromFirstArg|HW_Flag_ExplicitMaskedOperation|HW_Flag_SpecialImport|HW_Flag_SpecialCodeGen|HW_Flag_LowMaskedOperation) +HARDWARE_INTRINSIC(Sve, StoreNarrowing, -1, 3, true, {INS_sve_st1b, INS_sve_st1b, INS_sve_st1h, INS_sve_st1h, INS_sve_st1w, INS_sve_st1w, INS_sve_st1d, INS_sve_st1d, INS_invalid, INS_invalid}, HW_Category_MemoryStore, HW_Flag_Scalable|HW_Flag_BaseTypeFromFirstArg|HW_Flag_ExplicitMaskedOperation|HW_Flag_SpecialImport|HW_Flag_SpecialCodeGen|HW_Flag_LowMaskedOperation) HARDWARE_INTRINSIC(Sve, Subtract, -1, 2, true, {INS_sve_sub, INS_sve_sub, INS_sve_sub, INS_sve_sub, INS_sve_sub, INS_sve_sub, INS_sve_sub, INS_sve_sub, INS_sve_fsub, INS_sve_fsub}, HW_Category_SIMD, HW_Flag_Scalable|HW_Flag_OptionalEmbeddedMaskedOperation|HW_Flag_HasRMWSemantics|HW_Flag_LowMaskedOperation) HARDWARE_INTRINSIC(Sve, SubtractSaturate, -1, 2, true, {INS_sve_sqsub, INS_sve_uqsub, INS_sve_sqsub, INS_sve_uqsub, INS_sve_sqsub, INS_sve_uqsub, INS_sve_sqsub, INS_sve_uqsub, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_Scalable|HW_Flag_OptionalEmbeddedMaskedOperation|HW_Flag_HasRMWSemantics|HW_Flag_LowMaskedOperation) HARDWARE_INTRINSIC(Sve, UnzipEven, -1, 2, true, {INS_sve_uzp1, INS_sve_uzp1, INS_sve_uzp1, INS_sve_uzp1, INS_sve_uzp1, INS_sve_uzp1, INS_sve_uzp1, INS_sve_uzp1, INS_sve_uzp1, INS_sve_uzp1}, HW_Category_SIMD, HW_Flag_Scalable|HW_Flag_SpecialCodeGen) 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 88af56e345ce5..ece3b5c88588a 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 @@ -2998,6 +2998,80 @@ internal Arm64() { } /// ST4D {Zdata0.D - Zdata3.D}, Pg, [Xbase, #0, MUL VL] /// public static unsafe void StoreAndZip(Vector mask, ulong* address, (Vector Value1, Vector Value2, Vector Value3, Vector Value4) data) { throw new PlatformNotSupportedException(); } + /// Truncate to 8 bits and store + + /// + /// void svst1b[_s16](svbool_t pg, int8_t *base, svint16_t data) + /// ST1B Zdata.H, Pg, [Xbase, #0, MUL VL] + /// + public static unsafe void StoreNarrowing(Vector mask, sbyte* address, Vector data) { throw new PlatformNotSupportedException(); } + + + /// + /// void svst1b[_s32](svbool_t pg, int8_t *base, svint32_t data) + /// ST1B Zdata.S, Pg, [Xbase, #0, MUL VL] + /// + public static unsafe void StoreNarrowing(Vector mask, sbyte* address, Vector data) { throw new PlatformNotSupportedException(); } + + /// + /// void svst1h[_s32](svbool_t pg, int16_t *base, svint32_t data) + /// ST1H Zdata.S, Pg, [Xbase, #0, MUL VL] + /// + public static unsafe void StoreNarrowing(Vector mask, short* address, Vector data) { throw new PlatformNotSupportedException(); } + + /// + /// void svst1b[_s64](svbool_t pg, int8_t *base, svint64_t data) + /// ST1B Zdata.D, Pg, [Xbase, #0, MUL VL] + /// + public static unsafe void StoreNarrowing(Vector mask, sbyte* address, Vector data) { throw new PlatformNotSupportedException(); } + + /// + /// void svst1h[_s64](svbool_t pg, int16_t *base, svint64_t data) + /// ST1H Zdata.D, Pg, [Xbase, #0, MUL VL] + /// + public static unsafe void StoreNarrowing(Vector mask, short* address, Vector data) { throw new PlatformNotSupportedException(); } + + /// + /// void svst1w[_s64](svbool_t pg, int32_t *base, svint64_t data) + /// ST1W Zdata.D, Pg, [Xbase, #0, MUL VL] + /// + public static unsafe void StoreNarrowing(Vector mask, int* address, Vector data) { throw new PlatformNotSupportedException(); } + + /// + /// void svst1b[_u16](svbool_t pg, uint8_t *base, svuint16_t data) + /// ST1B Zdata.H, Pg, [Xbase, #0, MUL VL] + /// + public static unsafe void StoreNarrowing(Vector mask, byte* address, Vector data) { throw new PlatformNotSupportedException(); } + + /// + /// void svst1b[_u32](svbool_t pg, uint8_t *base, svuint32_t data) + /// ST1B Zdata.S, Pg, [Xbase, #0, MUL VL] + /// + public static unsafe void StoreNarrowing(Vector mask, byte* address, Vector data) { throw new PlatformNotSupportedException(); } + + /// + /// void svst1h[_u32](svbool_t pg, uint16_t *base, svuint32_t data) + /// ST1H Zdata.S, Pg, [Xbase, #0, MUL VL] + /// + public static unsafe void StoreNarrowing(Vector mask, ushort* address, Vector data) { throw new PlatformNotSupportedException(); } + + /// + /// void svst1b[_u64](svbool_t pg, uint8_t *base, svuint64_t data) + /// ST1B Zdata.D, Pg, [Xbase, #0, MUL VL] + /// + public static unsafe void StoreNarrowing(Vector mask, byte* address, Vector data) { throw new PlatformNotSupportedException(); } + + /// + /// void svst1h[_u64](svbool_t pg, uint16_t *base, svuint64_t data) + /// ST1H Zdata.D, Pg, [Xbase, #0, MUL VL] + /// + public static unsafe void StoreNarrowing(Vector mask, ushort* address, Vector data) { throw new PlatformNotSupportedException(); } + + /// + /// void svst1w[_u64](svbool_t pg, uint32_t *base, svuint64_t data) + /// ST1W Zdata.D, Pg, [Xbase, #0, MUL VL] + /// + public static unsafe void StoreNarrowing(Vector mask, uint* address, Vector data) { throw new PlatformNotSupportedException(); } /// Subtract : Subtract 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 8d2d7704ce362..251ae1f45a2e4 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 @@ -3094,6 +3094,80 @@ internal Arm64() { } /// ST4D {Zdata0.D - Zdata3.D}, Pg, [Xbase, #0, MUL VL] /// public static unsafe void StoreAndZip(Vector mask, ulong* address, (Vector Value1, Vector Value2, Vector Value3, Vector Value4) data) => StoreAndZip(mask, address, data); + /// Truncate to 8 bits and store + + + /// + /// void svst1b[_s16](svbool_t pg, int8_t *base, svint16_t data) + /// ST1B Zdata.H, Pg, [Xbase, #0, MUL VL] + /// + public static unsafe void StoreNarrowing(Vector mask, sbyte* address, Vector data) => StoreNarrowing(mask, address, data); + + /// + /// void svst1b[_s32](svbool_t pg, int8_t *base, svint32_t data) + /// ST1B Zdata.S, Pg, [Xbase, #0, MUL VL] + /// + public static unsafe void StoreNarrowing(Vector mask, sbyte* address, Vector data) => StoreNarrowing(mask, address, data); + + /// + /// void svst1h[_s32](svbool_t pg, int16_t *base, svint32_t data) + /// ST1H Zdata.S, Pg, [Xbase, #0, MUL VL] + /// + public static unsafe void StoreNarrowing(Vector mask, short* address, Vector data) => StoreNarrowing(mask, address, data); + + /// + /// void svst1b[_s64](svbool_t pg, int8_t *base, svint64_t data) + /// ST1B Zdata.D, Pg, [Xbase, #0, MUL VL] + /// + public static unsafe void StoreNarrowing(Vector mask, sbyte* address, Vector data) => StoreNarrowing(mask, address, data); + + /// + /// void svst1h[_s64](svbool_t pg, int16_t *base, svint64_t data) + /// ST1H Zdata.D, Pg, [Xbase, #0, MUL VL] + /// + public static unsafe void StoreNarrowing(Vector mask, short* address, Vector data) => StoreNarrowing(mask, address, data); + + /// + /// void svst1w[_s64](svbool_t pg, int32_t *base, svint64_t data) + /// ST1W Zdata.D, Pg, [Xbase, #0, MUL VL] + /// + public static unsafe void StoreNarrowing(Vector mask, int* address, Vector data) => StoreNarrowing(mask, address, data); + + /// + /// void svst1b[_u16](svbool_t pg, uint8_t *base, svuint16_t data) + /// ST1B Zdata.H, Pg, [Xbase, #0, MUL VL] + /// + public static unsafe void StoreNarrowing(Vector mask, byte* address, Vector data) => StoreNarrowing(mask, address, data); + + /// + /// void svst1b[_u32](svbool_t pg, uint8_t *base, svuint32_t data) + /// ST1B Zdata.S, Pg, [Xbase, #0, MUL VL] + /// + public static unsafe void StoreNarrowing(Vector mask, byte* address, Vector data) => StoreNarrowing(mask, address, data); + + /// + /// void svst1h[_u32](svbool_t pg, uint16_t *base, svuint32_t data) + /// ST1H Zdata.S, Pg, [Xbase, #0, MUL VL] + /// + public static unsafe void StoreNarrowing(Vector mask, ushort* address, Vector data) => StoreNarrowing(mask, address, data); + + /// + /// void svst1b[_u64](svbool_t pg, uint8_t *base, svuint64_t data) + /// ST1B Zdata.D, Pg, [Xbase, #0, MUL VL] + /// + public static unsafe void StoreNarrowing(Vector mask, byte* address, Vector data) => StoreNarrowing(mask, address, data); + + /// + /// void svst1h[_u64](svbool_t pg, uint16_t *base, svuint64_t data) + /// ST1H Zdata.D, Pg, [Xbase, #0, MUL VL] + /// + public static unsafe void StoreNarrowing(Vector mask, ushort* address, Vector data) => StoreNarrowing(mask, address, data); + + /// + /// void svst1w[_u64](svbool_t pg, uint32_t *base, svuint64_t data) + /// ST1W Zdata.D, Pg, [Xbase, #0, MUL VL] + /// + public static unsafe void StoreNarrowing(Vector mask, uint* address, Vector data) => StoreNarrowing(mask, address, data); /// Subtract : Subtract 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 d8d37180ecaf7..64390b9502a94 100644 --- a/src/libraries/System.Runtime.Intrinsics/ref/System.Runtime.Intrinsics.cs +++ b/src/libraries/System.Runtime.Intrinsics/ref/System.Runtime.Intrinsics.cs @@ -4588,6 +4588,19 @@ internal Arm64() { } public static unsafe void StoreAndZip(System.Numerics.Vector mask, ulong* address, (System.Numerics.Vector Value1, System.Numerics.Vector Value2, System.Numerics.Vector Value3) data) { throw null; } public static unsafe void StoreAndZip(System.Numerics.Vector mask, ulong* address, (System.Numerics.Vector Value1, System.Numerics.Vector Value2, System.Numerics.Vector Value3, System.Numerics.Vector Value4) data) { throw null; } + public static unsafe void StoreNarrowing(System.Numerics.Vector mask, sbyte* address, System.Numerics.Vector data) { throw null; } + public static unsafe void StoreNarrowing(System.Numerics.Vector mask, sbyte* address, System.Numerics.Vector data) { throw null; } + public static unsafe void StoreNarrowing(System.Numerics.Vector mask, short* address, System.Numerics.Vector data) { throw null; } + public static unsafe void StoreNarrowing(System.Numerics.Vector mask, sbyte* address, System.Numerics.Vector data) { throw null; } + public static unsafe void StoreNarrowing(System.Numerics.Vector mask, short* address, System.Numerics.Vector data) { throw null; } + public static unsafe void StoreNarrowing(System.Numerics.Vector mask, int* address, System.Numerics.Vector data) { throw null; } + public static unsafe void StoreNarrowing(System.Numerics.Vector mask, byte* address, System.Numerics.Vector data) { throw null; } + public static unsafe void StoreNarrowing(System.Numerics.Vector mask, byte* address, System.Numerics.Vector data) { throw null; } + public static unsafe void StoreNarrowing(System.Numerics.Vector mask, ushort* address, System.Numerics.Vector data) { throw null; } + public static unsafe void StoreNarrowing(System.Numerics.Vector mask, byte* address, System.Numerics.Vector data) { throw null; } + public static unsafe void StoreNarrowing(System.Numerics.Vector mask, ushort* address, System.Numerics.Vector data) { throw null; } + public static unsafe void StoreNarrowing(System.Numerics.Vector mask, uint* address, System.Numerics.Vector data) { throw null; } + public static System.Numerics.Vector Subtract(System.Numerics.Vector left, System.Numerics.Vector right) { throw null; } public static System.Numerics.Vector Subtract(System.Numerics.Vector left, System.Numerics.Vector right) { throw null; } public static System.Numerics.Vector Subtract(System.Numerics.Vector left, System.Numerics.Vector right) { throw null; } diff --git a/src/tests/Common/GenerateHWIntrinsicTests/GenerateHWIntrinsicTests_Arm.cs b/src/tests/Common/GenerateHWIntrinsicTests/GenerateHWIntrinsicTests_Arm.cs index 4fa05f18031db..70c4227888947 100644 --- a/src/tests/Common/GenerateHWIntrinsicTests/GenerateHWIntrinsicTests_Arm.cs +++ b/src/tests/Common/GenerateHWIntrinsicTests/GenerateHWIntrinsicTests_Arm.cs @@ -3429,6 +3429,19 @@ ("SveStoreAndZipTestx4.template", new Dictionary { ["TestName"] = "SveStoreAndZipx4_ushort", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "StoreAndZip", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["ValidateEntry"] = "(maskArray[i] == 0 && (result[index] != 0 || result[index + 1] != 0 || result[index + 2] != 0 || result[index + 3] != 0)) || (maskArray[i] == 1 && (result[index] != first[i] || result[index + 1] != second[i] || result[index + 2] != third[i] || result[index + 3] != fourth[i]))"}), ("SveStoreAndZipTestx4.template", new Dictionary { ["TestName"] = "SveStoreAndZipx4_uint", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "StoreAndZip", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["ValidateEntry"] = "(maskArray[i] == 0 && (result[index] != 0 || result[index + 1] != 0 || result[index + 2] != 0 || result[index + 3] != 0)) || (maskArray[i] == 1 && (result[index] != first[i] || result[index + 1] != second[i] || result[index + 2] != third[i] || result[index + 3] != fourth[i]))"}), ("SveStoreAndZipTestx4.template", new Dictionary { ["TestName"] = "SveStoreAndZipx4_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "StoreAndZip", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["ValidateEntry"] = "(maskArray[i] == 0 && (result[index] != 0 || result[index + 1] != 0 || result[index + 2] != 0 || result[index + 3] != 0)) || (maskArray[i] == 1 && (result[index] != first[i] || result[index + 1] != second[i] || result[index + 2] != third[i] || result[index + 3] != fourth[i]))"}), + + ("SveStoreNarrowingTest.template", new Dictionary { ["TestName"] = "SveStoreNarrow_short_sbyte", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "StoreNarrowing", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ValidateEntry"] = "(maskArray[i] == 0 && result[i] != 0) || (maskArray[i] == 1 && result[i] != (SByte)first[i])"}), + ("SveStoreNarrowingTest.template", new Dictionary { ["TestName"] = "SveStoreNarrow_int_sbyte", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "StoreNarrowing", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateEntry"] = "(maskArray[i] == 0 && result[i] != 0) || (maskArray[i] == 1 && result[i] != (SByte)first[i])"}), + ("SveStoreNarrowingTest.template", new Dictionary { ["TestName"] = "SveStoreNarrow_int_short", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "StoreNarrowing", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateEntry"] = "(maskArray[i] == 0 && result[i] != 0) || (maskArray[i] == 1 && result[i] != (Int16)first[i])"}), + ("SveStoreNarrowingTest.template", new Dictionary { ["TestName"] = "SveStoreNarrow_long_sbyte", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "StoreNarrowing", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["ValidateEntry"] = "(maskArray[i] == 0 && result[i] != 0) || (maskArray[i] == 1 && result[i] != (SByte)first[i])"}), + ("SveStoreNarrowingTest.template", new Dictionary { ["TestName"] = "SveStoreNarrow_long_short", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "StoreNarrowing", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["ValidateEntry"] = "(maskArray[i] == 0 && result[i] != 0) || (maskArray[i] == 1 && result[i] != (Int16)first[i])"}), + ("SveStoreNarrowingTest.template", new Dictionary { ["TestName"] = "SveStoreNarrow_long_int", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "StoreNarrowing", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["ValidateEntry"] = "(maskArray[i] == 0 && result[i] != 0) || (maskArray[i] == 1 && result[i] != (Int32)first[i])"}), + ("SveStoreNarrowingTest.template", new Dictionary { ["TestName"] = "SveStoreNarrow_ushort_byte", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "StoreNarrowing", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["ValidateEntry"] = "(maskArray[i] == 0 && result[i] != 0) || (maskArray[i] == 1 && result[i] != (Byte)first[i])"}), + ("SveStoreNarrowingTest.template", new Dictionary { ["TestName"] = "SveStoreNarrow_uint_byte", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "StoreNarrowing", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["ValidateEntry"] = "(maskArray[i] == 0 && result[i] != 0) || (maskArray[i] == 1 && result[i] != (Byte)first[i])"}), + ("SveStoreNarrowingTest.template", new Dictionary { ["TestName"] = "SveStoreNarrow_uint_ushort", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "StoreNarrowing", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["ValidateEntry"] = "(maskArray[i] == 0 && result[i] != 0) || (maskArray[i] == 1 && result[i] != (UInt16)first[i])"}), + ("SveStoreNarrowingTest.template", new Dictionary { ["TestName"] = "SveStoreNarrow_ulong_byte", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "StoreNarrowing", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["ValidateEntry"] = "(maskArray[i] == 0 && result[i] != 0) || (maskArray[i] == 1 && result[i] != (Byte)first[i])"}), + ("SveStoreNarrowingTest.template", new Dictionary { ["TestName"] = "SveStoreNarrow_ulong_ushort", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "StoreNarrowing", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["ValidateEntry"] = "(maskArray[i] == 0 && result[i] != 0) || (maskArray[i] == 1 && result[i] != (UInt16)first[i])"}), + ("SveStoreNarrowingTest.template", new Dictionary { ["TestName"] = "SveStoreNarrow_ulong_uint", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "StoreNarrowing", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["ValidateEntry"] = "(maskArray[i] == 0 && result[i] != 0) || (maskArray[i] == 1 && result[i] != (UInt32)first[i])"}), }; diff --git a/src/tests/JIT/HardwareIntrinsics/Arm/Shared/SveStoreNarrowingTest.template b/src/tests/JIT/HardwareIntrinsics/Arm/Shared/SveStoreNarrowingTest.template new file mode 100644 index 0000000000000..4770ad827519d --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/Arm/Shared/SveStoreNarrowingTest.template @@ -0,0 +1,332 @@ +// 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 StoreNarrowingTest__{TestName}(); + + if (test.IsSupported) + { + // Validates basic functionality works, using Unsafe.Read + test.RunBasicScenario_UnsafeRead(); + + if (Sve.IsSupported) + { + // Validates basic functionality works, using Load + test.RunBasicScenario_Load(); + } + + // 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 StoreNarrowingTest__{TestName} + { + private struct DataTable + { + private byte[] inArray1; + private byte[] outArray; + private byte[] maskArray; + + private GCHandle inHandle1; + private GCHandle outHandle; + private GCHandle maskHandle; + + private ulong alignment; + + public DataTable({Op1BaseType}[] inArray1, {Op2BaseType}[] outArray, {Op1BaseType}[] maskArray, int alignment) + { + int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf<{Op1BaseType}>(); + int sizeOfoutArray = outArray.Length * Unsafe.SizeOf<{Op2BaseType}>(); + int sizeOfmaskArray = maskArray.Length * Unsafe.SizeOf<{Op1BaseType}>(); + + if ((alignment != 64 && alignment != 16 && alignment != 8) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfoutArray || (alignment * 2) < sizeOfmaskArray) + { + throw new ArgumentException("Invalid value of alignment"); + } + + this.inArray1 = new byte[alignment * 2]; + this.outArray = new byte[alignment * 2]; + this.maskArray = new byte[alignment * 2]; + + this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); + this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); + this.maskHandle = GCHandle.Alloc(this.maskArray, 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(maskArrayPtr), ref Unsafe.As<{Op1BaseType}, byte>(ref maskArray[0]), (uint)sizeOfmaskArray); + } + + public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); + public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); + public void* maskArrayPtr => Align((byte*)(maskHandle.AddrOfPinnedObject().ToPointer()), alignment); + + public void Dispose() + { + inHandle1.Free(); + outHandle.Free(); + maskHandle.Free(); + } + + public static unsafe void* Align(byte* buffer, ulong expectedAlignment) + { + return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); + } + } + + + private struct TestStruct + { + public {Op1VectorType}<{Op1BaseType}> _fld1; + public {Op1VectorType}<{Op1BaseType}> _storeMask; + private GCHandle _outHandle; + + public static TestStruct Create() + { + var testStruct = new TestStruct(); + + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = {NextValueOp1}; } + Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op1VectorType}<{Op1BaseType}>, byte>(ref testStruct._fld1), ref Unsafe.As<{Op1BaseType}, byte>(ref _data1[0]), (uint)Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>()); + for (var i = 0; i < MaskElementCount; i++) { _maskData[i] = ({Op1BaseType})({NextValueOp1} % 2); } + Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op1VectorType}<{Op1BaseType}>, byte>(ref testStruct._storeMask), ref Unsafe.As<{Op1BaseType}, byte>(ref _maskData[0]), (uint)Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>()); + + ulong alignment = (ulong)LargestVectorSize; + byte[] _outArray = new byte[alignment * 2]; + testStruct._outHandle = GCHandle.Alloc(_outArray, GCHandleType.Pinned); + + return testStruct; + } + + public void* _outArrayPtr => DataTable.Align((byte*)(_outHandle.AddrOfPinnedObject().ToPointer()), (ulong)LargestVectorSize); + + public void Dispose() + { + _outHandle.Free(); + } + + public void RunStructFldScenario(StoreNarrowingTest__{TestName} testClass) + { + Sve.{Method}(_storeMask, ({Op2BaseType}*) _outArrayPtr, _fld1); + + testClass.ValidateResult(_fld1, _outArrayPtr, _storeMask); + } + } + + private static readonly int LargestVectorSize = {LargestVectorSize}; + + private static readonly int Op1ElementCount = Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>() / sizeof({Op1BaseType}); + private static readonly int RetElementCount = Unsafe.SizeOf<{Op2VectorType}<{Op2BaseType}>>() / sizeof({Op2BaseType}); + private static readonly int MaskElementCount = Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>() / sizeof({Op1BaseType}); + + private static {Op1BaseType}[] _data1 = new {Op1BaseType}[Op1ElementCount]; + private static {Op1BaseType}[] _maskData = new {Op1BaseType}[MaskElementCount]; + + private DataTable _dataTable; + + public StoreNarrowingTest__{TestName}() + { + Succeeded = true; + + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = {NextValueOp1}; } + for (var i = 0; i < MaskElementCount; i++) { _maskData[i] = ({Op1BaseType})({NextValueOp1} % 2); } + + _dataTable = new DataTable(_data1, new {Op2BaseType}[RetElementCount], _maskData, LargestVectorSize); + } + + public bool IsSupported => Sve.IsSupported; + + public bool Succeeded { get; set; } + + public void RunBasicScenario_UnsafeRead() + { + TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); + + Sve.{Method}(Unsafe.Read>(_dataTable.maskArrayPtr), ({Op2BaseType} *)_dataTable.outArrayPtr, Unsafe.Read<{Op1VectorType}<{Op1BaseType}>>(_dataTable.inArray1Ptr)); + + ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr, _dataTable.maskArrayPtr); + } + + public void RunBasicScenario_Load() + { + TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); + {Op1VectorType}<{Op1BaseType}> loadMask = Sve.CreateTrueMask{Op1BaseType}(SveMaskPattern.All); + + Sve.{Method}(Sve.LoadVector(loadMask, ({Op1BaseType}*)(_dataTable.maskArrayPtr)), ({Op2BaseType} *)_dataTable.outArrayPtr, Sve.LoadVector(loadMask, ({Op1BaseType}*)(_dataTable.inArray1Ptr))); + + ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr, _dataTable.maskArrayPtr); + } + + public void RunReflectionScenario_UnsafeRead() + { + TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); + + typeof(Sve).GetMethod(nameof(Sve.{Method}), new Type[] { typeof({Op1VectorType}<{Op1BaseType}>), typeof({Op2BaseType} *), typeof({Op1VectorType}<{Op1BaseType}>) }) + .Invoke(null, new object[] { Unsafe.Read>(_dataTable.maskArrayPtr), + Pointer.Box(_dataTable.outArrayPtr, typeof({Op2BaseType}*)), Unsafe.Read<{Op1VectorType}<{Op1BaseType}>>(_dataTable.inArray1Ptr) + }); + + ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr, _dataTable.maskArrayPtr); + } + + public void RunLclVarScenario_UnsafeRead() + { + TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); + + {Op1VectorType}<{Op1BaseType}> op1 = Unsafe.Read<{Op1VectorType}<{Op1BaseType}>>(_dataTable.inArray1Ptr); + {Op1VectorType}<{Op1BaseType}> storeMask = Unsafe.Read<{Op1VectorType}<{Op1BaseType}>>(_dataTable.maskArrayPtr); + + Sve.{Method}(storeMask, ({Op2BaseType} *)_dataTable.outArrayPtr, op1); + + ValidateResult(op1, _dataTable.outArrayPtr, storeMask); + } + + public void RunClassFldScenario() + { + TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); + + {Op1VectorType}<{Op1BaseType}> op1 = Unsafe.Read<{Op1VectorType}<{Op1BaseType}>>(_dataTable.inArray1Ptr); + {Op1VectorType}<{Op1BaseType}> storeMask = Unsafe.Read<{Op1VectorType}<{Op1BaseType}>>(_dataTable.maskArrayPtr); + + Sve.{Method}(storeMask, ({Op2BaseType} *)_dataTable.outArrayPtr, op1); + + ValidateResult(op1, _dataTable.outArrayPtr, storeMask); + } + + public void RunStructLclFldScenario() + { + TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); + + var test = TestStruct.Create(); + Sve.{Method}(test._storeMask, ({Op2BaseType} *)test._outArrayPtr, test._fld1); + + ValidateResult(test._fld1, test._outArrayPtr, test._storeMask); + } + + public void RunStructFldScenario() + { + TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); + + var test = TestStruct.Create(); + test.RunStructFldScenario(this); + } + + public void RunUnsupportedScenario() + { + TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); + + bool succeeded = false; + + try + { + RunBasicScenario_UnsafeRead(); + } + catch (PlatformNotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + Succeeded = false; + } + } + + private void ValidateResult({Op1VectorType}<{Op1BaseType}> op1, void* result, {Op1VectorType}<{Op1BaseType}> storeMask, [CallerMemberName] string method = "") + { + {Op1BaseType}[] inArray1 = new {Op1BaseType}[Op1ElementCount]; + {Op2BaseType}[] outArray = new {Op2BaseType}[RetElementCount]; + {Op1BaseType}[] maskArray = new {Op1BaseType}[MaskElementCount]; + + Unsafe.WriteUnaligned(ref Unsafe.As<{Op1BaseType}, byte>(ref inArray1[0]), op1); + Unsafe.WriteUnaligned(ref Unsafe.As<{Op1BaseType}, byte>(ref maskArray[0]), storeMask); + Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op2BaseType}, byte>(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf<{Op2VectorType}<{Op2BaseType}>>()); + + ValidateResult(inArray1, outArray, maskArray, method); + } + + private void ValidateResult(void* op1, void* result, void* mask, [CallerMemberName] string method = "") + { + {Op1BaseType}[] inArray1 = new {Op1BaseType}[Op1ElementCount]; + {Op2BaseType}[] outArray = new {Op2BaseType}[RetElementCount]; + {Op1BaseType}[] maskArray = new {Op1BaseType}[MaskElementCount]; + + Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op1BaseType}, byte>(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>()); + Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op2BaseType}, byte>(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf<{Op2VectorType}<{Op2BaseType}>>()); + Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op1BaseType}, byte>(ref maskArray[0]), ref Unsafe.AsRef(mask), (uint)Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>()); + + ValidateResult(inArray1, outArray, maskArray, method); + } + + private void ValidateResult({Op1BaseType}[] first, {Op2BaseType}[] result, {Op1BaseType}[] maskArray, [CallerMemberName] string method = "") + { + bool succeeded = true; + + for (var i = 0; i < Op1ElementCount; i++) + { + if ({ValidateEntry}) + { + succeeded = false; + break; + } + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"{nameof(Sve)}.{nameof(Sve.{Method})}<{Op1BaseType}>({Op1VectorType}<{Op1BaseType}>, {Op2BaseType}*, {Op1VectorType}<{Op1BaseType}>): {method} failed:"); + TestLibrary.TestFramework.LogInformation($" first: ({string.Join(", ", first)})"); + TestLibrary.TestFramework.LogInformation($" mask: ({string.Join(", ", maskArray)})"); + TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); + TestLibrary.TestFramework.LogInformation(string.Empty); + + Succeeded = false; + } + } + } +} From bb457cc550957b0ed9f3bfccb3c80b88c5136ed5 Mon Sep 17 00:00:00 2001 From: Swapnil Gaikwad Date: Thu, 23 May 2024 11:47:44 +0100 Subject: [PATCH 2/3] Incorporate review comments for Sve.StoreAndZip() --- .../GenerateHWIntrinsicTests_Arm.cs | 80 +++++++++---------- .../Arm/Shared/SveStoreAndZipTest.template | 16 ++-- .../Arm/Shared/SveStoreAndZipTestx2.template | 16 ++-- .../Arm/Shared/SveStoreAndZipTestx3.template | 16 ++-- .../Arm/Shared/SveStoreAndZipTestx4.template | 16 ++-- 5 files changed, 64 insertions(+), 80 deletions(-) diff --git a/src/tests/Common/GenerateHWIntrinsicTests/GenerateHWIntrinsicTests_Arm.cs b/src/tests/Common/GenerateHWIntrinsicTests/GenerateHWIntrinsicTests_Arm.cs index 70c4227888947..73bdcbbec0024 100644 --- a/src/tests/Common/GenerateHWIntrinsicTests/GenerateHWIntrinsicTests_Arm.cs +++ b/src/tests/Common/GenerateHWIntrinsicTests/GenerateHWIntrinsicTests_Arm.cs @@ -3389,46 +3389,46 @@ ("SveVecPairBinOpTest.template", new Dictionary { ["TestName"] = "SveZipLow_uint", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ZipLow", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateEntry"] = "result[i] != left[index] || result[i + 1] != right[index]"}), ("SveVecPairBinOpTest.template", new Dictionary { ["TestName"] = "SveZipLow_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ZipLow", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateEntry"] = "result[i] != left[index] || result[i + 1] != right[index]"}), - ("SveStoreAndZipTest.template", new Dictionary { ["TestName"] = "SveStoreAndZip_float", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "StoreAndZip", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateEntry"] = "(maskArray[i] == 0 && result[i] != 0) || (maskArray[i] == 1 && result[i] != first[i])"}), - ("SveStoreAndZipTest.template", new Dictionary { ["TestName"] = "SveStoreAndZip_double", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "StoreAndZip", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ValidateEntry"] = "(maskArray[i] == 0 && result[i] != 0) || (maskArray[i] == 1 && result[i] != first[i])"}), - ("SveStoreAndZipTest.template", new Dictionary { ["TestName"] = "SveStoreAndZip_sbyte", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "StoreAndZip", ["RetVectorType"] = "Vector", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "SByte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["ValidateEntry"] = "(maskArray[i] == 0 && result[i] != 0) || (maskArray[i] == 1 && result[i] != first[i])"}), - ("SveStoreAndZipTest.template", new Dictionary { ["TestName"] = "SveStoreAndZip_short", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "StoreAndZip", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ValidateEntry"] = "(maskArray[i] == 0 && result[i] != 0) || (maskArray[i] == 1 && result[i] != first[i])"}), - ("SveStoreAndZipTest.template", new Dictionary { ["TestName"] = "SveStoreAndZip_int", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "StoreAndZip", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateEntry"] = "(maskArray[i] == 0 && result[i] != 0) || (maskArray[i] == 1 && result[i] != first[i])"}), - ("SveStoreAndZipTest.template", new Dictionary { ["TestName"] = "SveStoreAndZip_long", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "StoreAndZip", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["ValidateEntry"] = "(maskArray[i] == 0 && result[i] != 0) || (maskArray[i] == 1 && result[i] != first[i])"}), - ("SveStoreAndZipTest.template", new Dictionary { ["TestName"] = "SveStoreAndZip_byte", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "StoreAndZip", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Byte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["ValidateEntry"] = "(maskArray[i] == 0 && result[i] != 0) || (maskArray[i] == 1 && result[i] != first[i])"}), - ("SveStoreAndZipTest.template", new Dictionary { ["TestName"] = "SveStoreAndZip_ushort", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "StoreAndZip", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["ValidateEntry"] = "(maskArray[i] == 0 && result[i] != 0) || (maskArray[i] == 1 && result[i] != first[i])"}), - ("SveStoreAndZipTest.template", new Dictionary { ["TestName"] = "SveStoreAndZip_uint", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "StoreAndZip", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["ValidateEntry"] = "(maskArray[i] == 0 && result[i] != 0) || (maskArray[i] == 1 && result[i] != first[i])"}), - ("SveStoreAndZipTest.template", new Dictionary { ["TestName"] = "SveStoreAndZip_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "StoreAndZip", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["ValidateEntry"] = "(maskArray[i] == 0 && result[i] != 0) || (maskArray[i] == 1 && result[i] != first[i])"}), - ("SveStoreAndZipTestx2.template", new Dictionary { ["TestName"] = "SveStoreAndZipx2_float", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "StoreAndZip", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateEntry"] = "(maskArray[i] == 0 && (result[index] != 0 || result[index + 1] != 0)) || (maskArray[i] == 1 && (result[index] != first[i] || result[index + 1] != second[i]))"}), - ("SveStoreAndZipTestx2.template", new Dictionary { ["TestName"] = "SveStoreAndZipx2_double", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "StoreAndZip", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ValidateEntry"] = "(maskArray[i] == 0 && (result[index] != 0 || result[index + 1] != 0)) || (maskArray[i] == 1 && (result[index] != first[i] || result[index + 1] != second[i]))"}), - ("SveStoreAndZipTestx2.template", new Dictionary { ["TestName"] = "SveStoreAndZipx2_sbyte", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "StoreAndZip", ["RetVectorType"] = "Vector", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "SByte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["ValidateEntry"] = "(maskArray[i] == 0 && (result[index] != 0 || result[index + 1] != 0)) || (maskArray[i] == 1 && (result[index] != first[i] || result[index + 1] != second[i]))"}), - ("SveStoreAndZipTestx2.template", new Dictionary { ["TestName"] = "SveStoreAndZipx2_short", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "StoreAndZip", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ValidateEntry"] = "(maskArray[i] == 0 && (result[index] != 0 || result[index + 1] != 0)) || (maskArray[i] == 1 && (result[index] != first[i] || result[index + 1] != second[i]))"}), - ("SveStoreAndZipTestx2.template", new Dictionary { ["TestName"] = "SveStoreAndZipx2_int", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "StoreAndZip", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateEntry"] = "(maskArray[i] == 0 && (result[index] != 0 || result[index + 1] != 0)) || (maskArray[i] == 1 && (result[index] != first[i] || result[index + 1] != second[i]))"}), - ("SveStoreAndZipTestx2.template", new Dictionary { ["TestName"] = "SveStoreAndZipx2_long", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "StoreAndZip", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["ValidateEntry"] = "(maskArray[i] == 0 && (result[index] != 0 || result[index + 1] != 0)) || (maskArray[i] == 1 && (result[index] != first[i] || result[index + 1] != second[i]))"}), - ("SveStoreAndZipTestx2.template", new Dictionary { ["TestName"] = "SveStoreAndZipx2_byte", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "StoreAndZip", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Byte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["ValidateEntry"] = "(maskArray[i] == 0 && (result[index] != 0 || result[index + 1] != 0)) || (maskArray[i] == 1 && (result[index] != first[i] || result[index + 1] != second[i]))"}), - ("SveStoreAndZipTestx2.template", new Dictionary { ["TestName"] = "SveStoreAndZipx2_ushort", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "StoreAndZip", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["ValidateEntry"] = "(maskArray[i] == 0 && (result[index] != 0 || result[index + 1] != 0)) || (maskArray[i] == 1 && (result[index] != first[i] || result[index + 1] != second[i]))"}), - ("SveStoreAndZipTestx2.template", new Dictionary { ["TestName"] = "SveStoreAndZipx2_uint", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "StoreAndZip", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["ValidateEntry"] = "(maskArray[i] == 0 && (result[index] != 0 || result[index + 1] != 0)) || (maskArray[i] == 1 && (result[index] != first[i] || result[index + 1] != second[i]))"}), - ("SveStoreAndZipTestx2.template", new Dictionary { ["TestName"] = "SveStoreAndZipx2_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "StoreAndZip", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["ValidateEntry"] = "(maskArray[i] == 0 && (result[index] != 0 || result[index + 1] != 0)) || (maskArray[i] == 1 && (result[index] != first[i] || result[index + 1] != second[i]))"}), - ("SveStoreAndZipTestx3.template", new Dictionary { ["TestName"] = "SveStoreAndZipx3_float", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "StoreAndZip", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateEntry"] = "(maskArray[i] == 0 && (result[index] != 0 || result[index + 1] != 0 || result[index + 2] != 0)) || (maskArray[i] == 1 && (result[index] != first[i] || result[index + 1] != second[i] || result[index + 2] != third[i]))"}), - ("SveStoreAndZipTestx3.template", new Dictionary { ["TestName"] = "SveStoreAndZipx3_double", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "StoreAndZip", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ValidateEntry"] = "(maskArray[i] == 0 && (result[index] != 0 || result[index + 1] != 0 || result[index + 2] != 0)) || (maskArray[i] == 1 && (result[index] != first[i] || result[index + 1] != second[i] || result[index + 2] != third[i]))"}), - ("SveStoreAndZipTestx3.template", new Dictionary { ["TestName"] = "SveStoreAndZipx3_sbyte", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "StoreAndZip", ["RetVectorType"] = "Vector", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "SByte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["ValidateEntry"] = "(maskArray[i] == 0 && (result[index] != 0 || result[index + 1] != 0 || result[index + 2] != 0)) || (maskArray[i] == 1 && (result[index] != first[i] || result[index + 1] != second[i] || result[index + 2] != third[i]))"}), - ("SveStoreAndZipTestx3.template", new Dictionary { ["TestName"] = "SveStoreAndZipx3_short", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "StoreAndZip", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ValidateEntry"] = "(maskArray[i] == 0 && (result[index] != 0 || result[index + 1] != 0 || result[index + 2] != 0)) || (maskArray[i] == 1 && (result[index] != first[i] || result[index + 1] != second[i] || result[index + 2] != third[i]))"}), - ("SveStoreAndZipTestx3.template", new Dictionary { ["TestName"] = "SveStoreAndZipx3_int", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "StoreAndZip", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateEntry"] = "(maskArray[i] == 0 && (result[index] != 0 || result[index + 1] != 0 || result[index + 2] != 0)) || (maskArray[i] == 1 && (result[index] != first[i] || result[index + 1] != second[i] || result[index + 2] != third[i]))"}), - ("SveStoreAndZipTestx3.template", new Dictionary { ["TestName"] = "SveStoreAndZipx3_long", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "StoreAndZip", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["ValidateEntry"] = "(maskArray[i] == 0 && (result[index] != 0 || result[index + 1] != 0 || result[index + 2] != 0)) || (maskArray[i] == 1 && (result[index] != first[i] || result[index + 1] != second[i] || result[index + 2] != third[i]))"}), - ("SveStoreAndZipTestx3.template", new Dictionary { ["TestName"] = "SveStoreAndZipx3_byte", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "StoreAndZip", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Byte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["ValidateEntry"] = "(maskArray[i] == 0 && (result[index] != 0 || result[index + 1] != 0 || result[index + 2] != 0)) || (maskArray[i] == 1 && (result[index] != first[i] || result[index + 1] != second[i] || result[index + 2] != third[i]))"}), - ("SveStoreAndZipTestx3.template", new Dictionary { ["TestName"] = "SveStoreAndZipx3_ushort", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "StoreAndZip", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["ValidateEntry"] = "(maskArray[i] == 0 && (result[index] != 0 || result[index + 1] != 0 || result[index + 2] != 0)) || (maskArray[i] == 1 && (result[index] != first[i] || result[index + 1] != second[i] || result[index + 2] != third[i]))"}), - ("SveStoreAndZipTestx3.template", new Dictionary { ["TestName"] = "SveStoreAndZipx3_uint", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "StoreAndZip", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["ValidateEntry"] = "(maskArray[i] == 0 && (result[index] != 0 || result[index + 1] != 0 || result[index + 2] != 0)) || (maskArray[i] == 1 && (result[index] != first[i] || result[index + 1] != second[i] || result[index + 2] != third[i]))"}), - ("SveStoreAndZipTestx3.template", new Dictionary { ["TestName"] = "SveStoreAndZipx3_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "StoreAndZip", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["ValidateEntry"] = "(maskArray[i] == 0 && (result[index] != 0 || result[index + 1] != 0 || result[index + 2] != 0)) || (maskArray[i] == 1 && (result[index] != first[i] || result[index + 1] != second[i] || result[index + 2] != third[i]))"}), - ("SveStoreAndZipTestx4.template", new Dictionary { ["TestName"] = "SveStoreAndZipx4_float", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "StoreAndZip", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateEntry"] = "(maskArray[i] == 0 && (result[index] != 0 || result[index + 1] != 0 || result[index + 2] != 0 || result[index + 3] != 0)) || (maskArray[i] == 1 && (result[index] != first[i] || result[index + 1] != second[i] || result[index + 2] != third[i] || result[index + 3] != fourth[i]))"}), - ("SveStoreAndZipTestx4.template", new Dictionary { ["TestName"] = "SveStoreAndZipx4_double", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "StoreAndZip", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ValidateEntry"] = "(maskArray[i] == 0 && (result[index] != 0 || result[index + 1] != 0 || result[index + 2] != 0 || result[index + 3] != 0)) || (maskArray[i] == 1 && (result[index] != first[i] || result[index + 1] != second[i] || result[index + 2] != third[i] || result[index + 3] != fourth[i]))"}), - ("SveStoreAndZipTestx4.template", new Dictionary { ["TestName"] = "SveStoreAndZipx4_sbyte", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "StoreAndZip", ["RetVectorType"] = "Vector", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "SByte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["ValidateEntry"] = "(maskArray[i] == 0 && (result[index] != 0 || result[index + 1] != 0 || result[index + 2] != 0 || result[index + 3] != 0)) || (maskArray[i] == 1 && (result[index] != first[i] || result[index + 1] != second[i] || result[index + 2] != third[i] || result[index + 3] != fourth[i]))"}), - ("SveStoreAndZipTestx4.template", new Dictionary { ["TestName"] = "SveStoreAndZipx4_short", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "StoreAndZip", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ValidateEntry"] = "(maskArray[i] == 0 && (result[index] != 0 || result[index + 1] != 0 || result[index + 2] != 0 || result[index + 3] != 0)) || (maskArray[i] == 1 && (result[index] != first[i] || result[index + 1] != second[i] || result[index + 2] != third[i] || result[index + 3] != fourth[i]))"}), - ("SveStoreAndZipTestx4.template", new Dictionary { ["TestName"] = "SveStoreAndZipx4_int", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "StoreAndZip", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateEntry"] = "(maskArray[i] == 0 && (result[index] != 0 || result[index + 1] != 0 || result[index + 2] != 0 || result[index + 3] != 0)) || (maskArray[i] == 1 && (result[index] != first[i] || result[index + 1] != second[i] || result[index + 2] != third[i] || result[index + 3] != fourth[i]))"}), - ("SveStoreAndZipTestx4.template", new Dictionary { ["TestName"] = "SveStoreAndZipx4_long", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "StoreAndZip", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["ValidateEntry"] = "(maskArray[i] == 0 && (result[index] != 0 || result[index + 1] != 0 || result[index + 2] != 0 || result[index + 3] != 0)) || (maskArray[i] == 1 && (result[index] != first[i] || result[index + 1] != second[i] || result[index + 2] != third[i] || result[index + 3] != fourth[i]))"}), - ("SveStoreAndZipTestx4.template", new Dictionary { ["TestName"] = "SveStoreAndZipx4_byte", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "StoreAndZip", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Byte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["ValidateEntry"] = "(maskArray[i] == 0 && (result[index] != 0 || result[index + 1] != 0 || result[index + 2] != 0 || result[index + 3] != 0)) || (maskArray[i] == 1 && (result[index] != first[i] || result[index + 1] != second[i] || result[index + 2] != third[i] || result[index + 3] != fourth[i]))"}), - ("SveStoreAndZipTestx4.template", new Dictionary { ["TestName"] = "SveStoreAndZipx4_ushort", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "StoreAndZip", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["ValidateEntry"] = "(maskArray[i] == 0 && (result[index] != 0 || result[index + 1] != 0 || result[index + 2] != 0 || result[index + 3] != 0)) || (maskArray[i] == 1 && (result[index] != first[i] || result[index + 1] != second[i] || result[index + 2] != third[i] || result[index + 3] != fourth[i]))"}), - ("SveStoreAndZipTestx4.template", new Dictionary { ["TestName"] = "SveStoreAndZipx4_uint", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "StoreAndZip", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["ValidateEntry"] = "(maskArray[i] == 0 && (result[index] != 0 || result[index + 1] != 0 || result[index + 2] != 0 || result[index + 3] != 0)) || (maskArray[i] == 1 && (result[index] != first[i] || result[index + 1] != second[i] || result[index + 2] != third[i] || result[index + 3] != fourth[i]))"}), - ("SveStoreAndZipTestx4.template", new Dictionary { ["TestName"] = "SveStoreAndZipx4_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "StoreAndZip", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["ValidateEntry"] = "(maskArray[i] == 0 && (result[index] != 0 || result[index + 1] != 0 || result[index + 2] != 0 || result[index + 3] != 0)) || (maskArray[i] == 1 && (result[index] != first[i] || result[index + 1] != second[i] || result[index + 2] != third[i] || result[index + 3] != fourth[i]))"}), + ("SveStoreAndZipTest.template", new Dictionary { ["TestName"] = "SveStoreAndZip_float", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "StoreAndZip", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateEntry"] = "(maskArray[i] == 0 && result[i] != 0) || (maskArray[i] == 1 && result[i] != first[i])"}), + ("SveStoreAndZipTest.template", new Dictionary { ["TestName"] = "SveStoreAndZip_double", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "StoreAndZip", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ValidateEntry"] = "(maskArray[i] == 0 && result[i] != 0) || (maskArray[i] == 1 && result[i] != first[i])"}), + ("SveStoreAndZipTest.template", new Dictionary { ["TestName"] = "SveStoreAndZip_sbyte", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "StoreAndZip", ["RetVectorType"] = "Vector", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "SByte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["ValidateEntry"] = "(maskArray[i] == 0 && result[i] != 0) || (maskArray[i] == 1 && result[i] != first[i])"}), + ("SveStoreAndZipTest.template", new Dictionary { ["TestName"] = "SveStoreAndZip_short", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "StoreAndZip", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ValidateEntry"] = "(maskArray[i] == 0 && result[i] != 0) || (maskArray[i] == 1 && result[i] != first[i])"}), + ("SveStoreAndZipTest.template", new Dictionary { ["TestName"] = "SveStoreAndZip_int", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "StoreAndZip", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateEntry"] = "(maskArray[i] == 0 && result[i] != 0) || (maskArray[i] == 1 && result[i] != first[i])"}), + ("SveStoreAndZipTest.template", new Dictionary { ["TestName"] = "SveStoreAndZip_long", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "StoreAndZip", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["ValidateEntry"] = "(maskArray[i] == 0 && result[i] != 0) || (maskArray[i] == 1 && result[i] != first[i])"}), + ("SveStoreAndZipTest.template", new Dictionary { ["TestName"] = "SveStoreAndZip_byte", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "StoreAndZip", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Byte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["ValidateEntry"] = "(maskArray[i] == 0 && result[i] != 0) || (maskArray[i] == 1 && result[i] != first[i])"}), + ("SveStoreAndZipTest.template", new Dictionary { ["TestName"] = "SveStoreAndZip_ushort", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "StoreAndZip", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["ValidateEntry"] = "(maskArray[i] == 0 && result[i] != 0) || (maskArray[i] == 1 && result[i] != first[i])"}), + ("SveStoreAndZipTest.template", new Dictionary { ["TestName"] = "SveStoreAndZip_uint", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "StoreAndZip", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["ValidateEntry"] = "(maskArray[i] == 0 && result[i] != 0) || (maskArray[i] == 1 && result[i] != first[i])"}), + ("SveStoreAndZipTest.template", new Dictionary { ["TestName"] = "SveStoreAndZip_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "StoreAndZip", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["ValidateEntry"] = "(maskArray[i] == 0 && result[i] != 0) || (maskArray[i] == 1 && result[i] != first[i])"}), + ("SveStoreAndZipTestx2.template", new Dictionary { ["TestName"] = "SveStoreAndZipx2_float", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "StoreAndZip", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateEntry"] = "(maskArray[i] == 0 && (result[index] != 0 || result[index + 1] != 0)) || (maskArray[i] == 1 && (result[index] != first[i] || result[index + 1] != second[i]))"}), + ("SveStoreAndZipTestx2.template", new Dictionary { ["TestName"] = "SveStoreAndZipx2_double", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "StoreAndZip", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ValidateEntry"] = "(maskArray[i] == 0 && (result[index] != 0 || result[index + 1] != 0)) || (maskArray[i] == 1 && (result[index] != first[i] || result[index + 1] != second[i]))"}), + ("SveStoreAndZipTestx2.template", new Dictionary { ["TestName"] = "SveStoreAndZipx2_sbyte", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "StoreAndZip", ["RetVectorType"] = "Vector", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "SByte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["ValidateEntry"] = "(maskArray[i] == 0 && (result[index] != 0 || result[index + 1] != 0)) || (maskArray[i] == 1 && (result[index] != first[i] || result[index + 1] != second[i]))"}), + ("SveStoreAndZipTestx2.template", new Dictionary { ["TestName"] = "SveStoreAndZipx2_short", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "StoreAndZip", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ValidateEntry"] = "(maskArray[i] == 0 && (result[index] != 0 || result[index + 1] != 0)) || (maskArray[i] == 1 && (result[index] != first[i] || result[index + 1] != second[i]))"}), + ("SveStoreAndZipTestx2.template", new Dictionary { ["TestName"] = "SveStoreAndZipx2_int", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "StoreAndZip", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateEntry"] = "(maskArray[i] == 0 && (result[index] != 0 || result[index + 1] != 0)) || (maskArray[i] == 1 && (result[index] != first[i] || result[index + 1] != second[i]))"}), + ("SveStoreAndZipTestx2.template", new Dictionary { ["TestName"] = "SveStoreAndZipx2_long", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "StoreAndZip", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["ValidateEntry"] = "(maskArray[i] == 0 && (result[index] != 0 || result[index + 1] != 0)) || (maskArray[i] == 1 && (result[index] != first[i] || result[index + 1] != second[i]))"}), + ("SveStoreAndZipTestx2.template", new Dictionary { ["TestName"] = "SveStoreAndZipx2_byte", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "StoreAndZip", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Byte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["ValidateEntry"] = "(maskArray[i] == 0 && (result[index] != 0 || result[index + 1] != 0)) || (maskArray[i] == 1 && (result[index] != first[i] || result[index + 1] != second[i]))"}), + ("SveStoreAndZipTestx2.template", new Dictionary { ["TestName"] = "SveStoreAndZipx2_ushort", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "StoreAndZip", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["ValidateEntry"] = "(maskArray[i] == 0 && (result[index] != 0 || result[index + 1] != 0)) || (maskArray[i] == 1 && (result[index] != first[i] || result[index + 1] != second[i]))"}), + ("SveStoreAndZipTestx2.template", new Dictionary { ["TestName"] = "SveStoreAndZipx2_uint", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "StoreAndZip", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["ValidateEntry"] = "(maskArray[i] == 0 && (result[index] != 0 || result[index + 1] != 0)) || (maskArray[i] == 1 && (result[index] != first[i] || result[index + 1] != second[i]))"}), + ("SveStoreAndZipTestx2.template", new Dictionary { ["TestName"] = "SveStoreAndZipx2_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "StoreAndZip", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["ValidateEntry"] = "(maskArray[i] == 0 && (result[index] != 0 || result[index + 1] != 0)) || (maskArray[i] == 1 && (result[index] != first[i] || result[index + 1] != second[i]))"}), + ("SveStoreAndZipTestx3.template", new Dictionary { ["TestName"] = "SveStoreAndZipx3_float", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "StoreAndZip", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateEntry"] = "(maskArray[i] == 0 && (result[index] != 0 || result[index + 1] != 0 || result[index + 2] != 0)) || (maskArray[i] == 1 && (result[index] != first[i] || result[index + 1] != second[i] || result[index + 2] != third[i]))"}), + ("SveStoreAndZipTestx3.template", new Dictionary { ["TestName"] = "SveStoreAndZipx3_double", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "StoreAndZip", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ValidateEntry"] = "(maskArray[i] == 0 && (result[index] != 0 || result[index + 1] != 0 || result[index + 2] != 0)) || (maskArray[i] == 1 && (result[index] != first[i] || result[index + 1] != second[i] || result[index + 2] != third[i]))"}), + ("SveStoreAndZipTestx3.template", new Dictionary { ["TestName"] = "SveStoreAndZipx3_sbyte", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "StoreAndZip", ["RetVectorType"] = "Vector", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "SByte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["ValidateEntry"] = "(maskArray[i] == 0 && (result[index] != 0 || result[index + 1] != 0 || result[index + 2] != 0)) || (maskArray[i] == 1 && (result[index] != first[i] || result[index + 1] != second[i] || result[index + 2] != third[i]))"}), + ("SveStoreAndZipTestx3.template", new Dictionary { ["TestName"] = "SveStoreAndZipx3_short", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "StoreAndZip", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ValidateEntry"] = "(maskArray[i] == 0 && (result[index] != 0 || result[index + 1] != 0 || result[index + 2] != 0)) || (maskArray[i] == 1 && (result[index] != first[i] || result[index + 1] != second[i] || result[index + 2] != third[i]))"}), + ("SveStoreAndZipTestx3.template", new Dictionary { ["TestName"] = "SveStoreAndZipx3_int", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "StoreAndZip", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateEntry"] = "(maskArray[i] == 0 && (result[index] != 0 || result[index + 1] != 0 || result[index + 2] != 0)) || (maskArray[i] == 1 && (result[index] != first[i] || result[index + 1] != second[i] || result[index + 2] != third[i]))"}), + ("SveStoreAndZipTestx3.template", new Dictionary { ["TestName"] = "SveStoreAndZipx3_long", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "StoreAndZip", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["ValidateEntry"] = "(maskArray[i] == 0 && (result[index] != 0 || result[index + 1] != 0 || result[index + 2] != 0)) || (maskArray[i] == 1 && (result[index] != first[i] || result[index + 1] != second[i] || result[index + 2] != third[i]))"}), + ("SveStoreAndZipTestx3.template", new Dictionary { ["TestName"] = "SveStoreAndZipx3_byte", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "StoreAndZip", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Byte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["ValidateEntry"] = "(maskArray[i] == 0 && (result[index] != 0 || result[index + 1] != 0 || result[index + 2] != 0)) || (maskArray[i] == 1 && (result[index] != first[i] || result[index + 1] != second[i] || result[index + 2] != third[i]))"}), + ("SveStoreAndZipTestx3.template", new Dictionary { ["TestName"] = "SveStoreAndZipx3_ushort", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "StoreAndZip", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["ValidateEntry"] = "(maskArray[i] == 0 && (result[index] != 0 || result[index + 1] != 0 || result[index + 2] != 0)) || (maskArray[i] == 1 && (result[index] != first[i] || result[index + 1] != second[i] || result[index + 2] != third[i]))"}), + ("SveStoreAndZipTestx3.template", new Dictionary { ["TestName"] = "SveStoreAndZipx3_uint", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "StoreAndZip", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["ValidateEntry"] = "(maskArray[i] == 0 && (result[index] != 0 || result[index + 1] != 0 || result[index + 2] != 0)) || (maskArray[i] == 1 && (result[index] != first[i] || result[index + 1] != second[i] || result[index + 2] != third[i]))"}), + ("SveStoreAndZipTestx3.template", new Dictionary { ["TestName"] = "SveStoreAndZipx3_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "StoreAndZip", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["ValidateEntry"] = "(maskArray[i] == 0 && (result[index] != 0 || result[index + 1] != 0 || result[index + 2] != 0)) || (maskArray[i] == 1 && (result[index] != first[i] || result[index + 1] != second[i] || result[index + 2] != third[i]))"}), + ("SveStoreAndZipTestx4.template", new Dictionary { ["TestName"] = "SveStoreAndZipx4_float", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "StoreAndZip", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateEntry"] = "(maskArray[i] == 0 && (result[index] != 0 || result[index + 1] != 0 || result[index + 2] != 0 || result[index + 3] != 0)) || (maskArray[i] == 1 && (result[index] != first[i] || result[index + 1] != second[i] || result[index + 2] != third[i] || result[index + 3] != fourth[i]))"}), + ("SveStoreAndZipTestx4.template", new Dictionary { ["TestName"] = "SveStoreAndZipx4_double", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "StoreAndZip", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ValidateEntry"] = "(maskArray[i] == 0 && (result[index] != 0 || result[index + 1] != 0 || result[index + 2] != 0 || result[index + 3] != 0)) || (maskArray[i] == 1 && (result[index] != first[i] || result[index + 1] != second[i] || result[index + 2] != third[i] || result[index + 3] != fourth[i]))"}), + ("SveStoreAndZipTestx4.template", new Dictionary { ["TestName"] = "SveStoreAndZipx4_sbyte", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "StoreAndZip", ["RetVectorType"] = "Vector", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "SByte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["ValidateEntry"] = "(maskArray[i] == 0 && (result[index] != 0 || result[index + 1] != 0 || result[index + 2] != 0 || result[index + 3] != 0)) || (maskArray[i] == 1 && (result[index] != first[i] || result[index + 1] != second[i] || result[index + 2] != third[i] || result[index + 3] != fourth[i]))"}), + ("SveStoreAndZipTestx4.template", new Dictionary { ["TestName"] = "SveStoreAndZipx4_short", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "StoreAndZip", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ValidateEntry"] = "(maskArray[i] == 0 && (result[index] != 0 || result[index + 1] != 0 || result[index + 2] != 0 || result[index + 3] != 0)) || (maskArray[i] == 1 && (result[index] != first[i] || result[index + 1] != second[i] || result[index + 2] != third[i] || result[index + 3] != fourth[i]))"}), + ("SveStoreAndZipTestx4.template", new Dictionary { ["TestName"] = "SveStoreAndZipx4_int", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "StoreAndZip", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateEntry"] = "(maskArray[i] == 0 && (result[index] != 0 || result[index + 1] != 0 || result[index + 2] != 0 || result[index + 3] != 0)) || (maskArray[i] == 1 && (result[index] != first[i] || result[index + 1] != second[i] || result[index + 2] != third[i] || result[index + 3] != fourth[i]))"}), + ("SveStoreAndZipTestx4.template", new Dictionary { ["TestName"] = "SveStoreAndZipx4_long", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "StoreAndZip", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["ValidateEntry"] = "(maskArray[i] == 0 && (result[index] != 0 || result[index + 1] != 0 || result[index + 2] != 0 || result[index + 3] != 0)) || (maskArray[i] == 1 && (result[index] != first[i] || result[index + 1] != second[i] || result[index + 2] != third[i] || result[index + 3] != fourth[i]))"}), + ("SveStoreAndZipTestx4.template", new Dictionary { ["TestName"] = "SveStoreAndZipx4_byte", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "StoreAndZip", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Byte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["ValidateEntry"] = "(maskArray[i] == 0 && (result[index] != 0 || result[index + 1] != 0 || result[index + 2] != 0 || result[index + 3] != 0)) || (maskArray[i] == 1 && (result[index] != first[i] || result[index + 1] != second[i] || result[index + 2] != third[i] || result[index + 3] != fourth[i]))"}), + ("SveStoreAndZipTestx4.template", new Dictionary { ["TestName"] = "SveStoreAndZipx4_ushort", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "StoreAndZip", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["ValidateEntry"] = "(maskArray[i] == 0 && (result[index] != 0 || result[index + 1] != 0 || result[index + 2] != 0 || result[index + 3] != 0)) || (maskArray[i] == 1 && (result[index] != first[i] || result[index + 1] != second[i] || result[index + 2] != third[i] || result[index + 3] != fourth[i]))"}), + ("SveStoreAndZipTestx4.template", new Dictionary { ["TestName"] = "SveStoreAndZipx4_uint", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "StoreAndZip", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["ValidateEntry"] = "(maskArray[i] == 0 && (result[index] != 0 || result[index + 1] != 0 || result[index + 2] != 0 || result[index + 3] != 0)) || (maskArray[i] == 1 && (result[index] != first[i] || result[index + 1] != second[i] || result[index + 2] != third[i] || result[index + 3] != fourth[i]))"}), + ("SveStoreAndZipTestx4.template", new Dictionary { ["TestName"] = "SveStoreAndZipx4_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "StoreAndZip", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["ValidateEntry"] = "(maskArray[i] == 0 && (result[index] != 0 || result[index + 1] != 0 || result[index + 2] != 0 || result[index + 3] != 0)) || (maskArray[i] == 1 && (result[index] != first[i] || result[index + 1] != second[i] || result[index + 2] != third[i] || result[index + 3] != fourth[i]))"}), ("SveStoreNarrowingTest.template", new Dictionary { ["TestName"] = "SveStoreNarrow_short_sbyte", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "StoreNarrowing", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ValidateEntry"] = "(maskArray[i] == 0 && result[i] != 0) || (maskArray[i] == 1 && result[i] != (SByte)first[i])"}), ("SveStoreNarrowingTest.template", new Dictionary { ["TestName"] = "SveStoreNarrow_int_sbyte", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "StoreNarrowing", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateEntry"] = "(maskArray[i] == 0 && result[i] != 0) || (maskArray[i] == 1 && result[i] != (SByte)first[i])"}), diff --git a/src/tests/JIT/HardwareIntrinsics/Arm/Shared/SveStoreAndZipTest.template b/src/tests/JIT/HardwareIntrinsics/Arm/Shared/SveStoreAndZipTest.template index d8294856452ac..a80fb6a4482a0 100644 --- a/src/tests/JIT/HardwareIntrinsics/Arm/Shared/SveStoreAndZipTest.template +++ b/src/tests/JIT/HardwareIntrinsics/Arm/Shared/SveStoreAndZipTest.template @@ -24,7 +24,7 @@ namespace JIT.HardwareIntrinsics.Arm [Fact] public static void {TestName}() { - var test = new StoreTest__{TestName}(); + var test = new StoreAndZipTest__{TestName}(); if (test.IsSupported) { @@ -65,7 +65,7 @@ namespace JIT.HardwareIntrinsics.Arm } } - public sealed unsafe class StoreTest__{TestName} + public sealed unsafe class StoreAndZipTest__{TestName} { private struct DataTable { @@ -131,12 +131,10 @@ namespace JIT.HardwareIntrinsics.Arm public static TestStruct Create() { var testStruct = new TestStruct(); - var rnd = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = {NextValueOp1}; } Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op1VectorType}<{Op1BaseType}>, byte>(ref testStruct._fld1), ref Unsafe.As<{Op1BaseType}, byte>(ref _data1[0]), (uint)Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>()); - for (var i = 0; i < MaskElementCount; i++) { _maskData[i] = ({Op1BaseType})1; } - for (var i = 0; i < MaskElementCount / 2; i++) { _maskData[rnd.Next(MaskElementCount)] = ({Op1BaseType})0; } + for (var i = 0; i < MaskElementCount; i++) { _maskData[i] = ({Op1BaseType})({NextValueOp1} % 2); } Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op1VectorType}<{Op1BaseType}>, byte>(ref testStruct._storeMask), ref Unsafe.As<{Op1BaseType}, byte>(ref _maskData[0]), (uint)Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>()); ulong alignment = (ulong)LargestVectorSize; @@ -153,7 +151,7 @@ namespace JIT.HardwareIntrinsics.Arm _outHandle.Free(); } - public void RunStructFldScenario(StoreTest__{TestName} testClass) + public void RunStructFldScenario(StoreAndZipTest__{TestName} testClass) { Sve.{Method}(_storeMask, ({Op1BaseType}*) _outArrayPtr, _fld1); @@ -172,14 +170,12 @@ namespace JIT.HardwareIntrinsics.Arm private DataTable _dataTable; - public StoreTest__{TestName}() + public StoreAndZipTest__{TestName}() { Succeeded = true; - var rnd = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = {NextValueOp1}; } - for (var i = 0; i < MaskElementCount; i++) { _maskData[i] = ({Op1BaseType})1; } - for (var i = 0; i < MaskElementCount / 2; i++) { _maskData[rnd.Next(MaskElementCount)] = ({Op1BaseType})0; } + for (var i = 0; i < MaskElementCount; i++) { _maskData[i] = ({Op1BaseType})({NextValueOp1} % 2); } _dataTable = new DataTable(_data1, new {RetBaseType}[RetElementCount], _maskData, LargestVectorSize); } diff --git a/src/tests/JIT/HardwareIntrinsics/Arm/Shared/SveStoreAndZipTestx2.template b/src/tests/JIT/HardwareIntrinsics/Arm/Shared/SveStoreAndZipTestx2.template index 992d253246492..241c24cdd2dac 100644 --- a/src/tests/JIT/HardwareIntrinsics/Arm/Shared/SveStoreAndZipTestx2.template +++ b/src/tests/JIT/HardwareIntrinsics/Arm/Shared/SveStoreAndZipTestx2.template @@ -24,7 +24,7 @@ namespace JIT.HardwareIntrinsics.Arm [Fact] public static void {TestName}() { - var test = new Storex2Test__{TestName}(); + var test = new StoreAndZipx2Test__{TestName}(); if (test.IsSupported) { @@ -65,7 +65,7 @@ namespace JIT.HardwareIntrinsics.Arm } } - public sealed unsafe class Storex2Test__{TestName} + public sealed unsafe class StoreAndZipx2Test__{TestName} { private struct DataTable { @@ -140,14 +140,12 @@ namespace JIT.HardwareIntrinsics.Arm public static TestStruct Create() { var testStruct = new TestStruct(); - var rnd = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = {NextValueOp1}; } Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op1VectorType}<{Op1BaseType}>, byte>(ref testStruct._fld1), ref Unsafe.As<{Op1BaseType}, byte>(ref _data1[0]), (uint)Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = {NextValueOp1}; } Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op1VectorType}<{Op1BaseType}>, byte>(ref testStruct._fld2), ref Unsafe.As<{Op1BaseType}, byte>(ref _data2[0]), (uint)Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>()); - for (var i = 0; i < MaskElementCount; i++) { _maskData[i] = ({Op1BaseType})1; } - for (var i = 0; i < MaskElementCount / 2; i++) { _maskData[rnd.Next(MaskElementCount)] = ({Op1BaseType})0; } + for (var i = 0; i < MaskElementCount; i++) { _maskData[i] = ({Op1BaseType})({NextValueOp1} % 2); } Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op1VectorType}<{Op1BaseType}>, byte>(ref testStruct._storeMask), ref Unsafe.As<{Op1BaseType}, byte>(ref _maskData[0]), (uint)Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>()); ulong alignment = (ulong)LargestVectorSize; @@ -164,7 +162,7 @@ namespace JIT.HardwareIntrinsics.Arm _outHandle.Free(); } - public void RunStructFldScenario(Storex2Test__{TestName} testClass) + public void RunStructFldScenario(StoreAndZipx2Test__{TestName} testClass) { Sve.{Method}(_storeMask, ({Op1BaseType}*) _outArrayPtr, (_fld1, _fld2)); @@ -185,15 +183,13 @@ namespace JIT.HardwareIntrinsics.Arm private DataTable _dataTable; - public Storex2Test__{TestName}() + public StoreAndZipx2Test__{TestName}() { Succeeded = true; - var rnd = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = {NextValueOp1}; } for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = {NextValueOp1}; } - for (var i = 0; i < MaskElementCount; i++) { _maskData[i] = ({Op1BaseType})1; } - for (var i = 0; i < MaskElementCount / 2; i++) { _maskData[rnd.Next(MaskElementCount)] = ({Op1BaseType})0; } + for (var i = 0; i < MaskElementCount; i++) { _maskData[i] = ({Op1BaseType})({NextValueOp1} % 2); } _dataTable = new DataTable(_data1, _data2, new {RetBaseType}[RetElementCount], _maskData, LargestVectorSize); } diff --git a/src/tests/JIT/HardwareIntrinsics/Arm/Shared/SveStoreAndZipTestx3.template b/src/tests/JIT/HardwareIntrinsics/Arm/Shared/SveStoreAndZipTestx3.template index cac8a3a542c29..edcb6268d2756 100644 --- a/src/tests/JIT/HardwareIntrinsics/Arm/Shared/SveStoreAndZipTestx3.template +++ b/src/tests/JIT/HardwareIntrinsics/Arm/Shared/SveStoreAndZipTestx3.template @@ -24,7 +24,7 @@ namespace JIT.HardwareIntrinsics.Arm [Fact] public static void {TestName}() { - var test = new Storex3Test__{TestName}(); + var test = new StoreAndZipx3Test__{TestName}(); if (test.IsSupported) { @@ -65,7 +65,7 @@ namespace JIT.HardwareIntrinsics.Arm } } - public sealed unsafe class Storex3Test__{TestName} + public sealed unsafe class StoreAndZipx3Test__{TestName} { private struct DataTable { @@ -149,7 +149,6 @@ namespace JIT.HardwareIntrinsics.Arm public static TestStruct Create() { var testStruct = new TestStruct(); - var rnd = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = {NextValueOp1}; } Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op1VectorType}<{Op1BaseType}>, byte>(ref testStruct._fld1), ref Unsafe.As<{Op1BaseType}, byte>(ref _data1[0]), (uint)Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>()); @@ -157,8 +156,7 @@ namespace JIT.HardwareIntrinsics.Arm Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op1VectorType}<{Op1BaseType}>, byte>(ref testStruct._fld2), ref Unsafe.As<{Op1BaseType}, byte>(ref _data2[0]), (uint)Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>()); for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = {NextValueOp1}; } Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op1VectorType}<{Op1BaseType}>, byte>(ref testStruct._fld3), ref Unsafe.As<{Op1BaseType}, byte>(ref _data3[0]), (uint)Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>()); - for (var i = 0; i < MaskElementCount; i++) { _maskData[i] = ({Op1BaseType})1; } - for (var i = 0; i < MaskElementCount / 2; i++) { _maskData[rnd.Next(MaskElementCount)] = ({Op1BaseType})0; } + for (var i = 0; i < MaskElementCount; i++) { _maskData[i] = ({Op1BaseType})({NextValueOp1} % 2); } Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op1VectorType}<{Op1BaseType}>, byte>(ref testStruct._storeMask), ref Unsafe.As<{Op1BaseType}, byte>(ref _maskData[0]), (uint)Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>()); ulong alignment = (ulong)LargestVectorSize; @@ -175,7 +173,7 @@ namespace JIT.HardwareIntrinsics.Arm _outHandle.Free(); } - public void RunStructFldScenario(Storex3Test__{TestName} testClass) + public void RunStructFldScenario(StoreAndZipx3Test__{TestName} testClass) { Sve.{Method}(_storeMask, ({Op1BaseType}*)_outArrayPtr, (_fld1, _fld2, _fld3)); @@ -198,16 +196,14 @@ namespace JIT.HardwareIntrinsics.Arm private DataTable _dataTable; - public Storex3Test__{TestName}() + public StoreAndZipx3Test__{TestName}() { Succeeded = true; - var rnd = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = {NextValueOp1}; } for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = {NextValueOp1}; } for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = {NextValueOp1}; } - for (var i = 0; i < MaskElementCount; i++) { _maskData[i] = ({Op1BaseType})1; } - for (var i = 0; i < MaskElementCount / 2; i++) { _maskData[rnd.Next(MaskElementCount)] = ({Op1BaseType})0; } + for (var i = 0; i < MaskElementCount; i++) { _maskData[i] = ({Op1BaseType})({NextValueOp1} % 2); } _dataTable = new DataTable(_data1, _data2, _data3, new {RetBaseType}[RetElementCount], _maskData, LargestVectorSize); } diff --git a/src/tests/JIT/HardwareIntrinsics/Arm/Shared/SveStoreAndZipTestx4.template b/src/tests/JIT/HardwareIntrinsics/Arm/Shared/SveStoreAndZipTestx4.template index 81b13f0a5e3ab..3001cb70fcacb 100644 --- a/src/tests/JIT/HardwareIntrinsics/Arm/Shared/SveStoreAndZipTestx4.template +++ b/src/tests/JIT/HardwareIntrinsics/Arm/Shared/SveStoreAndZipTestx4.template @@ -24,7 +24,7 @@ namespace JIT.HardwareIntrinsics.Arm [Fact] public static void {TestName}() { - var test = new Storex4Test__{TestName}(); + var test = new StoreAndZipx4Test__{TestName}(); if (test.IsSupported) { @@ -65,7 +65,7 @@ namespace JIT.HardwareIntrinsics.Arm } } - public sealed unsafe class Storex4Test__{TestName} + public sealed unsafe class StoreAndZipx4Test__{TestName} { private struct DataTable { @@ -158,7 +158,6 @@ namespace JIT.HardwareIntrinsics.Arm public static TestStruct Create() { var testStruct = new TestStruct(); - var rnd = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = {NextValueOp1}; } Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op1VectorType}<{Op1BaseType}>, byte>(ref testStruct._fld1), ref Unsafe.As<{Op1BaseType}, byte>(ref _data1[0]), (uint)Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>()); @@ -168,8 +167,7 @@ namespace JIT.HardwareIntrinsics.Arm Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op1VectorType}<{Op1BaseType}>, byte>(ref testStruct._fld3), ref Unsafe.As<{Op1BaseType}, byte>(ref _data3[0]), (uint)Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>()); for (var i = 0; i < Op4ElementCount; i++) { _data4[i] = {NextValueOp1}; } Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op1VectorType}<{Op1BaseType}>, byte>(ref testStruct._fld4), ref Unsafe.As<{Op1BaseType}, byte>(ref _data4[0]), (uint)Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>()); - for (var i = 0; i < MaskElementCount; i++) { _maskData[i] = ({Op1BaseType})1; } - for (var i = 0; i < MaskElementCount / 2; i++) { _maskData[rnd.Next(MaskElementCount)] = ({Op1BaseType})0; } + for (var i = 0; i < MaskElementCount; i++) { _maskData[i] = ({Op1BaseType})({NextValueOp1} % 2); } Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op1VectorType}<{Op1BaseType}>, byte>(ref testStruct._storeMask), ref Unsafe.As<{Op1BaseType}, byte>(ref _maskData[0]), (uint)Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>()); ulong alignment = (ulong)LargestVectorSize; @@ -186,7 +184,7 @@ namespace JIT.HardwareIntrinsics.Arm _outHandle.Free(); } - public void RunStructFldScenario(Storex4Test__{TestName} testClass) + public void RunStructFldScenario(StoreAndZipx4Test__{TestName} testClass) { Sve.{Method}(_storeMask, ({Op1BaseType}*)_outArrayPtr, (_fld1, _fld2, _fld3, _fld4)); @@ -211,17 +209,15 @@ namespace JIT.HardwareIntrinsics.Arm private DataTable _dataTable; - public Storex4Test__{TestName}() + public StoreAndZipx4Test__{TestName}() { Succeeded = true; - var rnd = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = {NextValueOp1}; } for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = {NextValueOp1}; } for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = {NextValueOp1}; } for (var i = 0; i < Op4ElementCount; i++) { _data4[i] = {NextValueOp1}; } - for (var i = 0; i < MaskElementCount; i++) { _maskData[i] = ({Op1BaseType})1; } - for (var i = 0; i < MaskElementCount / 2; i++) { _maskData[rnd.Next(MaskElementCount)] = ({Op1BaseType})0; } + for (var i = 0; i < MaskElementCount; i++) { _maskData[i] = ({Op1BaseType})({NextValueOp1} % 2); } _dataTable = new DataTable(_data1, _data2, _data3, _data4, new {RetBaseType}[RetElementCount], _maskData, LargestVectorSize); } From 0f6c58542945c7de3d57fdda22cba7032c3bc253 Mon Sep 17 00:00:00 2001 From: Swapnil Gaikwad Date: Thu, 23 May 2024 14:01:38 +0100 Subject: [PATCH 3/3] Fix formatting issues --- src/coreclr/jit/hwintrinsicarm64.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/coreclr/jit/hwintrinsicarm64.cpp b/src/coreclr/jit/hwintrinsicarm64.cpp index c2d043aa52180..ec4bc0ee5dd95 100644 --- a/src/coreclr/jit/hwintrinsicarm64.cpp +++ b/src/coreclr/jit/hwintrinsicarm64.cpp @@ -2491,8 +2491,9 @@ GenTree* Compiler::impSpecialIntrinsic(NamedIntrinsic intrinsic, CORINFO_CLASS_HANDLE tmpClass = NO_CLASS_HANDLE; // The size of narrowed target elements is determined from the second argument of StoreNarrowing(). - // Thus, we first extract the datatype of a pointer passed in the second argument and then store it as the auxiliary - // type of intrinsic. This auxiliary type is then used in the codegen to choose the correct instruction to emit. + // Thus, we first extract the datatype of a pointer passed in the second argument and then store it as the + // auxiliary type of intrinsic. This auxiliary type is then used in the codegen to choose the correct + // instruction to emit. ptrType = strip(info.compCompHnd->getArgType(sig, arg, &tmpClass)); assert(ptrType == CORINFO_TYPE_PTR); ptrType = info.compCompHnd->getChildType(argClass, &tmpClass);