diff --git a/src/coreclr/jit/emitxarch.cpp b/src/coreclr/jit/emitxarch.cpp index 6202210221d9d..1fad850f623e0 100644 --- a/src/coreclr/jit/emitxarch.cpp +++ b/src/coreclr/jit/emitxarch.cpp @@ -157,6 +157,7 @@ regNumber emitter::getSseShiftRegNumber(instruction ins) case INS_psrad: case INS_psraw: + case INS_vpsraq: { return (regNumber)4; } @@ -17916,15 +17917,20 @@ emitter::insExecutionCharacteristics emitter::getInsExecutionCharacteristics(ins case INS_pminsw: case INS_pminud: case INS_pminsd: + case INS_vpminuq: + case INS_vpminsq: case INS_pmaxub: case INS_pmaxsb: case INS_pmaxuw: case INS_pmaxsw: case INS_pmaxsd: case INS_pmaxud: + case INS_vpmaxsq: + case INS_vpmaxuq: case INS_pabsb: case INS_pabsw: case INS_pabsd: + case INS_vpabsq: case INS_psignb: case INS_psignw: case INS_psignd: @@ -17949,6 +17955,7 @@ emitter::insExecutionCharacteristics emitter::getInsExecutionCharacteristics(ins case INS_psrlq: case INS_psrad: case INS_psraw: + case INS_vpsraq: if (insFmt == IF_RWR_CNS) { result.insLatency = PERFSCORE_LATENCY_1C; @@ -18193,6 +18200,11 @@ emitter::insExecutionCharacteristics emitter::getInsExecutionCharacteristics(ins result.insLatency += PERFSCORE_LATENCY_10C; break; + case INS_vpmullq: + result.insThroughput = PERFSCORE_THROUGHPUT_1C; + result.insLatency += PERFSCORE_LATENCY_15C; + break; + case INS_vpbroadcastb: case INS_vpbroadcastw: case INS_vpbroadcastd: diff --git a/src/coreclr/jit/gentree.cpp b/src/coreclr/jit/gentree.cpp index 8e1308f2bc451..aefec70c0e574 100644 --- a/src/coreclr/jit/gentree.cpp +++ b/src/coreclr/jit/gentree.cpp @@ -18966,6 +18966,12 @@ bool GenTree::isCommutativeHWIntrinsic() const { return false; } + + case NI_AVX512F_Max: + case NI_AVX512F_Min: + { + return !varTypeIsFloating(node->GetSimdBaseType()); + } #endif // TARGET_XARCH default: @@ -19269,11 +19275,27 @@ GenTree* Compiler::gtNewSimdAbsNode(var_types type, GenTree* op1, CorInfoType si return gtNewSimdBinOpNode(GT_AND_NOT, type, op1, bitMask, simdBaseJitType, simdSize); } - assert((simdSize != 32) || compIsaSupportedDebugOnly(InstructionSet_AVX2)); + NamedIntrinsic intrinsic = NI_Illegal; + + if (simdBaseType == TYP_LONG) + { + if (compOpportunisticallyDependsOn(InstructionSet_AVX512F_VL)) + { + intrinsic = NI_AVX512F_VL_Abs; + } + } + else if (simdSize == 32) + { + assert(compIsaSupportedDebugOnly(InstructionSet_AVX2)); + intrinsic = NI_AVX2_Abs; + } + else if (compOpportunisticallyDependsOn(InstructionSet_SSSE3)) + { + intrinsic = NI_SSSE3_Abs; + } - if ((simdBaseType != TYP_LONG) && ((simdSize == 32) || compOpportunisticallyDependsOn(InstructionSet_SSSE3))) + if (intrinsic != NI_Illegal) { - NamedIntrinsic intrinsic = (simdSize == 32) ? NI_AVX2_Abs : NI_SSSE3_Abs; return gtNewSimdHWIntrinsicNode(type, op1, intrinsic, simdBaseJitType, simdSize); } else @@ -19390,6 +19412,23 @@ GenTree* Compiler::gtNewSimdBinOpNode( { assert(compIsaSupportedDebugOnly(InstructionSet_AVX512F)); intrinsic = NI_AVX512F_And; + + if (varTypeIsIntegral(simdBaseType)) + { + intrinsic = NI_AVX512F_And; + } + else if (compOpportunisticallyDependsOn(InstructionSet_AVX512DQ)) + { + intrinsic = NI_AVX512DQ_And; + } + else + { + // Since this is a bitwise operation, we can still support it by lying + // about the type and doing the operation using a supported instruction + + intrinsic = NI_AVX512F_And; + simdBaseJitType = (simdBaseType == TYP_DOUBLE) ? CORINFO_TYPE_LONG : CORINFO_TYPE_INT; + } } else if (simdSize == 32) { @@ -19409,7 +19448,7 @@ GenTree* Compiler::gtNewSimdBinOpNode( // about the type and doing the operation using a supported instruction intrinsic = NI_AVX_And; - simdBaseJitType = CORINFO_TYPE_FLOAT; + simdBaseJitType = varTypeIsLong(simdBaseType) ? CORINFO_TYPE_DOUBLE : CORINFO_TYPE_FLOAT; } } else if (simdBaseType == TYP_FLOAT) @@ -19429,6 +19468,23 @@ GenTree* Compiler::gtNewSimdBinOpNode( { assert(compIsaSupportedDebugOnly(InstructionSet_AVX512F)); intrinsic = NI_AVX512F_AndNot; + + if (varTypeIsIntegral(simdBaseType)) + { + intrinsic = NI_AVX512F_AndNot; + } + else if (compOpportunisticallyDependsOn(InstructionSet_AVX512DQ)) + { + intrinsic = NI_AVX512DQ_AndNot; + } + else + { + // Since this is a bitwise operation, we can still support it by lying + // about the type and doing the operation using a supported instruction + + intrinsic = NI_AVX512F_AndNot; + simdBaseJitType = (simdBaseType == TYP_DOUBLE) ? CORINFO_TYPE_LONG : CORINFO_TYPE_INT; + } } else if (simdSize == 32) { @@ -19448,7 +19504,7 @@ GenTree* Compiler::gtNewSimdBinOpNode( // about the type and doing the operation using a supported instruction intrinsic = NI_AVX_AndNot; - simdBaseJitType = CORINFO_TYPE_FLOAT; + simdBaseJitType = varTypeIsLong(simdBaseType) ? CORINFO_TYPE_DOUBLE : CORINFO_TYPE_FLOAT; } } else if (simdBaseType == TYP_FLOAT) @@ -19510,7 +19566,6 @@ GenTree* Compiler::gtNewSimdBinOpNode( } assert(!varTypeIsByte(simdBaseType)); - assert((op != GT_RSH) || (!varTypeIsUnsigned(simdBaseType) && !varTypeIsLong(simdBaseType))); // "over shifting" is platform specific behavior. We will match the C# behavior // this requires we mask with (sizeof(T) * 8) - 1 which ensures the shift cannot @@ -19541,7 +19596,16 @@ GenTree* Compiler::gtNewSimdBinOpNode( } else if (op == GT_RSH) { - intrinsic = NI_AVX2_ShiftRightArithmetic; + if (varTypeIsLong(simdBaseType) || (simdBaseType == TYP_DOUBLE)) + { + assert(varTypeIsSigned(simdBaseType)); + assert(compIsaSupportedDebugOnly(InstructionSet_AVX512F_VL)); + intrinsic = NI_AVX512F_VL_ShiftRightArithmetic; + } + else + { + intrinsic = NI_AVX2_ShiftRightArithmetic; + } } else { @@ -19555,7 +19619,16 @@ GenTree* Compiler::gtNewSimdBinOpNode( } else if (op == GT_RSH) { - intrinsic = NI_SSE2_ShiftRightArithmetic; + if (varTypeIsLong(simdBaseType) || (simdBaseType == TYP_DOUBLE)) + { + assert(varTypeIsSigned(simdBaseType)); + assert(compIsaSupportedDebugOnly(InstructionSet_AVX512F_VL)); + intrinsic = NI_AVX512F_VL_ShiftRightArithmetic; + } + else + { + intrinsic = NI_SSE2_ShiftRightArithmetic; + } } else { @@ -19654,6 +19727,16 @@ GenTree* Compiler::gtNewSimdBinOpNode( break; } + case TYP_LONG: + case TYP_ULONG: + { + assert((simdSize == 16) || (simdSize == 32)); + assert(compIsaSupportedDebugOnly(InstructionSet_AVX512DQ_VL)); + + intrinsic = NI_AVX512DQ_VL_MultiplyLow; + break; + } + case TYP_FLOAT: { if (simdSize == 32) @@ -19696,6 +19779,23 @@ GenTree* Compiler::gtNewSimdBinOpNode( { assert(compIsaSupportedDebugOnly(InstructionSet_AVX512F)); intrinsic = NI_AVX512F_Or; + + if (varTypeIsIntegral(simdBaseType)) + { + intrinsic = NI_AVX512F_Or; + } + else if (compOpportunisticallyDependsOn(InstructionSet_AVX512DQ)) + { + intrinsic = NI_AVX512DQ_Or; + } + else + { + // Since this is a bitwise operation, we can still support it by lying + // about the type and doing the operation using a supported instruction + + intrinsic = NI_AVX512F_Or; + simdBaseJitType = (simdBaseType == TYP_DOUBLE) ? CORINFO_TYPE_LONG : CORINFO_TYPE_INT; + } } else if (simdSize == 32) { @@ -19715,7 +19815,7 @@ GenTree* Compiler::gtNewSimdBinOpNode( // about the type and doing the operation using a supported instruction intrinsic = NI_AVX_Or; - simdBaseJitType = CORINFO_TYPE_FLOAT; + simdBaseJitType = varTypeIsLong(simdBaseType) ? CORINFO_TYPE_DOUBLE : CORINFO_TYPE_FLOAT; } } else if (simdBaseType == TYP_FLOAT) @@ -19775,6 +19875,23 @@ GenTree* Compiler::gtNewSimdBinOpNode( { assert(compIsaSupportedDebugOnly(InstructionSet_AVX512F)); intrinsic = NI_AVX512F_Xor; + + if (varTypeIsIntegral(simdBaseType)) + { + intrinsic = NI_AVX512F_Xor; + } + else if (compOpportunisticallyDependsOn(InstructionSet_AVX512DQ)) + { + intrinsic = NI_AVX512DQ_Xor; + } + else + { + // Since this is a bitwise operation, we can still support it by lying + // about the type and doing the operation using a supported instruction + + intrinsic = NI_AVX512F_Xor; + simdBaseJitType = (simdBaseType == TYP_DOUBLE) ? CORINFO_TYPE_LONG : CORINFO_TYPE_INT; + } } else if (simdSize == 32) { @@ -19794,7 +19911,7 @@ GenTree* Compiler::gtNewSimdBinOpNode( // about the type and doing the operation using a supported instruction intrinsic = NI_AVX_Xor; - simdBaseJitType = CORINFO_TYPE_FLOAT; + simdBaseJitType = varTypeIsLong(simdBaseType) ? CORINFO_TYPE_DOUBLE : CORINFO_TYPE_FLOAT; } } else if (simdBaseType == TYP_FLOAT) @@ -21885,6 +22002,10 @@ GenTree* Compiler::gtNewSimdMaxNode( { intrinsic = NI_AVX2_Max; } + else if (compOpportunisticallyDependsOn(InstructionSet_AVX512F_VL)) + { + intrinsic = NI_AVX512F_VL_Max; + } } } else @@ -21974,7 +22095,6 @@ GenTree* Compiler::gtNewSimdMaxNode( if (compOpportunisticallyDependsOn(InstructionSet_SSE41)) { intrinsic = NI_SSE41_Max; - break; } break; } @@ -21982,6 +22102,10 @@ GenTree* Compiler::gtNewSimdMaxNode( case TYP_LONG: case TYP_ULONG: { + if (compOpportunisticallyDependsOn(InstructionSet_AVX512F_VL)) + { + intrinsic = NI_AVX512F_VL_Max; + } break; } @@ -22072,6 +22196,10 @@ GenTree* Compiler::gtNewSimdMinNode( { intrinsic = NI_AVX2_Min; } + else if (compOpportunisticallyDependsOn(InstructionSet_AVX512F_VL)) + { + intrinsic = NI_AVX512F_VL_Min; + } } } else @@ -22157,7 +22285,6 @@ GenTree* Compiler::gtNewSimdMinNode( if (compOpportunisticallyDependsOn(InstructionSet_SSE41)) { intrinsic = NI_SSE41_Min; - break; } break; } @@ -22165,6 +22292,10 @@ GenTree* Compiler::gtNewSimdMinNode( case TYP_LONG: case TYP_ULONG: { + if (compOpportunisticallyDependsOn(InstructionSet_AVX512F_VL)) + { + intrinsic = NI_AVX512F_VL_Min; + } break; } @@ -22496,7 +22627,7 @@ GenTree* Compiler::gtNewSimdNarrowNode( // // var tmp1 = Avx.ConvertToVector128Single(op1).ToVector256Unsafe(); // var tmp2 = Avx.ConvertToVector128Single(op2); - // return Avx.InsertVector128(tmp1, tmp2, 1); + // return tmp1.WithUpper(tmp2); CorInfoType opBaseJitType = CORINFO_TYPE_DOUBLE; diff --git a/src/coreclr/jit/hwintrinsiccodegenxarch.cpp b/src/coreclr/jit/hwintrinsiccodegenxarch.cpp index 274cd7d79df70..ae0879e4ba473 100644 --- a/src/coreclr/jit/hwintrinsiccodegenxarch.cpp +++ b/src/coreclr/jit/hwintrinsiccodegenxarch.cpp @@ -1799,13 +1799,20 @@ void CodeGen::genAvxFamilyIntrinsic(GenTreeHWIntrinsic* node) case NI_AVX512BW_ConvertToVector256Byte: case NI_AVX512BW_ConvertToVector256SByte: { - // These instructions are RM_R and so we need to ensure the targetReg - // is passed in as the RM register and op1 is passed as the R register - - op1Reg = op1->GetRegNum(); instruction ins = HWIntrinsicInfo::lookupIns(intrinsicId, baseType); - emit->emitIns_R_R(ins, attr, op1Reg, targetReg); + if (varTypeIsFloating(baseType)) + { + genHWIntrinsic_R_RM(node, ins, attr, targetReg, op1); + } + else + { + // These instructions are RM_R and so we need to ensure the targetReg + // is passed in as the RM register and op1 is passed as the R register + + op1Reg = op1->GetRegNum(); + emit->emitIns_R_R(ins, attr, op1Reg, targetReg); + } break; } diff --git a/src/coreclr/jit/hwintrinsiclistxarch.h b/src/coreclr/jit/hwintrinsiclistxarch.h index ff7348f40bbb0..3e81d3f3da3f3 100644 --- a/src/coreclr/jit/hwintrinsiclistxarch.h +++ b/src/coreclr/jit/hwintrinsiclistxarch.h @@ -790,6 +790,7 @@ HARDWARE_INTRINSIC(AVX2, Xor, // {TYP_BYTE, TYP_UBYTE, TYP_SHORT, TYP_USHORT, TYP_INT, TYP_UINT, TYP_LONG, TYP_ULONG, TYP_FLOAT, TYP_DOUBLE} // *************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************** // AVX512F Intrinsics +HARDWARE_INTRINSIC(AVX512F, Abs, 64, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_pabsd, INS_invalid, INS_vpabsq, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SimpleSIMD, HW_Flag_NoRMWSemantics|HW_Flag_BaseTypeFromFirstArg) HARDWARE_INTRINSIC(AVX512F, Add, 64, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_paddd, INS_paddd, INS_paddq, INS_paddq, INS_addps, INS_addpd}, HW_Category_SimpleSIMD, HW_Flag_Commutative) HARDWARE_INTRINSIC(AVX512F, And, 64, 2, {INS_pand, INS_pand, INS_pand, INS_pand, INS_pand, INS_pand, INS_vpandq, INS_vpandq, INS_andps, INS_andpd}, HW_Category_SimpleSIMD, HW_Flag_Commutative) HARDWARE_INTRINSIC(AVX512F, AndNot, 64, 2, {INS_pandn, INS_pandn, INS_pandn, INS_pandn, INS_pandn, INS_pandn, INS_vpandnq, INS_vpandnq, INS_andnps, INS_andnpd}, HW_Category_SimpleSIMD, HW_Flag_NoFlag) @@ -799,15 +800,21 @@ HARDWARE_INTRINSIC(AVX512F, ConvertToVector128Int32, HARDWARE_INTRINSIC(AVX512F, ConvertToVector128UInt16, -1, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_vpmovdw, INS_vpmovdw, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SimpleSIMD, HW_Flag_BaseTypeFromFirstArg|HW_Flag_SpecialCodeGen) HARDWARE_INTRINSIC(AVX512F, ConvertToVector128UInt32, -1, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_vpmovqd, INS_vpmovqd, INS_invalid, INS_invalid}, HW_Category_SimpleSIMD, HW_Flag_BaseTypeFromFirstArg|HW_Flag_SpecialCodeGen) HARDWARE_INTRINSIC(AVX512F, ConvertToVector256Int16, 64, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_vpmovdw, INS_vpmovdw, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SimpleSIMD, HW_Flag_BaseTypeFromFirstArg|HW_Flag_SpecialCodeGen) -HARDWARE_INTRINSIC(AVX512F, ConvertToVector256Int32, 64, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_vpmovqd, INS_vpmovqd, INS_invalid, INS_invalid}, HW_Category_SimpleSIMD, HW_Flag_BaseTypeFromFirstArg|HW_Flag_SpecialCodeGen) +HARDWARE_INTRINSIC(AVX512F, ConvertToVector256Int32, 64, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_vpmovqd, INS_vpmovqd, INS_invalid, INS_cvtpd2dq}, HW_Category_SimpleSIMD, HW_Flag_BaseTypeFromFirstArg|HW_Flag_SpecialCodeGen) +HARDWARE_INTRINSIC(AVX512F, ConvertToVector128Int32WithTruncation, 64, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_cvttpd2dq}, HW_Category_SimpleSIMD, HW_Flag_BaseTypeFromFirstArg) HARDWARE_INTRINSIC(AVX512F, ConvertToVector256Single, 64, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_cvtpd2ps}, HW_Category_SimpleSIMD, HW_Flag_BaseTypeFromFirstArg) HARDWARE_INTRINSIC(AVX512F, ConvertToVector256UInt16, 64, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_vpmovdw, INS_vpmovdw, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SimpleSIMD, HW_Flag_BaseTypeFromFirstArg|HW_Flag_SpecialCodeGen) HARDWARE_INTRINSIC(AVX512F, ConvertToVector256UInt32, 64, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_vpmovqd, INS_vpmovqd, INS_invalid, INS_invalid}, HW_Category_SimpleSIMD, HW_Flag_BaseTypeFromFirstArg|HW_Flag_SpecialCodeGen) HARDWARE_INTRINSIC(AVX512F, ConvertToVector512Double, 64, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_cvtdq2pd, INS_invalid, INS_invalid, INS_invalid, INS_cvtps2pd, INS_invalid}, HW_Category_SimpleSIMD, HW_Flag_BaseTypeFromFirstArg) -HARDWARE_INTRINSIC(AVX512F, ConvertToVector512Int32, 64, 1, {INS_invalid, INS_invalid, INS_pmovsxwd, INS_pmovzxwd, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SimpleSIMD, HW_Flag_BaseTypeFromFirstArg) -HARDWARE_INTRINSIC(AVX512F, ConvertToVector512Int64, 64, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_pmovsxdq, INS_pmovzxdq, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SimpleSIMD, HW_Flag_BaseTypeFromFirstArg) -HARDWARE_INTRINSIC(AVX512F, ConvertToVector512UInt32, 64, 1, {INS_invalid, INS_invalid, INS_pmovsxwd, INS_pmovzxwd, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SimpleSIMD, HW_Flag_BaseTypeFromFirstArg) -HARDWARE_INTRINSIC(AVX512F, ConvertToVector512UInt64, 64, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_pmovsxdq, INS_pmovzxdq, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SimpleSIMD, HW_Flag_BaseTypeFromFirstArg) +HARDWARE_INTRINSIC(AVX512F, ConvertToVector512Int32, 64, 1, {INS_pmovsxbd, INS_pmovzxbd, INS_pmovsxwd, INS_pmovzxwd, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_cvtps2dq, INS_invalid}, HW_Category_SimpleSIMD, HW_Flag_BaseTypeFromFirstArg) +HARDWARE_INTRINSIC(AVX512F, ConvertToVector512Int32WithTruncation, 64, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_cvttps2dq, INS_invalid}, HW_Category_SimpleSIMD, HW_Flag_BaseTypeFromFirstArg) +HARDWARE_INTRINSIC(AVX512F, ConvertToVector512Int64, 64, 1, {INS_pmovsxbq, INS_pmovzxbq, INS_pmovsxwq, INS_pmovzxwq, INS_pmovsxdq, INS_pmovzxdq, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SimpleSIMD, HW_Flag_BaseTypeFromFirstArg) +HARDWARE_INTRINSIC(AVX512F, ConvertToVector512Single, 64, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_cvtdq2ps, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SimpleSIMD, HW_Flag_BaseTypeFromFirstArg) +HARDWARE_INTRINSIC(AVX512F, ConvertToVector512UInt32, 64, 1, {INS_pmovsxbd, INS_pmovzxbd, INS_pmovsxwd, INS_pmovzxwd, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SimpleSIMD, HW_Flag_BaseTypeFromFirstArg) +HARDWARE_INTRINSIC(AVX512F, ConvertToVector512UInt64, 64, 1, {INS_pmovsxbq, INS_pmovzxbq, INS_pmovsxwq, INS_pmovzxwq, INS_pmovsxdq, INS_pmovzxdq, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SimpleSIMD, HW_Flag_BaseTypeFromFirstArg) +HARDWARE_INTRINSIC(AVX512F, Divide, 64, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_divps, INS_divpd}, HW_Category_SimpleSIMD, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AVX512F, DuplicateEvenIndexed, 64, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_movsldup, INS_movddup}, HW_Category_SimpleSIMD, HW_Flag_NoRMWSemantics) +HARDWARE_INTRINSIC(AVX512F, DuplicateOddIndexed, 64, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_movshdup, INS_invalid}, HW_Category_SimpleSIMD, HW_Flag_NoRMWSemantics) HARDWARE_INTRINSIC(AVX512F, ExtractVector128, 64, 2, {INS_vextracti128, INS_vextracti128, INS_vextracti128, INS_vextracti128, INS_vextracti128, INS_vextracti128, INS_vextracti128, INS_vextracti128, INS_vextractf128, INS_vextractf128}, HW_Category_IMM, HW_Flag_FullRangeIMM) HARDWARE_INTRINSIC(AVX512F, ExtractVector256, 64, 2, {INS_vextracti64x4, INS_vextracti64x4, INS_vextracti64x4, INS_vextracti64x4, INS_vextracti64x4, INS_vextracti64x4, INS_vextracti64x4, INS_vextracti64x4, INS_vextractf64x4, INS_vextractf64x4}, HW_Category_IMM, HW_Flag_FullRangeIMM) HARDWARE_INTRINSIC(AVX512F, InsertVector128, 64, 3, {INS_vinserti128, INS_vinserti128, INS_vinserti128, INS_vinserti128, INS_vinserti128, INS_vinserti128, INS_vinserti128, INS_vinserti128, INS_vinsertf128, INS_vinsertf128}, HW_Category_IMM, HW_Flag_FullRangeIMM) @@ -815,19 +822,44 @@ HARDWARE_INTRINSIC(AVX512F, InsertVector256, HARDWARE_INTRINSIC(AVX512F, LoadAlignedVector512, 64, 1, {INS_movdqa, INS_movdqa, INS_movdqa, INS_movdqa, INS_movdqa, INS_movdqa, INS_vmovdqa64, INS_vmovdqa64, INS_movaps, INS_movapd}, HW_Category_MemoryLoad, HW_Flag_NoRMWSemantics) HARDWARE_INTRINSIC(AVX512F, LoadAlignedVector512NonTemporal, 64, 1, {INS_movntdqa, INS_movntdqa, INS_movntdqa, INS_movntdqa, INS_movntdqa, INS_movntdqa, INS_movntdqa, INS_movntdqa, INS_invalid, INS_invalid}, HW_Category_MemoryLoad, HW_Flag_NoFlag) HARDWARE_INTRINSIC(AVX512F, LoadVector512, 64, 1, {INS_movdqu, INS_movdqu, INS_movdqu, INS_movdqu, INS_movdqu, INS_movdqu, INS_vmovdqu64, INS_vmovdqu64, INS_movups, INS_movupd}, HW_Category_Helper, HW_Flag_SpecialImport|HW_Flag_NoCodeGen) +HARDWARE_INTRINSIC(AVX512F, Max, 64, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_pmaxsd, INS_pmaxud, INS_vpmaxsq, INS_vpmaxuq, INS_maxps, INS_maxpd}, HW_Category_SimpleSIMD, HW_Flag_MaybeCommutative) +HARDWARE_INTRINSIC(AVX512F, Min, 64, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_pminsd, INS_pminud, INS_vpminsq, INS_vpminuq, INS_minps, INS_minpd}, HW_Category_SimpleSIMD, HW_Flag_MaybeCommutative) +HARDWARE_INTRINSIC(AVX512F, Multiply, 64, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_pmuldq, INS_pmuludq, INS_mulps, INS_mulpd}, HW_Category_SimpleSIMD, HW_Flag_Commutative) +HARDWARE_INTRINSIC(AVX512F, MultiplyLow, 64, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_pmulld, INS_pmulld, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SimpleSIMD, HW_Flag_Commutative) HARDWARE_INTRINSIC(AVX512F, Or, 64, 2, {INS_por, INS_por, INS_por, INS_por, INS_por, INS_por, INS_vporq, INS_vporq, INS_orps, INS_orpd}, HW_Category_SimpleSIMD, HW_Flag_Commutative) +HARDWARE_INTRINSIC(AVX512F, ShiftLeftLogical, 64, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_pslld, INS_pslld, INS_psllq, INS_psllq, INS_invalid, INS_invalid}, HW_Category_IMM, HW_Flag_MaybeIMM|HW_Flag_NoJmpTableIMM|HW_Flag_FullRangeIMM) +HARDWARE_INTRINSIC(AVX512F, ShiftRightArithmetic, 64, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_psrad, INS_invalid, INS_vpsraq, INS_invalid, INS_invalid, INS_invalid}, HW_Category_IMM, HW_Flag_MaybeIMM|HW_Flag_NoJmpTableIMM|HW_Flag_FullRangeIMM) +HARDWARE_INTRINSIC(AVX512F, ShiftRightLogical, 64, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_psrld, INS_psrld, INS_psrlq, INS_psrlq, INS_invalid, INS_invalid}, HW_Category_IMM, HW_Flag_MaybeIMM|HW_Flag_NoJmpTableIMM|HW_Flag_FullRangeIMM) +HARDWARE_INTRINSIC(AVX512F, Shuffle, 64, -1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_pshufd, INS_pshufd, INS_invalid, INS_invalid, INS_shufps, INS_shufpd}, HW_Category_IMM, HW_Flag_NoRMWSemantics|HW_Flag_FullRangeIMM) +HARDWARE_INTRINSIC(AVX512F, Sqrt, 64, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_sqrtps, INS_sqrtpd}, HW_Category_SimpleSIMD, HW_Flag_NoRMWSemantics) HARDWARE_INTRINSIC(AVX512F, Store, 64, 2, {INS_movdqu, INS_movdqu, INS_movdqu, INS_movdqu, INS_movdqu, INS_movdqu, INS_vmovdqu64, INS_vmovdqu64, INS_movups, INS_movupd}, HW_Category_Helper, HW_Flag_SpecialImport|HW_Flag_BaseTypeFromSecondArg|HW_Flag_NoCodeGen) HARDWARE_INTRINSIC(AVX512F, StoreAligned, 64, 2, {INS_movdqa, INS_movdqa, INS_movdqa, INS_movdqa, INS_movdqa, INS_movdqa, INS_vmovdqa64, INS_vmovdqa64, INS_movaps, INS_movapd}, HW_Category_MemoryStore, HW_Flag_NoRMWSemantics|HW_Flag_BaseTypeFromSecondArg) HARDWARE_INTRINSIC(AVX512F, StoreAlignedNonTemporal, 64, 2, {INS_movntdq, INS_movntdq, INS_movntdq, INS_movntdq, INS_movntdq, INS_movntdq, INS_movntdq, INS_movntdq, INS_movntps, INS_movntpd}, HW_Category_MemoryStore, HW_Flag_NoRMWSemantics|HW_Flag_BaseTypeFromSecondArg) HARDWARE_INTRINSIC(AVX512F, Subtract, 64, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_psubd, INS_psubd, INS_psubq, INS_psubq, INS_subps, INS_subpd}, HW_Category_SimpleSIMD, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AVX512F, UnpackHigh, 64, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_punpckhdq, INS_punpckhdq, INS_punpckhqdq, INS_punpckhqdq, INS_unpckhps, INS_unpckhpd}, HW_Category_SimpleSIMD, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AVX512F, UnpackLow, 64, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_punpckldq, INS_punpckldq, INS_punpcklqdq, INS_punpcklqdq, INS_unpcklps, INS_unpcklpd}, HW_Category_SimpleSIMD, HW_Flag_NoFlag) HARDWARE_INTRINSIC(AVX512F, Xor, 64, 2, {INS_pxor, INS_pxor, INS_pxor, INS_pxor, INS_pxor, INS_pxor, INS_vpxorq, INS_vpxorq, INS_xorps, INS_xorpd}, HW_Category_SimpleSIMD, HW_Flag_Commutative) // *************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************** // ISA Function name SIMD size NumArg Instructions Category Flags // {TYP_BYTE, TYP_UBYTE, TYP_SHORT, TYP_USHORT, TYP_INT, TYP_UINT, TYP_LONG, TYP_ULONG, TYP_FLOAT, TYP_DOUBLE} // *************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************** -// AVX512F Intrinsics -HARDWARE_INTRINSIC(AVX512BW, Add, 64, 2, {INS_paddb, INS_paddb, INS_paddw, INS_paddw, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SimpleSIMD, HW_Flag_Commutative) +// AVX512F.VL Intrinsics +HARDWARE_INTRINSIC(AVX512F_VL, Abs, -1, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_vpabsq, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SimpleSIMD, HW_Flag_NoRMWSemantics|HW_Flag_BaseTypeFromFirstArg) +HARDWARE_INTRINSIC(AVX512F_VL, Max, -1, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_vpmaxsq, INS_vpmaxuq, INS_invalid, INS_invalid}, HW_Category_SimpleSIMD, HW_Flag_Commutative) +HARDWARE_INTRINSIC(AVX512F_VL, Min, -1, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_vpminsq, INS_vpminuq, INS_invalid, INS_invalid}, HW_Category_SimpleSIMD, HW_Flag_Commutative) +HARDWARE_INTRINSIC(AVX512F_VL, ShiftRightArithmetic, -1, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_vpsraq, INS_invalid, INS_invalid, INS_invalid}, HW_Category_IMM, HW_Flag_MaybeIMM|HW_Flag_NoJmpTableIMM|HW_Flag_FullRangeIMM) + +// *************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************** +// ISA Function name SIMD size NumArg Instructions Category Flags +// {TYP_BYTE, TYP_UBYTE, TYP_SHORT, TYP_USHORT, TYP_INT, TYP_UINT, TYP_LONG, TYP_ULONG, TYP_FLOAT, TYP_DOUBLE} +// *************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************** +// AVX512BW Intrinsics +HARDWARE_INTRINSIC(AVX512BW, Abs, 64, 1, {INS_pabsb, INS_invalid, INS_pabsw, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SimpleSIMD, HW_Flag_NoRMWSemantics|HW_Flag_BaseTypeFromFirstArg) +HARDWARE_INTRINSIC(AVX512BW, Add, 64, 2, {INS_paddb, INS_paddb, INS_paddw, INS_paddw, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SimpleSIMD, HW_Flag_Commutative) +HARDWARE_INTRINSIC(AVX512BW, AddSaturate, 64, 2, {INS_paddsb, INS_paddusb, INS_paddsw, INS_paddusw, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SimpleSIMD, HW_Flag_Commutative) +HARDWARE_INTRINSIC(AVX512BW, AlignRight, 64, 3, {INS_palignr, INS_palignr, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_IMM, HW_Flag_FullRangeIMM) +HARDWARE_INTRINSIC(AVX512BW, Average, 64, 2, {INS_invalid, INS_pavgb, INS_invalid, INS_pavgw, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SimpleSIMD, HW_Flag_Commutative) HARDWARE_INTRINSIC(AVX512BW, BroadcastScalarToVector512, 64, 1, {INS_vpbroadcastb, INS_vpbroadcastb, INS_vpbroadcastw, INS_vpbroadcastw, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMDScalar, HW_Flag_MaybeMemoryLoad) HARDWARE_INTRINSIC(AVX512BW, ConvertToVector128Byte, -1, 1, {INS_invalid, INS_invalid, INS_vpmovwb, INS_vpmovwb, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SimpleSIMD, HW_Flag_BaseTypeFromFirstArg|HW_Flag_SpecialCodeGen) HARDWARE_INTRINSIC(AVX512BW, ConvertToVector128SByte, -1, 1, {INS_invalid, INS_invalid, INS_vpmovwb, INS_vpmovwb, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SimpleSIMD, HW_Flag_BaseTypeFromFirstArg|HW_Flag_SpecialCodeGen) @@ -835,7 +867,47 @@ HARDWARE_INTRINSIC(AVX512BW, ConvertToVector256Byte, HARDWARE_INTRINSIC(AVX512BW, ConvertToVector256SByte, 64, 1, {INS_invalid, INS_invalid, INS_vpmovwb, INS_vpmovwb, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SimpleSIMD, HW_Flag_BaseTypeFromFirstArg|HW_Flag_SpecialCodeGen) HARDWARE_INTRINSIC(AVX512BW, ConvertToVector512Int16, 64, 1, {INS_pmovsxbw, INS_pmovzxbw, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SimpleSIMD, HW_Flag_BaseTypeFromFirstArg) HARDWARE_INTRINSIC(AVX512BW, ConvertToVector512UInt16, 64, 1, {INS_pmovsxbw, INS_pmovzxbw, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SimpleSIMD, HW_Flag_BaseTypeFromFirstArg) -HARDWARE_INTRINSIC(AVX512BW, Subtract, 64, 2, {INS_psubb, INS_psubb, INS_psubw, INS_psubw, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SimpleSIMD, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AVX512BW, LoadVector512, 64, 1, {INS_vmovdqu8, INS_vmovdqu8, INS_vmovdqu16, INS_vmovdqu16, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_SpecialImport|HW_Flag_NoCodeGen) +HARDWARE_INTRINSIC(AVX512BW, Max, 64, 2, {INS_pmaxsb, INS_pmaxub, INS_pmaxsw, INS_pmaxuw, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SimpleSIMD, HW_Flag_Commutative) +HARDWARE_INTRINSIC(AVX512BW, Min, 64, 2, {INS_pminsb, INS_pminub, INS_pminsw, INS_pminuw, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SimpleSIMD, HW_Flag_Commutative) +HARDWARE_INTRINSIC(AVX512BW, MultiplyAddAdjacent, 64, 2, {INS_invalid, INS_invalid, INS_pmaddubsw, INS_invalid, INS_pmaddwd, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SimpleSIMD, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AVX512BW, MultiplyHigh, 64, 2, {INS_invalid, INS_invalid, INS_pmulhw, INS_pmulhuw, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SimpleSIMD, HW_Flag_Commutative) +HARDWARE_INTRINSIC(AVX512BW, MultiplyHighRoundScale, 64, 2, {INS_invalid, INS_invalid, INS_pmulhrsw, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SimpleSIMD, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AVX512BW, MultiplyLow, 64, 2, {INS_invalid, INS_invalid, INS_pmullw, INS_pmullw, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SimpleSIMD, HW_Flag_Commutative) +HARDWARE_INTRINSIC(AVX512BW, PackSignedSaturate, 64, 2, {INS_packsswb, INS_invalid, INS_packssdw, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SimpleSIMD, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AVX512BW, PackUnsignedSaturate, 64, 2, {INS_invalid, INS_packuswb, INS_invalid, INS_packusdw, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SimpleSIMD, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AVX512BW, ShiftLeftLogical, 64, 2, {INS_invalid, INS_invalid, INS_psllw, INS_psllw, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_IMM, HW_Flag_MaybeIMM|HW_Flag_NoJmpTableIMM|HW_Flag_FullRangeIMM) +HARDWARE_INTRINSIC(AVX512BW, ShiftLeftLogical128BitLane, 64, 2, {INS_pslldq, INS_pslldq, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_IMM, HW_Flag_FullRangeIMM) +HARDWARE_INTRINSIC(AVX512BW, ShiftRightArithmetic, 64, 2, {INS_invalid, INS_invalid, INS_psraw, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_IMM, HW_Flag_MaybeIMM|HW_Flag_NoJmpTableIMM|HW_Flag_FullRangeIMM) +HARDWARE_INTRINSIC(AVX512BW, ShiftRightLogical, 64, 2, {INS_invalid, INS_invalid, INS_psrlw, INS_psrlw, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_IMM, HW_Flag_MaybeIMM|HW_Flag_NoJmpTableIMM|HW_Flag_FullRangeIMM) +HARDWARE_INTRINSIC(AVX512BW, ShiftRightLogical128BitLane, 64, 2, {INS_psrldq, INS_psrldq, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_IMM, HW_Flag_FullRangeIMM) +HARDWARE_INTRINSIC(AVX512BW, Shuffle, 64, 2, {INS_pshufb, INS_pshufb, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SimpleSIMD, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AVX512BW, ShuffleHigh, 64, 2, {INS_invalid, INS_invalid, INS_pshufhw, INS_pshufhw, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_IMM, HW_Flag_FullRangeIMM) +HARDWARE_INTRINSIC(AVX512BW, ShuffleLow, 64, 2, {INS_invalid, INS_invalid, INS_pshuflw, INS_pshuflw, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_IMM, HW_Flag_FullRangeIMM) +HARDWARE_INTRINSIC(AVX512BW, Store, 64, 2, {INS_vmovdqu8, INS_vmovdqu8, INS_vmovdqu16, INS_vmovdqu16, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_SpecialImport|HW_Flag_BaseTypeFromSecondArg|HW_Flag_NoCodeGen) +HARDWARE_INTRINSIC(AVX512BW, Subtract, 64, 2, {INS_psubb, INS_psubb, INS_psubw, INS_psubw, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SimpleSIMD, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AVX512BW, SubtractSaturate, 64, 2, {INS_psubsb, INS_psubusb, INS_psubsw, INS_psubusw, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SimpleSIMD, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AVX512BW, SumAbsoluteDifferences, 64, 2, {INS_invalid, INS_invalid, INS_invalid, INS_psadbw, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SimpleSIMD, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AVX512BW, UnpackHigh, 64, 2, {INS_punpckhbw, INS_punpckhbw, INS_punpckhwd, INS_punpckhwd, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SimpleSIMD, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AVX512BW, UnpackLow, 64, 2, {INS_punpcklbw, INS_punpcklbw, INS_punpcklwd, INS_punpcklwd, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SimpleSIMD, HW_Flag_NoFlag) + +// *************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************** +// ISA Function name SIMD size NumArg Instructions Category Flags +// {TYP_BYTE, TYP_UBYTE, TYP_SHORT, TYP_USHORT, TYP_INT, TYP_UINT, TYP_LONG, TYP_ULONG, TYP_FLOAT, TYP_DOUBLE} +// *************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************** +// AVX512DQ Intrinsics +HARDWARE_INTRINSIC(AVX512DQ, And, 64, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_andps, INS_andpd}, HW_Category_SimpleSIMD, HW_Flag_Commutative) +HARDWARE_INTRINSIC(AVX512DQ, AndNot, 64, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_andnps, INS_andnpd}, HW_Category_SimpleSIMD, HW_Flag_NoFlag) +HARDWARE_INTRINSIC(AVX512DQ, MultiplyLow, 64, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_vpmullq, INS_vpmullq, INS_invalid, INS_invalid}, HW_Category_SimpleSIMD, HW_Flag_Commutative) +HARDWARE_INTRINSIC(AVX512DQ, Or, 64, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_orps, INS_orpd}, HW_Category_SimpleSIMD, HW_Flag_Commutative) +HARDWARE_INTRINSIC(AVX512DQ, Xor, 64, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_xorps, INS_xorpd}, HW_Category_SimpleSIMD, HW_Flag_Commutative) + +// *************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************** +// ISA Function name SIMD size NumArg Instructions Category Flags +// {TYP_BYTE, TYP_UBYTE, TYP_SHORT, TYP_USHORT, TYP_INT, TYP_UINT, TYP_LONG, TYP_ULONG, TYP_FLOAT, TYP_DOUBLE} +// *************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************** +// AVX512DQ.VL Intrinsics +HARDWARE_INTRINSIC(AVX512DQ_VL, MultiplyLow, -1, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_vpmullq, INS_vpmullq, INS_invalid, INS_invalid}, HW_Category_SimpleSIMD, HW_Flag_Commutative) // *************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************** // ISA Function name SIMD size NumArg Instructions Category Flags diff --git a/src/coreclr/jit/hwintrinsicxarch.cpp b/src/coreclr/jit/hwintrinsicxarch.cpp index eec393b257dcd..e32befa5c637c 100644 --- a/src/coreclr/jit/hwintrinsicxarch.cpp +++ b/src/coreclr/jit/hwintrinsicxarch.cpp @@ -548,6 +548,13 @@ GenTree* Compiler::impNonConstFallback(NamedIntrinsic intrinsic, var_types simdT case NI_AVX2_ShiftLeftLogical: case NI_AVX2_ShiftRightArithmetic: case NI_AVX2_ShiftRightLogical: + case NI_AVX512F_ShiftLeftLogical: + case NI_AVX512F_ShiftRightArithmetic: + case NI_AVX512F_ShiftRightLogical: + case NI_AVX512F_VL_ShiftRightArithmetic: + case NI_AVX512BW_ShiftLeftLogical: + case NI_AVX512BW_ShiftRightArithmetic: + case NI_AVX512BW_ShiftRightLogical: { impSpillSideEffect(true, verCurrentState.esStackDepth - 2 DEBUGARG("Spilling op1 side effects for HWIntrinsic")); @@ -1839,6 +1846,7 @@ GenTree* Compiler::impSpecialIntrinsic(NamedIntrinsic intrinsic, case NI_SSE2_LoadVector128: case NI_AVX_LoadVector256: case NI_AVX512F_LoadVector512: + case NI_AVX512BW_LoadVector512: case NI_Vector128_Load: case NI_Vector256_Load: case NI_Vector512_Load: @@ -1961,8 +1969,18 @@ GenTree* Compiler::impSpecialIntrinsic(NamedIntrinsic intrinsic, if (varTypeIsLong(simdBaseType)) { - // TODO-XARCH-CQ: We should support long/ulong multiplication + assert((simdSize == 16) || (simdSize == 32)); + + if (!compOpportunisticallyDependsOn(InstructionSet_AVX512DQ_VL)) + { + // TODO-XARCH-CQ: We should support long/ulong multiplication + break; + } + +#if defined(TARGET_X86) + // TODO-XARCH-CQ: We need to support 64-bit CreateBroadcast break; +#endif // TARGET_X86 } CORINFO_ARG_LIST_HANDLE arg1 = sig->args; @@ -2117,12 +2135,21 @@ GenTree* Compiler::impSpecialIntrinsic(NamedIntrinsic intrinsic, { assert(sig->numArgs == 2); - if (varTypeIsByte(simdBaseType) || varTypeIsLong(simdBaseType) || (simdBaseType == TYP_DOUBLE)) + if (varTypeIsByte(simdBaseType)) { - // byte, sbyte, long, and ulong would require more work to support + // byte and sbyte would require more work to support break; } + if (varTypeIsLong(simdBaseType) || (simdBaseType == TYP_DOUBLE)) + { + if (!compOpportunisticallyDependsOn(InstructionSet_AVX512F_VL)) + { + // long, ulong, and double would require more work to support + break; + } + } + if ((simdSize != 32) || compExactlyDependsOn(InstructionSet_AVX2)) { genTreeOps op = varTypeIsUnsigned(simdBaseType) ? GT_RSZ : GT_RSH; @@ -2256,6 +2283,7 @@ GenTree* Compiler::impSpecialIntrinsic(NamedIntrinsic intrinsic, case NI_SSE2_Store: case NI_AVX_Store: case NI_AVX512F_Store: + case NI_AVX512BW_Store: { assert(retType == TYP_VOID); assert(sig->numArgs == 2); diff --git a/src/coreclr/jit/instrsxarch.h b/src/coreclr/jit/instrsxarch.h index c16d16b466907..e4cf99d9b17f0 100644 --- a/src/coreclr/jit/instrsxarch.h +++ b/src/coreclr/jit/instrsxarch.h @@ -615,13 +615,19 @@ INST3(vextractf64x4, "extractf64x4", IUM_WR, SSE3A(0x1B), BAD_ INST3(vextracti64x4, "extracti64x4", IUM_WR, SSE3A(0x3B), BAD_CODE, BAD_CODE, INS_TT_TUPLE4, Input_64Bit | REX_W1_EVEX | Encoding_EVEX | INS_Flags_IsDstDstSrcAVXInstruction) // Extract 256-bit packed quadword integer values INST3(vinsertf64x4, "insertf64x4", IUM_WR, BAD_CODE, BAD_CODE, SSE3A(0x1A), INS_TT_TUPLE4, Input_64Bit | REX_W1_EVEX | Encoding_EVEX | INS_Flags_IsDstDstSrcAVXInstruction) // Insert 256-bit packed double-precision floating point values INST3(vinserti64x4, "inserti64x4", IUM_WR, BAD_CODE, BAD_CODE, SSE3A(0x3A), INS_TT_TUPLE4, Input_64Bit | REX_W1_EVEX | Encoding_EVEX | INS_Flags_IsDstDstSrcAVXInstruction) // Insert 256-bit packed quadword integer values -INST3(vmovdqa64, "movdqa64", IUM_WR, PCKDBL(0x7F), BAD_CODE, PCKDBL(0x6F), INS_TT_FULL_MEM, Input_64Bit | REX_W1_EVEX | Encoding_EVEX | INS_FLAGS_None) -INST3(vmovdqu64, "movdqu64", IUM_WR, SSEFLT(0x7F), BAD_CODE, SSEFLT(0x6F), INS_TT_FULL_MEM, Input_64Bit | REX_W1_EVEX | Encoding_EVEX | INS_FLAGS_None) +INST3(vmovdqa64, "movdqa64", IUM_WR, PCKDBL(0x7F), BAD_CODE, PCKDBL(0x6F), INS_TT_FULL_MEM, Input_64Bit | REX_W1_EVEX | Encoding_EVEX) +INST3(vmovdqu64, "movdqu64", IUM_WR, SSEFLT(0x7F), BAD_CODE, SSEFLT(0x6F), INS_TT_FULL_MEM, Input_64Bit | REX_W1_EVEX | Encoding_EVEX) +INST3(vpabsq, "pabsq", IUM_WR, BAD_CODE, BAD_CODE, SSE38(0x1F), INS_TT_FULL, Input_64Bit | REX_W1_EVEX | Encoding_EVEX) // Packed absolute value of 64-bit integers INST3(vpandq, "pandq", IUM_WR, BAD_CODE, BAD_CODE, PCKDBL(0xDB), INS_TT_FULL, Input_64Bit | REX_W1_EVEX | Encoding_EVEX | INS_Flags_IsDstDstSrcAVXInstruction) // Packed bit-wise AND of two xmm regs INST3(vpandnq, "pandnq", IUM_WR, BAD_CODE, BAD_CODE, PCKDBL(0xDF), INS_TT_FULL, Input_64Bit | REX_W1_EVEX | Encoding_EVEX | INS_Flags_IsDstDstSrcAVXInstruction) // Packed bit-wise AND NOT of two xmm regs +INST3(vpmaxsq, "pmaxsq", IUM_WR, BAD_CODE, BAD_CODE, SSE38(0x3D), INS_TT_FULL, Input_64Bit | REX_W1_EVEX | Encoding_EVEX | INS_Flags_IsDstDstSrcAVXInstruction) // packed maximum 64-bit signed integers +INST3(vpmaxuq, "pmaxuq", IUM_WR, BAD_CODE, BAD_CODE, SSE38(0x3F), INS_TT_FULL, Input_64Bit | REX_W1_EVEX | Encoding_EVEX | INS_Flags_IsDstDstSrcAVXInstruction) // packed maximum 64-bit unsigned integers +INST3(vpminsq, "pminsq", IUM_WR, BAD_CODE, BAD_CODE, SSE38(0x39), INS_TT_FULL, Input_64Bit | REX_W1_EVEX | Encoding_EVEX | INS_Flags_IsDstDstSrcAVXInstruction) // packed minimum 64-bit signed integers +INST3(vpminuq, "pminuq", IUM_WR, BAD_CODE, BAD_CODE, SSE38(0x3B), INS_TT_FULL, Input_64Bit | REX_W1_EVEX | Encoding_EVEX | INS_Flags_IsDstDstSrcAVXInstruction) // packed minimum 64-bit unsigned integers INST3(vpmovdw, "pmovdw", IUM_WR, PSSE38(0xF3, 0x33), BAD_CODE, PSSE38(0xF3, 0x33), INS_TT_HALF_MEM, Input_32Bit | REX_W0_EVEX | Encoding_EVEX) INST3(vpmovqd, "pmovqd", IUM_WR, PSSE38(0xF3, 0x35), BAD_CODE, PSSE38(0xF3, 0x35), INS_TT_HALF_MEM, Input_64Bit | REX_W0_EVEX | Encoding_EVEX) INST3(vporq, "porq", IUM_WR, BAD_CODE, BAD_CODE, PCKDBL(0xEB), INS_TT_FULL, Input_64Bit | REX_W1_EVEX | Encoding_EVEX | INS_Flags_IsDstDstSrcAVXInstruction) // Packed bit-wise OR of two xmm regs +INST3(vpsraq, "psraq", IUM_WR, BAD_CODE, PCKDBL(0x72), PCKDBL(0xE2), INS_TT_FULL | INS_TT_MEM128, Input_64Bit | REX_W1_EVEX | Encoding_EVEX | INS_Flags_IsDstDstSrcAVXInstruction) // Packed shift right arithmetic of 64-bit integers INST3(vpternlogd, "pternlogd", IUM_WR, BAD_CODE, BAD_CODE, SSE3A(0x25), INS_TT_FULL, Input_32Bit | REX_W0_EVEX | Encoding_EVEX | INS_Flags_IsDstDstSrcAVXInstruction) INST3(vpxorq, "pxorq", IUM_WR, BAD_CODE, BAD_CODE, PCKDBL(0xEF), INS_TT_FULL, Input_64Bit | REX_W1_EVEX | Encoding_EVEX | INS_Flags_IsDstDstSrcAVXInstruction) // Packed bit-wise XOR of two xmm regs @@ -648,8 +654,8 @@ INST3(vpmovwb, "pmovwb", IUM_WR, PSSE38(0xF3, 0x30), BAD_ INST3(kortestb, "kortestb", IUM_WR, BAD_CODE, BAD_CODE, PCKDBL(0x98), INS_TT_NONE, REX_W0 | Encoding_VEX | Resets_OF | Resets_SF | Writes_ZF | Resets_AF | Resets_PF | Writes_CF | KInstruction) INST3(kmovb_gpr, "kmovb", IUM_WR, BAD_CODE, BAD_CODE, PCKDBL(0x92), INS_TT_NONE, REX_W0 | Encoding_VEX | KInstruction) INST3(kmovb_msk, "kmovb", IUM_WR, PCKDBL(0x91), BAD_CODE, PCKDBL(0x90), INS_TT_NONE, REX_W0 | Encoding_VEX | KInstruction) -INST3(vextractf32x8, "extractf32x8", IUM_WR, SSE3A(0x1B), BAD_CODE, BAD_CODE, INS_TT_TUPLE8, Input_32Bit | REX_W0_EVEX | Encoding_EVEX) // Extract 256-bit packed double-precision floating point values -INST3(vextracti32x8, "extracti32x8", IUM_WR, SSE3A(0x3B), BAD_CODE, BAD_CODE, INS_TT_TUPLE8, Input_32Bit | REX_W0_EVEX | Encoding_EVEX) // Extract 256-bit packed quadword integer values +INST3(vextractf32x8, "extractf32x8", IUM_WR, SSE3A(0x1B), BAD_CODE, BAD_CODE, INS_TT_TUPLE8, Input_32Bit | REX_W0_EVEX | Encoding_EVEX) // Extract 256-bit packed double-precision floating point values +INST3(vextracti32x8, "extracti32x8", IUM_WR, SSE3A(0x3B), BAD_CODE, BAD_CODE, INS_TT_TUPLE8, Input_32Bit | REX_W0_EVEX | Encoding_EVEX) // Extract 256-bit packed quadword integer values INST3(vinsertf32x8, "insertf32x8", IUM_WR, BAD_CODE, BAD_CODE, SSE3A(0x1A), INS_TT_TUPLE8, Input_32Bit | REX_W0_EVEX | Encoding_EVEX | INS_Flags_IsDstDstSrcAVXInstruction) // Insert 256-bit packed double-precision floating point values INST3(vinserti32x8, "inserti32x8", IUM_WR, BAD_CODE, BAD_CODE, SSE3A(0x3A), INS_TT_TUPLE8, Input_32Bit | REX_W0_EVEX | Encoding_EVEX | INS_Flags_IsDstDstSrcAVXInstruction) // Insert 256-bit packed quadword integer values INST3(vpcmpd, "pcmpd", IUM_WR, BAD_CODE, BAD_CODE, SSE3A(0x1F), INS_TT_FULL, Input_32Bit | REX_W0_EVEX | Encoding_EVEX | INS_Flags_Is3OperandInstructionMask) @@ -660,6 +666,8 @@ INST3(vpmovd2m, "pmovd2m", IUM_WR, BAD_CODE, BAD_ INST3(vpmovm2d, "pmovm2d", IUM_WR, BAD_CODE, BAD_CODE, PSSE38(0xF3, 0x38), INS_TT_NONE, Input_32Bit | REX_W0_EVEX | Encoding_EVEX) INST3(vpmovm2q, "pmovm2q", IUM_WR, BAD_CODE, BAD_CODE, PSSE38(0xF3, 0x38), INS_TT_NONE, Input_64Bit | REX_W1_EVEX | Encoding_EVEX) INST3(vpmovq2m, "pmovq2m", IUM_WR, BAD_CODE, BAD_CODE, PSSE38(0xF3, 0x39), INS_TT_NONE, Input_64Bit | REX_W1_EVEX | Encoding_EVEX) +INST3(vpmullq, "pmullq", IUM_WR, BAD_CODE, BAD_CODE, SSE38(0x40), INS_TT_FULL, Input_64Bit | REX_W1_EVEX | Encoding_EVEX | INS_Flags_IsDstDstSrcAVXInstruction) // Packed multiply 64 bit unsigned integers and store lower 64 bits of each result + INST3(LAST_AVX512_INSTRUCTION, "LAST_AVX512_INSTRUCTION", IUM_WR, BAD_CODE, BAD_CODE, BAD_CODE, INS_TT_NONE, INS_FLAGS_None) diff --git a/src/coreclr/jit/lowerxarch.cpp b/src/coreclr/jit/lowerxarch.cpp index 2abdb461ba7f5..cde2cee13abd5 100644 --- a/src/coreclr/jit/lowerxarch.cpp +++ b/src/coreclr/jit/lowerxarch.cpp @@ -6835,6 +6835,8 @@ bool Lowering::IsContainableHWIntrinsicOp(GenTreeHWIntrinsic* parentNode, GenTre case NI_AVX_DotProduct: case NI_AVX_Permute: case NI_AVX_Permute2x128: + case NI_AVX_Shuffle: + case NI_AVX2_AlignRight: case NI_AVX2_Blend: case NI_AVX2_MultipleSumAbsoluteDifferences: case NI_AVX2_Permute2x128: @@ -6842,8 +6844,20 @@ bool Lowering::IsContainableHWIntrinsicOp(GenTreeHWIntrinsic* parentNode, GenTre case NI_AVX2_ShiftLeftLogical: case NI_AVX2_ShiftRightArithmetic: case NI_AVX2_ShiftRightLogical: + case NI_AVX2_Shuffle: case NI_AVX2_ShuffleHigh: case NI_AVX2_ShuffleLow: + case NI_AVX512F_ShiftLeftLogical: + case NI_AVX512F_ShiftRightArithmetic: + case NI_AVX512F_ShiftRightLogical: + case NI_AVX512F_Shuffle: + case NI_AVX512F_VL_ShiftRightArithmetic: + case NI_AVX512BW_AlignRight: + case NI_AVX512BW_ShiftLeftLogical: + case NI_AVX512BW_ShiftRightArithmetic: + case NI_AVX512BW_ShiftRightLogical: + case NI_AVX512BW_ShuffleHigh: + case NI_AVX512BW_ShuffleLow: { assert(!supportsSIMDScalarLoads); @@ -7509,6 +7523,13 @@ void Lowering::ContainCheckHWIntrinsic(GenTreeHWIntrinsic* node) case NI_AVX2_ShiftLeftLogical: case NI_AVX2_ShiftRightArithmetic: case NI_AVX2_ShiftRightLogical: + case NI_AVX512F_ShiftLeftLogical: + case NI_AVX512F_ShiftRightArithmetic: + case NI_AVX512F_ShiftRightLogical: + case NI_AVX512F_VL_ShiftRightArithmetic: + case NI_AVX512BW_ShiftLeftLogical: + case NI_AVX512BW_ShiftRightArithmetic: + case NI_AVX512BW_ShiftRightLogical: { // These intrinsics can have op2 be imm or reg/mem @@ -7526,13 +7547,37 @@ void Lowering::ContainCheckHWIntrinsic(GenTreeHWIntrinsic* node) break; } + case NI_AVX2_Shuffle: + { + if (varTypeIsByte(simdBaseType)) + { + // byte and sbyte are: pshufb ymm1, ymm2, ymm3/m256 + assert(!isCommutative); + + bool supportsRegOptional = false; + + if (IsContainableHWIntrinsicOp(node, op2, &supportsRegOptional)) + { + MakeSrcContained(node, op2); + } + else if (supportsRegOptional) + { + MakeSrcRegOptional(node, op2); + } + break; + } + FALLTHROUGH; + } + case NI_SSE2_Shuffle: case NI_SSE2_ShuffleHigh: case NI_SSE2_ShuffleLow: case NI_AVX2_Permute4x64: - case NI_AVX2_Shuffle: case NI_AVX2_ShuffleHigh: case NI_AVX2_ShuffleLow: + case NI_AVX512F_Shuffle: + case NI_AVX512BW_ShuffleHigh: + case NI_AVX512BW_ShuffleLow: { // These intrinsics have op2 as an imm and op1 as a reg/mem @@ -7601,6 +7646,8 @@ void Lowering::ContainCheckHWIntrinsic(GenTreeHWIntrinsic* node) case NI_SSE2_ShiftRightLogical128BitLane: case NI_AVX2_ShiftLeftLogical128BitLane: case NI_AVX2_ShiftRightLogical128BitLane: + case NI_AVX512BW_ShiftLeftLogical128BitLane: + case NI_AVX512BW_ShiftRightLogical128BitLane: { #if DEBUG // These intrinsics should have been marked contained by the general-purpose handling @@ -7852,6 +7899,8 @@ void Lowering::ContainCheckHWIntrinsic(GenTreeHWIntrinsic* node) case NI_AVX2_MultipleSumAbsoluteDifferences: case NI_AVX2_Permute2x128: case NI_AVX512F_InsertVector256: + case NI_AVX512F_Shuffle: + case NI_AVX512BW_AlignRight: case NI_PCLMULQDQ_CarrylessMultiply: { if (IsContainableHWIntrinsicOp(node, op2, &supportsRegOptional)) diff --git a/src/coreclr/jit/simdashwintrinsic.cpp b/src/coreclr/jit/simdashwintrinsic.cpp index 45f6c02fc0929..9cd7240d81e7b 100644 --- a/src/coreclr/jit/simdashwintrinsic.cpp +++ b/src/coreclr/jit/simdashwintrinsic.cpp @@ -772,6 +772,47 @@ GenTree* Compiler::impSimdAsHWIntrinsicSpecial(NamedIntrinsic intrinsic, } #endif // TARGET_XARCH +#if defined(TARGET_XARCH) + case NI_VectorT128_Multiply: + case NI_VectorT128_op_Multiply: + case NI_VectorT256_Multiply: + case NI_VectorT256_op_Multiply: + { + if (varTypeIsLong(simdBaseType)) + { + if (!compOpportunisticallyDependsOn(InstructionSet_AVX512DQ_VL)) + { + // TODO-XARCH-CQ: We should support long/ulong multiplication + return nullptr; + } + +#if defined(TARGET_X86) + // TODO-XARCH-CQ: We need to support 64-bit CreateBroadcast + return nullptr; +#endif // TARGET_X86 + } + break; + } +#endif // TARGET_XARCH + +#if defined(TARGET_XARCH) + case NI_VectorT128_ShiftRightArithmetic: + case NI_VectorT128_op_RightShift: + case NI_VectorT256_ShiftRightArithmetic: + case NI_VectorT256_op_RightShift: + { + if (varTypeIsLong(simdBaseType) || (simdBaseType == TYP_DOUBLE)) + { + if (!compOpportunisticallyDependsOn(InstructionSet_AVX512F_VL)) + { + // TODO-XARCH-CQ: We should support long/ulong arithmetic shift + return nullptr; + } + } + break; + } +#endif // TARGET_XARCH + default: { // Most intrinsics have some path that works even if only SSE2/AdvSimd is available diff --git a/src/coreclr/jit/simdashwintrinsiclistxarch.h b/src/coreclr/jit/simdashwintrinsiclistxarch.h index 397483a98c12b..5756db4798648 100644 --- a/src/coreclr/jit/simdashwintrinsiclistxarch.h +++ b/src/coreclr/jit/simdashwintrinsiclistxarch.h @@ -251,7 +251,7 @@ SIMD_AS_HWINTRINSIC_ID(VectorT128, LoadUnsafe, SIMD_AS_HWINTRINSIC_NM(VectorT128, LoadUnsafeIndex, "LoadUnsafe", 2, {NI_VectorT128_LoadUnsafeIndex, NI_VectorT128_LoadUnsafeIndex, NI_VectorT128_LoadUnsafeIndex, NI_VectorT128_LoadUnsafeIndex, NI_VectorT128_LoadUnsafeIndex, NI_VectorT128_LoadUnsafeIndex, NI_VectorT128_LoadUnsafeIndex, NI_VectorT128_LoadUnsafeIndex, NI_VectorT128_LoadUnsafeIndex, NI_VectorT128_LoadUnsafeIndex}, SimdAsHWIntrinsicFlag::KeepBaseTypeFromRet) SIMD_AS_HWINTRINSIC_ID(VectorT128, Max, 2, {NI_VectorT128_Max, NI_VectorT128_Max, NI_VectorT128_Max, NI_VectorT128_Max, NI_VectorT128_Max, NI_VectorT128_Max, NI_VectorT128_Max, NI_VectorT128_Max, NI_VectorT128_Max, NI_VectorT128_Max}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT128, Min, 2, {NI_VectorT128_Min, NI_VectorT128_Min, NI_VectorT128_Min, NI_VectorT128_Min, NI_VectorT128_Min, NI_VectorT128_Min, NI_VectorT128_Min, NI_VectorT128_Min, NI_VectorT128_Min, NI_VectorT128_Min}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(VectorT128, Multiply, 2, {NI_Illegal, NI_Illegal, NI_VectorT128_Multiply, NI_VectorT128_Multiply, NI_VectorT128_Multiply, NI_VectorT128_Multiply, NI_Illegal, NI_Illegal, NI_VectorT128_Multiply, NI_VectorT128_Multiply}, SimdAsHWIntrinsicFlag::None) +SIMD_AS_HWINTRINSIC_ID(VectorT128, Multiply, 2, {NI_Illegal, NI_Illegal, NI_VectorT128_Multiply, NI_VectorT128_Multiply, NI_VectorT128_Multiply, NI_VectorT128_Multiply, NI_VectorT128_Multiply, NI_VectorT128_Multiply, NI_VectorT128_Multiply, NI_VectorT128_Multiply}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT128, Narrow, 2, {NI_VectorT128_Narrow, NI_VectorT128_Narrow, NI_VectorT128_Narrow, NI_VectorT128_Narrow, NI_VectorT128_Narrow, NI_VectorT128_Narrow, NI_VectorT128_Narrow, NI_VectorT128_Narrow, NI_VectorT128_Narrow, NI_VectorT128_Narrow}, SimdAsHWIntrinsicFlag::KeepBaseTypeFromRet) SIMD_AS_HWINTRINSIC_ID(VectorT128, Negate, 1, {NI_VectorT128_Negate, NI_VectorT128_Negate, NI_VectorT128_Negate, NI_VectorT128_Negate, NI_VectorT128_Negate, NI_VectorT128_Negate, NI_VectorT128_Negate, NI_VectorT128_Negate, NI_VectorT128_Negate, NI_VectorT128_Negate}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT128, OnesComplement, 1, {NI_VectorT128_OnesComplement, NI_VectorT128_OnesComplement, NI_VectorT128_OnesComplement, NI_VectorT128_OnesComplement, NI_VectorT128_OnesComplement, NI_VectorT128_OnesComplement, NI_VectorT128_OnesComplement, NI_VectorT128_OnesComplement, NI_VectorT128_OnesComplement, NI_VectorT128_OnesComplement}, SimdAsHWIntrinsicFlag::None) @@ -266,13 +266,13 @@ SIMD_AS_HWINTRINSIC_ID(VectorT128, op_Inequality, SIMD_AS_HWINTRINSIC_ID(VectorT128, op_LeftShift, 2, {NI_Illegal, NI_Illegal, NI_VectorT128_op_LeftShift, NI_VectorT128_op_LeftShift, NI_VectorT128_op_LeftShift, NI_VectorT128_op_LeftShift, NI_VectorT128_op_LeftShift, NI_VectorT128_op_LeftShift, NI_VectorT128_op_LeftShift, NI_VectorT128_op_LeftShift}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT128, op_Multiply, 2, {NI_Illegal, NI_Illegal, NI_VectorT128_op_Multiply, NI_VectorT128_op_Multiply, NI_VectorT128_op_Multiply, NI_VectorT128_op_Multiply, NI_Illegal, NI_Illegal, NI_VectorT128_op_Multiply, NI_VectorT128_op_Multiply}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT128, op_OnesComplement, 2, {NI_VectorT128_op_OnesComplement, NI_VectorT128_op_OnesComplement, NI_VectorT128_op_OnesComplement, NI_VectorT128_op_OnesComplement, NI_VectorT128_op_OnesComplement, NI_VectorT128_op_OnesComplement, NI_VectorT128_op_OnesComplement, NI_VectorT128_op_OnesComplement, NI_VectorT128_op_OnesComplement, NI_VectorT128_op_OnesComplement}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(VectorT128, op_RightShift, 2, {NI_Illegal, NI_Illegal, NI_VectorT128_op_RightShift, NI_VectorT128_op_RightShift, NI_VectorT128_op_RightShift, NI_VectorT128_op_RightShift, NI_Illegal, NI_Illegal, NI_VectorT128_op_RightShift, NI_Illegal}, SimdAsHWIntrinsicFlag::None) +SIMD_AS_HWINTRINSIC_ID(VectorT128, op_RightShift, 2, {NI_Illegal, NI_Illegal, NI_VectorT128_op_RightShift, NI_VectorT128_op_RightShift, NI_VectorT128_op_RightShift, NI_VectorT128_op_RightShift, NI_VectorT128_op_RightShift, NI_VectorT128_op_RightShift, NI_VectorT128_op_RightShift, NI_VectorT128_op_RightShift}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT128, op_Subtraction, 2, {NI_VectorT128_op_Subtraction, NI_VectorT128_op_Subtraction, NI_VectorT128_op_Subtraction, NI_VectorT128_op_Subtraction, NI_VectorT128_op_Subtraction, NI_VectorT128_op_Subtraction, NI_VectorT128_op_Subtraction, NI_VectorT128_op_Subtraction, NI_VectorT128_op_Subtraction, NI_VectorT128_op_Subtraction}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT128, op_UnaryNegation, 1, {NI_VectorT128_op_UnaryNegation, NI_VectorT128_op_UnaryNegation, NI_VectorT128_op_UnaryNegation, NI_VectorT128_op_UnaryNegation, NI_VectorT128_op_UnaryNegation, NI_VectorT128_op_UnaryNegation, NI_VectorT128_op_UnaryNegation, NI_VectorT128_op_UnaryNegation, NI_VectorT128_op_UnaryNegation, NI_VectorT128_op_UnaryNegation}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT128, op_UnaryPlus, 1, {NI_VectorT128_op_UnaryPlus, NI_VectorT128_op_UnaryPlus, NI_VectorT128_op_UnaryPlus, NI_VectorT128_op_UnaryPlus, NI_VectorT128_op_UnaryPlus, NI_VectorT128_op_UnaryPlus, NI_VectorT128_op_UnaryPlus, NI_VectorT128_op_UnaryPlus, NI_VectorT128_op_UnaryPlus, NI_VectorT128_op_UnaryPlus}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT128, op_UnsignedRightShift, 2, {NI_Illegal, NI_Illegal, NI_VectorT128_op_UnsignedRightShift, NI_VectorT128_op_UnsignedRightShift, NI_VectorT128_op_UnsignedRightShift, NI_VectorT128_op_UnsignedRightShift, NI_VectorT128_op_UnsignedRightShift, NI_VectorT128_op_UnsignedRightShift, NI_VectorT128_op_UnsignedRightShift, NI_VectorT128_op_UnsignedRightShift}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT128, ShiftLeft, 2, {NI_Illegal, NI_Illegal, NI_VectorT128_ShiftLeft, NI_VectorT128_ShiftLeft, NI_VectorT128_ShiftLeft, NI_VectorT128_ShiftLeft, NI_VectorT128_ShiftLeft, NI_VectorT128_ShiftLeft, NI_Illegal, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(VectorT128, ShiftRightArithmetic, 2, {NI_Illegal, NI_Illegal, NI_VectorT128_ShiftRightArithmetic, NI_Illegal, NI_VectorT128_ShiftRightArithmetic, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal}, SimdAsHWIntrinsicFlag::None) +SIMD_AS_HWINTRINSIC_ID(VectorT128, ShiftRightArithmetic, 2, {NI_Illegal, NI_Illegal, NI_VectorT128_ShiftRightArithmetic, NI_Illegal, NI_VectorT128_ShiftRightArithmetic, NI_Illegal, NI_VectorT128_ShiftRightArithmetic, NI_Illegal, NI_Illegal, NI_Illegal}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT128, ShiftRightLogical, 2, {NI_Illegal, NI_Illegal, NI_VectorT128_ShiftRightLogical, NI_VectorT128_ShiftRightLogical, NI_VectorT128_ShiftRightLogical, NI_VectorT128_ShiftRightLogical, NI_VectorT128_ShiftRightLogical, NI_VectorT128_ShiftRightLogical, NI_Illegal, NI_Illegal}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_NM(VectorT128, Sqrt, "SquareRoot", 1, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_VectorT128_Sqrt, NI_VectorT128_Sqrt}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT128, Store, 2, {NI_VectorT128_Store, NI_VectorT128_Store, NI_VectorT128_Store, NI_VectorT128_Store, NI_VectorT128_Store, NI_VectorT128_Store, NI_VectorT128_Store, NI_VectorT128_Store, NI_VectorT128_Store, NI_VectorT128_Store}, SimdAsHWIntrinsicFlag::SpillSideEffectsOp1) @@ -350,7 +350,7 @@ SIMD_AS_HWINTRINSIC_ID(VectorT256, LoadUnsafe, SIMD_AS_HWINTRINSIC_NM(VectorT256, LoadUnsafeIndex, "LoadUnsafe", 2, {NI_VectorT256_LoadUnsafeIndex, NI_VectorT256_LoadUnsafeIndex, NI_VectorT256_LoadUnsafeIndex, NI_VectorT256_LoadUnsafeIndex, NI_VectorT256_LoadUnsafeIndex, NI_VectorT256_LoadUnsafeIndex, NI_VectorT256_LoadUnsafeIndex, NI_VectorT256_LoadUnsafeIndex, NI_VectorT256_LoadUnsafeIndex, NI_VectorT256_LoadUnsafeIndex}, SimdAsHWIntrinsicFlag::KeepBaseTypeFromRet) SIMD_AS_HWINTRINSIC_ID(VectorT256, Min, 2, {NI_VectorT256_Min, NI_VectorT256_Min, NI_VectorT256_Min, NI_VectorT256_Min, NI_VectorT256_Min, NI_VectorT256_Min, NI_VectorT256_Min, NI_VectorT256_Min, NI_VectorT256_Min, NI_VectorT256_Min}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT256, Max, 2, {NI_VectorT256_Max, NI_VectorT256_Max, NI_VectorT256_Max, NI_VectorT256_Max, NI_VectorT256_Max, NI_VectorT256_Max, NI_VectorT256_Max, NI_VectorT256_Max, NI_VectorT256_Max, NI_VectorT256_Max}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(VectorT256, Multiply, 2, {NI_Illegal, NI_Illegal, NI_VectorT256_Multiply, NI_VectorT256_Multiply, NI_VectorT256_Multiply, NI_VectorT256_Multiply, NI_Illegal, NI_Illegal, NI_VectorT256_Multiply, NI_VectorT256_Multiply}, SimdAsHWIntrinsicFlag::None) +SIMD_AS_HWINTRINSIC_ID(VectorT256, Multiply, 2, {NI_Illegal, NI_Illegal, NI_VectorT256_Multiply, NI_VectorT256_Multiply, NI_VectorT256_Multiply, NI_VectorT256_Multiply, NI_VectorT256_Multiply, NI_VectorT256_Multiply, NI_VectorT256_Multiply, NI_VectorT256_Multiply}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT256, Narrow, 2, {NI_VectorT256_Narrow, NI_VectorT256_Narrow, NI_VectorT256_Narrow, NI_VectorT256_Narrow, NI_VectorT256_Narrow, NI_VectorT256_Narrow, NI_VectorT256_Narrow, NI_VectorT256_Narrow, NI_VectorT256_Narrow, NI_VectorT256_Narrow}, SimdAsHWIntrinsicFlag::KeepBaseTypeFromRet) SIMD_AS_HWINTRINSIC_ID(VectorT256, Negate, 1, {NI_VectorT256_Negate, NI_VectorT256_Negate, NI_VectorT256_Negate, NI_VectorT256_Negate, NI_VectorT256_Negate, NI_VectorT256_Negate, NI_VectorT256_Negate, NI_VectorT256_Negate, NI_VectorT256_Negate, NI_VectorT256_Negate}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT256, OnesComplement, 2, {NI_VectorT256_OnesComplement, NI_VectorT256_OnesComplement, NI_VectorT256_OnesComplement, NI_VectorT256_OnesComplement, NI_VectorT256_OnesComplement, NI_VectorT256_OnesComplement, NI_VectorT256_OnesComplement, NI_VectorT256_OnesComplement, NI_VectorT256_OnesComplement, NI_VectorT256_OnesComplement}, SimdAsHWIntrinsicFlag::None) @@ -365,13 +365,13 @@ SIMD_AS_HWINTRINSIC_ID(VectorT256, op_Inequality, SIMD_AS_HWINTRINSIC_ID(VectorT256, op_LeftShift, 2, {NI_Illegal, NI_Illegal, NI_VectorT256_op_LeftShift, NI_VectorT256_op_LeftShift, NI_VectorT256_op_LeftShift, NI_VectorT256_op_LeftShift, NI_VectorT256_op_LeftShift, NI_VectorT256_op_LeftShift, NI_VectorT256_op_LeftShift, NI_VectorT256_op_LeftShift}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT256, op_Multiply, 2, {NI_Illegal, NI_Illegal, NI_VectorT256_op_Multiply, NI_VectorT256_op_Multiply, NI_VectorT256_op_Multiply, NI_VectorT256_op_Multiply, NI_Illegal, NI_Illegal, NI_VectorT256_op_Multiply, NI_VectorT256_op_Multiply}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT256, op_OnesComplement, 1, {NI_VectorT256_op_OnesComplement, NI_VectorT256_op_OnesComplement, NI_VectorT256_op_OnesComplement, NI_VectorT256_op_OnesComplement, NI_VectorT256_op_OnesComplement, NI_VectorT256_op_OnesComplement, NI_VectorT256_op_OnesComplement, NI_VectorT256_op_OnesComplement, NI_VectorT256_op_OnesComplement, NI_VectorT256_op_OnesComplement}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(VectorT256, op_RightShift, 2, {NI_Illegal, NI_Illegal, NI_VectorT256_op_RightShift, NI_VectorT256_op_RightShift, NI_VectorT256_op_RightShift, NI_VectorT256_op_RightShift, NI_Illegal, NI_Illegal, NI_VectorT256_op_RightShift, NI_Illegal}, SimdAsHWIntrinsicFlag::None) +SIMD_AS_HWINTRINSIC_ID(VectorT256, op_RightShift, 2, {NI_Illegal, NI_Illegal, NI_VectorT256_op_RightShift, NI_VectorT256_op_RightShift, NI_VectorT256_op_RightShift, NI_VectorT256_op_RightShift, NI_VectorT256_op_RightShift, NI_VectorT256_op_RightShift, NI_VectorT256_op_RightShift, NI_VectorT256_op_RightShift}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT256, op_Subtraction, 2, {NI_VectorT256_op_Subtraction, NI_VectorT256_op_Subtraction, NI_VectorT256_op_Subtraction, NI_VectorT256_op_Subtraction, NI_VectorT256_op_Subtraction, NI_VectorT256_op_Subtraction, NI_VectorT256_op_Subtraction, NI_VectorT256_op_Subtraction, NI_VectorT256_op_Subtraction, NI_VectorT256_op_Subtraction}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT256, op_UnaryNegation, 1, {NI_VectorT256_op_UnaryNegation, NI_VectorT256_op_UnaryNegation, NI_VectorT256_op_UnaryNegation, NI_VectorT256_op_UnaryNegation, NI_VectorT256_op_UnaryNegation, NI_VectorT256_op_UnaryNegation, NI_VectorT256_op_UnaryNegation, NI_VectorT256_op_UnaryNegation, NI_VectorT256_op_UnaryNegation, NI_VectorT256_op_UnaryNegation}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT256, op_UnaryPlus, 1, {NI_VectorT256_op_UnaryPlus, NI_VectorT256_op_UnaryPlus, NI_VectorT256_op_UnaryPlus, NI_VectorT256_op_UnaryPlus, NI_VectorT256_op_UnaryPlus, NI_VectorT256_op_UnaryPlus, NI_VectorT256_op_UnaryPlus, NI_VectorT256_op_UnaryPlus, NI_VectorT256_op_UnaryPlus, NI_VectorT256_op_UnaryPlus}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT256, op_UnsignedRightShift, 2, {NI_Illegal, NI_Illegal, NI_VectorT256_op_UnsignedRightShift, NI_VectorT256_op_UnsignedRightShift, NI_VectorT256_op_UnsignedRightShift, NI_VectorT256_op_UnsignedRightShift, NI_VectorT256_op_UnsignedRightShift, NI_VectorT256_op_UnsignedRightShift, NI_VectorT256_op_UnsignedRightShift, NI_VectorT256_op_UnsignedRightShift}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT256, ShiftLeft, 2, {NI_Illegal, NI_Illegal, NI_VectorT256_ShiftLeft, NI_VectorT256_ShiftLeft, NI_VectorT256_ShiftLeft, NI_VectorT256_ShiftLeft, NI_VectorT256_ShiftLeft, NI_VectorT256_ShiftLeft, NI_Illegal, NI_Illegal}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(VectorT256, ShiftRightArithmetic, 2, {NI_Illegal, NI_Illegal, NI_VectorT256_ShiftRightArithmetic, NI_Illegal, NI_VectorT256_ShiftRightArithmetic, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal}, SimdAsHWIntrinsicFlag::None) +SIMD_AS_HWINTRINSIC_ID(VectorT256, ShiftRightArithmetic, 2, {NI_Illegal, NI_Illegal, NI_VectorT256_ShiftRightArithmetic, NI_Illegal, NI_VectorT256_ShiftRightArithmetic, NI_Illegal, NI_VectorT256_ShiftRightArithmetic, NI_Illegal, NI_Illegal, NI_Illegal}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT256, ShiftRightLogical, 2, {NI_Illegal, NI_Illegal, NI_VectorT256_ShiftRightLogical, NI_VectorT256_ShiftRightLogical, NI_VectorT256_ShiftRightLogical, NI_VectorT256_ShiftRightLogical, NI_VectorT256_ShiftRightLogical, NI_VectorT256_ShiftRightLogical, NI_Illegal, NI_Illegal}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_NM(VectorT256, Sqrt, "SquareRoot", 1, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_VectorT256_Sqrt, NI_VectorT256_Sqrt}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT256, Store, 2, {NI_VectorT256_Store, NI_VectorT256_Store, NI_VectorT256_Store, NI_VectorT256_Store, NI_VectorT256_Store, NI_VectorT256_Store, NI_VectorT256_Store, NI_VectorT256_Store, NI_VectorT256_Store, NI_VectorT256_Store}, SimdAsHWIntrinsicFlag::SpillSideEffectsOp1) diff --git a/src/coreclr/jit/valuenum.cpp b/src/coreclr/jit/valuenum.cpp index 263c2accb11f0..18c4d946c2736 100644 --- a/src/coreclr/jit/valuenum.cpp +++ b/src/coreclr/jit/valuenum.cpp @@ -7049,6 +7049,8 @@ ValueNum ValueNumStore::EvalHWIntrinsicFunBinary(var_types type, case NI_SSE2_Add: case NI_AVX_Add: case NI_AVX2_Add: + case NI_AVX512F_Add: + case NI_AVX512BW_Add: #endif { return EvaluateBinarySimd(this, GT_ADD, /* scalar */ false, type, baseType, arg0VN, arg1VN); @@ -7098,6 +7100,7 @@ ValueNum ValueNumStore::EvalHWIntrinsicFunBinary(var_types type, case NI_SSE_Divide: case NI_SSE2_Divide: case NI_AVX_Divide: + case NI_AVX512F_Divide: #endif { return EvaluateBinarySimd(this, GT_DIV, /* scalar */ false, type, baseType, arg0VN, arg1VN); @@ -7179,6 +7182,8 @@ ValueNum ValueNumStore::EvalHWIntrinsicFunBinary(var_types type, #else case NI_SSE2_ShiftLeftLogical: case NI_AVX2_ShiftLeftLogical: + case NI_AVX512F_ShiftLeftLogical: + case NI_AVX512BW_ShiftLeftLogical: #endif { return EvaluateBinarySimd(this, GT_LSH, /* scalar */ false, type, baseType, arg0VN, arg1VN); @@ -7189,6 +7194,9 @@ ValueNum ValueNumStore::EvalHWIntrinsicFunBinary(var_types type, #else case NI_SSE2_ShiftRightArithmetic: case NI_AVX2_ShiftRightArithmetic: + case NI_AVX512F_ShiftRightArithmetic: + case NI_AVX512F_VL_ShiftRightArithmetic: + case NI_AVX512BW_ShiftRightArithmetic: #endif { return EvaluateBinarySimd(this, GT_RSH, /* scalar */ false, type, baseType, arg0VN, arg1VN); @@ -7199,6 +7207,8 @@ ValueNum ValueNumStore::EvalHWIntrinsicFunBinary(var_types type, #else case NI_SSE2_ShiftRightLogical: case NI_AVX2_ShiftRightLogical: + case NI_AVX512F_ShiftRightLogical: + case NI_AVX512BW_ShiftRightLogical: #endif { return EvaluateBinarySimd(this, GT_RSZ, /* scalar */ false, type, baseType, arg0VN, arg1VN); @@ -7229,6 +7239,8 @@ ValueNum ValueNumStore::EvalHWIntrinsicFunBinary(var_types type, case NI_SSE2_Subtract: case NI_AVX_Subtract: case NI_AVX2_Subtract: + case NI_AVX512F_Subtract: + case NI_AVX512BW_Subtract: #endif { return EvaluateBinarySimd(this, GT_SUB, /* scalar */ false, type, baseType, arg0VN, arg1VN); @@ -7272,6 +7284,8 @@ ValueNum ValueNumStore::EvalHWIntrinsicFunBinary(var_types type, case NI_SSE2_Add: case NI_AVX_Add: case NI_AVX2_Add: + case NI_AVX512F_Add: + case NI_AVX512BW_Add: #endif { if (varTypeIsFloating(baseType)) @@ -7364,6 +7378,7 @@ ValueNum ValueNumStore::EvalHWIntrinsicFunBinary(var_types type, case NI_SSE_Divide: case NI_SSE2_Divide: case NI_AVX_Divide: + case NI_AVX512F_Divide: #endif { // Handle `x / 1 == x`. @@ -7398,6 +7413,11 @@ ValueNum ValueNumStore::EvalHWIntrinsicFunBinary(var_types type, case NI_SSE41_MultiplyLow: case NI_AVX_Multiply: case NI_AVX2_MultiplyLow: + case NI_AVX512F_Multiply: + case NI_AVX512F_MultiplyLow: + case NI_AVX512BW_MultiplyLow: + case NI_AVX512DQ_MultiplyLow: + case NI_AVX512DQ_VL_MultiplyLow: #endif { if (!varTypeIsFloating(baseType)) @@ -7470,6 +7490,13 @@ ValueNum ValueNumStore::EvalHWIntrinsicFunBinary(var_types type, case NI_AVX2_ShiftLeftLogical: case NI_AVX2_ShiftRightArithmetic: case NI_AVX2_ShiftRightLogical: + case NI_AVX512F_ShiftLeftLogical: + case NI_AVX512F_ShiftRightArithmetic: + case NI_AVX512F_ShiftRightLogical: + case NI_AVX512F_VL_ShiftRightArithmetic: + case NI_AVX512BW_ShiftLeftLogical: + case NI_AVX512BW_ShiftRightArithmetic: + case NI_AVX512BW_ShiftRightLogical: #endif { // Handle `x << 0 == x` and `0 << x == 0` @@ -7492,6 +7519,8 @@ ValueNum ValueNumStore::EvalHWIntrinsicFunBinary(var_types type, case NI_SSE2_Subtract: case NI_AVX_Subtract: case NI_AVX2_Subtract: + case NI_AVX512F_Subtract: + case NI_AVX512BW_Subtract: #endif { if (varTypeIsFloating(baseType)) @@ -7584,6 +7613,8 @@ ValueNum ValueNumStore::EvalHWIntrinsicFunBinary(var_types type, case NI_SSE2_Subtract: case NI_AVX_Subtract: case NI_AVX2_Subtract: + case NI_AVX512F_Subtract: + case NI_AVX512BW_Subtract: #endif { if (varTypeIsFloating(baseType)) diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Avx512BW.PlatformNotSupported.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Avx512BW.PlatformNotSupported.cs index 31ae3725d46fb..0d93c5f5d6c4f 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Avx512BW.PlatformNotSupported.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Avx512BW.PlatformNotSupported.cs @@ -29,5 +29,447 @@ internal X64() { } public static new bool IsSupported { [Intrinsic] get { return false; } } } + + /// + /// __m512i _mm512_abs_epi8 (__m512i a) + /// VPABSB zmm1 {k1}{z}, zmm2/m512 + /// + public static Vector512 Abs(Vector512 value) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_abs_epi16 (__m512i a) + /// VPABSW zmm1 {k1}{z}, zmm2/m512 + /// + public static Vector512 Abs(Vector512 value) { throw new PlatformNotSupportedException(); } + + /// + /// __m512i _mm512_add_epi8 (__m512i a, __m512i b) + /// VPADDB zmm1 {k1}{z}, zmm2, zmm3/m512 + /// + public static Vector512 Add(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_add_epi8 (__m512i a, __m512i b) + /// VPADDB zmm1 {k1}{z}, zmm2, zmm3/m512 + /// + public static Vector512 Add(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_add_epi16 (__m512i a, __m512i b) + /// VPADDW zmm1 {k1}{z}, zmm2, zmm3/m512 + /// + public static Vector512 Add(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_add_epi16 (__m512i a, __m512i b) + /// VPADDW zmm1 {k1}{z}, zmm2, zmm3/m512 + /// + public static Vector512 Add(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + + /// + /// __m512i _mm512_adds_epi8 (__m512i a, __m512i b) + /// VPADDSB zmm1 {k1}{z}, zmm2, zmm3/m512 + /// + public static Vector512 AddSaturate(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_adds_epu8 (__m512i a, __m512i b) + /// VPADDUSB zmm1 {k1}{z}, zmm2, zmm3/m512 + /// + public static Vector512 AddSaturate(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_adds_epi16 (__m512i a, __m512i b) + /// VPADDSW zmm1 {k1}{z}, zmm2, zmm3/m512 + /// + public static Vector512 AddSaturate(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_adds_epu16 (__m512i a, __m512i b) + /// VPADDUSW zmm1 {k1}{z}, zmm2, zmm3/m512 + /// + public static Vector512 AddSaturate(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + + /// + /// __m512i _mm512_alignr_epi8 (__m512i a, __m512i b, const int count) + /// VPALIGNR zmm1 {k1}{z}, zmm2, zmm3/m512, imm8 + /// + public static Vector512 AlignRight(Vector512 left, Vector512 right, [ConstantExpected] byte mask) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_alignr_epi8 (__m512i a, __m512i b, const int count) + /// VPALIGNR zmm1 {k1}{z}, zmm2, zmm3/m512, imm8 + /// + public static Vector512 AlignRight(Vector512 left, Vector512 right, [ConstantExpected] byte mask) { throw new PlatformNotSupportedException(); } + + /// + /// __m512i _mm512_avg_epu8 (__m512i a, __m512i b) + /// VPAVGB zmm1 {k1}{z}, zmm2, zmm3/m512 + /// + public static Vector512 Average(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_avg_epu16 (__m512i a, __m512i b) + /// VPAVGW zmm1 {k1}{z}, zmm2, zmm3/m512 + /// + public static Vector512 Average(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + + /// + /// __m512i _mm512_cvtepi8_epi16 (__m128i a) + /// VPMOVSXBW zmm1 {k1}{z}, ymm2/m256 + /// + public static Vector512 ConvertToVector512Int16(Vector256 value) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_cvtepu8_epi16 (__m128i a) + /// VPMOVZXBW zmm1 {k1}{z}, ymm2/m256 + /// + public static Vector512 ConvertToVector512Int16(Vector256 value) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_cvtepi8_epi16 (__m128i a) + /// VPMOVSXBW zmm1 {k1}{z}, ymm2/m256 + /// + public static Vector512 ConvertToVector512UInt16(Vector256 value) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_cvtepu8_epi16 (__m128i a) + /// VPMOVZXBW zmm1 {k1}{z}, ymm2/m256 + /// + public static Vector512 ConvertToVector512UInt16(Vector256 value) { throw new PlatformNotSupportedException(); } + + /// + /// __m512i _mm512_loadu_epi8 (__m512i const * mem_addr) + /// VMOVDQU8 zmm1 {k1}{z}, m512 + /// + public static new unsafe Vector512 LoadVector512(sbyte* address) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_loadu_epi8 (__m512i const * mem_addr) + /// VMOVDQU8 zmm1 {k1}{z}, m512 + /// + public static new unsafe Vector512 LoadVector512(byte* address) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_loadu_epi16 (__m512i const * mem_addr) + /// VMOVDQU16 zmm1 {k1}{z}, m512 + /// + public static new unsafe Vector512 LoadVector512(short* address) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_loadu_epi16 (__m512i const * mem_addr) + /// VMOVDQU16 zmm1 {k1}{z}, m512 + /// + public static new unsafe Vector512 LoadVector512(ushort* address) { throw new PlatformNotSupportedException(); } + + /// + /// __m512i _mm512_max_epi8 (__m512i a, __m512i b) + /// VPMAXSB zmm1 {k1}{z}, zmm2, zmm3/m512 + /// + public static Vector512 Max(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_max_epu8 (__m512i a, __m512i b) + /// VPMAXUB zmm1 {k1}{z}, zmm2, zmm3/m512 + /// + public static Vector512 Max(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_max_epi16 (__m512i a, __m512i b) + /// VPMAXSW zmm1 {k1}{z}, zmm2, zmm3/m512 + /// + public static Vector512 Max(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_max_epu16 (__m512i a, __m512i b) + /// VPMAXUW zmm1 {k1}{z}, zmm2, zmm3/m512 + /// + public static Vector512 Max(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + + /// + /// __m512i _mm512_min_epi8 (__m512i a, __m512i b) + /// VPMINSB zmm1 {k1}{z}, zmm2, zmm3/m512 + /// + public static Vector512 Min(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_min_epu8 (__m512i a, __m512i b) + /// VPMINUB zmm1 {k1}{z}, zmm2, zmm3/m512 + /// + public static Vector512 Min(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_min_epi16 (__m512i a, __m512i b) + /// VPMINSW zmm1 {k1}{z}, zmm2, zmm3/m512 + /// + public static Vector512 Min(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_min_epu16 (__m512i a, __m512i b) + /// VPMINUW zmm1 {k1}{z}, zmm2, zmm3/m512 + /// + public static Vector512 Min(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + + /// + /// __m512i _mm512_madd_epi16 (__m512i a, __m512i b) + /// VPMADDWD zmm1 {k1}{z}, zmm2, zmm3/m512 + /// + public static Vector512 MultiplyAddAdjacent(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_maddubs_epi16 (__m512i a, __m512i b) + /// VPMADDUBSW zmm1 {k1}{z}, zmm2, zmm3/m512 + /// + public static Vector512 MultiplyAddAdjacent(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + + /// + /// __m512i _mm512_mulhi_epi16 (__m512i a, __m512i b) + /// VPMULHW zmm1 {k1}{z}, zmm2, zmm3/m512 + /// + public static Vector512 MultiplyHigh(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_mulhi_epu16 (__m512i a, __m512i b) + /// VPMULHUW zmm1 {k1}{z}, zmm2, zmm3/m512 + /// + public static Vector512 MultiplyHigh(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + + /// + /// __m512i _mm512_mulhrs_epi16 (__m512i a, __m512i b) + /// VPMULHRSW zmm1 {k1}{z}, zmm2, zmm3/m512 + /// + public static Vector512 MultiplyHighRoundScale(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + + /// + /// __m512i _mm512_mullo_epi16 (__m512i a, __m512i b) + /// VPMULLW zmm1 {k1}{z}, zmm2, zmm3/m512 + /// + public static Vector512 MultiplyLow(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_mullo_epi16 (__m512i a, __m512i b) + /// VPMULLW zmm1 {k1}{z}, zmm2, zmm3/m512 + /// + public static Vector512 MultiplyLow(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + + /// + /// __m512i _mm512_packs_epi16 (__m512i a, __m512i b) + /// VPACKSSWB zmm1 {k1}{z}, zmm2, zmm3/m512 + /// + public static Vector512 PackSignedSaturate(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_packs_epi32 (__m512i a, __m512i b) + /// VPACKSSDW zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst + /// + public static Vector512 PackSignedSaturate(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + + /// + /// __m512i _mm512_packus_epi16 (__m512i a, __m512i b) + /// VPACKUSWB zmm1 {k1}{z}, zmm2, zmm3/m512 + /// + public static Vector512 PackUnsignedSaturate(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_packus_epi32 (__m512i a, __m512i b) + /// VPACKUSDW zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst + /// + public static Vector512 PackUnsignedSaturate(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + + /// + /// __m512i _mm512_sll_epi16 (__m512i a, __m128i count) + /// VPSLLW zmm1 {k1}{z}, zmm2, xmm3/m128 + /// + public static Vector512 ShiftLeftLogical(Vector512 value, Vector128 count) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_sll_epi16 (__m512i a, __m128i count) + /// VPSLLW zmm1 {k1}{z}, zmm2, xmm3/m128 + /// + public static Vector512 ShiftLeftLogical(Vector512 value, Vector128 count) { throw new PlatformNotSupportedException(); } + + /// + /// __m512i _mm512_slli_epi16 (__m512i a, int imm8) + /// VPSLLW zmm1 {k1}{z}, zmm2, imm8 + /// + public static Vector512 ShiftLeftLogical(Vector512 value, [ConstantExpected] byte count) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_slli_epi16 (__m512i a, int imm8) + /// VPSLLW zmm1 {k1}{z}, zmm2, imm8 + /// + public static Vector512 ShiftLeftLogical(Vector512 value, [ConstantExpected] byte count) { throw new PlatformNotSupportedException(); } + + /// + /// __m512i _mm512_bslli_epi128 (__m512i a, const int imm8) + /// VPSLLDQ zmm1, zmm2/m512, imm8 + /// + public static Vector512 ShiftLeftLogical128BitLane(Vector512 value, [ConstantExpected] byte numBytes) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_bslli_epi128 (__m512i a, const int imm8) + /// VPSLLDQ zmm1, zmm2/m512, imm8 + /// + public static Vector512 ShiftLeftLogical128BitLane(Vector512 value, [ConstantExpected] byte numBytes) { throw new PlatformNotSupportedException(); } + + /// + /// _mm512_sra_epi16 (__m512i a, __m128i count) + /// VPSRAW zmm1 {k1}{z}, zmm2, xmm3/m128 + /// + public static Vector512 ShiftRightArithmetic(Vector512 value, Vector128 count) { throw new PlatformNotSupportedException(); } + + /// + /// __m512i _mm512_srai_epi16 (__m512i a, int imm8) + /// VPSRAW zmm1 {k1}{z}, zmm2, imm8 + /// + public static Vector512 ShiftRightArithmetic(Vector512 value, [ConstantExpected] byte count) { throw new PlatformNotSupportedException(); } + + /// + /// __m512i _mm512_srl_epi16 (__m512i a, __m128i count) + /// VPSRLW zmm1 {k1}{z}, zmm2, xmm3/m128 + /// + public static Vector512 ShiftRightLogical(Vector512 value, Vector128 count) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_srl_epi16 (__m512i a, __m128i count) + /// VPSRLW zmm1 {k1}{z}, zmm2, xmm3/m128 + /// + public static Vector512 ShiftRightLogical(Vector512 value, Vector128 count) { throw new PlatformNotSupportedException(); } + + /// + /// __m512i _mm512_srli_epi16 (__m512i a, int imm8) + /// VPSRLW zmm1 {k1}{z}, zmm2, imm8 + /// + public static Vector512 ShiftRightLogical(Vector512 value, [ConstantExpected] byte count) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_srli_epi16 (__m512i a, int imm8) + /// VPSRLW zmm1 {k1}{z}, zmm2, imm8 + /// + public static Vector512 ShiftRightLogical(Vector512 value, [ConstantExpected] byte count) { throw new PlatformNotSupportedException(); } + + /// + /// __m512i _mm512_bsrli_epi128 (__m512i a, const int imm8) + /// VPSRLDQ zmm1, zmm2/m128, imm8 + /// + public static Vector512 ShiftRightLogical128BitLane(Vector512 value, [ConstantExpected] byte numBytes) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_bsrli_epi128 (__m512i a, const int imm8) + /// VPSRLDQ zmm1, zmm2/m128, imm8 + /// + public static Vector512 ShiftRightLogical128BitLane(Vector512 value, [ConstantExpected] byte numBytes) { throw new PlatformNotSupportedException(); } + + /// + /// __m512i _mm512_shuffle_epi8 (__m512i a, __m512i b) + /// VPSHUFB zmm1 {k1}{z}, zmm2, zmm3/m512 + /// + public static Vector512 Shuffle(Vector512 value, Vector512 mask) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_shuffle_epi8 (__m512i a, __m512i b) + /// VPSHUFB zmm1 {k1}{z}, zmm2, zmm3/m512 + /// + public static Vector512 Shuffle(Vector512 value, Vector512 mask) { throw new PlatformNotSupportedException(); } + + /// + /// __m512i _mm512_shufflehi_epi16 (__m512i a, const int imm8) + /// VPSHUFHW zmm1 {k1}{z}, zmm2/m512, imm8 + /// + public static Vector512 ShuffleHigh(Vector512 value, [ConstantExpected] byte control) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_shufflehi_epi16 (__m512i a, const int imm8) + /// VPSHUFHW zmm1 {k1}{z}, zmm2/m512, imm8 + /// + public static Vector512 ShuffleHigh(Vector512 value, [ConstantExpected] byte control) { throw new PlatformNotSupportedException(); } + + /// + /// __m512i _mm512_shufflelo_epi16 (__m512i a, const int imm8) + /// VPSHUFLW zmm1 {k1}{z}, zmm2/m512, imm8 + /// + public static Vector512 ShuffleLow(Vector512 value, [ConstantExpected] byte control) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_shufflelo_epi16 (__m512i a, const int imm8) + /// VPSHUFLW zmm1 {k1}{z}, zmm2/m512, imm8 + /// + public static Vector512 ShuffleLow(Vector512 value, [ConstantExpected] byte control) { throw new PlatformNotSupportedException(); } + + /// + /// void _mm512_storeu_epi8 (__m512i * mem_addr, __m512i a) + /// VMOVDQU8 m512 {k1}{z}, zmm1 + /// + public static new unsafe void Store(sbyte* address, Vector512 source) { throw new PlatformNotSupportedException(); } + /// + /// void _mm512_storeu_epi8 (__m512i * mem_addr, __m512i a) + /// VMOVDQU8 m512 {k1}{z}, zmm1 + /// + public static new unsafe void Store(byte* address, Vector512 source) { throw new PlatformNotSupportedException(); } + /// + /// void _mm512_storeu_epi16 (__m512i * mem_addr, __m512i a) + /// VMOVDQU16 m512 {k1}{z}, zmm1 + /// + public static new unsafe void Store(short* address, Vector512 source) { throw new PlatformNotSupportedException(); } + /// + /// void _mm512_storeu_epi16 (__m512i * mem_addr, __m512i a) + /// VMOVDQU16 m512 {k1}{z}, zmm1 + /// + public static new unsafe void Store(ushort* address, Vector512 source) { throw new PlatformNotSupportedException(); } + + /// + /// __m512i _mm512_sub_epi8 (__m512i a, __m512i b) + /// VPSUBB zmm1 {k1}{z}, zmm2, zmm3/m512 + /// + public static Vector512 Subtract(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_sub_epi8 (__m512i a, __m512i b) + /// VPSUBB zmm1 {k1}{z}, zmm2, zmm3/m512 + /// + public static Vector512 Subtract(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_sub_epi16 (__m512i a, __m512i b) + /// VPSUBW zmm1 {k1}{z}, zmm2, zmm3/m512 + /// + public static Vector512 Subtract(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_sub_epi16 (__m512i a, __m512i b) + /// VPSUBW zmm1 {k1}{z}, zmm2, zmm3/m512 + /// + public static Vector512 Subtract(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + + /// + /// __m512i _mm512_subs_epi8 (__m512i a, __m512i b) + /// VPSUBSB zmm1 {k1}{z}, zmm2, zmm3/m128 + /// + public static Vector512 SubtractSaturate(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_subs_epi16 (__m512i a, __m512i b) + /// VPSUBSW zmm1 {k1}{z}, zmm2, zmm3/m128 + /// + public static Vector512 SubtractSaturate(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_subs_epu8 (__m512i a, __m512i b) + /// VPSUBUSB zmm1 {k1}{z}, zmm2, zmm3/m128 + /// + public static Vector512 SubtractSaturate(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_subs_epu16 (__m512i a, __m512i b) + /// VPSUBUSW zmm1 {k1}{z}, zmm2, zmm3/m128 + /// + public static Vector512 SubtractSaturate(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + + /// + /// __m512i _mm512_sad_epu8 (__m512i a, __m512i b) + /// VPSADBW zmm1 {k1}{z}, zmm2, zmm3/m512 + /// + public static Vector512 SumAbsoluteDifferences(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + + /// + /// __m512i _mm512_unpackhi_epi8 (__m512i a, __m512i b) + /// VPUNPCKHBW zmm1 {k1}{z}, zmm2, zmm3/m512 + /// + public static Vector512 UnpackHigh(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_unpackhi_epi8 (__m512i a, __m512i b) + /// VPUNPCKHBW zmm1 {k1}{z}, zmm2, zmm3/m512 + /// + public static Vector512 UnpackHigh(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_unpackhi_epi16 (__m512i a, __m512i b) + /// VPUNPCKHWD zmm1 {k1}{z}, zmm2, zmm3/m512 + /// + public static Vector512 UnpackHigh(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_unpackhi_epi16 (__m512i a, __m512i b) + /// VPUNPCKHWD zmm1 {k1}{z}, zmm2, zmm3/m512 + /// + public static Vector512 UnpackHigh(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + + /// + /// __m512i _mm512_unpacklo_epi8 (__m512i a, __m512i b) + /// VPUNPCKLBW zmm1 {k1}{z}, zmm2, zmm3/m512 + /// + public static Vector512 UnpackLow(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_unpacklo_epi8 (__m512i a, __m512i b) + /// VPUNPCKLBW zmm1 {k1}{z}, zmm2, zmm3/m512 + /// + public static Vector512 UnpackLow(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_unpacklo_epi16 (__m512i a, __m512i b) + /// VPUNPCKLWD zmm1 {k1}{z}, zmm2, zmm3/m512 + /// + public static Vector512 UnpackLow(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_unpacklo_epi16 (__m512i a, __m512i b) + /// VPUNPCKLWD zmm1 {k1}{z}, zmm2, zmm3/m512 + /// + public static Vector512 UnpackLow(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } } } diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Avx512BW.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Avx512BW.cs index b0fe1c60f8b33..01811c5a108db 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Avx512BW.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Avx512BW.cs @@ -30,5 +30,447 @@ internal X64() { } public static new bool IsSupported { get => IsSupported; } } + + /// + /// __m512i _mm512_abs_epi8 (__m512i a) + /// VPABSB zmm1 {k1}{z}, zmm2/m512 + /// + public static Vector512 Abs(Vector512 value) => Abs(value); + /// + /// __m512i _mm512_abs_epi16 (__m512i a) + /// VPABSW zmm1 {k1}{z}, zmm2/m512 + /// + public static Vector512 Abs(Vector512 value) => Abs(value); + + /// + /// __m512i _mm512_add_epi8 (__m512i a, __m512i b) + /// VPADDB zmm1 {k1}{z}, zmm2, zmm3/m512 + /// + public static Vector512 Add(Vector512 left, Vector512 right) => Add(left, right); + /// + /// __m512i _mm512_add_epi8 (__m512i a, __m512i b) + /// VPADDB zmm1 {k1}{z}, zmm2, zmm3/m512 + /// + public static Vector512 Add(Vector512 left, Vector512 right) => Add(left, right); + /// + /// __m512i _mm512_add_epi16 (__m512i a, __m512i b) + /// VPADDW zmm1 {k1}{z}, zmm2, zmm3/m512 + /// + public static Vector512 Add(Vector512 left, Vector512 right) => Add(left, right); + /// + /// __m512i _mm512_add_epi16 (__m512i a, __m512i b) + /// VPADDW zmm1 {k1}{z}, zmm2, zmm3/m512 + /// + public static Vector512 Add(Vector512 left, Vector512 right) => Add(left, right); + + /// + /// __m512i _mm512_adds_epi8 (__m512i a, __m512i b) + /// VPADDSB zmm1 {k1}{z}, zmm2, zmm3/m512 + /// + public static Vector512 AddSaturate(Vector512 left, Vector512 right) => AddSaturate(left, right); + /// + /// __m512i _mm512_adds_epu8 (__m512i a, __m512i b) + /// VPADDUSB zmm1 {k1}{z}, zmm2, zmm3/m512 + /// + public static Vector512 AddSaturate(Vector512 left, Vector512 right) => AddSaturate(left, right); + /// + /// __m512i _mm512_adds_epi16 (__m512i a, __m512i b) + /// VPADDSW zmm1 {k1}{z}, zmm2, zmm3/m512 + /// + public static Vector512 AddSaturate(Vector512 left, Vector512 right) => AddSaturate(left, right); + /// + /// __m512i _mm512_adds_epu16 (__m512i a, __m512i b) + /// VPADDUSW zmm1 {k1}{z}, zmm2, zmm3/m512 + /// + public static Vector512 AddSaturate(Vector512 left, Vector512 right) => AddSaturate(left, right); + + /// + /// __m512i _mm512_alignr_epi8 (__m512i a, __m512i b, const int count) + /// VPALIGNR zmm1 {k1}{z}, zmm2, zmm3/m512, imm8 + /// + public static Vector512 AlignRight(Vector512 left, Vector512 right, [ConstantExpected] byte mask) => AlignRight(left, right, mask); + /// + /// __m512i _mm512_alignr_epi8 (__m512i a, __m512i b, const int count) + /// VPALIGNR zmm1 {k1}{z}, zmm2, zmm3/m512, imm8 + /// + public static Vector512 AlignRight(Vector512 left, Vector512 right, [ConstantExpected] byte mask) => AlignRight(left, right, mask); + + /// + /// __m512i _mm512_avg_epu8 (__m512i a, __m512i b) + /// VPAVGB zmm1 {k1}{z}, zmm2, zmm3/m512 + /// + public static Vector512 Average(Vector512 left, Vector512 right) => Average(left, right); + /// + /// __m512i _mm512_avg_epu16 (__m512i a, __m512i b) + /// VPAVGW zmm1 {k1}{z}, zmm2, zmm3/m512 + /// + public static Vector512 Average(Vector512 left, Vector512 right) => Average(left, right); + + /// + /// __m512i _mm512_cvtepi8_epi16 (__m128i a) + /// VPMOVSXBW zmm1 {k1}{z}, ymm2/m256 + /// + public static Vector512 ConvertToVector512Int16(Vector256 value) => ConvertToVector512Int16(value); + /// + /// __m512i _mm512_cvtepu8_epi16 (__m128i a) + /// VPMOVZXBW zmm1 {k1}{z}, ymm2/m256 + /// + public static Vector512 ConvertToVector512Int16(Vector256 value) => ConvertToVector512Int16(value); + /// + /// __m512i _mm512_cvtepi8_epi16 (__m128i a) + /// VPMOVSXBW zmm1 {k1}{z}, ymm2/m256 + /// + public static Vector512 ConvertToVector512UInt16(Vector256 value) => ConvertToVector512UInt16(value); + /// + /// __m512i _mm512_cvtepu8_epi16 (__m128i a) + /// VPMOVZXBW zmm1 {k1}{z}, ymm2/m256 + /// + public static Vector512 ConvertToVector512UInt16(Vector256 value) => ConvertToVector512UInt16(value); + + /// + /// __m512i _mm512_loadu_epi8 (__m512i const * mem_addr) + /// VMOVDQU8 zmm1 {k1}{z}, m512 + /// + public static new unsafe Vector512 LoadVector512(sbyte* address) => LoadVector512(address); + /// + /// __m512i _mm512_loadu_epi8 (__m512i const * mem_addr) + /// VMOVDQU8 zmm1 {k1}{z}, m512 + /// + public static new unsafe Vector512 LoadVector512(byte* address) => LoadVector512(address); + /// + /// __m512i _mm512_loadu_epi16 (__m512i const * mem_addr) + /// VMOVDQU16 zmm1 {k1}{z}, m512 + /// + public static new unsafe Vector512 LoadVector512(short* address) => LoadVector512(address); + /// + /// __m512i _mm512_loadu_epi16 (__m512i const * mem_addr) + /// VMOVDQU16 zmm1 {k1}{z}, m512 + /// + public static new unsafe Vector512 LoadVector512(ushort* address) => LoadVector512(address); + + /// + /// __m512i _mm512_max_epi8 (__m512i a, __m512i b) + /// VPMAXSB zmm1 {k1}{z}, zmm2, zmm3/m512 + /// + public static Vector512 Max(Vector512 left, Vector512 right) => Max(left, right); + /// + /// __m512i _mm512_max_epu8 (__m512i a, __m512i b) + /// VPMAXUB zmm1 {k1}{z}, zmm2, zmm3/m512 + /// + public static Vector512 Max(Vector512 left, Vector512 right) => Max(left, right); + /// + /// __m512i _mm512_max_epi16 (__m512i a, __m512i b) + /// VPMAXSW zmm1 {k1}{z}, zmm2, zmm3/m512 + /// + public static Vector512 Max(Vector512 left, Vector512 right) => Max(left, right); + /// + /// __m512i _mm512_max_epu16 (__m512i a, __m512i b) + /// VPMAXUW zmm1 {k1}{z}, zmm2, zmm3/m512 + /// + public static Vector512 Max(Vector512 left, Vector512 right) => Max(left, right); + + /// + /// __m512i _mm512_min_epi8 (__m512i a, __m512i b) + /// VPMINSB zmm1 {k1}{z}, zmm2, zmm3/m512 + /// + public static Vector512 Min(Vector512 left, Vector512 right) => Min(left, right); + /// + /// __m512i _mm512_min_epu8 (__m512i a, __m512i b) + /// VPMINUB zmm1 {k1}{z}, zmm2, zmm3/m512 + /// + public static Vector512 Min(Vector512 left, Vector512 right) => Min(left, right); + /// + /// __m512i _mm512_min_epi16 (__m512i a, __m512i b) + /// VPMINSW zmm1 {k1}{z}, zmm2, zmm3/m512 + /// + public static Vector512 Min(Vector512 left, Vector512 right) => Min(left, right); + /// + /// __m512i _mm512_min_epu16 (__m512i a, __m512i b) + /// VPMINUW zmm1 {k1}{z}, zmm2, zmm3/m512 + /// + public static Vector512 Min(Vector512 left, Vector512 right) => Min(left, right); + + /// + /// __m512i _mm512_madd_epi16 (__m512i a, __m512i b) + /// VPMADDWD zmm1 {k1}{z}, zmm2, zmm3/m512 + /// + public static Vector512 MultiplyAddAdjacent(Vector512 left, Vector512 right) => MultiplyAddAdjacent(left, right); + /// + /// __m512i _mm512_maddubs_epi16 (__m512i a, __m512i b) + /// VPMADDUBSW zmm1 {k1}{z}, zmm2, zmm3/m512 + /// + public static Vector512 MultiplyAddAdjacent(Vector512 left, Vector512 right) => MultiplyAddAdjacent(left, right); + + /// + /// __m512i _mm512_mulhi_epi16 (__m512i a, __m512i b) + /// VPMULHW zmm1 {k1}{z}, zmm2, zmm3/m512 + /// + public static Vector512 MultiplyHigh(Vector512 left, Vector512 right) => MultiplyHigh(left, right); + /// + /// __m512i _mm512_mulhi_epu16 (__m512i a, __m512i b) + /// VPMULHUW zmm1 {k1}{z}, zmm2, zmm3/m512 + /// + public static Vector512 MultiplyHigh(Vector512 left, Vector512 right) => MultiplyHigh(left, right); + + /// + /// __m512i _mm512_mulhrs_epi16 (__m512i a, __m512i b) + /// VPMULHRSW zmm1 {k1}{z}, zmm2, zmm3/m512 + /// + public static Vector512 MultiplyHighRoundScale(Vector512 left, Vector512 right) => MultiplyHighRoundScale(left, right); + + /// + /// __m512i _mm512_mullo_epi16 (__m512i a, __m512i b) + /// VPMULLW zmm1 {k1}{z}, zmm2, zmm3/m512 + /// + public static Vector512 MultiplyLow(Vector512 left, Vector512 right) => MultiplyLow(left, right); + /// + /// __m512i _mm512_mullo_epi16 (__m512i a, __m512i b) + /// VPMULLW zmm1 {k1}{z}, zmm2, zmm3/m512 + /// + public static Vector512 MultiplyLow(Vector512 left, Vector512 right) => MultiplyLow(left, right); + + /// + /// __m512i _mm512_packs_epi16 (__m512i a, __m512i b) + /// VPACKSSWB zmm1 {k1}{z}, zmm2, zmm3/m512 + /// + public static Vector512 PackSignedSaturate(Vector512 left, Vector512 right) => PackSignedSaturate(left, right); + /// + /// __m512i _mm512_packs_epi32 (__m512i a, __m512i b) + /// VPACKSSDW zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst + /// + public static Vector512 PackSignedSaturate(Vector512 left, Vector512 right) => PackSignedSaturate(left, right); + + /// + /// __m512i _mm512_packus_epi16 (__m512i a, __m512i b) + /// VPACKUSWB zmm1 {k1}{z}, zmm2, zmm3/m512 + /// + public static Vector512 PackUnsignedSaturate(Vector512 left, Vector512 right) => PackUnsignedSaturate(left, right); + /// + /// __m512i _mm512_packus_epi32 (__m512i a, __m512i b) + /// VPACKUSDW zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst + /// + public static Vector512 PackUnsignedSaturate(Vector512 left, Vector512 right) => PackUnsignedSaturate(left, right); + + /// + /// __m512i _mm512_sll_epi16 (__m512i a, __m128i count) + /// VPSLLW zmm1 {k1}{z}, zmm2, xmm3/m128 + /// + public static Vector512 ShiftLeftLogical(Vector512 value, Vector128 count) => ShiftLeftLogical(value, count); + /// + /// __m512i _mm512_sll_epi16 (__m512i a, __m128i count) + /// VPSLLW zmm1 {k1}{z}, zmm2, xmm3/m128 + /// + public static Vector512 ShiftLeftLogical(Vector512 value, Vector128 count) => ShiftLeftLogical(value, count); + + /// + /// __m512i _mm512_slli_epi16 (__m512i a, int imm8) + /// VPSLLW zmm1 {k1}{z}, zmm2, imm8 + /// + public static Vector512 ShiftLeftLogical(Vector512 value, [ConstantExpected] byte count) => ShiftLeftLogical(value, count); + /// + /// __m512i _mm512_slli_epi16 (__m512i a, int imm8) + /// VPSLLW zmm1 {k1}{z}, zmm2, imm8 + /// + public static Vector512 ShiftLeftLogical(Vector512 value, [ConstantExpected] byte count) => ShiftLeftLogical(value, count); + + /// + /// __m512i _mm512_bslli_epi128 (__m512i a, const int imm8) + /// VPSLLDQ zmm1, zmm2/m512, imm8 + /// + public static Vector512 ShiftLeftLogical128BitLane(Vector512 value, [ConstantExpected] byte numBytes) => ShiftLeftLogical128BitLane(value, numBytes); + /// + /// __m512i _mm512_bslli_epi128 (__m512i a, const int imm8) + /// VPSLLDQ zmm1, zmm2/m512, imm8 + /// + public static Vector512 ShiftLeftLogical128BitLane(Vector512 value, [ConstantExpected] byte numBytes) => ShiftLeftLogical128BitLane(value, numBytes); + + /// + /// _mm512_sra_epi16 (__m512i a, __m128i count) + /// VPSRAW zmm1 {k1}{z}, zmm2, xmm3/m128 + /// + public static Vector512 ShiftRightArithmetic(Vector512 value, Vector128 count) => ShiftRightArithmetic(value, count); + + /// + /// __m512i _mm512_srai_epi16 (__m512i a, int imm8) + /// VPSRAW zmm1 {k1}{z}, zmm2, imm8 + /// + public static Vector512 ShiftRightArithmetic(Vector512 value, [ConstantExpected] byte count) => ShiftRightArithmetic(value, count); + + /// + /// __m512i _mm512_srl_epi16 (__m512i a, __m128i count) + /// VPSRLW zmm1 {k1}{z}, zmm2, xmm3/m128 + /// + public static Vector512 ShiftRightLogical(Vector512 value, Vector128 count) => ShiftRightLogical(value, count); + /// + /// __m512i _mm512_srl_epi16 (__m512i a, __m128i count) + /// VPSRLW zmm1 {k1}{z}, zmm2, xmm3/m128 + /// + public static Vector512 ShiftRightLogical(Vector512 value, Vector128 count) => ShiftRightLogical(value, count); + + /// + /// __m512i _mm512_srli_epi16 (__m512i a, int imm8) + /// VPSRLW zmm1 {k1}{z}, zmm2, imm8 + /// + public static Vector512 ShiftRightLogical(Vector512 value, [ConstantExpected] byte count) => ShiftRightLogical(value, count); + /// + /// __m512i _mm512_srli_epi16 (__m512i a, int imm8) + /// VPSRLW zmm1 {k1}{z}, zmm2, imm8 + /// + public static Vector512 ShiftRightLogical(Vector512 value, [ConstantExpected] byte count) => ShiftRightLogical(value, count); + + /// + /// __m512i _mm512_bsrli_epi128 (__m512i a, const int imm8) + /// VPSRLDQ zmm1, zmm2/m128, imm8 + /// + public static Vector512 ShiftRightLogical128BitLane(Vector512 value, [ConstantExpected] byte numBytes) => ShiftRightLogical128BitLane(value, numBytes); + /// + /// __m512i _mm512_bsrli_epi128 (__m512i a, const int imm8) + /// VPSRLDQ zmm1, zmm2/m128, imm8 + /// + public static Vector512 ShiftRightLogical128BitLane(Vector512 value, [ConstantExpected] byte numBytes) => ShiftRightLogical128BitLane(value, numBytes); + + /// + /// __m512i _mm512_shuffle_epi8 (__m512i a, __m512i b) + /// VPSHUFB zmm1 {k1}{z}, zmm2, zmm3/m512 + /// + public static Vector512 Shuffle(Vector512 value, Vector512 mask) => Shuffle(value, mask); + /// + /// __m512i _mm512_shuffle_epi8 (__m512i a, __m512i b) + /// VPSHUFB zmm1 {k1}{z}, zmm2, zmm3/m512 + /// + public static Vector512 Shuffle(Vector512 value, Vector512 mask) => Shuffle(value, mask); + + /// + /// __m512i _mm512_shufflehi_epi16 (__m512i a, const int imm8) + /// VPSHUFHW zmm1 {k1}{z}, zmm2/m512, imm8 + /// + public static Vector512 ShuffleHigh(Vector512 value, [ConstantExpected] byte control) => ShuffleHigh(value, control); + /// + /// __m512i _mm512_shufflehi_epi16 (__m512i a, const int imm8) + /// VPSHUFHW zmm1 {k1}{z}, zmm2/m512, imm8 + /// + public static Vector512 ShuffleHigh(Vector512 value, [ConstantExpected] byte control) => ShuffleHigh(value, control); + + /// + /// __m512i _mm512_shufflelo_epi16 (__m512i a, const int imm8) + /// VPSHUFLW zmm1 {k1}{z}, zmm2/m512, imm8 + /// + public static Vector512 ShuffleLow(Vector512 value, [ConstantExpected] byte control) => ShuffleLow(value, control); + /// + /// __m512i _mm512_shufflelo_epi16 (__m512i a, const int imm8) + /// VPSHUFLW zmm1 {k1}{z}, zmm2/m512, imm8 + /// + public static Vector512 ShuffleLow(Vector512 value, [ConstantExpected] byte control) => ShuffleLow(value, control); + + /// + /// void _mm512_storeu_epi8 (__m512i * mem_addr, __m512i a) + /// VMOVDQU8 m512 {k1}{z}, zmm1 + /// + public static new unsafe void Store(sbyte* address, Vector512 source) => Store(address, source); + /// + /// void _mm512_storeu_epi8 (__m512i * mem_addr, __m512i a) + /// VMOVDQU8 m512 {k1}{z}, zmm1 + /// + public static new unsafe void Store(byte* address, Vector512 source) => Store(address, source); + /// + /// void _mm512_storeu_epi16 (__m512i * mem_addr, __m512i a) + /// VMOVDQU16 m512 {k1}{z}, zmm1 + /// + public static new unsafe void Store(short* address, Vector512 source) => Store(address, source); + /// + /// void _mm512_storeu_epi16 (__m512i * mem_addr, __m512i a) + /// VMOVDQU16 m512 {k1}{z}, zmm1 + /// + public static new unsafe void Store(ushort* address, Vector512 source) => Store(address, source); + + /// + /// __m512i _mm512_sub_epi8 (__m512i a, __m512i b) + /// VPSUBB zmm1 {k1}{z}, zmm2, zmm3/m512 + /// + public static Vector512 Subtract(Vector512 left, Vector512 right) => Subtract(left, right); + /// + /// __m512i _mm512_sub_epi8 (__m512i a, __m512i b) + /// VPSUBB zmm1 {k1}{z}, zmm2, zmm3/m512 + /// + public static Vector512 Subtract(Vector512 left, Vector512 right) => Subtract(left, right); + /// + /// __m512i _mm512_sub_epi16 (__m512i a, __m512i b) + /// VPSUBW zmm1 {k1}{z}, zmm2, zmm3/m512 + /// + public static Vector512 Subtract(Vector512 left, Vector512 right) => Subtract(left, right); + /// + /// __m512i _mm512_sub_epi16 (__m512i a, __m512i b) + /// VPSUBW zmm1 {k1}{z}, zmm2, zmm3/m512 + /// + public static Vector512 Subtract(Vector512 left, Vector512 right) => Subtract(left, right); + + /// + /// __m512i _mm512_subs_epi8 (__m512i a, __m512i b) + /// VPSUBSB zmm1 {k1}{z}, zmm2, zmm3/m128 + /// + public static Vector512 SubtractSaturate(Vector512 left, Vector512 right) => SubtractSaturate(left, right); + /// + /// __m512i _mm512_subs_epi16 (__m512i a, __m512i b) + /// VPSUBSW zmm1 {k1}{z}, zmm2, zmm3/m128 + /// + public static Vector512 SubtractSaturate(Vector512 left, Vector512 right) => SubtractSaturate(left, right); + /// + /// __m512i _mm512_subs_epu8 (__m512i a, __m512i b) + /// VPSUBUSB zmm1 {k1}{z}, zmm2, zmm3/m128 + /// + public static Vector512 SubtractSaturate(Vector512 left, Vector512 right) => SubtractSaturate(left, right); + /// + /// __m512i _mm512_subs_epu16 (__m512i a, __m512i b) + /// VPSUBUSW zmm1 {k1}{z}, zmm2, zmm3/m128 + /// + public static Vector512 SubtractSaturate(Vector512 left, Vector512 right) => SubtractSaturate(left, right); + + /// + /// __m512i _mm512_sad_epu8 (__m512i a, __m512i b) + /// VPSADBW zmm1 {k1}{z}, zmm2, zmm3/m512 + /// + public static Vector512 SumAbsoluteDifferences(Vector512 left, Vector512 right) => SumAbsoluteDifferences(left, right); + + /// + /// __m512i _mm512_unpackhi_epi8 (__m512i a, __m512i b) + /// VPUNPCKHBW zmm1 {k1}{z}, zmm2, zmm3/m512 + /// + public static Vector512 UnpackHigh(Vector512 left, Vector512 right) => UnpackHigh(left, right); + /// + /// __m512i _mm512_unpackhi_epi8 (__m512i a, __m512i b) + /// VPUNPCKHBW zmm1 {k1}{z}, zmm2, zmm3/m512 + /// + public static Vector512 UnpackHigh(Vector512 left, Vector512 right) => UnpackHigh(left, right); + /// + /// __m512i _mm512_unpackhi_epi16 (__m512i a, __m512i b) + /// VPUNPCKHWD zmm1 {k1}{z}, zmm2, zmm3/m512 + /// + public static Vector512 UnpackHigh(Vector512 left, Vector512 right) => UnpackHigh(left, right); + /// + /// __m512i _mm512_unpackhi_epi16 (__m512i a, __m512i b) + /// VPUNPCKHWD zmm1 {k1}{z}, zmm2, zmm3/m512 + /// + public static Vector512 UnpackHigh(Vector512 left, Vector512 right) => UnpackHigh(left, right); + + /// + /// __m512i _mm512_unpacklo_epi8 (__m512i a, __m512i b) + /// VPUNPCKLBW zmm1 {k1}{z}, zmm2, zmm3/m512 + /// + public static Vector512 UnpackLow(Vector512 left, Vector512 right) => UnpackLow(left, right); + /// + /// __m512i _mm512_unpacklo_epi8 (__m512i a, __m512i b) + /// VPUNPCKLBW zmm1 {k1}{z}, zmm2, zmm3/m512 + /// + public static Vector512 UnpackLow(Vector512 left, Vector512 right) => UnpackLow(left, right); + /// + /// __m512i _mm512_unpacklo_epi16 (__m512i a, __m512i b) + /// VPUNPCKLWD zmm1 {k1}{z}, zmm2, zmm3/m512 + /// + public static Vector512 UnpackLow(Vector512 left, Vector512 right) => UnpackLow(left, right); + /// + /// __m512i _mm512_unpacklo_epi16 (__m512i a, __m512i b) + /// VPUNPCKLWD zmm1 {k1}{z}, zmm2, zmm3/m512 + /// + public static Vector512 UnpackLow(Vector512 left, Vector512 right) => UnpackLow(left, right); } } diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Avx512DQ.PlatformNotSupported.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Avx512DQ.PlatformNotSupported.cs index bdab068b8484b..0503b5a0db8a1 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Avx512DQ.PlatformNotSupported.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Avx512DQ.PlatformNotSupported.cs @@ -21,6 +21,27 @@ internal Avx512DQ() { } internal VL() { } public static new bool IsSupported { [Intrinsic] get { return false; } } + + /// + /// __m128i _mm_mullo_epi64 (__m128i a, __m128i b) + /// VPMULLQ xmm1 {k1}{z}, xmm2, xmm3/m128/m64bcst + /// + public static Vector128 MultiplyLow(Vector128 left, Vector128 right) { throw new PlatformNotSupportedException(); } + /// + /// __m128i _mm_mullo_epi64 (__m128i a, __m128i b) + /// VPMULLQ xmm1 {k1}{z}, xmm2, xmm3/m128/m64bcst + /// + public static Vector128 MultiplyLow(Vector128 left, Vector128 right) { throw new PlatformNotSupportedException(); } + /// + /// __m256i _mm256_mullo_epi64 (__m256i a, __m256i b) + /// VPMULLQ ymm1 {k1}{z}, ymm2, ymm3/m256/m64bcst + /// + public static Vector256 MultiplyLow(Vector256 left, Vector256 right) { throw new PlatformNotSupportedException(); } + /// + /// __m256i _mm256_mullo_epi64 (__m256i a, __m256i b) + /// VPMULLQ ymm1 {k1}{z}, ymm2, ymm3/m256/m64bcst + /// + public static Vector256 MultiplyLow(Vector256 left, Vector256 right) { throw new PlatformNotSupportedException(); } } public new abstract class X64 : Avx512F.X64 @@ -29,5 +50,60 @@ internal X64() { } public static new bool IsSupported { [Intrinsic] get { return false; } } } + + /// + /// __m512 _mm512_and_ps (__m512 a, __m512 b) + /// VANDPS zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst + /// + public static Vector512 And(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + /// + /// __m512d _mm512_and_pd (__m512d a, __m512d b) + /// VANDPD zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst + /// + public static Vector512 And(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + + /// + /// __m512 _mm512_andnot_ps (__m512 a, __m512 b) + /// VANDNPS zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst + /// + public static Vector512 AndNot(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + /// + /// __m512d _mm512_andnot_pd (__m512d a, __m512d b) + /// VANDNPD zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst + /// + public static Vector512 AndNot(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + + /// + /// __m512i _mm512_mullo_epi64 (__m512i a, __m512i b) + /// VPMULLQ zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst + /// + public static Vector512 MultiplyLow(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_mullo_epi64 (__m512i a, __m512i b) + /// VPMULLQ zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst + /// + public static Vector512 MultiplyLow(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + + /// + /// __m512 _mm512_or_ps (__m512 a, __m512 b) + /// VORPS zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst + /// + public static Vector512 Or(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + /// + /// __m512d _mm512_or_pd (__m512d a, __m512d b) + /// VORPD zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst + /// + public static Vector512 Or(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + + /// + /// __m512 _mm512_xor_ps (__m512 a, __m512 b) + /// VXORPS zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst + /// + public static Vector512 Xor(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + /// + /// __m512d _mm512_xor_pd (__m512d a, __m512d b) + /// VXORPD zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst + /// + public static Vector512 Xor(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } } } diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Avx512DQ.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Avx512DQ.cs index 01004e8b8e9ee..436595edfc9bd 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Avx512DQ.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Avx512DQ.cs @@ -1,7 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; namespace System.Runtime.Intrinsics.X86 @@ -21,6 +20,27 @@ internal Avx512DQ() { } internal VL() { } public static new bool IsSupported { get => IsSupported; } + + /// + /// __m128i _mm_mullo_epi64 (__m128i a, __m128i b) + /// VPMULLQ xmm1 {k1}{z}, xmm2, xmm3/m128/m64bcst + /// + public static Vector128 MultiplyLow(Vector128 left, Vector128 right) => MultiplyLow(left, right); + /// + /// __m128i _mm_mullo_epi64 (__m128i a, __m128i b) + /// VPMULLQ xmm1 {k1}{z}, xmm2, xmm3/m128/m64bcst + /// + public static Vector128 MultiplyLow(Vector128 left, Vector128 right) => MultiplyLow(left, right); + /// + /// __m256i _mm256_mullo_epi64 (__m256i a, __m256i b) + /// VPMULLQ ymm1 {k1}{z}, ymm2, ymm3/m256/m64bcst + /// + public static Vector256 MultiplyLow(Vector256 left, Vector256 right) => MultiplyLow(left, right); + /// + /// __m256i _mm256_mullo_epi64 (__m256i a, __m256i b) + /// VPMULLQ ymm1 {k1}{z}, ymm2, ymm3/m256/m64bcst + /// + public static Vector256 MultiplyLow(Vector256 left, Vector256 right) => MultiplyLow(left, right); } [Intrinsic] @@ -30,5 +50,60 @@ internal X64() { } public static new bool IsSupported { get => IsSupported; } } + + /// + /// __m512 _mm512_and_ps (__m512 a, __m512 b) + /// VANDPS zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst + /// + public static Vector512 And(Vector512 left, Vector512 right) => And(left, right); + /// + /// __m512d _mm512_and_pd (__m512d a, __m512d b) + /// VANDPD zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst + /// + public static Vector512 And(Vector512 left, Vector512 right) => And(left, right); + + /// + /// __m512 _mm512_andnot_ps (__m512 a, __m512 b) + /// VANDNPS zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst + /// + public static Vector512 AndNot(Vector512 left, Vector512 right) => AndNot(left, right); + /// + /// __m512d _mm512_andnot_pd (__m512d a, __m512d b) + /// VANDNPD zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst + /// + public static Vector512 AndNot(Vector512 left, Vector512 right) => AndNot(left, right); + + /// + /// __m512i _mm512_mullo_epi64 (__m512i a, __m512i b) + /// VPMULLQ zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst + /// + public static Vector512 MultiplyLow(Vector512 left, Vector512 right) => MultiplyLow(left, right); + /// + /// __m512i _mm512_mullo_epi64 (__m512i a, __m512i b) + /// VPMULLQ zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst + /// + public static Vector512 MultiplyLow(Vector512 left, Vector512 right) => MultiplyLow(left, right); + + /// + /// __m512 _mm512_or_ps (__m512 a, __m512 b) + /// VORPS zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst + /// + public static Vector512 Or(Vector512 left, Vector512 right) => Or(left, right); + /// + /// __m512d _mm512_or_pd (__m512d a, __m512d b) + /// VORPD zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst + /// + public static Vector512 Or(Vector512 left, Vector512 right) => Or(left, right); + + /// + /// __m512 _mm512_xor_ps (__m512 a, __m512 b) + /// VXORPS zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst + /// + public static Vector512 Xor(Vector512 left, Vector512 right) => Xor(left, right); + /// + /// __m512d _mm512_xor_pd (__m512d a, __m512d b) + /// VXORPD zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst + /// + public static Vector512 Xor(Vector512 left, Vector512 right) => Xor(left, right); } } diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Avx512F.PlatformNotSupported.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Avx512F.PlatformNotSupported.cs index 63f62aff615aa..96b70d19e58c1 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Avx512F.PlatformNotSupported.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Avx512F.PlatformNotSupported.cs @@ -21,6 +21,81 @@ public abstract class VL internal VL() { } public static bool IsSupported { [Intrinsic] get { return false; } } + + /// + /// __m128i _mm_abs_epi64 (__m128i a) + /// VPABSQ xmm1 {k1}{z}, xmm2/m128/m64bcst + /// + public static Vector128 Abs(Vector128 value) { throw new PlatformNotSupportedException(); } + /// + /// __m256i _mm256_abs_epi64 (__m128i a) + /// VPABSQ ymm1 {k1}{z}, ymm2/m256/m64bcst + /// + public static Vector256 Abs(Vector256 value) { throw new PlatformNotSupportedException(); } + + /// + /// __m128i _mm_max_epi64 (__m128i a, __m128i b) + /// VPMAXSQ xmm1 {k1}{z}, xmm2, xmm3/m128/m64bcst + /// + public static Vector128 Max(Vector128 left, Vector128 right) { throw new PlatformNotSupportedException(); } + /// + /// __m128i _mm_max_epu64 (__m128i a, __m128i b) + /// VPMAXUQ xmm1 {k1}{z}, xmm2, xmm3/m128/m64bcst + /// + public static Vector128 Max(Vector128 left, Vector128 right) { throw new PlatformNotSupportedException(); } + /// + /// __m256i _mm256_max_epi64 (__m256i a, __m256i b) + /// VPMAXSQ ymm1 {k1}{z}, ymm2, ymm3/m256/m64bcst + /// + public static Vector256 Max(Vector256 left, Vector256 right) { throw new PlatformNotSupportedException(); } + /// + /// __m256i _mm256_max_epu64 (__m256i a, __m256i b) + /// VPMAXUQ ymm1 {k1}{z}, ymm2, ymm3/m256/m64bcst + /// + public static Vector256 Max(Vector256 left, Vector256 right) { throw new PlatformNotSupportedException(); } + + /// + /// __m128i _mm_min_epi64 (__m128i a, __m128i b) + /// VPMINSQ xmm1 {k1}{z}, xmm2, xmm3/m128/m64bcst + /// + public static Vector128 Min(Vector128 left, Vector128 right) { throw new PlatformNotSupportedException(); } + /// + /// __m128i _mm_min_epu64 (__m128i a, __m128i b) + /// VPMINUQ xmm1 {k1}{z}, xmm2, xmm3/m128/m64bcst + /// + public static Vector128 Min(Vector128 left, Vector128 right) { throw new PlatformNotSupportedException(); } + /// + /// __m256i _mm256_min_epi64 (__m256i a, __m256i b) + /// VPMINSQ ymm1 {k1}{z}, ymm2, ymm3/m256/m64bcst + /// + public static Vector256 Min(Vector256 left, Vector256 right) { throw new PlatformNotSupportedException(); } + /// + /// __m256i _mm256_min_epu64 (__m256i a, __m256i b) + /// VPMINUQ ymm1 {k1}{z}, ymm2, ymm3/m256/m64bcst + /// + public static Vector256 Min(Vector256 left, Vector256 right) { throw new PlatformNotSupportedException(); } + + /// + /// __m128i _mm_sra_epi64 (__m128i a, __m128i count) + /// VPSRAQ xmm1 {k1}{z}, xmm2, xmm3/m128 + /// + public static Vector128 ShiftRightArithmetic(Vector128 value, Vector128 count) { throw new PlatformNotSupportedException(); } + /// + /// __m256i _mm256_sra_epi64 (__m256i a, __m128i count) + /// VPSRAQ ymm1 {k1}{z}, ymm2, xmm3/m128 + /// + public static Vector256 ShiftRightArithmetic(Vector256 value, Vector128 count) { throw new PlatformNotSupportedException(); } + + /// + /// __128i _mm_srai_epi64 (__m128i a, int imm8) + /// VPSRAQ xmm1 {k1}{z}, xmm2, imm8 + /// + public static Vector128 ShiftRightArithmetic(Vector128 value, [ConstantExpected] byte count) { throw new PlatformNotSupportedException(); } + /// + /// __m256i _mm256_srai_epi64 (__m256i a, int imm8) + /// VPSRAQ ymm1 {k1}{z}, ymm2, imm8 + /// + public static Vector256 ShiftRightArithmetic(Vector256 value, [ConstantExpected] byte count) { throw new PlatformNotSupportedException(); } } public new abstract class X64 : Avx2.X64 @@ -31,461 +106,1002 @@ internal X64() { } } /// - /// __m512i _mm512_and_si512 (__m512i a, __m512i b) - /// VPAND zmm, zmm, zmm/m512 + /// __m512i _mm512_abs_epi32 (__m512i a) + /// VPABSD zmm1 {k1}{z}, zmm2/m512/m32bcst /// - public static Vector512 And(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + public static Vector512 Abs(Vector512 value) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_abs_epi64 (__m512i a) + /// VPABSQ zmm1 {k1}{z}, zmm2/m512/m64bcst + /// + public static Vector512 Abs(Vector512 value) { throw new PlatformNotSupportedException(); } + + /// + /// __m512i _mm512_add_epi32 (__m512i a, __m512i b) + /// VPADDD zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst + /// + public static Vector512 Add(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_add_epi32 (__m512i a, __m512i b) + /// VPADDD zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst + /// + public static Vector512 Add(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_add_epi64 (__m512i a, __m512i b) + /// VPADDQ zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst + /// + public static Vector512 Add(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_add_epi64 (__m512i a, __m512i b) + /// VPADDQ zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst + /// + public static Vector512 Add(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + /// + /// __m512d _mm512_add_pd (__m512d a, __m512d b) + /// VADDPD zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst{er} + /// + public static Vector512 Add(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + /// + /// __m512 _mm512_add_ps (__m512 a, __m512 b) + /// VADDPS zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst{er} + /// + public static Vector512 Add(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + /// /// __m512i _mm512_and_si512 (__m512i a, __m512i b) - /// VPAND zmm, zmm, zmm/m512 + /// VPANDD zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst /// public static Vector512 And(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } /// /// __m512i _mm512_and_si512 (__m512i a, __m512i b) - /// VPAND zmm, zmm, zmm/m512 + /// VPANDD zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst + /// + public static Vector512 And(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_and_si512 (__m512i a, __m512i b) + /// VPANDD zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst /// public static Vector512 And(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } /// /// __m512i _mm512_and_si512 (__m512i a, __m512i b) - /// VPAND zmm, zmm, zmm/m512 + /// VPANDD zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst /// public static Vector512 And(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } /// - /// __m512i _mm512_and_si512 (__m512i a, __m512i b) - /// VPAND zmm, zmm, zmm/m512 + /// __m512i _mm512_and_epi32 (__m512i a, __m512i b) + /// VPANDD zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst /// public static Vector512 And(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } /// - /// __m512i _mm512_and_si512 (__m512i a, __m512i b) - /// VPAND zmm, zmm, zmm/m512 + /// __m512i _mm512_and_epi32 (__m512i a, __m512i b) + /// VPANDD zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst /// public static Vector512 And(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } /// - /// __m512i _mm512_and_si512 (__m512i a, __m512i b) - /// VPAND zmm, zmm, zmm/m512 + /// __m512i _mm512_and_epi64 (__m512i a, __m512i b) + /// VPANDQ zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst /// public static Vector512 And(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } /// - /// __m512i _mm512_and_si512 (__m512i a, __m512i b) - /// VPAND zmm, zmm, zmm/m512 + /// __m512i _mm512_and_epi64 (__m512i a, __m512i b) + /// VPANDQ zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst /// public static Vector512 And(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } - /// - /// __m512 _mm512_and_ps (__m512 a, __m512 b) - /// VANDPS zmm, zmm, zmm/m512 - /// - public static Vector512 And(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } - /// - /// __m512d _mm512_and_pd (__m512d a, __m512d b) - /// VANDPD zmm, zmm, zmm/m512 - /// - public static Vector512 And(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } /// /// __m512i _mm512_andnot_si512 (__m512i a, __m512i b) - /// VPANDN zmm, zmm, zmm/m512 + /// VPANDND zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst /// - public static Vector512 AndNot(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + public static Vector512 AndNot(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } /// /// __m512i _mm512_andnot_si512 (__m512i a, __m512i b) - /// VPANDN zmm, zmm, zmm/m512 + /// VPANDND zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst /// - public static Vector512 AndNot(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + public static Vector512 AndNot(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } /// /// __m512i _mm512_andnot_si512 (__m512i a, __m512i b) - /// VPANDN zmm, zmm, zmm/m512 + /// VPANDND zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst /// public static Vector512 AndNot(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } /// /// __m512i _mm512_andnot_si512 (__m512i a, __m512i b) - /// VPANDN zmm, zmm, zmm/m512 + /// VPANDND zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst /// public static Vector512 AndNot(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } /// - /// __m512i _mm512_andnot_si512 (__m512i a, __m512i b) - /// VPANDN zmm, zmm, zmm/m512 + /// __m512i _mm512_andnot_epi32 (__m512i a, __m512i b) + /// VPANDND zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst /// public static Vector512 AndNot(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } /// - /// __m512i _mm512_andnot_si512 (__m512i a, __m512i b) - /// VPANDN zmm, zmm, zmm/m512 + /// __m512i _mm512_andnot_epi32 (__m512i a, __m512i b) + /// VPANDND zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst /// public static Vector512 AndNot(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } /// - /// __m512i _mm512_andnot_si512 (__m512i a, __m512i b) - /// VPANDN zmm, zmm, zmm/m512 + /// __m512i _mm512_andnot_epi64 (__m512i a, __m512i b) + /// VPANDNQ zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst /// public static Vector512 AndNot(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } /// - /// __m512i _mm512_andnot_si512 (__m512i a, __m512i b) - /// VPANDN zmm, zmm, zmm/m512 + /// __m512i _mm512_andnot_epi64 (__m512i a, __m512i b) + /// VPANDNQ zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst /// public static Vector512 AndNot(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + + /// + /// __m256i _mm512_cvtpd_epi32 (__m512d a) + /// VCVTPD2DQ ymm1 {k1}{z}, zmm2/m512/m64bcst{er} + /// + public static Vector256 ConvertToVector256Int32(Vector512 value) { throw new PlatformNotSupportedException(); } + /// + /// __m256 _mm512_cvtpd_ps (__m512d a) + /// VCVTPD2PS ymm1, zmm2/m512 + /// VCVTPD2PS ymm1 {k1}{z}, zmm2/m512/m64bcst{er} + /// + public static Vector256 ConvertToVector256Single(Vector512 value) { throw new PlatformNotSupportedException(); } + + /// + /// __m256i _mm512_cvttpd_epi32 (__m512d a) + /// VCVTTPD2DQ ymm1 {k1}{z}, zmm2/m512/m64bcst{sae} + /// + public static Vector256 ConvertToVector256Int32WithTruncation(Vector512 value) { throw new PlatformNotSupportedException(); } + + /// + /// __m512d _mm512_cvtepi32_pd (__m256i a) + /// VCVTDQ2PD zmm1 {k1}{z}, ymm2/m256/m32bcst + /// + public static Vector512 ConvertToVector512Double(Vector256 value) { throw new PlatformNotSupportedException(); } + /// + /// __m512d _mm512_cvtps_pd (__m256 a) + /// VCVTPS2PD zmm1 {k1}{z}, ymm2/m256/m32bcst{sae} + /// + public static Vector512 ConvertToVector512Double(Vector256 value) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_cvtepi8_epi32 (__m128i a) + /// VPMOVSXBD zmm1 {k1}{z}, xmm2/m128 + /// + public static Vector512 ConvertToVector512Int32(Vector128 value) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_cvtepu8_epi32 (__m128i a) + /// VPMOVZXBD zmm1 {k1}{z}, xmm2/m128 + /// + public static Vector512 ConvertToVector512Int32(Vector128 value) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_cvtepi16_epi32 (__m128i a) + /// VPMOVSXWD zmm1 {k1}{z}, ymm2/m256 + /// + public static Vector512 ConvertToVector512Int32(Vector256 value) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_cvtepu16_epi32 (__m128i a) + /// VPMOVZXWD zmm1 {k1}{z}, ymm2/m256 + /// + public static Vector512 ConvertToVector512Int32(Vector256 value) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_cvtps_epi32 (__m512 a) + /// VCVTPS2DQ zmm1 {k1}{z}, zmm2/m512/m32bcst{er} + /// + public static Vector512 ConvertToVector512Int32(Vector512 value) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_cvtepi8_epi64 (__m128i a) + /// VPMOVSXBQ zmm1 {k1}{z}, xmm2/m64 + /// + public static Vector512 ConvertToVector512Int64(Vector128 value) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_cvtepu8_epi64 (__m128i a) + /// VPMOVZXBQ zmm1 {k1}{z}, xmm2/m64 + /// + public static Vector512 ConvertToVector512Int64(Vector128 value) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_cvtepi16_epi64 (__m128i a) + /// VPMOVSXWQ zmm1 {k1}{z}, xmm2/m128 + /// + public static Vector512 ConvertToVector512Int64(Vector128 value) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_cvtepu16_epi64 (__m128i a) + /// VPMOVZXWQ zmm1 {k1}{z}, xmm2/m128 + /// + public static Vector512 ConvertToVector512Int64(Vector128 value) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_cvtepi32_epi64 (__m128i a) + /// VPMOVSXDQ zmm1 {k1}{z}, ymm2/m256 + /// + public static Vector512 ConvertToVector512Int64(Vector256 value) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_cvtepu32_epi64 (__m128i a) + /// VPMOVZXDQ zmm1 {k1}{z}, ymm2/m256 + /// + public static Vector512 ConvertToVector512Int64(Vector256 value) { throw new PlatformNotSupportedException(); } + /// + /// __m512 _mm512_cvtepi32_ps (__m512i a) + /// VCVTDQ2PS zmm1 {k1}{z}, zmm2/m512/m32bcst{er} + /// + public static Vector512 ConvertToVector512Single(Vector512 value) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_cvtepi8_epi32 (__m128i a) + /// VPMOVSXBD zmm1 {k1}{z}, xmm2/m128 + /// + public static Vector512 ConvertToVector512UInt32(Vector128 value) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_cvtepu8_epi32 (__m128i a) + /// VPMOVZXBD zmm1 {k1}{z}, xmm2/m128 + /// + public static Vector512 ConvertToVector512UInt32(Vector128 value) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_cvtepi16_epi32 (__m128i a) + /// VPMOVSXWD zmm1 {k1}{z}, ymm2/m256 + /// + public static Vector512 ConvertToVector512UInt32(Vector256 value) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_cvtepu16_epi32 (__m128i a) + /// VPMOVZXWD zmm1 {k1}{z}, ymm2/m256 + /// + public static Vector512 ConvertToVector512UInt32(Vector256 value) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_cvtepi8_epi64 (__m128i a) + /// VPMOVSXBQ zmm1 {k1}{z}, xmm2/m64 + /// + public static Vector512 ConvertToVector512UInt64(Vector128 value) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_cvtepu8_epi64 (__m128i a) + /// VPMOVZXBQ zmm1 {k1}{z}, xmm2/m64 + /// + public static Vector512 ConvertToVector512UInt64(Vector128 value) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_cvtepi16_epi64 (__m128i a) + /// VPMOVSXWQ zmm1 {k1}{z}, xmm2/m128 + /// + public static Vector512 ConvertToVector512UInt64(Vector128 value) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_cvtepu16_epi64 (__m128i a) + /// VPMOVZXWQ zmm1 {k1}{z}, xmm2/m128 + /// + public static Vector512 ConvertToVector512UInt64(Vector128 value) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_cvtepi32_epi64 (__m128i a) + /// VPMOVSXDQ zmm1 {k1}{z}, ymm2/m256 + /// + public static Vector512 ConvertToVector512UInt64(Vector256 value) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_cvtepu32_epi64 (__m128i a) + /// VPMOVZXDQ zmm1 {k1}{z}, ymm2/m256 + /// + public static Vector512 ConvertToVector512UInt64(Vector256 value) { throw new PlatformNotSupportedException(); } + + /// + /// __m512i _mm512_cvttps_epi32 (__m512 a) + /// VCVTTPS2DQ zmm1 {k1}{z}, zmm2/m512/m32bcst{sae} + /// + public static Vector512 ConvertToVector512Int32WithTruncation(Vector512 value) { throw new PlatformNotSupportedException(); } + + /// + /// __m512 _mm512_div_ps (__m512 a, __m512 b) + /// VDIVPS zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst{er} + /// + public static Vector512 Divide(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + /// + /// __m512d _mm512_div_pd (__m512d a, __m512d b) + /// VDIVPD zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst{er} + /// + public static Vector512 Divide(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + + /// + /// __m512 _mm512_moveldup_ps (__m512 a) + /// VMOVSLDUP zmm1 {k1}{z}, zmm2/m512 + /// + public static Vector512 DuplicateEvenIndexed(Vector512 value) { throw new PlatformNotSupportedException(); } + /// + /// __m512d _mm512_movedup_pd (__m512d a) + /// VMOVDDUP zmm1 {k1}{z}, zmm2/m512 + /// + public static Vector512 DuplicateEvenIndexed(Vector512 value) { throw new PlatformNotSupportedException(); } + /// + /// __m512 _mm512_movehdup_ps (__m512 a) + /// VMOVSHDUP zmm1 {k1}{z}, zmm2/m512 + /// + public static Vector512 DuplicateOddIndexed(Vector512 value) { throw new PlatformNotSupportedException(); } + + /// + /// __m512i _mm512_load_si512 (__m512i const * mem_addr) + /// VMOVDQA32 zmm1 {k1}{z}, m512 + /// + public static unsafe Vector512 LoadAlignedVector512(byte* address) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_load_si512 (__m512i const * mem_addr) + /// VMOVDQA32 zmm1 {k1}{z}, m512 + /// + public static unsafe Vector512 LoadAlignedVector512(sbyte* address) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_load_si512 (__m512i const * mem_addr) + /// VMOVDQA32 zmm1 {k1}{z}, m512 + /// + public static unsafe Vector512 LoadAlignedVector512(short* address) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_load_si512 (__m512i const * mem_addr) + /// VMOVDQA32 zmm1 {k1}{z}, m512 + /// + public static unsafe Vector512 LoadAlignedVector512(ushort* address) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_load_epi32 (__m512i const * mem_addr) + /// VMOVDQA32 zmm1 {k1}{z}, m512 + /// + public static unsafe Vector512 LoadAlignedVector512(int* address) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_load_epi32 (__m512i const * mem_addr) + /// VMOVDQA32 zmm1 {k1}{z}, m512 + /// + public static unsafe Vector512 LoadAlignedVector512(uint* address) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_load_epi64 (__m512i const * mem_addr) + /// VMOVDQA64 zmm1 {k1}{z}, m512 + /// + public static unsafe Vector512 LoadAlignedVector512(long* address) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_load_epi64 (__m512i const * mem_addr) + /// VMOVDQA64 zmm1 {k1}{z}, m512 + /// + public static unsafe Vector512 LoadAlignedVector512(ulong* address) { throw new PlatformNotSupportedException(); } + /// + /// __m512 _mm512_load_ps (float const * mem_addr) + /// VMOVAPS zmm1 {k1}{z}, m512 + /// + public static unsafe Vector512 LoadAlignedVector512(float* address) { throw new PlatformNotSupportedException(); } + /// + /// __m512d _mm512_load_pd (double const * mem_addr) + /// VMOVAPD zmm1 {k1}{z}, m512 + /// + public static unsafe Vector512 LoadAlignedVector512(double* address) { throw new PlatformNotSupportedException(); } + + /// + /// __m512i _mm512_stream_load_si512 (__m512i const* mem_addr) + /// VMOVNTDQA zmm1, m512 + /// + public static unsafe Vector512 LoadAlignedVector512NonTemporal(sbyte* address) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_stream_load_si512 (__m512i const* mem_addr) + /// VMOVNTDQA zmm1, m512 + /// + public static unsafe Vector512 LoadAlignedVector512NonTemporal(byte* address) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_stream_load_si512 (__m512i const* mem_addr) + /// VMOVNTDQA zmm1, m512 + /// + public static unsafe Vector512 LoadAlignedVector512NonTemporal(short* address) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_stream_load_si512 (__m512i const* mem_addr) + /// VMOVNTDQA zmm1, m512 + /// + public static unsafe Vector512 LoadAlignedVector512NonTemporal(ushort* address) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_stream_load_si512 (__m512i const* mem_addr) + /// VMOVNTDQA zmm1, m512 + /// + public static unsafe Vector512 LoadAlignedVector512NonTemporal(int* address) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_stream_load_si512 (__m512i const* mem_addr) + /// VMOVNTDQA zmm1, m512 + /// + public static unsafe Vector512 LoadAlignedVector512NonTemporal(uint* address) { throw new PlatformNotSupportedException(); } /// - /// __m512 _mm512_andnot_ps (__m512 a, __m512 b) - /// VANDNPS zmm, zmm, zmm/m512 + /// __m512i _mm512_stream_load_si512 (__m512i const* mem_addr) + /// VMOVNTDQA zmm1, m512 /// - public static Vector512 AndNot(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + public static unsafe Vector512 LoadAlignedVector512NonTemporal(long* address) { throw new PlatformNotSupportedException(); } /// - /// __m512d _mm512_andnot_pd (__m512d a, __m512d b) - /// VANDNPD zmm, zmm, zmm/m512 + /// __m512i _mm512_stream_load_si512 (__m512i const* mem_addr) + /// VMOVNTDQA zmm1, m512 /// - public static Vector512 AndNot(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + public static unsafe Vector512 LoadAlignedVector512NonTemporal(ulong* address) { throw new PlatformNotSupportedException(); } /// /// __m512i _mm512_loadu_si512 (__m512i const * mem_addr) - /// VMOVDQU32 zmm, m512 + /// VMOVDQU32 zmm1 {k1}{z}, m512 /// public static unsafe Vector512 LoadVector512(sbyte* address) { throw new PlatformNotSupportedException(); } /// /// __m512i _mm512_loadu_si512 (__m512i const * mem_addr) - /// VMOVDQU32 zmm, m512 + /// VMOVDQU32 zmm1 {k1}{z}, m512 /// public static unsafe Vector512 LoadVector512(byte* address) { throw new PlatformNotSupportedException(); } /// /// __m512i _mm512_loadu_si512 (__m512i const * mem_addr) - /// VMOVDQU32 zmm, m512 + /// VMOVDQU32 zmm1 {k1}{z}, m512 /// public static unsafe Vector512 LoadVector512(short* address) { throw new PlatformNotSupportedException(); } /// /// __m512i _mm512_loadu_si512 (__m512i const * mem_addr) - /// VMOVDQU32 zmm, m512 + /// VMOVDQU32 zmm1 {k1}{z}, m512 /// public static unsafe Vector512 LoadVector512(ushort* address) { throw new PlatformNotSupportedException(); } /// - /// __m512i _mm512_loadu_si512 (__m512i const * mem_addr) - /// VMOVDQU32 zmm, m512 + /// __m512i _mm512_loadu_epi32 (__m512i const * mem_addr) + /// VMOVDQU32 zmm1 {k1}{z}, m512 /// public static unsafe Vector512 LoadVector512(int* address) { throw new PlatformNotSupportedException(); } /// - /// __m512i _mm512_loadu_si512 (__m512i const * mem_addr) - /// VMOVDQU32 zmm, m512 + /// __m512i _mm512_loadu_epi32 (__m512i const * mem_addr) + /// VMOVDQU32 zmm1 {k1}{z}, m512 /// public static unsafe Vector512 LoadVector512(uint* address) { throw new PlatformNotSupportedException(); } /// - /// __m512i _mm512_loadu_si512 (__m512i const * mem_addr) - /// VMOVDQU64 zmm, m512 + /// __m512i _mm512_loadu_epi64 (__m512i const * mem_addr) + /// VMOVDQU64 zmm1 {k1}{z}, m512 /// public static unsafe Vector512 LoadVector512(long* address) { throw new PlatformNotSupportedException(); } /// - /// __m512i _mm512_loadu_si512 (__m512i const * mem_addr) - /// VMOVDQU64 zmm, m512 + /// __m512i _mm512_loadu_epi64 (__m512i const * mem_addr) + /// VMOVDQU64 zmm1 {k1}{z}, m512 /// public static unsafe Vector512 LoadVector512(ulong* address) { throw new PlatformNotSupportedException(); } /// /// __m512 _mm512_loadu_ps (float const * mem_addr) - /// VMOVUPS zmm, zmm/m512 + /// VMOVUPS zmm1 {k1}{z}, m512 /// public static unsafe Vector512 LoadVector512(float* address) { throw new PlatformNotSupportedException(); } /// /// __m512d _mm512_loadu_pd (double const * mem_addr) - /// VMOVUPD zmm, zmm/m512 + /// VMOVUPD zmm1 {k1}{z}, m512 /// public static unsafe Vector512 LoadVector512(double* address) { throw new PlatformNotSupportedException(); } /// - /// __m512i _mm512_load_si512 (__m512i const * mem_addr) - /// VMOVDQA32 zmm, m512 + /// __m512i _mm512_max_epi32 (__m512i a, __m512i b) + /// VPMAXSD zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst /// - public static unsafe Vector512 LoadAlignedVector512(sbyte* address) { throw new PlatformNotSupportedException(); } + public static Vector512 Max(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } /// - /// __m512i _mm512_load_si512 (__m512i const * mem_addr) - /// VMOVDQA32 zmm, m512 + /// __m512i _mm512_max_epu32 (__m512i a, __m512i b) + /// VPMAXUD zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst /// - public static unsafe Vector512 LoadAlignedVector512(byte* address) { throw new PlatformNotSupportedException(); } + public static Vector512 Max(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } /// - /// __m512i _mm512_load_si512 (__m512i const * mem_addr) - /// VMOVDQA32 zmm, m512 + /// __m512i _mm512_max_epi64 (__m512i a, __m512i b) + /// VPMAXSQ zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst /// - public static unsafe Vector512 LoadAlignedVector512(short* address) { throw new PlatformNotSupportedException(); } + public static Vector512 Max(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } /// - /// __m512i _mm512_load_si512 (__m512i const * mem_addr) - /// VMOVDQA32 zmm, m512 + /// __m512i _mm512_max_epu64 (__m512i a, __m512i b) + /// VPMAXUQ zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst /// - public static unsafe Vector512 LoadAlignedVector512(ushort* address) { throw new PlatformNotSupportedException(); } + public static Vector512 Max(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } /// - /// __m512i _mm512_load_si512 (__m512i const * mem_addr) - /// VMOVDQA32 zmm, m512 + /// __m512 _mm512_max_ps (__m512 a, __m512 b) + /// VMAXPS zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst{sae} /// - public static unsafe Vector512 LoadAlignedVector512(int* address) { throw new PlatformNotSupportedException(); } + public static Vector512 Max(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } /// - /// __m512i _mm512_load_si512 (__m512i const * mem_addr) - /// VMOVDQA32 zmm, m512 + /// __m512d _mm512_max_pd (__m512d a, __m512d b) + /// VMAXPD zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst{sae} /// - public static unsafe Vector512 LoadAlignedVector512(uint* address) { throw new PlatformNotSupportedException(); } + public static Vector512 Max(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + /// - /// __m512i _mm512_load_si512 (__m512i const * mem_addr) - /// VMOVDQA64 zmm, m512 + /// __m512i _mm512_min_epi32 (__m512i a, __m512i b) + /// VPMINSD zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst /// - public static unsafe Vector512 LoadAlignedVector512(long* address) { throw new PlatformNotSupportedException(); } + public static Vector512 Min(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } /// - /// __m512i _mm512_load_si512 (__m512i const * mem_addr) - /// VMOVDQA64 zmm, m512 + /// __m512i _mm512_min_epu32 (__m512i a, __m512i b) + /// VPMINUD zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst /// - public static unsafe Vector512 LoadAlignedVector512(ulong* address) { throw new PlatformNotSupportedException(); } + public static Vector512 Min(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } /// - /// __m512 _mm512_load_ps (float const * mem_addr) - /// VMOVAPS zmm, zmm/m512 + /// __m512i _mm512_min_epi64 (__m512i a, __m512i b) + /// VPMINSQ zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst /// - public static unsafe Vector512 LoadAlignedVector512(float* address) { throw new PlatformNotSupportedException(); } + public static Vector512 Min(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } /// - /// __m512d _mm512_load_pd (double const * mem_addr) - /// VMOVAPD zmm, zmm/m512 + /// __m512i _mm512_min_epu64 (__m512i a, __m512i b) + /// VPMINUQ zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst /// - public static unsafe Vector512 LoadAlignedVector512(double* address) { throw new PlatformNotSupportedException(); } + public static Vector512 Min(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + /// + /// __m512 _mm512_min_ps (__m512 a, __m512 b) + /// VMINPS zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst{sae} + /// + public static Vector512 Min(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + /// + /// __m512d _mm512_min_pd (__m512d a, __m512d b) + /// VMINPD zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst{sae} + /// + public static Vector512 Min(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } /// - /// __m512 _mm512_or_ps (__m512 a, __m512 b) - /// VORPS zmm, zmm, zmm/m512 + /// __m512i _mm512_mul_epi32 (__m512i a, __m512i b) + /// VPMULDQ zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst /// - public static Vector512 Or(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + public static Vector512 Multiply(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } /// - /// __m512d _mm512_or_pd (__m512d a, __m512d b) - /// VORPD zmm, zmm, zmm/m512 + /// __m512i _mm512_mul_epu32 (__m512i a, __m512i b) + /// VPMULUDQ zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst /// - public static Vector512 Or(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + public static Vector512 Multiply(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } /// - /// __m512i _mm512_or_si512 (__m512i a, __m512i b) - /// VPOR zmm, zmm, zmm/m512 + /// __m512 _mm512_mul_ps (__m512 a, __m512 b) + /// VMULPS zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst{er} /// - public static Vector512 Or(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + public static Vector512 Multiply(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + /// + /// __m512d _mm512_mul_pd (__m512d a, __m512d b) + /// VMULPD zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst{er} + /// + public static Vector512 Multiply(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + + /// + /// __m512i _mm512_mullo_epi32 (__m512i a, __m512i b) + /// VPMULLD zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst + /// + public static Vector512 MultiplyLow(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_mullo_epi32 (__m512i a, __m512i b) + /// VPMULLD zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst + /// + public static Vector512 MultiplyLow(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + /// /// __m512i _mm512_or_si512 (__m512i a, __m512i b) - /// VPOR zmm, zmm, zmm/m512 + /// VPORD zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst /// public static Vector512 Or(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } /// /// __m512i _mm512_or_si512 (__m512i a, __m512i b) - /// VPOR zmm, zmm, zmm/m512 + /// VPORD zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst + /// + public static Vector512 Or(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_or_si512 (__m512i a, __m512i b) + /// VPORD zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst /// public static Vector512 Or(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } /// /// __m512i _mm512_or_si512 (__m512i a, __m512i b) - /// VPOR zmm, zmm, zmm/m512 + /// VPORD zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst /// public static Vector512 Or(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } /// - /// __m512i _mm512_or_si512 (__m512i a, __m512i b) - /// VPOR zmm, zmm, zmm/m512 + /// __m512i _mm512_or_epi32 (__m512i a, __m512i b) + /// VPORD zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst /// public static Vector512 Or(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } /// - /// __m512i _mm512_or_si512 (__m512i a, __m512i b) - /// VPOR zmm, zmm, zmm/m512 + /// __m512i _mm512_or_epi32 (__m512i a, __m512i b) + /// VPORD zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst /// public static Vector512 Or(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } /// - /// __m512i _mm512_or_si512 (__m512i a, __m512i b) - /// VPOR zmm, zmm, zmm/m512 + /// __m512i _mm512_or_epi64 (__m512i a, __m512i b) + /// VPORQ zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst /// public static Vector512 Or(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } /// - /// __m512i _mm512_or_si512 (__m512i a, __m512i b) - /// VPOR zmm, zmm, zmm/m512 + /// __m512i _mm512_or_epi64 (__m512i a, __m512i b) + /// VPORQ zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst /// public static Vector512 Or(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_sll_epi32 (__m512i a, __m128i count) + /// VPSLLD zmm1 {k1}{z}, zmm2, xmm3/m128 + /// + public static Vector512 ShiftLeftLogical(Vector512 value, Vector128 count) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_sll_epi32 (__m512i a, __m128i count) + /// VPSLLD zmm1 {k1}{z}, zmm2, xmm3/m128 + /// + public static Vector512 ShiftLeftLogical(Vector512 value, Vector128 count) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_sll_epi64 (__m512i a, __m128i count) + /// VPSLLQ zmm1 {k1}{z}, zmm2, xmm3/m128 + /// + public static Vector512 ShiftLeftLogical(Vector512 value, Vector128 count) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_sll_epi64 (__m512i a, __m128i count) + /// VPSLLQ zmm1 {k1}{z}, zmm2, xmm3/m128 + /// + public static Vector512 ShiftLeftLogical(Vector512 value, Vector128 count) { throw new PlatformNotSupportedException(); } + + /// + /// __m512i _mm512_slli_epi32 (__m512i a, int imm8) + /// VPSLLD zmm1 {k1}{z}, zmm2, imm8 + /// + public static Vector512 ShiftLeftLogical(Vector512 value, [ConstantExpected] byte count) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_slli_epi32 (__m512i a, int imm8) + /// VPSLLD zmm1 {k1}{z}, zmm2, imm8 + /// + public static Vector512 ShiftLeftLogical(Vector512 value, [ConstantExpected] byte count) { throw new PlatformNotSupportedException(); } + + /// + /// __m512i _mm512_slli_epi64 (__m512i a, int imm8) + /// VPSLLQ zmm1 {k1}{z}, zmm2, imm8 + /// + public static Vector512 ShiftLeftLogical(Vector512 value, [ConstantExpected] byte count) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_slli_epi64 (__m512i a, int imm8) + /// VPSLLQ zmm1 {k1}{z}, zmm2, imm8 + /// + public static Vector512 ShiftLeftLogical(Vector512 value, [ConstantExpected] byte count) { throw new PlatformNotSupportedException(); } + + /// + /// _mm512_sra_epi32 (__m512i a, __m128i count) + /// VPSRAD zmm1 {k1}{z}, zmm2, xmm3/m128 + /// + public static Vector512 ShiftRightArithmetic(Vector512 value, Vector128 count) { throw new PlatformNotSupportedException(); } + /// + /// _mm512_sra_epi64 (__m512i a, __m128i count) + /// VPSRAQ zmm1 {k1}{z}, zmm2, xmm3/m128 + /// + public static Vector512 ShiftRightArithmetic(Vector512 value, Vector128 count) { throw new PlatformNotSupportedException(); } + + /// + /// __m512i _mm512_srai_epi32 (__m512i a, int imm8) + /// VPSRAD zmm1 {k1}{z}, zmm2, imm8 + /// + public static Vector512 ShiftRightArithmetic(Vector512 value, [ConstantExpected] byte count) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_srai_epi64 (__m512i a, int imm8) + /// VPSRAQ zmm1 {k1}{z}, zmm2, imm8 + /// + public static Vector512 ShiftRightArithmetic(Vector512 value, [ConstantExpected] byte count) { throw new PlatformNotSupportedException(); } + + /// + /// __m512i _mm512_srl_epi32 (__m512i a, __m128i count) + /// VPSRLD zmm1 {k1}{z}, zmm2, xmm3/m128 + /// + public static Vector512 ShiftRightLogical(Vector512 value, Vector128 count) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_srl_epi32 (__m512i a, __m128i count) + /// VPSRLD zmm1 {k1}{z}, zmm2, xmm3/m128 + /// + public static Vector512 ShiftRightLogical(Vector512 value, Vector128 count) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_srl_epi64 (__m512i a, __m128i count) + /// VPSRLQ zmm1 {k1}{z}, zmm2, xmm3/m128 + /// + public static Vector512 ShiftRightLogical(Vector512 value, Vector128 count) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_srl_epi64 (__m512i a, __m128i count) + /// VPSRLQ zmm1 {k1}{z}, zmm2, xmm3/m128 + /// + public static Vector512 ShiftRightLogical(Vector512 value, Vector128 count) { throw new PlatformNotSupportedException(); } + + /// + /// __m512i _mm512_srli_epi32 (__m512i a, int imm8) + /// VPSRLD zmm1 {k1}{z}, zmm2, imm8 + /// + public static Vector512 ShiftRightLogical(Vector512 value, [ConstantExpected] byte count) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_srli_epi32 (__m512i a, int imm8) + /// VPSRLD zmm1 {k1}{z}, zmm2, imm8 + /// + public static Vector512 ShiftRightLogical(Vector512 value, [ConstantExpected] byte count) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_srli_epi64 (__m512i a, int imm8) + /// VPSRLQ zmm1 {k1}{z}, zmm2, imm8 + /// + public static Vector512 ShiftRightLogical(Vector512 value, [ConstantExpected] byte count) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_srli_epi64 (__m512i a, int imm8) + /// VPSRLQ zmm1 {k1}{z}, zmm2, imm8 + /// + public static Vector512 ShiftRightLogical(Vector512 value, [ConstantExpected] byte count) { throw new PlatformNotSupportedException(); } + + /// + /// __m512i _mm512_shuffle_epi32 (__m512i a, const int imm8) + /// VPSHUFD zmm1 {k1}{z}, zmm2/m512/m32bcst, imm8 + /// + public static Vector512 Shuffle(Vector512 value, [ConstantExpected] byte control) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_shuffle_epi32 (__m512i a, const int imm8) + /// VPSHUFD zmm1 {k1}{z}, zmm2/m512/m32bcst, imm8 + /// + public static Vector512 Shuffle(Vector512 value, [ConstantExpected] byte control) { throw new PlatformNotSupportedException(); } + /// + /// __m512 _mm512_shuffle_ps (__m512 a, __m512 b, const int imm8) + /// VSHUFPS zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst, imm8 + /// + public static Vector512 Shuffle(Vector512 value, Vector512 right, [ConstantExpected] byte control) { throw new PlatformNotSupportedException(); } + /// + /// __m512d _mm512_shuffle_pd (__m512d a, __m512d b, const int imm8) + /// VSHUFPD zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst, imm8 + /// + public static Vector512 Shuffle(Vector512 value, Vector512 right, [ConstantExpected] byte control) { throw new PlatformNotSupportedException(); } + + /// + /// __m512 _mm512_sqrt_ps (__m512 a) + /// VSQRTPS zmm1 {k1}{z}, zmm2/m512/m32bcst{er} + /// + public static Vector512 Sqrt(Vector512 value) { throw new PlatformNotSupportedException(); } + /// + /// __m512d _mm512_sqrt_pd (__m512d a) + /// VSQRTPD zmm1 {k1}{z}, zmm2/m512/m64bcst{er} + /// + public static Vector512 Sqrt(Vector512 value) { throw new PlatformNotSupportedException(); } + /// /// void _mm512_storeu_si512 (__m512i * mem_addr, __m512i a) - /// VMOVDQU32 m512, zmm + /// VMOVDQU32 m512 {k1}{z}, zmm1 /// public static unsafe void Store(sbyte* address, Vector512 source) { throw new PlatformNotSupportedException(); } /// /// void _mm512_storeu_si512 (__m512i * mem_addr, __m512i a) - /// VMOVDQU32 m512, zmm + /// VMOVDQU32 m512 {k1}{z}, zmm1 /// public static unsafe void Store(byte* address, Vector512 source) { throw new PlatformNotSupportedException(); } /// /// void _mm512_storeu_si512 (__m512i * mem_addr, __m512i a) - /// VMOVDQU32 m512, zmm + /// VMOVDQU32 m512 {k1}{z}, zmm1 /// public static unsafe void Store(short* address, Vector512 source) { throw new PlatformNotSupportedException(); } /// /// void _mm512_storeu_si512 (__m512i * mem_addr, __m512i a) - /// VMOVDQU32 m512, zmm + /// VMOVDQU32 m512 {k1}{z}, zmm1 /// public static unsafe void Store(ushort* address, Vector512 source) { throw new PlatformNotSupportedException(); } /// - /// void _mm512_storeu_si512 (__m512i * mem_addr, __m512i a) - /// VMOVDQU32 m512, zmm + /// void _mm512_storeu_epi32 (__m512i * mem_addr, __m512i a) + /// VMOVDQU32 m512 {k1}{z}, zmm1 /// public static unsafe void Store(int* address, Vector512 source) { throw new PlatformNotSupportedException(); } /// - /// void _mm512_storeu_si512 (__m512i * mem_addr, __m512i a) - /// VMOVDQU32 m512, zmm + /// void _mm512_storeu_epi32 (__m512i * mem_addr, __m512i a) + /// VMOVDQU32 m512 {k1}{z}, zmm1 /// public static unsafe void Store(uint* address, Vector512 source) { throw new PlatformNotSupportedException(); } /// - /// void _mm512_storeu_si512 (__m512i * mem_addr, __m512i a) - /// VMOVDQU64 m512, zmm + /// void _mm512_storeu_epi64 (__m512i * mem_addr, __m512i a) + /// VMOVDQU64 m512 {k1}{z}, zmm1 /// public static unsafe void Store(long* address, Vector512 source) { throw new PlatformNotSupportedException(); } /// - /// void _mm512_storeu_si512 (__m512i * mem_addr, __m512i a) - /// VMOVDQU64 m512, zmm + /// void _mm512_storeu_epi64 (__m512i * mem_addr, __m512i a) + /// VMOVDQU64 m512 {k1}{z}, zmm1 /// public static unsafe void Store(ulong* address, Vector512 source) { throw new PlatformNotSupportedException(); } /// /// void _mm512_storeu_ps (float * mem_addr, __m512 a) - /// VMOVUPS m512, zmm + /// VMOVUPS m512 {k1}{z}, zmm1 /// public static unsafe void Store(float* address, Vector512 source) { throw new PlatformNotSupportedException(); } /// /// void _mm512_storeu_pd (double * mem_addr, __m512d a) - /// VMOVUPD m512, zmm + /// VMOVUPD m512 {k1}{z}, zmm1 /// public static unsafe void Store(double* address, Vector512 source) { throw new PlatformNotSupportedException(); } /// /// void _mm512_store_si512 (__m512i * mem_addr, __m512i a) - /// VMOVDQA32 m512, zmm + /// VMOVDQA32 m512 {k1}{z}, zmm1 /// - public static unsafe void StoreAligned(sbyte* address, Vector512 source) { throw new PlatformNotSupportedException(); } + public static unsafe void StoreAligned(byte* address, Vector512 source) { throw new PlatformNotSupportedException(); } /// /// void _mm512_store_si512 (__m512i * mem_addr, __m512i a) - /// VMOVDQA32 m512, zmm + /// VMOVDQA32 m512 {k1}{z}, zmm1 /// - public static unsafe void StoreAligned(byte* address, Vector512 source) { throw new PlatformNotSupportedException(); } + public static unsafe void StoreAligned(sbyte* address, Vector512 source) { throw new PlatformNotSupportedException(); } /// /// void _mm512_store_si512 (__m512i * mem_addr, __m512i a) - /// VMOVDQA32 m512, zmm + /// VMOVDQA32 m512 {k1}{z}, zmm1 /// public static unsafe void StoreAligned(short* address, Vector512 source) { throw new PlatformNotSupportedException(); } /// /// void _mm512_store_si512 (__m512i * mem_addr, __m512i a) - /// VMOVDQA32 m512, zmm + /// VMOVDQA32 m512 {k1}{z}, zmm1 /// public static unsafe void StoreAligned(ushort* address, Vector512 source) { throw new PlatformNotSupportedException(); } /// - /// void _mm512_store_si512 (__m512i * mem_addr, __m512i a) - /// VMOVDQA32 m512, zmm + /// void _mm512_store_epi32 (__m512i * mem_addr, __m512i a) + /// VMOVDQA32 m512 {k1}{z}, zmm1 /// public static unsafe void StoreAligned(int* address, Vector512 source) { throw new PlatformNotSupportedException(); } /// - /// void _mm512_store_si512 (__m512i * mem_addr, __m512i a) - /// VMOVDQA32 m512, zmm + /// void _mm512_store_epi32 (__m512i * mem_addr, __m512i a) + /// VMOVDQA32 m512 {k1}{z}, zmm1 /// public static unsafe void StoreAligned(uint* address, Vector512 source) { throw new PlatformNotSupportedException(); } /// - /// void _mm512_store_si512 (__m512i * mem_addr, __m512i a) - /// VMOVDQA64 m512, zmm + /// void _mm512_store_epi64 (__m512i * mem_addr, __m512i a) + /// VMOVDQA32 m512 {k1}{z}, zmm1 /// public static unsafe void StoreAligned(long* address, Vector512 source) { throw new PlatformNotSupportedException(); } /// - /// void _mm512_store_si512 (__m512i * mem_addr, __m512i a) - /// VMOVDQA64 m512, zmm + /// void _mm512_store_epi64 (__m512i * mem_addr, __m512i a) + /// VMOVDQA32 m512 {k1}{z}, zmm1 /// public static unsafe void StoreAligned(ulong* address, Vector512 source) { throw new PlatformNotSupportedException(); } /// /// void _mm512_store_ps (float * mem_addr, __m512 a) - /// VMOVAPS m512, zmm + /// VMOVAPS m512 {k1}{z}, zmm1 /// public static unsafe void StoreAligned(float* address, Vector512 source) { throw new PlatformNotSupportedException(); } /// /// void _mm512_store_pd (double * mem_addr, __m512d a) - /// VMOVAPD m512, zmm + /// VMOVAPD m512 {k1}{z}, zmm1 /// public static unsafe void StoreAligned(double* address, Vector512 source) { throw new PlatformNotSupportedException(); } /// /// void _mm512_stream_si512 (__m512i * mem_addr, __m512i a) - /// VMOVNTDQ m512, zmm + /// VMOVNTDQ m512, zmm1 /// public static unsafe void StoreAlignedNonTemporal(sbyte* address, Vector512 source) { throw new PlatformNotSupportedException(); } /// /// void _mm512_stream_si512 (__m512i * mem_addr, __m512i a) - /// VMOVNTDQ m512, zmm + /// VMOVNTDQ m512, zmm1 /// public static unsafe void StoreAlignedNonTemporal(byte* address, Vector512 source) { throw new PlatformNotSupportedException(); } /// /// void _mm512_stream_si512 (__m512i * mem_addr, __m512i a) - /// VMOVNTDQ m512, zmm + /// VMOVNTDQ m512, zmm1 /// public static unsafe void StoreAlignedNonTemporal(short* address, Vector512 source) { throw new PlatformNotSupportedException(); } /// /// void _mm512_stream_si512 (__m512i * mem_addr, __m512i a) - /// VMOVNTDQ m512, zmm + /// VMOVNTDQ m512, zmm1 /// public static unsafe void StoreAlignedNonTemporal(ushort* address, Vector512 source) { throw new PlatformNotSupportedException(); } /// /// void _mm512_stream_si512 (__m512i * mem_addr, __m512i a) - /// VMOVNTDQ m512, zmm + /// VMOVNTDQ m512, zmm1 /// public static unsafe void StoreAlignedNonTemporal(int* address, Vector512 source) { throw new PlatformNotSupportedException(); } /// /// void _mm512_stream_si512 (__m512i * mem_addr, __m512i a) - /// VMOVNTDQ m512, zmm + /// VMOVNTDQ m512, zmm1 /// public static unsafe void StoreAlignedNonTemporal(uint* address, Vector512 source) { throw new PlatformNotSupportedException(); } /// /// void _mm512_stream_si512 (__m512i * mem_addr, __m512i a) - /// VMOVNTDQ m512, zmm + /// VMOVNTDQ m512, zmm1 /// public static unsafe void StoreAlignedNonTemporal(long* address, Vector512 source) { throw new PlatformNotSupportedException(); } /// /// void _mm512_stream_si512 (__m512i * mem_addr, __m512i a) - /// VMOVNTDQ m512, zmm + /// VMOVNTDQ m512, zmm1 /// public static unsafe void StoreAlignedNonTemporal(ulong* address, Vector512 source) { throw new PlatformNotSupportedException(); } /// /// void _mm512_stream_ps (float * mem_addr, __m512 a) - /// MOVNTPS m512, zmm + /// VMOVNTPS m512, zmm1 /// public static unsafe void StoreAlignedNonTemporal(float* address, Vector512 source) { throw new PlatformNotSupportedException(); } /// /// void _mm512_stream_pd (double * mem_addr, __m512d a) - /// MOVNTPD m512, zmm + /// VMOVNTPD m512, zmm1 /// public static unsafe void StoreAlignedNonTemporal(double* address, Vector512 source) { throw new PlatformNotSupportedException(); } /// - /// __m512 _mm512_xor_ps (__m512 a, __m512 b) - /// VXORPS zmm, zmm, zmm/m512 + /// __m512i _mm512_sub_epi32 (__m512i a, __m512i b) + /// VPSUBD zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst /// - public static Vector512 Xor(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + public static Vector512 Subtract(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } /// - /// __m512d _mm512_xor_pd (__m512d a, __m512d b) - /// VXORPS zmm, zmm, zmm/m512 + /// __m512i _mm512_sub_epi32 (__m512i a, __m512i b) + /// VPSUBD zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst /// - public static Vector512 Xor(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + public static Vector512 Subtract(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } /// - /// __m512i _mm512_xor_si512 (__m512i a, __m512i b) - /// VPXOR zmm, zmm, zmm/m512 + /// __m512i _mm512_sub_epi64 (__m512i a, __m512i b) + /// VPSUBQ zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst /// - public static Vector512 Xor(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + public static Vector512 Subtract(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_sub_epi64 (__m512i a, __m512i b) + /// VPSUBQ zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst + /// + public static Vector512 Subtract(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + /// + /// __m512 _mm512_sub_ps (__m512 a, __m512 b) + /// VSUBPS zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst{er} + /// + public static Vector512 Subtract(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + /// + /// __m512d _mm512_sub_pd (__m512d a, __m512d b) + /// VSUBPD zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst{er} + /// + public static Vector512 Subtract(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + + /// + /// __m512i _mm512_unpackhi_epi32 (__m512i a, __m512i b) + /// VPUNPCKHDQ zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst + /// + public static Vector512 UnpackHigh(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_unpackhi_epi32 (__m512i a, __m512i b) + /// VPUNPCKHDQ zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst + /// + public static Vector512 UnpackHigh(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_unpackhi_epi64 (__m512i a, __m512i b) + /// VPUNPCKHQDQ zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst + /// + public static Vector512 UnpackHigh(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_unpackhi_epi64 (__m512i a, __m512i b) + /// VPUNPCKHQDQ zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst + /// + public static Vector512 UnpackHigh(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + /// + /// __m512 _mm512_unpackhi_ps (__m512 a, __m512 b) + /// VUNPCKHPS zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst + /// + public static Vector512 UnpackHigh(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + /// + /// __m512d _mm512_unpackhi_pd (__m512d a, __m512d b) + /// VUNPCKHPD zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst + /// + public static Vector512 UnpackHigh(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + + /// + /// __m512i _mm512_unpacklo_epi32 (__m512i a, __m512i b) + /// VPUNPCKLDQ zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst + /// + public static Vector512 UnpackLow(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_unpacklo_epi32 (__m512i a, __m512i b) + /// VPUNPCKLDQ zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst + /// + public static Vector512 UnpackLow(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_unpacklo_epi64 (__m512i a, __m512i b) + /// VPUNPCKLQDQ zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst + /// + public static Vector512 UnpackLow(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_unpacklo_epi64 (__m512i a, __m512i b) + /// VPUNPCKLQDQ zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst + /// + public static Vector512 UnpackLow(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + /// + /// __m512 _mm512_unpacklo_ps (__m512 a, __m512 b) + /// VUNPCKLPS zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst + /// + public static Vector512 UnpackLow(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + /// + /// __m512d _mm512_unpacklo_pd (__m512d a, __m512d b) + /// VUNPCKLPD zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst + /// + public static Vector512 UnpackLow(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + /// /// __m512i _mm512_xor_si512 (__m512i a, __m512i b) - /// VPXOR zmm, zmm, zmm/m512 + /// VPXORD zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst /// public static Vector512 Xor(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } /// /// __m512i _mm512_xor_si512 (__m512i a, __m512i b) - /// VPXOR zmm, zmm, zmm/m512 + /// VPXORD zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst + /// + public static Vector512 Xor(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } + /// + /// __m512i _mm512_xor_si512 (__m512i a, __m512i b) + /// VPXORD zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst /// public static Vector512 Xor(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } /// /// __m512i _mm512_xor_si512 (__m512i a, __m512i b) - /// VPXOR zmm, zmm, zmm/m512 + /// VPXORD zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst /// public static Vector512 Xor(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } /// - /// __m512i _mm512_xor_si512 (__m512i a, __m512i b) - /// VPXOR zmm, zmm, zmm/m512 + /// __m512i _mm512_xor_epi32 (__m512i a, __m512i b) + /// VPXORD zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst /// public static Vector512 Xor(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } /// - /// __m512i _mm512_xor_si512 (__m512i a, __m512i b) - /// VPXOR zmm, zmm, zmm/m512 + /// __m512i _mm512_xor_epi32 (__m512i a, __m512i b) + /// VPXORD zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst /// public static Vector512 Xor(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } /// - /// __m512i _mm512_xor_si512 (__m512i a, __m512i b) - /// VPXOR zmm, zmm, zmm/m512 + /// __m512i _mm512_xor_epi64 (__m512i a, __m512i b) + /// VPXORQ zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst /// public static Vector512 Xor(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } /// - /// __m512i _mm512_xor_si512 (__m512i a, __m512i b) - /// VPXOR zmm, zmm, zmm/m512 + /// __m512i _mm512_xor_epi64 (__m512i a, __m512i b) + /// VPXORQ zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst /// public static Vector512 Xor(Vector512 left, Vector512 right) { throw new PlatformNotSupportedException(); } } diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Avx512F.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Avx512F.cs index e8d64a3373aaa..3b787d30a8ea1 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Avx512F.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Avx512F.cs @@ -21,6 +21,81 @@ public abstract class VL internal VL() { } public static bool IsSupported { get => IsSupported; } + + /// + /// __m128i _mm_abs_epi64 (__m128i a) + /// VPABSQ xmm1 {k1}{z}, xmm2/m128/m64bcst + /// + public static Vector128 Abs(Vector128 value) => Abs(value); + /// + /// __m256i _mm256_abs_epi64 (__m128i a) + /// VPABSQ ymm1 {k1}{z}, ymm2/m256/m64bcst + /// + public static Vector256 Abs(Vector256 value) => Abs(value); + + /// + /// __m128i _mm_max_epi64 (__m128i a, __m128i b) + /// VPMAXSQ xmm1 {k1}{z}, xmm2, xmm3/m128/m64bcst + /// + public static Vector128 Max(Vector128 left, Vector128 right) => Max(left, right); + /// + /// __m128i _mm_max_epu64 (__m128i a, __m128i b) + /// VPMAXUQ xmm1 {k1}{z}, xmm2, xmm3/m128/m64bcst + /// + public static Vector128 Max(Vector128 left, Vector128 right) => Max(left, right); + /// + /// __m256i _mm256_max_epi64 (__m256i a, __m256i b) + /// VPMAXSQ ymm1 {k1}{z}, ymm2, ymm3/m256/m64bcst + /// + public static Vector256 Max(Vector256 left, Vector256 right) => Max(left, right); + /// + /// __m256i _mm256_max_epu64 (__m256i a, __m256i b) + /// VPMAXUQ ymm1 {k1}{z}, ymm2, ymm3/m256/m64bcst + /// + public static Vector256 Max(Vector256 left, Vector256 right) => Max(left, right); + + /// + /// __m128i _mm_min_epi64 (__m128i a, __m128i b) + /// VPMINSQ xmm1 {k1}{z}, xmm2, xmm3/m128/m64bcst + /// + public static Vector128 Min(Vector128 left, Vector128 right) => Min(left, right); + /// + /// __m128i _mm_min_epu64 (__m128i a, __m128i b) + /// VPMINUQ xmm1 {k1}{z}, xmm2, xmm3/m128/m64bcst + /// + public static Vector128 Min(Vector128 left, Vector128 right) => Min(left, right); + /// + /// __m256i _mm256_min_epi64 (__m256i a, __m256i b) + /// VPMINSQ ymm1 {k1}{z}, ymm2, ymm3/m256/m64bcst + /// + public static Vector256 Min(Vector256 left, Vector256 right) => Min(left, right); + /// + /// __m256i _mm256_min_epu64 (__m256i a, __m256i b) + /// VPMINUQ ymm1 {k1}{z}, ymm2, ymm3/m256/m64bcst + /// + public static Vector256 Min(Vector256 left, Vector256 right) => Min(left, right); + + /// + /// __m128i _mm_sra_epi64 (__m128i a, __m128i count) + /// VPSRAQ xmm1 {k1}{z}, xmm2, xmm3/m128 + /// + public static Vector128 ShiftRightArithmetic(Vector128 value, Vector128 count) => ShiftRightArithmetic(value, count); + /// + /// __m256i _mm256_sra_epi64 (__m256i a, __m128i count) + /// VPSRAQ ymm1 {k1}{z}, ymm2, xmm3/m128 + /// + public static Vector256 ShiftRightArithmetic(Vector256 value, Vector128 count) => ShiftRightArithmetic(value, count); + + /// + /// __128i _mm_srai_epi64 (__m128i a, int imm8) + /// VPSRAQ xmm1 {k1}{z}, xmm2, imm8 + /// + public static Vector128 ShiftRightArithmetic(Vector128 value, [ConstantExpected] byte count) => ShiftRightArithmetic(value, count); + /// + /// __m256i _mm256_srai_epi64 (__m256i a, int imm8) + /// VPSRAQ ymm1 {k1}{z}, ymm2, imm8 + /// + public static Vector256 ShiftRightArithmetic(Vector256 value, [ConstantExpected] byte count) => ShiftRightArithmetic(value, count); } [Intrinsic] @@ -32,461 +107,1001 @@ internal X64() { } } /// - /// __m512i _mm512_and_si512 (__m512i a, __m512i b) - /// VPAND zmm, zmm, zmm/m512 + /// __m512i _mm512_abs_epi32 (__m512i a) + /// VPABSD zmm1 {k1}{z}, zmm2/m512/m32bcst /// - public static Vector512 And(Vector512 left, Vector512 right) => And(left, right); + public static Vector512 Abs(Vector512 value) => Abs(value); + /// + /// __m512i _mm512_abs_epi64 (__m512i a) + /// VPABSQ zmm1 {k1}{z}, zmm2/m512/m64bcst + /// + public static Vector512 Abs(Vector512 value) => Abs(value); + + /// + /// __m512i _mm512_add_epi32 (__m512i a, __m512i b) + /// VPADDD zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst + /// + public static Vector512 Add(Vector512 left, Vector512 right) => Add(left, right); + /// + /// __m512i _mm512_add_epi32 (__m512i a, __m512i b) + /// VPADDD zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst + /// + public static Vector512 Add(Vector512 left, Vector512 right) => Add(left, right); + /// + /// __m512i _mm512_add_epi64 (__m512i a, __m512i b) + /// VPADDQ zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst + /// + public static Vector512 Add(Vector512 left, Vector512 right) => Add(left, right); + /// + /// __m512i _mm512_add_epi64 (__m512i a, __m512i b) + /// VPADDQ zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst + /// + public static Vector512 Add(Vector512 left, Vector512 right) => Add(left, right); + /// + /// __m512d _mm512_add_pd (__m512d a, __m512d b) + /// VADDPD zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst{er} + /// + public static Vector512 Add(Vector512 left, Vector512 right) => Add(left, right); + /// + /// __m512 _mm512_add_ps (__m512 a, __m512 b) + /// VADDPS zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst{er} + /// + public static Vector512 Add(Vector512 left, Vector512 right) => Add(left, right); + /// /// __m512i _mm512_and_si512 (__m512i a, __m512i b) - /// VPAND zmm, zmm, zmm/m512 + /// VPANDD zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst /// public static Vector512 And(Vector512 left, Vector512 right) => And(left, right); /// /// __m512i _mm512_and_si512 (__m512i a, __m512i b) - /// VPAND zmm, zmm, zmm/m512 + /// VPANDD zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst + /// + public static Vector512 And(Vector512 left, Vector512 right) => And(left, right); + /// + /// __m512i _mm512_and_si512 (__m512i a, __m512i b) + /// VPANDD zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst /// public static Vector512 And(Vector512 left, Vector512 right) => And(left, right); /// /// __m512i _mm512_and_si512 (__m512i a, __m512i b) - /// VPAND zmm, zmm, zmm/m512 + /// VPANDD zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst /// public static Vector512 And(Vector512 left, Vector512 right) => And(left, right); /// - /// __m512i _mm512_and_si512 (__m512i a, __m512i b) - /// VPAND zmm, zmm, zmm/m512 + /// __m512i _mm512_and_epi32 (__m512i a, __m512i b) + /// VPANDD zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst /// public static Vector512 And(Vector512 left, Vector512 right) => And(left, right); /// - /// __m512i _mm512_and_si512 (__m512i a, __m512i b) - /// VPAND zmm, zmm, zmm/m512 + /// __m512i _mm512_and_epi32 (__m512i a, __m512i b) + /// VPANDD zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst /// public static Vector512 And(Vector512 left, Vector512 right) => And(left, right); /// - /// __m512i _mm512_and_si512 (__m512i a, __m512i b) - /// VPAND zmm, zmm, zmm/m512 + /// __m512i _mm512_and_epi64 (__m512i a, __m512i b) + /// VPANDQ zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst /// public static Vector512 And(Vector512 left, Vector512 right) => And(left, right); /// - /// __m512i _mm512_and_si512 (__m512i a, __m512i b) - /// VPAND zmm, zmm, zmm/m512 + /// __m512i _mm512_and_epi64 (__m512i a, __m512i b) + /// VPANDQ zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst /// public static Vector512 And(Vector512 left, Vector512 right) => And(left, right); - /// - /// __m512 _mm512_and_ps (__m512 a, __m512 b) - /// VANDPS zmm, zmm, zmm/m512 - /// - public static Vector512 And(Vector512 left, Vector512 right) => And(left, right); - /// - /// __m512d _mm512_and_pd (__m512d a, __m512d b) - /// VANDPD zmm, zmm, zmm/m512 - /// - public static Vector512 And(Vector512 left, Vector512 right) => And(left, right); /// /// __m512i _mm512_andnot_si512 (__m512i a, __m512i b) - /// VPANDN zmm, zmm, zmm/m512 + /// VPANDND zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst /// - public static Vector512 AndNot(Vector512 left, Vector512 right) => AndNot(left, right); + public static Vector512 AndNot(Vector512 left, Vector512 right) => AndNot(left, right); /// /// __m512i _mm512_andnot_si512 (__m512i a, __m512i b) - /// VPANDN zmm, zmm, zmm/m512 + /// VPANDND zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst /// - public static Vector512 AndNot(Vector512 left, Vector512 right) => AndNot(left, right); + public static Vector512 AndNot(Vector512 left, Vector512 right) => AndNot(left, right); /// /// __m512i _mm512_andnot_si512 (__m512i a, __m512i b) - /// VPANDN zmm, zmm, zmm/m512 + /// VPANDND zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst /// public static Vector512 AndNot(Vector512 left, Vector512 right) => AndNot(left, right); /// /// __m512i _mm512_andnot_si512 (__m512i a, __m512i b) - /// VPANDN zmm, zmm, zmm/m512 + /// VPANDND zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst /// public static Vector512 AndNot(Vector512 left, Vector512 right) => AndNot(left, right); /// - /// __m512i _mm512_andnot_si512 (__m512i a, __m512i b) - /// VPANDN zmm, zmm, zmm/m512 + /// __m512i _mm512_andnot_epi32 (__m512i a, __m512i b) + /// VPANDND zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst /// public static Vector512 AndNot(Vector512 left, Vector512 right) => AndNot(left, right); /// - /// __m512i _mm512_andnot_si512 (__m512i a, __m512i b) - /// VPANDN zmm, zmm, zmm/m512 + /// __m512i _mm512_andnot_epi32 (__m512i a, __m512i b) + /// VPANDND zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst /// public static Vector512 AndNot(Vector512 left, Vector512 right) => AndNot(left, right); /// - /// __m512i _mm512_andnot_si512 (__m512i a, __m512i b) - /// VPANDN zmm, zmm, zmm/m512 + /// __m512i _mm512_andnot_epi64 (__m512i a, __m512i b) + /// VPANDNQ zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst /// public static Vector512 AndNot(Vector512 left, Vector512 right) => AndNot(left, right); /// - /// __m512i _mm512_andnot_si512 (__m512i a, __m512i b) - /// VPANDN zmm, zmm, zmm/m512 + /// __m512i _mm512_andnot_epi64 (__m512i a, __m512i b) + /// VPANDNQ zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst /// public static Vector512 AndNot(Vector512 left, Vector512 right) => AndNot(left, right); + + /// + /// __m256i _mm512_cvtpd_epi32 (__m512d a) + /// VCVTPD2DQ ymm1 {k1}{z}, zmm2/m512/m64bcst{er} + /// + public static Vector256 ConvertToVector256Int32(Vector512 value) => ConvertToVector256Int32(value); + /// + /// __m256 _mm512_cvtpd_ps (__m512d a) + /// VCVTPD2PS ymm1, zmm2/m512 + /// VCVTPD2PS ymm1 {k1}{z}, zmm2/m512/m64bcst{er} + /// + public static Vector256 ConvertToVector256Single(Vector512 value) => ConvertToVector256Single(value); + + /// + /// __m256i _mm512_cvttpd_epi32 (__m512d a) + /// VCVTTPD2DQ ymm1 {k1}{z}, zmm2/m512/m64bcst{sae} + /// + public static Vector256 ConvertToVector256Int32WithTruncation(Vector512 value) => ConvertToVector256Int32WithTruncation(value); + + /// + /// __m512d _mm512_cvtepi32_pd (__m256i a) + /// VCVTDQ2PD zmm1 {k1}{z}, ymm2/m256/m32bcst + /// + public static Vector512 ConvertToVector512Double(Vector256 value) => ConvertToVector512Double(value); + /// + /// __m512d _mm512_cvtps_pd (__m256 a) + /// VCVTPS2PD zmm1 {k1}{z}, ymm2/m256/m32bcst{sae} + /// + public static Vector512 ConvertToVector512Double(Vector256 value) => ConvertToVector512Double(value); + /// + /// __m512i _mm512_cvtepi8_epi32 (__m128i a) + /// VPMOVSXBD zmm1 {k1}{z}, xmm2/m128 + /// + public static Vector512 ConvertToVector512Int32(Vector128 value) => ConvertToVector512Int32(value); + /// + /// __m512i _mm512_cvtepu8_epi32 (__m128i a) + /// VPMOVZXBD zmm1 {k1}{z}, xmm2/m128 + /// + public static Vector512 ConvertToVector512Int32(Vector128 value) => ConvertToVector512Int32(value); + /// + /// __m512i _mm512_cvtepi16_epi32 (__m128i a) + /// VPMOVSXWD zmm1 {k1}{z}, ymm2/m256 + /// + public static Vector512 ConvertToVector512Int32(Vector256 value) => ConvertToVector512Int32(value); + /// + /// __m512i _mm512_cvtepu16_epi32 (__m128i a) + /// VPMOVZXWD zmm1 {k1}{z}, ymm2/m256 + /// + public static Vector512 ConvertToVector512Int32(Vector256 value) => ConvertToVector512Int32(value); + /// + /// __m512i _mm512_cvtps_epi32 (__m512 a) + /// VCVTPS2DQ zmm1 {k1}{z}, zmm2/m512/m32bcst{er} + /// + public static Vector512 ConvertToVector512Int32(Vector512 value) => ConvertToVector512Int32(value); + /// + /// __m512i _mm512_cvtepi8_epi64 (__m128i a) + /// VPMOVSXBQ zmm1 {k1}{z}, xmm2/m64 + /// + public static Vector512 ConvertToVector512Int64(Vector128 value) => ConvertToVector512Int64(value); + /// + /// __m512i _mm512_cvtepu8_epi64 (__m128i a) + /// VPMOVZXBQ zmm1 {k1}{z}, xmm2/m64 + /// + public static Vector512 ConvertToVector512Int64(Vector128 value) => ConvertToVector512Int64(value); + /// + /// __m512i _mm512_cvtepi16_epi64 (__m128i a) + /// VPMOVSXWQ zmm1 {k1}{z}, xmm2/m128 + /// + public static Vector512 ConvertToVector512Int64(Vector128 value) => ConvertToVector512Int64(value); + /// + /// __m512i _mm512_cvtepu16_epi64 (__m128i a) + /// VPMOVZXWQ zmm1 {k1}{z}, xmm2/m128 + /// + public static Vector512 ConvertToVector512Int64(Vector128 value) => ConvertToVector512Int64(value); + /// + /// __m512i _mm512_cvtepi32_epi64 (__m128i a) + /// VPMOVSXDQ zmm1 {k1}{z}, ymm2/m256 + /// + public static Vector512 ConvertToVector512Int64(Vector256 value) => ConvertToVector512Int64(value); + /// + /// __m512i _mm512_cvtepu32_epi64 (__m128i a) + /// VPMOVZXDQ zmm1 {k1}{z}, ymm2/m256 + /// + public static Vector512 ConvertToVector512Int64(Vector256 value) => ConvertToVector512Int64(value); + /// + /// __m512 _mm512_cvtepi32_ps (__m512i a) + /// VCVTDQ2PS zmm1 {k1}{z}, zmm2/m512/m32bcst{er} + /// + public static Vector512 ConvertToVector512Single(Vector512 value) => ConvertToVector512Single(value); + /// + /// __m512i _mm512_cvtepi8_epi32 (__m128i a) + /// VPMOVSXBD zmm1 {k1}{z}, xmm2/m128 + /// + public static Vector512 ConvertToVector512UInt32(Vector128 value) => ConvertToVector512UInt32(value); /// - /// __m512 _mm512_andnot_ps (__m512 a, __m512 b) - /// VANDNPS zmm, zmm, zmm/m512 + /// __m512i _mm512_cvtepu8_epi32 (__m128i a) + /// VPMOVZXBD zmm1 {k1}{z}, xmm2/m128 /// - public static Vector512 AndNot(Vector512 left, Vector512 right) => AndNot(left, right); + public static Vector512 ConvertToVector512UInt32(Vector128 value) => ConvertToVector512UInt32(value); /// - /// __m512d _mm512_andnot_pd (__m512d a, __m512d b) - /// VANDNPD zmm, zmm, zmm/m512 + /// __m512i _mm512_cvtepi16_epi32 (__m128i a) + /// VPMOVSXWD zmm1 {k1}{z}, ymm2/m256 /// - public static Vector512 AndNot(Vector512 left, Vector512 right) => AndNot(left, right); + public static Vector512 ConvertToVector512UInt32(Vector256 value) => ConvertToVector512UInt32(value); + /// + /// __m512i _mm512_cvtepu16_epi32 (__m128i a) + /// VPMOVZXWD zmm1 {k1}{z}, ymm2/m256 + /// + public static Vector512 ConvertToVector512UInt32(Vector256 value) => ConvertToVector512UInt32(value); + /// + /// __m512i _mm512_cvtepi8_epi64 (__m128i a) + /// VPMOVSXBQ zmm1 {k1}{z}, xmm2/m64 + /// + public static Vector512 ConvertToVector512UInt64(Vector128 value) => ConvertToVector512UInt64(value); + /// + /// __m512i _mm512_cvtepu8_epi64 (__m128i a) + /// VPMOVZXBQ zmm1 {k1}{z}, xmm2/m64 + /// + public static Vector512 ConvertToVector512UInt64(Vector128 value) => ConvertToVector512UInt64(value); + /// + /// __m512i _mm512_cvtepi16_epi64 (__m128i a) + /// VPMOVSXWQ zmm1 {k1}{z}, xmm2/m128 + /// + public static Vector512 ConvertToVector512UInt64(Vector128 value) => ConvertToVector512UInt64(value); + /// + /// __m512i _mm512_cvtepu16_epi64 (__m128i a) + /// VPMOVZXWQ zmm1 {k1}{z}, xmm2/m128 + /// + public static Vector512 ConvertToVector512UInt64(Vector128 value) => ConvertToVector512UInt64(value); + /// + /// __m512i _mm512_cvtepi32_epi64 (__m128i a) + /// VPMOVSXDQ zmm1 {k1}{z}, ymm2/m256 + /// + public static Vector512 ConvertToVector512UInt64(Vector256 value) => ConvertToVector512UInt64(value); + /// + /// __m512i _mm512_cvtepu32_epi64 (__m128i a) + /// VPMOVZXDQ zmm1 {k1}{z}, ymm2/m256 + /// + public static Vector512 ConvertToVector512UInt64(Vector256 value) => ConvertToVector512UInt64(value); + + /// + /// __m512i _mm512_cvttps_epi32 (__m512 a) + /// VCVTTPS2DQ zmm1 {k1}{z}, zmm2/m512/m32bcst{sae} + /// + public static Vector512 ConvertToVector512Int32WithTruncation(Vector512 value) => ConvertToVector512Int32WithTruncation(value); + + /// + /// __m512 _mm512_div_ps (__m512 a, __m512 b) + /// VDIVPS zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst{er} + /// + public static Vector512 Divide(Vector512 left, Vector512 right) => Divide(left, right); + /// + /// __m512d _mm512_div_pd (__m512d a, __m512d b) + /// VDIVPD zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst{er} + /// + public static Vector512 Divide(Vector512 left, Vector512 right) => Divide(left, right); + + /// + /// __m512 _mm512_moveldup_ps (__m512 a) + /// VMOVSLDUP zmm1 {k1}{z}, zmm2/m512 + /// + public static Vector512 DuplicateEvenIndexed(Vector512 value) => DuplicateEvenIndexed(value); + /// + /// __m512d _mm512_movedup_pd (__m512d a) + /// VMOVDDUP zmm1 {k1}{z}, zmm2/m512 + /// + public static Vector512 DuplicateEvenIndexed(Vector512 value) => DuplicateEvenIndexed(value); + /// + /// __m512 _mm512_movehdup_ps (__m512 a) + /// VMOVSHDUP zmm1 {k1}{z}, zmm2/m512 + /// + public static Vector512 DuplicateOddIndexed(Vector512 value) => DuplicateOddIndexed(value); + + /// + /// __m512i _mm512_load_si512 (__m512i const * mem_addr) + /// VMOVDQA32 zmm1 {k1}{z}, m512 + /// + public static unsafe Vector512 LoadAlignedVector512(byte* address) => LoadAlignedVector512(address); + /// + /// __m512i _mm512_load_si512 (__m512i const * mem_addr) + /// VMOVDQA32 zmm1 {k1}{z}, m512 + /// + public static unsafe Vector512 LoadAlignedVector512(sbyte* address) => LoadAlignedVector512(address); + /// + /// __m512i _mm512_load_si512 (__m512i const * mem_addr) + /// VMOVDQA32 zmm1 {k1}{z}, m512 + /// + public static unsafe Vector512 LoadAlignedVector512(short* address) => LoadAlignedVector512(address); + /// + /// __m512i _mm512_load_si512 (__m512i const * mem_addr) + /// VMOVDQA32 zmm1 {k1}{z}, m512 + /// + public static unsafe Vector512 LoadAlignedVector512(ushort* address) => LoadAlignedVector512(address); + /// + /// __m512i _mm512_load_epi32 (__m512i const * mem_addr) + /// VMOVDQA32 zmm1 {k1}{z}, m512 + /// + public static unsafe Vector512 LoadAlignedVector512(int* address) => LoadAlignedVector512(address); + /// + /// __m512i _mm512_load_epi32 (__m512i const * mem_addr) + /// VMOVDQA32 zmm1 {k1}{z}, m512 + /// + public static unsafe Vector512 LoadAlignedVector512(uint* address) => LoadAlignedVector512(address); + /// + /// __m512i _mm512_load_epi64 (__m512i const * mem_addr) + /// VMOVDQA64 zmm1 {k1}{z}, m512 + /// + public static unsafe Vector512 LoadAlignedVector512(long* address) => LoadAlignedVector512(address); + /// + /// __m512i _mm512_load_epi64 (__m512i const * mem_addr) + /// VMOVDQA64 zmm1 {k1}{z}, m512 + /// + public static unsafe Vector512 LoadAlignedVector512(ulong* address) => LoadAlignedVector512(address); + /// + /// __m512 _mm512_load_ps (float const * mem_addr) + /// VMOVAPS zmm1 {k1}{z}, m512 + /// + public static unsafe Vector512 LoadAlignedVector512(float* address) => LoadAlignedVector512(address); + /// + /// __m512d _mm512_load_pd (double const * mem_addr) + /// VMOVAPD zmm1 {k1}{z}, m512 + /// + public static unsafe Vector512 LoadAlignedVector512(double* address) => LoadAlignedVector512(address); + + /// + /// __m512i _mm512_stream_load_si512 (__m512i const* mem_addr) + /// VMOVNTDQA zmm1, m512 + /// + public static unsafe Vector512 LoadAlignedVector512NonTemporal(sbyte* address) => LoadAlignedVector512NonTemporal(address); + /// + /// __m512i _mm512_stream_load_si512 (__m512i const* mem_addr) + /// VMOVNTDQA zmm1, m512 + /// + public static unsafe Vector512 LoadAlignedVector512NonTemporal(byte* address) => LoadAlignedVector512NonTemporal(address); + /// + /// __m512i _mm512_stream_load_si512 (__m512i const* mem_addr) + /// VMOVNTDQA zmm1, m512 + /// + public static unsafe Vector512 LoadAlignedVector512NonTemporal(short* address) => LoadAlignedVector512NonTemporal(address); + /// + /// __m512i _mm512_stream_load_si512 (__m512i const* mem_addr) + /// VMOVNTDQA zmm1, m512 + /// + public static unsafe Vector512 LoadAlignedVector512NonTemporal(ushort* address) => LoadAlignedVector512NonTemporal(address); + /// + /// __m512i _mm512_stream_load_si512 (__m512i const* mem_addr) + /// VMOVNTDQA zmm1, m512 + /// + public static unsafe Vector512 LoadAlignedVector512NonTemporal(int* address) => LoadAlignedVector512NonTemporal(address); + /// + /// __m512i _mm512_stream_load_si512 (__m512i const* mem_addr) + /// VMOVNTDQA zmm1, m512 + /// + public static unsafe Vector512 LoadAlignedVector512NonTemporal(uint* address) => LoadAlignedVector512NonTemporal(address); + /// + /// __m512i _mm512_stream_load_si512 (__m512i const* mem_addr) + /// VMOVNTDQA zmm1, m512 + /// + public static unsafe Vector512 LoadAlignedVector512NonTemporal(long* address) => LoadAlignedVector512NonTemporal(address); + /// + /// __m512i _mm512_stream_load_si512 (__m512i const* mem_addr) + /// VMOVNTDQA zmm1, m512 + /// + public static unsafe Vector512 LoadAlignedVector512NonTemporal(ulong* address) => LoadAlignedVector512NonTemporal(address); /// /// __m512i _mm512_loadu_si512 (__m512i const * mem_addr) - /// VMOVDQU32 zmm, m512 + /// VMOVDQU32 zmm1 {k1}{z}, m512 /// public static unsafe Vector512 LoadVector512(sbyte* address) => LoadVector512(address); /// /// __m512i _mm512_loadu_si512 (__m512i const * mem_addr) - /// VMOVDQU32 zmm, m512 + /// VMOVDQU32 zmm1 {k1}{z}, m512 /// public static unsafe Vector512 LoadVector512(byte* address) => LoadVector512(address); /// /// __m512i _mm512_loadu_si512 (__m512i const * mem_addr) - /// VMOVDQU32 zmm, m512 + /// VMOVDQU32 zmm1 {k1}{z}, m512 /// public static unsafe Vector512 LoadVector512(short* address) => LoadVector512(address); /// /// __m512i _mm512_loadu_si512 (__m512i const * mem_addr) - /// VMOVDQU32 zmm, m512 + /// VMOVDQU32 zmm1 {k1}{z}, m512 /// public static unsafe Vector512 LoadVector512(ushort* address) => LoadVector512(address); /// - /// __m512i _mm512_loadu_si512 (__m512i const * mem_addr) - /// VMOVDQU32 zmm, m512 + /// __m512i _mm512_loadu_epi32 (__m512i const * mem_addr) + /// VMOVDQU32 zmm1 {k1}{z}, m512 /// public static unsafe Vector512 LoadVector512(int* address) => LoadVector512(address); /// - /// __m512i _mm512_loadu_si512 (__m512i const * mem_addr) - /// VMOVDQU32 zmm, m512 + /// __m512i _mm512_loadu_epi32 (__m512i const * mem_addr) + /// VMOVDQU32 zmm1 {k1}{z}, m512 /// public static unsafe Vector512 LoadVector512(uint* address) => LoadVector512(address); /// - /// __m512i _mm512_loadu_si512 (__m512i const * mem_addr) - /// VMOVDQU64 zmm, m512 + /// __m512i _mm512_loadu_epi64 (__m512i const * mem_addr) + /// VMOVDQU64 zmm1 {k1}{z}, m512 /// public static unsafe Vector512 LoadVector512(long* address) => LoadVector512(address); /// - /// __m512i _mm512_loadu_si512 (__m512i const * mem_addr) - /// VMOVDQU64 zmm, m512 + /// __m512i _mm512_loadu_epi64 (__m512i const * mem_addr) + /// VMOVDQU64 zmm1 {k1}{z}, m512 /// public static unsafe Vector512 LoadVector512(ulong* address) => LoadVector512(address); /// /// __m512 _mm512_loadu_ps (float const * mem_addr) - /// VMOVUPS zmm, zmm/m512 + /// VMOVUPS zmm1 {k1}{z}, m512 /// public static unsafe Vector512 LoadVector512(float* address) => LoadVector512(address); /// /// __m512d _mm512_loadu_pd (double const * mem_addr) - /// VMOVUPD zmm, zmm/m512 + /// VMOVUPD zmm1 {k1}{z}, m512 /// public static unsafe Vector512 LoadVector512(double* address) => LoadVector512(address); /// - /// __m512i _mm512_load_si512 (__m512i const * mem_addr) - /// VMOVDQA32 zmm, m512 + /// __m512i _mm512_max_epi32 (__m512i a, __m512i b) + /// VPMAXSD zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst /// - public static unsafe Vector512 LoadAlignedVector512(sbyte* address) => LoadAlignedVector512(address); + public static Vector512 Max(Vector512 left, Vector512 right) => Max(left, right); /// - /// __m512i _mm512_load_si512 (__m512i const * mem_addr) - /// VMOVDQA32 zmm, m512 + /// __m512i _mm512_max_epu32 (__m512i a, __m512i b) + /// VPMAXUD zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst /// - public static unsafe Vector512 LoadAlignedVector512(byte* address) => LoadAlignedVector512(address); + public static Vector512 Max(Vector512 left, Vector512 right) => Max(left, right); /// - /// __m512i _mm512_load_si512 (__m512i const * mem_addr) - /// VMOVDQA32 zmm, m512 + /// __m512i _mm512_max_epi64 (__m512i a, __m512i b) + /// VPMAXSQ zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst /// - public static unsafe Vector512 LoadAlignedVector512(short* address) => LoadAlignedVector512(address); + public static Vector512 Max(Vector512 left, Vector512 right) => Max(left, right); /// - /// __m512i _mm512_load_si512 (__m512i const * mem_addr) - /// VMOVDQA32 zmm, m512 + /// __m512i _mm512_max_epu64 (__m512i a, __m512i b) + /// VPMAXUQ zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst /// - public static unsafe Vector512 LoadAlignedVector512(ushort* address) => LoadAlignedVector512(address); + public static Vector512 Max(Vector512 left, Vector512 right) => Max(left, right); /// - /// __m512i _mm512_load_si512 (__m512i const * mem_addr) - /// VMOVDQA32 zmm, m512 + /// __m512 _mm512_max_ps (__m512 a, __m512 b) + /// VMAXPS zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst{sae} /// - public static unsafe Vector512 LoadAlignedVector512(int* address) => LoadAlignedVector512(address); + public static Vector512 Max(Vector512 left, Vector512 right) => Max(left, right); /// - /// __m512i _mm512_load_si512 (__m512i const * mem_addr) - /// VMOVDQA32 zmm, m512 + /// __m512d _mm512_max_pd (__m512d a, __m512d b) + /// VMAXPD zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst{sae} /// - public static unsafe Vector512 LoadAlignedVector512(uint* address) => LoadAlignedVector512(address); + public static Vector512 Max(Vector512 left, Vector512 right) => Max(left, right); + /// - /// __m512i _mm512_load_si512 (__m512i const * mem_addr) - /// VMOVDQA64 zmm, m512 + /// __m512i _mm512_min_epi32 (__m512i a, __m512i b) + /// VPMINSD zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst /// - public static unsafe Vector512 LoadAlignedVector512(long* address) => LoadAlignedVector512(address); + public static Vector512 Min(Vector512 left, Vector512 right) => Min(left, right); /// - /// __m512i _mm512_load_si512 (__m512i const * mem_addr) - /// VMOVDQA64 zmm, m512 + /// __m512i _mm512_min_epu32 (__m512i a, __m512i b) + /// VPMINUD zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst /// - public static unsafe Vector512 LoadAlignedVector512(ulong* address) => LoadAlignedVector512(address); + public static Vector512 Min(Vector512 left, Vector512 right) => Min(left, right); /// - /// __m512 _mm512_load_ps (float const * mem_addr) - /// VMOVAPS zmm, zmm/m512 + /// __m512i _mm512_min_epi64 (__m512i a, __m512i b) + /// VPMINSQ zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst /// - public static unsafe Vector512 LoadAlignedVector512(float* address) => LoadAlignedVector512(address); + public static Vector512 Min(Vector512 left, Vector512 right) => Min(left, right); /// - /// __m512d _mm512_load_pd (double const * mem_addr) - /// VMOVAPD zmm, zmm/m512 + /// __m512i _mm512_min_epu64 (__m512i a, __m512i b) + /// VPMINUQ zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst /// - public static unsafe Vector512 LoadAlignedVector512(double* address) => LoadAlignedVector512(address); + public static Vector512 Min(Vector512 left, Vector512 right) => Min(left, right); + /// + /// __m512 _mm512_min_ps (__m512 a, __m512 b) + /// VMINPS zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst{sae} + /// + public static Vector512 Min(Vector512 left, Vector512 right) => Min(left, right); + /// + /// __m512d _mm512_min_pd (__m512d a, __m512d b) + /// VMINPD zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst{sae} + /// + public static Vector512 Min(Vector512 left, Vector512 right) => Min(left, right); /// - /// __m512 _mm512_or_ps (__m512 a, __m512 b) - /// VORPS zmm, zmm, zmm/m512 + /// __m512i _mm512_mul_epi32 (__m512i a, __m512i b) + /// VPMULDQ zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst /// - public static Vector512 Or(Vector512 left, Vector512 right) => Or(left, right); + public static Vector512 Multiply(Vector512 left, Vector512 right) => Multiply(left, right); /// - /// __m512d _mm512_or_pd (__m512d a, __m512d b) - /// VORPD zmm, zmm, zmm/m512 + /// __m512i _mm512_mul_epu32 (__m512i a, __m512i b) + /// VPMULUDQ zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst /// - public static Vector512 Or(Vector512 left, Vector512 right) => Or(left, right); + public static Vector512 Multiply(Vector512 left, Vector512 right) => Multiply(left, right); /// - /// __m512i _mm512_or_si512 (__m512i a, __m512i b) - /// VPOR zmm, zmm, zmm/m512 + /// __m512 _mm512_mul_ps (__m512 a, __m512 b) + /// VMULPS zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst{er} /// - public static Vector512 Or(Vector512 left, Vector512 right) => Or(left, right); + public static Vector512 Multiply(Vector512 left, Vector512 right) => Multiply(left, right); + /// + /// __m512d _mm512_mul_pd (__m512d a, __m512d b) + /// VMULPD zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst{er} + /// + public static Vector512 Multiply(Vector512 left, Vector512 right) => Multiply(left, right); + + /// + /// __m512i _mm512_mullo_epi32 (__m512i a, __m512i b) + /// VPMULLD zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst + /// + public static Vector512 MultiplyLow(Vector512 left, Vector512 right) => MultiplyLow(left, right); + /// + /// __m512i _mm512_mullo_epi32 (__m512i a, __m512i b) + /// VPMULLD zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst + /// + public static Vector512 MultiplyLow(Vector512 left, Vector512 right) => MultiplyLow(left, right); + /// /// __m512i _mm512_or_si512 (__m512i a, __m512i b) - /// VPOR zmm, zmm, zmm/m512 + /// VPORD zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst /// public static Vector512 Or(Vector512 left, Vector512 right) => Or(left, right); /// /// __m512i _mm512_or_si512 (__m512i a, __m512i b) - /// VPOR zmm, zmm, zmm/m512 + /// VPORD zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst + /// + public static Vector512 Or(Vector512 left, Vector512 right) => Or(left, right); + /// + /// __m512i _mm512_or_si512 (__m512i a, __m512i b) + /// VPORD zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst /// public static Vector512 Or(Vector512 left, Vector512 right) => Or(left, right); /// /// __m512i _mm512_or_si512 (__m512i a, __m512i b) - /// VPOR zmm, zmm, zmm/m512 + /// VPORD zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst /// public static Vector512 Or(Vector512 left, Vector512 right) => Or(left, right); /// - /// __m512i _mm512_or_si512 (__m512i a, __m512i b) - /// VPOR zmm, zmm, zmm/m512 + /// __m512i _mm512_or_epi32 (__m512i a, __m512i b) + /// VPORD zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst /// public static Vector512 Or(Vector512 left, Vector512 right) => Or(left, right); /// - /// __m512i _mm512_or_si512 (__m512i a, __m512i b) - /// VPOR zmm, zmm, zmm/m512 + /// __m512i _mm512_or_epi32 (__m512i a, __m512i b) + /// VPORD zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst /// public static Vector512 Or(Vector512 left, Vector512 right) => Or(left, right); /// - /// __m512i _mm512_or_si512 (__m512i a, __m512i b) - /// VPOR zmm, zmm, zmm/m512 + /// __m512i _mm512_or_epi64 (__m512i a, __m512i b) + /// VPORQ zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst /// public static Vector512 Or(Vector512 left, Vector512 right) => Or(left, right); /// - /// __m512i _mm512_or_si512 (__m512i a, __m512i b) - /// VPOR zmm, zmm, zmm/m512 + /// __m512i _mm512_or_epi64 (__m512i a, __m512i b) + /// VPORQ zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst /// public static Vector512 Or(Vector512 left, Vector512 right) => Or(left, right); + /// + /// __m512i _mm512_sll_epi32 (__m512i a, __m128i count) + /// VPSLLD zmm1 {k1}{z}, zmm2, xmm3/m128 + /// + public static Vector512 ShiftLeftLogical(Vector512 value, Vector128 count) => ShiftLeftLogical(value, count); + /// + /// __m512i _mm512_sll_epi32 (__m512i a, __m128i count) + /// VPSLLD zmm1 {k1}{z}, zmm2, xmm3/m128 + /// + public static Vector512 ShiftLeftLogical(Vector512 value, Vector128 count) => ShiftLeftLogical(value, count); + /// + /// __m512i _mm512_sll_epi64 (__m512i a, __m128i count) + /// VPSLLQ zmm1 {k1}{z}, zmm2, xmm3/m128 + /// + public static Vector512 ShiftLeftLogical(Vector512 value, Vector128 count) => ShiftLeftLogical(value, count); + /// + /// __m512i _mm512_sll_epi64 (__m512i a, __m128i count) + /// VPSLLQ zmm1 {k1}{z}, zmm2, xmm3/m128 + /// + public static Vector512 ShiftLeftLogical(Vector512 value, Vector128 count) => ShiftLeftLogical(value, count); + + /// + /// __m512i _mm512_slli_epi32 (__m512i a, int imm8) + /// VPSLLD zmm1 {k1}{z}, zmm2, imm8 + /// + public static Vector512 ShiftLeftLogical(Vector512 value, [ConstantExpected] byte count) => ShiftLeftLogical(value, count); + /// + /// __m512i _mm512_slli_epi32 (__m512i a, int imm8) + /// VPSLLD zmm1 {k1}{z}, zmm2, imm8 + /// + public static Vector512 ShiftLeftLogical(Vector512 value, [ConstantExpected] byte count) => ShiftLeftLogical(value, count); + /// + /// __m512i _mm512_slli_epi64 (__m512i a, int imm8) + /// VPSLLQ zmm1 {k1}{z}, zmm2, imm8 + /// + public static Vector512 ShiftLeftLogical(Vector512 value, [ConstantExpected] byte count) => ShiftLeftLogical(value, count); + /// + /// __m512i _mm512_slli_epi64 (__m512i a, int imm8) + /// VPSLLQ zmm1 {k1}{z}, zmm2, imm8 + /// + public static Vector512 ShiftLeftLogical(Vector512 value, [ConstantExpected] byte count) => ShiftLeftLogical(value, count); + + /// + /// _mm512_sra_epi32 (__m512i a, __m128i count) + /// VPSRAD zmm1 {k1}{z}, zmm2, xmm3/m128 + /// + public static Vector512 ShiftRightArithmetic(Vector512 value, Vector128 count) => ShiftRightArithmetic(value, count); + /// + /// _mm512_sra_epi64 (__m512i a, __m128i count) + /// VPSRAQ zmm1 {k1}{z}, zmm2, xmm3/m128 + /// + public static Vector512 ShiftRightArithmetic(Vector512 value, Vector128 count) => ShiftRightArithmetic(value, count); + + /// + /// __m512i _mm512_srai_epi32 (__m512i a, int imm8) + /// VPSRAD zmm1 {k1}{z}, zmm2, imm8 + /// + public static Vector512 ShiftRightArithmetic(Vector512 value, [ConstantExpected] byte count) => ShiftRightArithmetic(value, count); + /// + /// __m512i _mm512_srai_epi64 (__m512i a, int imm8) + /// VPSRAQ zmm1 {k1}{z}, zmm2, imm8 + /// + public static Vector512 ShiftRightArithmetic(Vector512 value, [ConstantExpected] byte count) => ShiftRightArithmetic(value, count); + + /// + /// __m512i _mm512_srl_epi32 (__m512i a, __m128i count) + /// VPSRLD zmm1 {k1}{z}, zmm2, xmm3/m128 + /// + public static Vector512 ShiftRightLogical(Vector512 value, Vector128 count) => ShiftRightLogical(value, count); + /// + /// __m512i _mm512_srl_epi32 (__m512i a, __m128i count) + /// VPSRLD zmm1 {k1}{z}, zmm2, xmm3/m128 + /// + public static Vector512 ShiftRightLogical(Vector512 value, Vector128 count) => ShiftRightLogical(value, count); + /// + /// __m512i _mm512_srl_epi64 (__m512i a, __m128i count) + /// VPSRLQ zmm1 {k1}{z}, zmm2, xmm3/m128 + /// + public static Vector512 ShiftRightLogical(Vector512 value, Vector128 count) => ShiftRightLogical(value, count); + /// + /// __m512i _mm512_srl_epi64 (__m512i a, __m128i count) + /// VPSRLQ zmm1 {k1}{z}, zmm2, xmm3/m128 + /// + public static Vector512 ShiftRightLogical(Vector512 value, Vector128 count) => ShiftRightLogical(value, count); + + /// + /// __m512i _mm512_srli_epi32 (__m512i a, int imm8) + /// VPSRLD zmm1 {k1}{z}, zmm2, imm8 + /// + public static Vector512 ShiftRightLogical(Vector512 value, [ConstantExpected] byte count) => ShiftRightLogical(value, count); + /// + /// __m512i _mm512_srli_epi32 (__m512i a, int imm8) + /// VPSRLD zmm1 {k1}{z}, zmm2, imm8 + /// + public static Vector512 ShiftRightLogical(Vector512 value, [ConstantExpected] byte count) => ShiftRightLogical(value, count); + /// + /// __m512i _mm512_srli_epi64 (__m512i a, int imm8) + /// VPSRLQ zmm1 {k1}{z}, zmm2, imm8 + /// + public static Vector512 ShiftRightLogical(Vector512 value, [ConstantExpected] byte count) => ShiftRightLogical(value, count); + /// + /// __m512i _mm512_srli_epi64 (__m512i a, int imm8) + /// VPSRLQ zmm1 {k1}{z}, zmm2, imm8 + /// + public static Vector512 ShiftRightLogical(Vector512 value, [ConstantExpected] byte count) => ShiftRightLogical(value, count); + + /// + /// __m512i _mm512_shuffle_epi32 (__m512i a, const int imm8) + /// VPSHUFD zmm1 {k1}{z}, zmm2/m512/m32bcst, imm8 + /// + public static Vector512 Shuffle(Vector512 value, [ConstantExpected] byte control) => Shuffle(value, control); + /// + /// __m512i _mm512_shuffle_epi32 (__m512i a, const int imm8) + /// VPSHUFD zmm1 {k1}{z}, zmm2/m512/m32bcst, imm8 + /// + public static Vector512 Shuffle(Vector512 value, [ConstantExpected] byte control) => Shuffle(value, control); + /// + /// __m512 _mm512_shuffle_ps (__m512 a, __m512 b, const int imm8) + /// VSHUFPS zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst, imm8 + /// + public static Vector512 Shuffle(Vector512 value, Vector512 right, [ConstantExpected] byte control) => Shuffle(value, right, control); + /// + /// __m512d _mm512_shuffle_pd (__m512d a, __m512d b, const int imm8) + /// VSHUFPD zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst, imm8 + /// + public static Vector512 Shuffle(Vector512 value, Vector512 right, [ConstantExpected] byte control) => Shuffle(value, right, control); + + /// + /// __m512 _mm512_sqrt_ps (__m512 a) + /// VSQRTPS zmm1 {k1}{z}, zmm2/m512/m32bcst{er} + /// + public static Vector512 Sqrt(Vector512 value) => Sqrt(value); + /// + /// __m512d _mm512_sqrt_pd (__m512d a) + /// VSQRTPD zmm1 {k1}{z}, zmm2/m512/m64bcst{er} + /// + public static Vector512 Sqrt(Vector512 value) => Sqrt(value); + /// /// void _mm512_storeu_si512 (__m512i * mem_addr, __m512i a) - /// VMOVDQU32 m512, zmm + /// VMOVDQU32 m512 {k1}{z}, zmm1 /// public static unsafe void Store(sbyte* address, Vector512 source) => Store(address, source); /// /// void _mm512_storeu_si512 (__m512i * mem_addr, __m512i a) - /// VMOVDQU32 m512, zmm + /// VMOVDQU32 m512 {k1}{z}, zmm1 /// public static unsafe void Store(byte* address, Vector512 source) => Store(address, source); /// /// void _mm512_storeu_si512 (__m512i * mem_addr, __m512i a) - /// VMOVDQU32 m512, zmm + /// VMOVDQU32 m512 {k1}{z}, zmm1 /// public static unsafe void Store(short* address, Vector512 source) => Store(address, source); /// /// void _mm512_storeu_si512 (__m512i * mem_addr, __m512i a) - /// VMOVDQU32 m512, zmm + /// VMOVDQU32 m512 {k1}{z}, zmm1 /// public static unsafe void Store(ushort* address, Vector512 source) => Store(address, source); /// - /// void _mm512_storeu_si512 (__m512i * mem_addr, __m512i a) - /// VMOVDQU32 m512, zmm + /// void _mm512_storeu_epi32 (__m512i * mem_addr, __m512i a) + /// VMOVDQU32 m512 {k1}{z}, zmm1 /// public static unsafe void Store(int* address, Vector512 source) => Store(address, source); /// - /// void _mm512_storeu_si512 (__m512i * mem_addr, __m512i a) - /// VMOVDQU32 m512, zmm + /// void _mm512_storeu_epi32 (__m512i * mem_addr, __m512i a) + /// VMOVDQU32 m512 {k1}{z}, zmm1 /// public static unsafe void Store(uint* address, Vector512 source) => Store(address, source); /// - /// void _mm512_storeu_si512 (__m512i * mem_addr, __m512i a) - /// VMOVDQU64 m512, zmm + /// void _mm512_storeu_epi64 (__m512i * mem_addr, __m512i a) + /// VMOVDQU64 m512 {k1}{z}, zmm1 /// public static unsafe void Store(long* address, Vector512 source) => Store(address, source); /// - /// void _mm512_storeu_si512 (__m512i * mem_addr, __m512i a) - /// VMOVDQU64 m512, zmm + /// void _mm512_storeu_epi64 (__m512i * mem_addr, __m512i a) + /// VMOVDQU64 m512 {k1}{z}, zmm1 /// public static unsafe void Store(ulong* address, Vector512 source) => Store(address, source); /// /// void _mm512_storeu_ps (float * mem_addr, __m512 a) - /// VMOVUPS m512, zmm + /// VMOVUPS m512 {k1}{z}, zmm1 /// public static unsafe void Store(float* address, Vector512 source) => Store(address, source); /// /// void _mm512_storeu_pd (double * mem_addr, __m512d a) - /// VMOVUPD m512, zmm + /// VMOVUPD m512 {k1}{z}, zmm1 /// public static unsafe void Store(double* address, Vector512 source) => Store(address, source); /// /// void _mm512_store_si512 (__m512i * mem_addr, __m512i a) - /// VMOVDQA32 m512, zmm + /// VMOVDQA32 m512 {k1}{z}, zmm1 /// - public static unsafe void StoreAligned(sbyte* address, Vector512 source) => StoreAligned(address, source); + public static unsafe void StoreAligned(byte* address, Vector512 source) => StoreAligned(address, source); /// /// void _mm512_store_si512 (__m512i * mem_addr, __m512i a) - /// VMOVDQA32 m512, zmm + /// VMOVDQA32 m512 {k1}{z}, zmm1 /// - public static unsafe void StoreAligned(byte* address, Vector512 source) => StoreAligned(address, source); + public static unsafe void StoreAligned(sbyte* address, Vector512 source) => StoreAligned(address, source); /// /// void _mm512_store_si512 (__m512i * mem_addr, __m512i a) - /// VMOVDQA32 m512, zmm + /// VMOVDQA32 m512 {k1}{z}, zmm1 /// public static unsafe void StoreAligned(short* address, Vector512 source) => StoreAligned(address, source); /// /// void _mm512_store_si512 (__m512i * mem_addr, __m512i a) - /// VMOVDQA32 m512, zmm + /// VMOVDQA32 m512 {k1}{z}, zmm1 /// public static unsafe void StoreAligned(ushort* address, Vector512 source) => StoreAligned(address, source); /// - /// void _mm512_store_si512 (__m512i * mem_addr, __m512i a) - /// VMOVDQA32 m512, zmm + /// void _mm512_store_epi32 (__m512i * mem_addr, __m512i a) + /// VMOVDQA32 m512 {k1}{z}, zmm1 /// public static unsafe void StoreAligned(int* address, Vector512 source) => StoreAligned(address, source); /// - /// void _mm512_store_si512 (__m512i * mem_addr, __m512i a) - /// VMOVDQA32 m512, zmm + /// void _mm512_store_epi32 (__m512i * mem_addr, __m512i a) + /// VMOVDQA32 m512 {k1}{z}, zmm1 /// public static unsafe void StoreAligned(uint* address, Vector512 source) => StoreAligned(address, source); /// - /// void _mm512_store_si512 (__m512i * mem_addr, __m512i a) - /// VMOVDQA64 m512, zmm + /// void _mm512_store_epi64 (__m512i * mem_addr, __m512i a) + /// VMOVDQA32 m512 {k1}{z}, zmm1 /// public static unsafe void StoreAligned(long* address, Vector512 source) => StoreAligned(address, source); /// - /// void _mm512_store_si512 (__m512i * mem_addr, __m512i a) - /// VMOVDQA64 m512, zmm + /// void _mm512_store_epi64 (__m512i * mem_addr, __m512i a) + /// VMOVDQA32 m512 {k1}{z}, zmm1 /// public static unsafe void StoreAligned(ulong* address, Vector512 source) => StoreAligned(address, source); /// /// void _mm512_store_ps (float * mem_addr, __m512 a) - /// VMOVAPS m512, zmm + /// VMOVAPS m512 {k1}{z}, zmm1 /// public static unsafe void StoreAligned(float* address, Vector512 source) => StoreAligned(address, source); /// /// void _mm512_store_pd (double * mem_addr, __m512d a) - /// VMOVAPD m512, zmm + /// VMOVAPD m512 {k1}{z}, zmm1 /// public static unsafe void StoreAligned(double* address, Vector512 source) => StoreAligned(address, source); /// /// void _mm512_stream_si512 (__m512i * mem_addr, __m512i a) - /// VMOVNTDQ m512, zmm + /// VMOVNTDQ m512, zmm1 /// public static unsafe void StoreAlignedNonTemporal(sbyte* address, Vector512 source) => StoreAlignedNonTemporal(address, source); /// /// void _mm512_stream_si512 (__m512i * mem_addr, __m512i a) - /// VMOVNTDQ m512, zmm + /// VMOVNTDQ m512, zmm1 /// public static unsafe void StoreAlignedNonTemporal(byte* address, Vector512 source) => StoreAlignedNonTemporal(address, source); /// /// void _mm512_stream_si512 (__m512i * mem_addr, __m512i a) - /// VMOVNTDQ m512, zmm + /// VMOVNTDQ m512, zmm1 /// public static unsafe void StoreAlignedNonTemporal(short* address, Vector512 source) => StoreAlignedNonTemporal(address, source); /// /// void _mm512_stream_si512 (__m512i * mem_addr, __m512i a) - /// VMOVNTDQ m512, zmm + /// VMOVNTDQ m512, zmm1 /// public static unsafe void StoreAlignedNonTemporal(ushort* address, Vector512 source) => StoreAlignedNonTemporal(address, source); /// /// void _mm512_stream_si512 (__m512i * mem_addr, __m512i a) - /// VMOVNTDQ m512, zmm + /// VMOVNTDQ m512, zmm1 /// public static unsafe void StoreAlignedNonTemporal(int* address, Vector512 source) => StoreAlignedNonTemporal(address, source); /// /// void _mm512_stream_si512 (__m512i * mem_addr, __m512i a) - /// VMOVNTDQ m512, zmm + /// VMOVNTDQ m512, zmm1 /// public static unsafe void StoreAlignedNonTemporal(uint* address, Vector512 source) => StoreAlignedNonTemporal(address, source); /// /// void _mm512_stream_si512 (__m512i * mem_addr, __m512i a) - /// VMOVNTDQ m512, zmm + /// VMOVNTDQ m512, zmm1 /// public static unsafe void StoreAlignedNonTemporal(long* address, Vector512 source) => StoreAlignedNonTemporal(address, source); /// /// void _mm512_stream_si512 (__m512i * mem_addr, __m512i a) - /// VMOVNTDQ m512, zmm + /// VMOVNTDQ m512, zmm1 /// public static unsafe void StoreAlignedNonTemporal(ulong* address, Vector512 source) => StoreAlignedNonTemporal(address, source); /// /// void _mm512_stream_ps (float * mem_addr, __m512 a) - /// MOVNTPS m512, zmm + /// VMOVNTPS m512, zmm1 /// public static unsafe void StoreAlignedNonTemporal(float* address, Vector512 source) => StoreAlignedNonTemporal(address, source); /// /// void _mm512_stream_pd (double * mem_addr, __m512d a) - /// MOVNTPD m512, zmm + /// VMOVNTPD m512, zmm1 /// public static unsafe void StoreAlignedNonTemporal(double* address, Vector512 source) => StoreAlignedNonTemporal(address, source); /// - /// __m512 _mm512_xor_ps (__m512 a, __m512 b) - /// VXORPS zmm, zmm, zmm/m512 + /// __m512i _mm512_sub_epi32 (__m512i a, __m512i b) + /// VPSUBD zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst /// - public static Vector512 Xor(Vector512 left, Vector512 right) => Xor(left, right); + public static Vector512 Subtract(Vector512 left, Vector512 right) => Subtract(left, right); /// - /// __m512d _mm512_xor_pd (__m512d a, __m512d b) - /// VXORPS zmm, zmm, zmm/m512 + /// __m512i _mm512_sub_epi32 (__m512i a, __m512i b) + /// VPSUBD zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst /// - public static Vector512 Xor(Vector512 left, Vector512 right) => Xor(left, right); + public static Vector512 Subtract(Vector512 left, Vector512 right) => Subtract(left, right); /// - /// __m512i _mm512_xor_si512 (__m512i a, __m512i b) - /// VPXOR zmm, zmm, zmm/m512 + /// __m512i _mm512_sub_epi64 (__m512i a, __m512i b) + /// VPSUBQ zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst /// - public static Vector512 Xor(Vector512 left, Vector512 right) => Xor(left, right); + public static Vector512 Subtract(Vector512 left, Vector512 right) => Subtract(left, right); + /// + /// __m512i _mm512_sub_epi64 (__m512i a, __m512i b) + /// VPSUBQ zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst + /// + public static Vector512 Subtract(Vector512 left, Vector512 right) => Subtract(left, right); + /// + /// __m512 _mm512_sub_ps (__m512 a, __m512 b) + /// VSUBPS zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst{er} + /// + public static Vector512 Subtract(Vector512 left, Vector512 right) => Subtract(left, right); + /// + /// __m512d _mm512_sub_pd (__m512d a, __m512d b) + /// VSUBPD zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst{er} + /// + public static Vector512 Subtract(Vector512 left, Vector512 right) => Subtract(left, right); + + /// + /// __m512i _mm512_unpackhi_epi32 (__m512i a, __m512i b) + /// VPUNPCKHDQ zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst + /// + public static Vector512 UnpackHigh(Vector512 left, Vector512 right) => UnpackHigh(left, right); + /// + /// __m512i _mm512_unpackhi_epi32 (__m512i a, __m512i b) + /// VPUNPCKHDQ zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst + /// + public static Vector512 UnpackHigh(Vector512 left, Vector512 right) => UnpackHigh(left, right); + /// + /// __m512i _mm512_unpackhi_epi64 (__m512i a, __m512i b) + /// VPUNPCKHQDQ zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst + /// + public static Vector512 UnpackHigh(Vector512 left, Vector512 right) => UnpackHigh(left, right); + /// + /// __m512i _mm512_unpackhi_epi64 (__m512i a, __m512i b) + /// VPUNPCKHQDQ zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst + /// + public static Vector512 UnpackHigh(Vector512 left, Vector512 right) => UnpackHigh(left, right); + /// + /// __m512 _mm512_unpackhi_ps (__m512 a, __m512 b) + /// VUNPCKHPS zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst + /// + public static Vector512 UnpackHigh(Vector512 left, Vector512 right) => UnpackHigh(left, right); + /// + /// __m512d _mm512_unpackhi_pd (__m512d a, __m512d b) + /// VUNPCKHPD zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst + /// + public static Vector512 UnpackHigh(Vector512 left, Vector512 right) => UnpackHigh(left, right); + + /// + /// __m512i _mm512_unpacklo_epi32 (__m512i a, __m512i b) + /// VPUNPCKLDQ zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst + /// + public static Vector512 UnpackLow(Vector512 left, Vector512 right) => UnpackLow(left, right); + /// + /// __m512i _mm512_unpacklo_epi32 (__m512i a, __m512i b) + /// VPUNPCKLDQ zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst + /// + public static Vector512 UnpackLow(Vector512 left, Vector512 right) => UnpackLow(left, right); + /// + /// __m512i _mm512_unpacklo_epi64 (__m512i a, __m512i b) + /// VPUNPCKLQDQ zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst + /// + public static Vector512 UnpackLow(Vector512 left, Vector512 right) => UnpackLow(left, right); + /// + /// __m512i _mm512_unpacklo_epi64 (__m512i a, __m512i b) + /// VPUNPCKLQDQ zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst + /// + public static Vector512 UnpackLow(Vector512 left, Vector512 right) => UnpackLow(left, right); + /// + /// __m512 _mm512_unpacklo_ps (__m512 a, __m512 b) + /// VUNPCKLPS zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst + /// + public static Vector512 UnpackLow(Vector512 left, Vector512 right) => UnpackLow(left, right); + /// + /// __m512d _mm512_unpacklo_pd (__m512d a, __m512d b) + /// VUNPCKLPD zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst + /// + public static Vector512 UnpackLow(Vector512 left, Vector512 right) => UnpackLow(left, right); + /// /// __m512i _mm512_xor_si512 (__m512i a, __m512i b) - /// VPXOR zmm, zmm, zmm/m512 + /// VPXORD zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst /// public static Vector512 Xor(Vector512 left, Vector512 right) => Xor(left, right); /// /// __m512i _mm512_xor_si512 (__m512i a, __m512i b) - /// VPXOR zmm, zmm, zmm/m512 + /// VPXORD zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst + /// + public static Vector512 Xor(Vector512 left, Vector512 right) => Xor(left, right); + /// + /// __m512i _mm512_xor_si512 (__m512i a, __m512i b) + /// VPXORD zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst /// public static Vector512 Xor(Vector512 left, Vector512 right) => Xor(left, right); /// /// __m512i _mm512_xor_si512 (__m512i a, __m512i b) - /// VPXOR zmm, zmm, zmm/m512 + /// VPXORD zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst /// public static Vector512 Xor(Vector512 left, Vector512 right) => Xor(left, right); /// - /// __m512i _mm512_xor_si512 (__m512i a, __m512i b) - /// VPXOR zmm, zmm, zmm/m512 + /// __m512i _mm512_xor_epi32 (__m512i a, __m512i b) + /// VPXORD zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst /// public static Vector512 Xor(Vector512 left, Vector512 right) => Xor(left, right); /// - /// __m512i _mm512_xor_si512 (__m512i a, __m512i b) - /// VPXOR zmm, zmm, zmm/m512 + /// __m512i _mm512_xor_epi32 (__m512i a, __m512i b) + /// VPXORD zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst /// public static Vector512 Xor(Vector512 left, Vector512 right) => Xor(left, right); /// - /// __m512i _mm512_xor_si512 (__m512i a, __m512i b) - /// VPXOR zmm, zmm, zmm/m512 + /// __m512i _mm512_xor_epi64 (__m512i a, __m512i b) + /// VPXORQ zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst /// public static Vector512 Xor(Vector512 left, Vector512 right) => Xor(left, right); /// - /// __m512i _mm512_xor_si512 (__m512i a, __m512i b) - /// VPXOR zmm, zmm, zmm/m512 + /// __m512i _mm512_xor_epi64 (__m512i a, __m512i b) + /// VPXORQ zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst /// public static Vector512 Xor(Vector512 left, Vector512 right) => Xor(left, right); } 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 32d3dd7ea39e7..26affa796b3a1 100644 --- a/src/libraries/System.Runtime.Intrinsics/ref/System.Runtime.Intrinsics.cs +++ b/src/libraries/System.Runtime.Intrinsics/ref/System.Runtime.Intrinsics.cs @@ -4,6 +4,8 @@ // Changes to this file must follow the https://aka.ms/api-review process. // ------------------------------------------------------------------------------ +using System.Diagnostics.CodeAnalysis; + namespace System.Runtime.Intrinsics { public static partial class Vector128 @@ -2861,7 +2863,7 @@ public unsafe static void StoreSelectedScalar(ulong* address, System.Runtime.Int public static System.Runtime.Intrinsics.Vector64 VectorTableLookup((Vector128, Vector128, Vector128) table, Vector64 byteIndexes) { throw null; } public static System.Runtime.Intrinsics.Vector64 VectorTableLookup((Vector128, Vector128, Vector128) table, Vector64 byteIndexes) { throw null; } public static System.Runtime.Intrinsics.Vector64 VectorTableLookup((Vector128, Vector128, Vector128, Vector128) table, Vector64 byteIndexes) { throw null; } - public static System.Runtime.Intrinsics.Vector64 VectorTableLookup((Vector128, Vector128, Vector128, Vector128) table, Vector64 byteIndexes) { throw null; } + public static System.Runtime.Intrinsics.Vector64 VectorTableLookup((Vector128, Vector128, Vector128, Vector128) table, Vector64 byteIndexes) { throw null; } public static System.Runtime.Intrinsics.Vector64 VectorTableLookupExtension(System.Runtime.Intrinsics.Vector64 defaultValues, System.Runtime.Intrinsics.Vector128 table, System.Runtime.Intrinsics.Vector64 byteIndexes) { throw null; } public static System.Runtime.Intrinsics.Vector64 VectorTableLookupExtension(System.Runtime.Intrinsics.Vector64 defaultValues, System.Runtime.Intrinsics.Vector128 table, System.Runtime.Intrinsics.Vector64 byteIndexes) { throw null; } public static System.Runtime.Intrinsics.Vector64 VectorTableLookupExtension(System.Runtime.Intrinsics.Vector64 defaultValues, (Vector128, Vector128) table, Vector64 byteIndexes) { throw null; } @@ -3510,7 +3512,7 @@ public unsafe static void StorePairScalarNonTemporal(uint* address, System.Runti public static System.Runtime.Intrinsics.Vector128 VectorTableLookup((Vector128, Vector128, Vector128) table, Vector128 byteIndexes) { throw null; } public static System.Runtime.Intrinsics.Vector128 VectorTableLookup((Vector128, Vector128, Vector128) table, Vector128 byteIndexes) { throw null; } public static System.Runtime.Intrinsics.Vector128 VectorTableLookup((Vector128, Vector128, Vector128, Vector128) table, Vector128 byteIndexes) { throw null; } - public static System.Runtime.Intrinsics.Vector128 VectorTableLookup((Vector128, Vector128, Vector128, Vector128) table, Vector128 byteIndexes) { throw null; } + public static System.Runtime.Intrinsics.Vector128 VectorTableLookup((Vector128, Vector128, Vector128, Vector128) table, Vector128 byteIndexes) { throw null; } public static System.Runtime.Intrinsics.Vector128 VectorTableLookupExtension(System.Runtime.Intrinsics.Vector128 defaultValues, System.Runtime.Intrinsics.Vector128 table, System.Runtime.Intrinsics.Vector128 byteIndexes) { throw null; } public static System.Runtime.Intrinsics.Vector128 VectorTableLookupExtension(System.Runtime.Intrinsics.Vector128 defaultValues, System.Runtime.Intrinsics.Vector128 table, System.Runtime.Intrinsics.Vector128 byteIndexes) { throw null; } public static System.Runtime.Intrinsics.Vector128 VectorTableLookupExtension(Vector128 defaultValues, (Vector128, Vector128) table, Vector128 byteIndexes) { throw null; } @@ -4402,6 +4404,88 @@ public abstract partial class Avx512BW : System.Runtime.Intrinsics.X86.Avx512F { internal Avx512BW() { } public static new bool IsSupported { get { throw null; } } + public static System.Runtime.Intrinsics.Vector512 Abs(System.Runtime.Intrinsics.Vector512 value) { throw null; } + public static System.Runtime.Intrinsics.Vector512 Abs(System.Runtime.Intrinsics.Vector512 value) { throw null; } + public static System.Runtime.Intrinsics.Vector512 Add(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } + public static System.Runtime.Intrinsics.Vector512 Add(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } + public static System.Runtime.Intrinsics.Vector512 Add(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } + public static System.Runtime.Intrinsics.Vector512 Add(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } + public static System.Runtime.Intrinsics.Vector512 AddSaturate(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } + public static System.Runtime.Intrinsics.Vector512 AddSaturate(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } + public static System.Runtime.Intrinsics.Vector512 AddSaturate(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } + public static System.Runtime.Intrinsics.Vector512 AddSaturate(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } + public static System.Runtime.Intrinsics.Vector512 AlignRight(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right, [System.Diagnostics.CodeAnalysis.ConstantExpected] byte mask) { throw null; } + public static System.Runtime.Intrinsics.Vector512 AlignRight(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right, [System.Diagnostics.CodeAnalysis.ConstantExpected] byte mask) { throw null; } + public static System.Runtime.Intrinsics.Vector512 Average(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } + public static System.Runtime.Intrinsics.Vector512 Average(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } + public static System.Runtime.Intrinsics.Vector512 ConvertToVector512Int16(System.Runtime.Intrinsics.Vector256 value) { throw null; } + public static System.Runtime.Intrinsics.Vector512 ConvertToVector512Int16(System.Runtime.Intrinsics.Vector256 value) { throw null; } + public static System.Runtime.Intrinsics.Vector512 ConvertToVector512UInt16(System.Runtime.Intrinsics.Vector256 value) { throw null; } + public static System.Runtime.Intrinsics.Vector512 ConvertToVector512UInt16(System.Runtime.Intrinsics.Vector256 value) { throw null; } + public new unsafe static System.Runtime.Intrinsics.Vector512 LoadVector512(byte* address) { throw null; } + public new unsafe static System.Runtime.Intrinsics.Vector512 LoadVector512(short* address) { throw null; } + public new unsafe static System.Runtime.Intrinsics.Vector512 LoadVector512(sbyte* address) { throw null; } + public new unsafe static System.Runtime.Intrinsics.Vector512 LoadVector512(ushort* address) { throw null; } + public static System.Runtime.Intrinsics.Vector512 Max(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } + public static System.Runtime.Intrinsics.Vector512 Max(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } + public static System.Runtime.Intrinsics.Vector512 Max(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } + public static System.Runtime.Intrinsics.Vector512 Max(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } + public static System.Runtime.Intrinsics.Vector512 Min(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } + public static System.Runtime.Intrinsics.Vector512 Min(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } + public static System.Runtime.Intrinsics.Vector512 Min(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } + public static System.Runtime.Intrinsics.Vector512 Min(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } + public static System.Runtime.Intrinsics.Vector512 MultiplyAddAdjacent(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } + public static System.Runtime.Intrinsics.Vector512 MultiplyAddAdjacent(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } + public static System.Runtime.Intrinsics.Vector512 MultiplyHigh(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } + public static System.Runtime.Intrinsics.Vector512 MultiplyHigh(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } + public static System.Runtime.Intrinsics.Vector512 MultiplyHighRoundScale(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } + public static System.Runtime.Intrinsics.Vector512 MultiplyLow(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } + public static System.Runtime.Intrinsics.Vector512 MultiplyLow(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } + public static System.Runtime.Intrinsics.Vector512 PackSignedSaturate(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } + public static System.Runtime.Intrinsics.Vector512 PackSignedSaturate(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } + public static System.Runtime.Intrinsics.Vector512 PackUnsignedSaturate(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } + public static System.Runtime.Intrinsics.Vector512 PackUnsignedSaturate(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } + public static System.Runtime.Intrinsics.Vector512 ShiftLeftLogical(System.Runtime.Intrinsics.Vector512 value, [System.Diagnostics.CodeAnalysis.ConstantExpected] byte count) { throw null; } + public static System.Runtime.Intrinsics.Vector512 ShiftLeftLogical(System.Runtime.Intrinsics.Vector512 value, System.Runtime.Intrinsics.Vector128 count) { throw null; } + public static System.Runtime.Intrinsics.Vector512 ShiftLeftLogical(System.Runtime.Intrinsics.Vector512 value, [System.Diagnostics.CodeAnalysis.ConstantExpected] byte count) { throw null; } + public static System.Runtime.Intrinsics.Vector512 ShiftLeftLogical(System.Runtime.Intrinsics.Vector512 value, System.Runtime.Intrinsics.Vector128 count) { throw null; } + public static System.Runtime.Intrinsics.Vector512 ShiftLeftLogical128BitLane(System.Runtime.Intrinsics.Vector512 value, [System.Diagnostics.CodeAnalysis.ConstantExpected] byte numBytes) { throw null; } + public static System.Runtime.Intrinsics.Vector512 ShiftLeftLogical128BitLane(System.Runtime.Intrinsics.Vector512 value, [System.Diagnostics.CodeAnalysis.ConstantExpected] byte numBytes) { throw null; } + public static System.Runtime.Intrinsics.Vector512 ShiftRightArithmetic(System.Runtime.Intrinsics.Vector512 value, [System.Diagnostics.CodeAnalysis.ConstantExpected] byte count) { throw null; } + public static System.Runtime.Intrinsics.Vector512 ShiftRightArithmetic(System.Runtime.Intrinsics.Vector512 value, System.Runtime.Intrinsics.Vector128 count) { throw null; } + public static System.Runtime.Intrinsics.Vector512 ShiftRightLogical(System.Runtime.Intrinsics.Vector512 value, [System.Diagnostics.CodeAnalysis.ConstantExpected] byte count) { throw null; } + public static System.Runtime.Intrinsics.Vector512 ShiftRightLogical(System.Runtime.Intrinsics.Vector512 value, System.Runtime.Intrinsics.Vector128 count) { throw null; } + public static System.Runtime.Intrinsics.Vector512 ShiftRightLogical(System.Runtime.Intrinsics.Vector512 value, [System.Diagnostics.CodeAnalysis.ConstantExpected] byte count) { throw null; } + public static System.Runtime.Intrinsics.Vector512 ShiftRightLogical(System.Runtime.Intrinsics.Vector512 value, System.Runtime.Intrinsics.Vector128 count) { throw null; } + public static System.Runtime.Intrinsics.Vector512 ShiftRightLogical128BitLane(System.Runtime.Intrinsics.Vector512 value, [System.Diagnostics.CodeAnalysis.ConstantExpected] byte numBytes) { throw null; } + public static System.Runtime.Intrinsics.Vector512 ShiftRightLogical128BitLane(System.Runtime.Intrinsics.Vector512 value, [System.Diagnostics.CodeAnalysis.ConstantExpected] byte numBytes) { throw null; } + public static System.Runtime.Intrinsics.Vector512 Shuffle(System.Runtime.Intrinsics.Vector512 value, System.Runtime.Intrinsics.Vector512 mask) { throw null; } + public static System.Runtime.Intrinsics.Vector512 Shuffle(System.Runtime.Intrinsics.Vector512 value, System.Runtime.Intrinsics.Vector512 mask) { throw null; } + public static System.Runtime.Intrinsics.Vector512 ShuffleHigh(System.Runtime.Intrinsics.Vector512 value, [System.Diagnostics.CodeAnalysis.ConstantExpected] byte control) { throw null; } + public static System.Runtime.Intrinsics.Vector512 ShuffleHigh(System.Runtime.Intrinsics.Vector512 value, [System.Diagnostics.CodeAnalysis.ConstantExpected] byte control) { throw null; } + public static System.Runtime.Intrinsics.Vector512 ShuffleLow(System.Runtime.Intrinsics.Vector512 value, [System.Diagnostics.CodeAnalysis.ConstantExpected] byte control) { throw null; } + public static System.Runtime.Intrinsics.Vector512 ShuffleLow(System.Runtime.Intrinsics.Vector512 value, [System.Diagnostics.CodeAnalysis.ConstantExpected] byte control) { throw null; } + public new unsafe static void Store(byte* address, System.Runtime.Intrinsics.Vector512 source) { } + public new unsafe static void Store(short* address, System.Runtime.Intrinsics.Vector512 source) { } + public new unsafe static void Store(sbyte* address, System.Runtime.Intrinsics.Vector512 source) { } + public new unsafe static void Store(ushort* address, System.Runtime.Intrinsics.Vector512 source) { } + public static System.Runtime.Intrinsics.Vector512 Subtract(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } + public static System.Runtime.Intrinsics.Vector512 Subtract(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } + public static System.Runtime.Intrinsics.Vector512 Subtract(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } + public static System.Runtime.Intrinsics.Vector512 Subtract(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } + public static System.Runtime.Intrinsics.Vector512 SubtractSaturate(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } + public static System.Runtime.Intrinsics.Vector512 SubtractSaturate(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } + public static System.Runtime.Intrinsics.Vector512 SubtractSaturate(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } + public static System.Runtime.Intrinsics.Vector512 SubtractSaturate(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } + public static System.Runtime.Intrinsics.Vector512 SumAbsoluteDifferences(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } + public static System.Runtime.Intrinsics.Vector512 UnpackHigh(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } + public static System.Runtime.Intrinsics.Vector512 UnpackHigh(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } + public static System.Runtime.Intrinsics.Vector512 UnpackHigh(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } + public static System.Runtime.Intrinsics.Vector512 UnpackHigh(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } + public static System.Runtime.Intrinsics.Vector512 UnpackLow(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } + public static System.Runtime.Intrinsics.Vector512 UnpackLow(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } + public static System.Runtime.Intrinsics.Vector512 UnpackLow(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } + public static System.Runtime.Intrinsics.Vector512 UnpackLow(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } public new abstract partial class VL : System.Runtime.Intrinsics.X86.Avx512F.VL { internal VL() { } @@ -4434,10 +4518,24 @@ public abstract partial class Avx512DQ : System.Runtime.Intrinsics.X86.Avx512F { internal Avx512DQ() { } public static new bool IsSupported { get { throw null; } } + public static System.Runtime.Intrinsics.Vector512 And(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } + public static System.Runtime.Intrinsics.Vector512 And(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } + public static System.Runtime.Intrinsics.Vector512 AndNot(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } + public static System.Runtime.Intrinsics.Vector512 AndNot(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } + public static System.Runtime.Intrinsics.Vector512 MultiplyLow(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } + public static System.Runtime.Intrinsics.Vector512 MultiplyLow(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } + public static System.Runtime.Intrinsics.Vector512 Or(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } + public static System.Runtime.Intrinsics.Vector512 Or(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } + public static System.Runtime.Intrinsics.Vector512 Xor(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } + public static System.Runtime.Intrinsics.Vector512 Xor(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } public new abstract partial class VL : System.Runtime.Intrinsics.X86.Avx512F.VL { internal VL() { } public static new bool IsSupported { get { throw null; } } + public static System.Runtime.Intrinsics.Vector128 MultiplyLow(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) { throw null; } + public static System.Runtime.Intrinsics.Vector128 MultiplyLow(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) { throw null; } + public static System.Runtime.Intrinsics.Vector256 MultiplyLow(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) { throw null; } + public static System.Runtime.Intrinsics.Vector256 MultiplyLow(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) { throw null; } } public new abstract partial class X64 : System.Runtime.Intrinsics.X86.Avx512F.X64 { @@ -4450,26 +4548,63 @@ public abstract partial class Avx512F : System.Runtime.Intrinsics.X86.Avx2 { internal Avx512F() { } public static new bool IsSupported { get { throw null; } } + public static System.Runtime.Intrinsics.Vector512 Abs(System.Runtime.Intrinsics.Vector512 value) { throw null; } + public static System.Runtime.Intrinsics.Vector512 Abs(System.Runtime.Intrinsics.Vector512 value) { throw null; } + public static System.Runtime.Intrinsics.Vector512 Add(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } + public static System.Runtime.Intrinsics.Vector512 Add(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } + public static System.Runtime.Intrinsics.Vector512 Add(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } + public static System.Runtime.Intrinsics.Vector512 Add(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } + public static System.Runtime.Intrinsics.Vector512 Add(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } + public static System.Runtime.Intrinsics.Vector512 Add(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } public static System.Runtime.Intrinsics.Vector512 And(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } - public static System.Runtime.Intrinsics.Vector512 And(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } public static System.Runtime.Intrinsics.Vector512 And(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } public static System.Runtime.Intrinsics.Vector512 And(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } public static System.Runtime.Intrinsics.Vector512 And(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } public static System.Runtime.Intrinsics.Vector512 And(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } - public static System.Runtime.Intrinsics.Vector512 And(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } public static System.Runtime.Intrinsics.Vector512 And(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } public static System.Runtime.Intrinsics.Vector512 And(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } public static System.Runtime.Intrinsics.Vector512 And(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } public static System.Runtime.Intrinsics.Vector512 AndNot(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } - public static System.Runtime.Intrinsics.Vector512 AndNot(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } public static System.Runtime.Intrinsics.Vector512 AndNot(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } public static System.Runtime.Intrinsics.Vector512 AndNot(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } public static System.Runtime.Intrinsics.Vector512 AndNot(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } public static System.Runtime.Intrinsics.Vector512 AndNot(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } - public static System.Runtime.Intrinsics.Vector512 AndNot(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } public static System.Runtime.Intrinsics.Vector512 AndNot(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } public static System.Runtime.Intrinsics.Vector512 AndNot(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } public static System.Runtime.Intrinsics.Vector512 AndNot(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } + public static System.Runtime.Intrinsics.Vector256 ConvertToVector256Int32(System.Runtime.Intrinsics.Vector512 value) { throw null; } + public static System.Runtime.Intrinsics.Vector256 ConvertToVector256Int32WithTruncation(System.Runtime.Intrinsics.Vector512 value) { throw null; } + public static System.Runtime.Intrinsics.Vector256 ConvertToVector256Single(System.Runtime.Intrinsics.Vector512 value) { throw null; } + public static System.Runtime.Intrinsics.Vector512 ConvertToVector512Double(System.Runtime.Intrinsics.Vector256 value) { throw null; } + public static System.Runtime.Intrinsics.Vector512 ConvertToVector512Double(System.Runtime.Intrinsics.Vector256 value) { throw null; } + public static System.Runtime.Intrinsics.Vector512 ConvertToVector512Int32(System.Runtime.Intrinsics.Vector128 value) { throw null; } + public static System.Runtime.Intrinsics.Vector512 ConvertToVector512Int32(System.Runtime.Intrinsics.Vector256 value) { throw null; } + public static System.Runtime.Intrinsics.Vector512 ConvertToVector512Int32(System.Runtime.Intrinsics.Vector128 value) { throw null; } + public static System.Runtime.Intrinsics.Vector512 ConvertToVector512Int32(System.Runtime.Intrinsics.Vector512 value) { throw null; } + public static System.Runtime.Intrinsics.Vector512 ConvertToVector512Int32(System.Runtime.Intrinsics.Vector256 value) { throw null; } + public static System.Runtime.Intrinsics.Vector512 ConvertToVector512Int32WithTruncation(System.Runtime.Intrinsics.Vector512 value) { throw null; } + public static System.Runtime.Intrinsics.Vector512 ConvertToVector512Int64(System.Runtime.Intrinsics.Vector128 value) { throw null; } + public static System.Runtime.Intrinsics.Vector512 ConvertToVector512Int64(System.Runtime.Intrinsics.Vector128 value) { throw null; } + public static System.Runtime.Intrinsics.Vector512 ConvertToVector512Int64(System.Runtime.Intrinsics.Vector256 value) { throw null; } + public static System.Runtime.Intrinsics.Vector512 ConvertToVector512Int64(System.Runtime.Intrinsics.Vector128 value) { throw null; } + public static System.Runtime.Intrinsics.Vector512 ConvertToVector512Int64(System.Runtime.Intrinsics.Vector128 value) { throw null; } + public static System.Runtime.Intrinsics.Vector512 ConvertToVector512Int64(System.Runtime.Intrinsics.Vector256 value) { throw null; } + public static System.Runtime.Intrinsics.Vector512 ConvertToVector512Single(System.Runtime.Intrinsics.Vector512 value) { throw null; } + public static System.Runtime.Intrinsics.Vector512 ConvertToVector512UInt32(System.Runtime.Intrinsics.Vector128 value) { throw null; } + public static System.Runtime.Intrinsics.Vector512 ConvertToVector512UInt32(System.Runtime.Intrinsics.Vector256 value) { throw null; } + public static System.Runtime.Intrinsics.Vector512 ConvertToVector512UInt32(System.Runtime.Intrinsics.Vector128 value) { throw null; } + public static System.Runtime.Intrinsics.Vector512 ConvertToVector512UInt32(System.Runtime.Intrinsics.Vector256 value) { throw null; } + public static System.Runtime.Intrinsics.Vector512 ConvertToVector512UInt64(System.Runtime.Intrinsics.Vector128 value) { throw null; } + public static System.Runtime.Intrinsics.Vector512 ConvertToVector512UInt64(System.Runtime.Intrinsics.Vector128 value) { throw null; } + public static System.Runtime.Intrinsics.Vector512 ConvertToVector512UInt64(System.Runtime.Intrinsics.Vector256 value) { throw null; } + public static System.Runtime.Intrinsics.Vector512 ConvertToVector512UInt64(System.Runtime.Intrinsics.Vector128 value) { throw null; } + public static System.Runtime.Intrinsics.Vector512 ConvertToVector512UInt64(System.Runtime.Intrinsics.Vector128 value) { throw null; } + public static System.Runtime.Intrinsics.Vector512 ConvertToVector512UInt64(System.Runtime.Intrinsics.Vector256 value) { throw null; } + public static System.Runtime.Intrinsics.Vector512 Divide(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } + public static System.Runtime.Intrinsics.Vector512 Divide(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } + public static System.Runtime.Intrinsics.Vector512 DuplicateEvenIndexed(System.Runtime.Intrinsics.Vector512 value) { throw null; } + public static System.Runtime.Intrinsics.Vector512 DuplicateEvenIndexed(System.Runtime.Intrinsics.Vector512 value) { throw null; } + public static System.Runtime.Intrinsics.Vector512 DuplicateOddIndexed(System.Runtime.Intrinsics.Vector512 value) { throw null; } public unsafe static System.Runtime.Intrinsics.Vector512 LoadAlignedVector512(byte* address) { throw null; } public unsafe static System.Runtime.Intrinsics.Vector512 LoadAlignedVector512(double* address) { throw null; } public unsafe static System.Runtime.Intrinsics.Vector512 LoadAlignedVector512(short* address) { throw null; } @@ -4480,6 +4615,14 @@ internal Avx512F() { } public unsafe static System.Runtime.Intrinsics.Vector512 LoadAlignedVector512(ushort* address) { throw null; } public unsafe static System.Runtime.Intrinsics.Vector512 LoadAlignedVector512(uint* address) { throw null; } public unsafe static System.Runtime.Intrinsics.Vector512 LoadAlignedVector512(ulong* address) { throw null; } + public static unsafe System.Runtime.Intrinsics.Vector512 LoadAlignedVector512NonTemporal(byte* address) { throw null; } + public static unsafe System.Runtime.Intrinsics.Vector512 LoadAlignedVector512NonTemporal(short* address) { throw null; } + public static unsafe System.Runtime.Intrinsics.Vector512 LoadAlignedVector512NonTemporal(int* address) { throw null; } + public static unsafe System.Runtime.Intrinsics.Vector512 LoadAlignedVector512NonTemporal(long* address) { throw null; } + public static unsafe System.Runtime.Intrinsics.Vector512 LoadAlignedVector512NonTemporal(sbyte* address) { throw null; } + public static unsafe System.Runtime.Intrinsics.Vector512 LoadAlignedVector512NonTemporal(ushort* address) { throw null; } + public static unsafe System.Runtime.Intrinsics.Vector512 LoadAlignedVector512NonTemporal(uint* address) { throw null; } + public static unsafe System.Runtime.Intrinsics.Vector512 LoadAlignedVector512NonTemporal(ulong* address) { throw null; } public unsafe static System.Runtime.Intrinsics.Vector512 LoadVector512(byte* address) { throw null; } public unsafe static System.Runtime.Intrinsics.Vector512 LoadVector512(double* address) { throw null; } public unsafe static System.Runtime.Intrinsics.Vector512 LoadVector512(short* address) { throw null; } @@ -4490,16 +4633,58 @@ internal Avx512F() { } public unsafe static System.Runtime.Intrinsics.Vector512 LoadVector512(ushort* address) { throw null; } public unsafe static System.Runtime.Intrinsics.Vector512 LoadVector512(uint* address) { throw null; } public unsafe static System.Runtime.Intrinsics.Vector512 LoadVector512(ulong* address) { throw null; } + public static System.Runtime.Intrinsics.Vector512 Max(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } + public static System.Runtime.Intrinsics.Vector512 Max(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } + public static System.Runtime.Intrinsics.Vector512 Max(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } + public static System.Runtime.Intrinsics.Vector512 Max(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } + public static System.Runtime.Intrinsics.Vector512 Max(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } + public static System.Runtime.Intrinsics.Vector512 Max(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } + public static System.Runtime.Intrinsics.Vector512 Min(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } + public static System.Runtime.Intrinsics.Vector512 Min(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } + public static System.Runtime.Intrinsics.Vector512 Min(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } + public static System.Runtime.Intrinsics.Vector512 Min(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } + public static System.Runtime.Intrinsics.Vector512 Min(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } + public static System.Runtime.Intrinsics.Vector512 Min(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } + public static System.Runtime.Intrinsics.Vector512 Multiply(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } + public static System.Runtime.Intrinsics.Vector512 Multiply(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } + public static System.Runtime.Intrinsics.Vector512 Multiply(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } + public static System.Runtime.Intrinsics.Vector512 Multiply(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } + public static System.Runtime.Intrinsics.Vector512 MultiplyLow(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } + public static System.Runtime.Intrinsics.Vector512 MultiplyLow(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } public static System.Runtime.Intrinsics.Vector512 Or(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } - public static System.Runtime.Intrinsics.Vector512 Or(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } public static System.Runtime.Intrinsics.Vector512 Or(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } public static System.Runtime.Intrinsics.Vector512 Or(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } public static System.Runtime.Intrinsics.Vector512 Or(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } public static System.Runtime.Intrinsics.Vector512 Or(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } - public static System.Runtime.Intrinsics.Vector512 Or(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } public static System.Runtime.Intrinsics.Vector512 Or(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } public static System.Runtime.Intrinsics.Vector512 Or(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } public static System.Runtime.Intrinsics.Vector512 Or(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } + public static System.Runtime.Intrinsics.Vector512 ShiftLeftLogical(System.Runtime.Intrinsics.Vector512 value, [System.Diagnostics.CodeAnalysis.ConstantExpected] byte count) { throw null; } + public static System.Runtime.Intrinsics.Vector512 ShiftLeftLogical(System.Runtime.Intrinsics.Vector512 value, System.Runtime.Intrinsics.Vector128 count) { throw null; } + public static System.Runtime.Intrinsics.Vector512 ShiftLeftLogical(System.Runtime.Intrinsics.Vector512 value, [System.Diagnostics.CodeAnalysis.ConstantExpected] byte count) { throw null; } + public static System.Runtime.Intrinsics.Vector512 ShiftLeftLogical(System.Runtime.Intrinsics.Vector512 value, System.Runtime.Intrinsics.Vector128 count) { throw null; } + public static System.Runtime.Intrinsics.Vector512 ShiftLeftLogical(System.Runtime.Intrinsics.Vector512 value, [System.Diagnostics.CodeAnalysis.ConstantExpected] byte count) { throw null; } + public static System.Runtime.Intrinsics.Vector512 ShiftLeftLogical(System.Runtime.Intrinsics.Vector512 value, System.Runtime.Intrinsics.Vector128 count) { throw null; } + public static System.Runtime.Intrinsics.Vector512 ShiftLeftLogical(System.Runtime.Intrinsics.Vector512 value, [System.Diagnostics.CodeAnalysis.ConstantExpected] byte count) { throw null; } + public static System.Runtime.Intrinsics.Vector512 ShiftLeftLogical(System.Runtime.Intrinsics.Vector512 value, System.Runtime.Intrinsics.Vector128 count) { throw null; } + public static System.Runtime.Intrinsics.Vector512 ShiftRightArithmetic(System.Runtime.Intrinsics.Vector512 value, [System.Diagnostics.CodeAnalysis.ConstantExpected] byte count) { throw null; } + public static System.Runtime.Intrinsics.Vector512 ShiftRightArithmetic(System.Runtime.Intrinsics.Vector512 value, System.Runtime.Intrinsics.Vector128 count) { throw null; } + public static System.Runtime.Intrinsics.Vector512 ShiftRightArithmetic(System.Runtime.Intrinsics.Vector512 value, [System.Diagnostics.CodeAnalysis.ConstantExpected] byte count) { throw null; } + public static System.Runtime.Intrinsics.Vector512 ShiftRightArithmetic(System.Runtime.Intrinsics.Vector512 value, System.Runtime.Intrinsics.Vector128 count) { throw null; } + public static System.Runtime.Intrinsics.Vector512 ShiftRightLogical(System.Runtime.Intrinsics.Vector512 value, [System.Diagnostics.CodeAnalysis.ConstantExpected] byte count) { throw null; } + public static System.Runtime.Intrinsics.Vector512 ShiftRightLogical(System.Runtime.Intrinsics.Vector512 value, System.Runtime.Intrinsics.Vector128 count) { throw null; } + public static System.Runtime.Intrinsics.Vector512 ShiftRightLogical(System.Runtime.Intrinsics.Vector512 value, [System.Diagnostics.CodeAnalysis.ConstantExpected] byte count) { throw null; } + public static System.Runtime.Intrinsics.Vector512 ShiftRightLogical(System.Runtime.Intrinsics.Vector512 value, System.Runtime.Intrinsics.Vector128 count) { throw null; } + public static System.Runtime.Intrinsics.Vector512 ShiftRightLogical(System.Runtime.Intrinsics.Vector512 value, [System.Diagnostics.CodeAnalysis.ConstantExpected] byte count) { throw null; } + public static System.Runtime.Intrinsics.Vector512 ShiftRightLogical(System.Runtime.Intrinsics.Vector512 value, System.Runtime.Intrinsics.Vector128 count) { throw null; } + public static System.Runtime.Intrinsics.Vector512 ShiftRightLogical(System.Runtime.Intrinsics.Vector512 value, [System.Diagnostics.CodeAnalysis.ConstantExpected] byte count) { throw null; } + public static System.Runtime.Intrinsics.Vector512 ShiftRightLogical(System.Runtime.Intrinsics.Vector512 value, System.Runtime.Intrinsics.Vector128 count) { throw null; } + public static System.Runtime.Intrinsics.Vector512 Shuffle(System.Runtime.Intrinsics.Vector512 value, System.Runtime.Intrinsics.Vector512 right, [System.Diagnostics.CodeAnalysis.ConstantExpected] byte control) { throw null; } + public static System.Runtime.Intrinsics.Vector512 Shuffle(System.Runtime.Intrinsics.Vector512 value, [System.Diagnostics.CodeAnalysis.ConstantExpected] byte control) { throw null; } + public static System.Runtime.Intrinsics.Vector512 Shuffle(System.Runtime.Intrinsics.Vector512 value, System.Runtime.Intrinsics.Vector512 right, [System.Diagnostics.CodeAnalysis.ConstantExpected] byte control) { throw null; } + public static System.Runtime.Intrinsics.Vector512 Shuffle(System.Runtime.Intrinsics.Vector512 value, [System.Diagnostics.CodeAnalysis.ConstantExpected] byte control) { throw null; } + public static System.Runtime.Intrinsics.Vector512 Sqrt(System.Runtime.Intrinsics.Vector512 value) { throw null; } + public static System.Runtime.Intrinsics.Vector512 Sqrt(System.Runtime.Intrinsics.Vector512 value) { throw null; } public unsafe static void Store(byte* address, System.Runtime.Intrinsics.Vector512 source) { } public unsafe static void Store(double* address, System.Runtime.Intrinsics.Vector512 source) { } public unsafe static void Store(short* address, System.Runtime.Intrinsics.Vector512 source) { } @@ -4530,13 +4715,29 @@ public unsafe static void StoreAlignedNonTemporal(float* address, System.Runtime public unsafe static void StoreAlignedNonTemporal(ushort* address, System.Runtime.Intrinsics.Vector512 source) { } public unsafe static void StoreAlignedNonTemporal(uint* address, System.Runtime.Intrinsics.Vector512 source) { } public unsafe static void StoreAlignedNonTemporal(ulong* address, System.Runtime.Intrinsics.Vector512 source) { } + public static System.Runtime.Intrinsics.Vector512 Subtract(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } + public static System.Runtime.Intrinsics.Vector512 Subtract(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } + public static System.Runtime.Intrinsics.Vector512 Subtract(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } + public static System.Runtime.Intrinsics.Vector512 Subtract(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } + public static System.Runtime.Intrinsics.Vector512 Subtract(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } + public static System.Runtime.Intrinsics.Vector512 Subtract(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } + public static System.Runtime.Intrinsics.Vector512 UnpackHigh(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } + public static System.Runtime.Intrinsics.Vector512 UnpackHigh(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } + public static System.Runtime.Intrinsics.Vector512 UnpackHigh(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } + public static System.Runtime.Intrinsics.Vector512 UnpackHigh(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } + public static System.Runtime.Intrinsics.Vector512 UnpackHigh(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } + public static System.Runtime.Intrinsics.Vector512 UnpackHigh(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } + public static System.Runtime.Intrinsics.Vector512 UnpackLow(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } + public static System.Runtime.Intrinsics.Vector512 UnpackLow(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } + public static System.Runtime.Intrinsics.Vector512 UnpackLow(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } + public static System.Runtime.Intrinsics.Vector512 UnpackLow(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } + public static System.Runtime.Intrinsics.Vector512 UnpackLow(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } + public static System.Runtime.Intrinsics.Vector512 UnpackLow(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } public static System.Runtime.Intrinsics.Vector512 Xor(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } - public static System.Runtime.Intrinsics.Vector512 Xor(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } public static System.Runtime.Intrinsics.Vector512 Xor(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } public static System.Runtime.Intrinsics.Vector512 Xor(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } public static System.Runtime.Intrinsics.Vector512 Xor(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } public static System.Runtime.Intrinsics.Vector512 Xor(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } - public static System.Runtime.Intrinsics.Vector512 Xor(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } public static System.Runtime.Intrinsics.Vector512 Xor(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } public static System.Runtime.Intrinsics.Vector512 Xor(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } public static System.Runtime.Intrinsics.Vector512 Xor(System.Runtime.Intrinsics.Vector512 left, System.Runtime.Intrinsics.Vector512 right) { throw null; } @@ -4544,6 +4745,20 @@ public abstract partial class VL { internal VL() { } public static bool IsSupported { get { throw null; } } + public static System.Runtime.Intrinsics.Vector128 Abs(System.Runtime.Intrinsics.Vector128 value) { throw null; } + public static System.Runtime.Intrinsics.Vector256 Abs(System.Runtime.Intrinsics.Vector256 value) { throw null; } + public static System.Runtime.Intrinsics.Vector128 Max(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) { throw null; } + public static System.Runtime.Intrinsics.Vector128 Max(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) { throw null; } + public static System.Runtime.Intrinsics.Vector256 Max(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) { throw null; } + public static System.Runtime.Intrinsics.Vector256 Max(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) { throw null; } + public static System.Runtime.Intrinsics.Vector128 Min(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) { throw null; } + public static System.Runtime.Intrinsics.Vector128 Min(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) { throw null; } + public static System.Runtime.Intrinsics.Vector256 Min(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) { throw null; } + public static System.Runtime.Intrinsics.Vector256 Min(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) { throw null; } + public static System.Runtime.Intrinsics.Vector128 ShiftRightArithmetic(System.Runtime.Intrinsics.Vector128 value, [System.Diagnostics.CodeAnalysis.ConstantExpected] byte count) { throw null; } + public static System.Runtime.Intrinsics.Vector128 ShiftRightArithmetic(System.Runtime.Intrinsics.Vector128 value, System.Runtime.Intrinsics.Vector128 count) { throw null; } + public static System.Runtime.Intrinsics.Vector256 ShiftRightArithmetic(System.Runtime.Intrinsics.Vector256 value, [System.Diagnostics.CodeAnalysis.ConstantExpected] byte count) { throw null; } + public static System.Runtime.Intrinsics.Vector256 ShiftRightArithmetic(System.Runtime.Intrinsics.Vector256 value, System.Runtime.Intrinsics.Vector128 count) { throw null; } } public new abstract partial class X64 : System.Runtime.Intrinsics.X86.Avx2.X64 { diff --git a/src/tests/Common/GenerateHWIntrinsicTests/GenerateHWIntrinsicTests_X86.cs b/src/tests/Common/GenerateHWIntrinsicTests/GenerateHWIntrinsicTests_X86.cs index 01ce0956431e8..1b8c3cec126d3 100644 --- a/src/tests/Common/GenerateHWIntrinsicTests/GenerateHWIntrinsicTests_X86.cs +++ b/src/tests/Common/GenerateHWIntrinsicTests/GenerateHWIntrinsicTests_X86.cs @@ -461,9 +461,9 @@ (string templateFileName, Dictionary templateData)[] Ssse3Inputs = new [] { - ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Ssse3", ["LoadIsa"] = "Sse2", ["Method"] = "Abs", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "result[0] != Math.Abs(firstOp[0])", ["ValidateRemainingResults"] = "result[i] != Math.Abs(firstOp[i])"}), - ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Ssse3", ["LoadIsa"] = "Sse2", ["Method"] = "Abs", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "result[0] != Math.Abs(firstOp[0])", ["ValidateRemainingResults"] = "result[i] != Math.Abs(firstOp[i])"}), - ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Ssse3", ["LoadIsa"] = "Sse2", ["Method"] = "Abs", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "result[0] != Math.Abs(firstOp[0])", ["ValidateRemainingResults"] = "result[i] != Math.Abs(firstOp[i])"}), + ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Ssse3", ["LoadIsa"] = "Sse2", ["Method"] = "Abs", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "result[0] != (byte)((firstOp[0] < 0) ? -firstOp[0] : firstOp[0])", ["ValidateRemainingResults"] = "result[i] != (byte)((firstOp[i] < 0) ? -firstOp[i] : firstOp[i])"}), + ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Ssse3", ["LoadIsa"] = "Sse2", ["Method"] = "Abs", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "result[0] != (ushort)((firstOp[0] < 0) ? -firstOp[0] : firstOp[0])", ["ValidateRemainingResults"] = "result[i] != (ushort)((firstOp[i] < 0) ? -firstOp[i] : firstOp[i])"}), + ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Ssse3", ["LoadIsa"] = "Sse2", ["Method"] = "Abs", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "result[0] != (uint)((firstOp[0] < 0) ? -firstOp[0] : firstOp[0])", ["ValidateRemainingResults"] = "result[i] != (uint)((firstOp[i] < 0) ? -firstOp[i] : firstOp[i])"}), ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Ssse3", ["LoadIsa"] = "Sse2", ["Method"] = "AlignRight", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Byte", ["Imm"] = "0", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "result[0] != right[0]", ["ValidateRemainingResults"] = "result[i] != right[i]"}), ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Ssse3", ["LoadIsa"] = "Sse2", ["Method"] = "AlignRight", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Byte", ["Imm"] = "1", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "result[0] != right[1]", ["ValidateRemainingResults"] = "result[i] != (i == 15 ? left[0] : right[i+1])"}), ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Ssse3", ["LoadIsa"] = "Sse2", ["Method"] = "AlignRight", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["Imm"] = "0", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "result[0] != right[0]", ["ValidateRemainingResults"] = "result[i] != right[i]"}), @@ -633,152 +633,155 @@ (string templateFileName, Dictionary templateData)[] Avx1Inputs = new [] { - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Add", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(left[0] + right[0]) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(left[i] + right[i]) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Add", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(left[0] + right[0]) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(left[i] + right[i]) != BitConverter.SingleToInt32Bits(result[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "AddSubtract", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(left[0] - right[0]) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "((i % 2 != 0) && (BitConverter.DoubleToInt64Bits(left[i] + right[i]) != BitConverter.DoubleToInt64Bits(result[i]))) || ((i % 2 == 0) && (BitConverter.DoubleToInt64Bits(left[i] - right[i]) != BitConverter.DoubleToInt64Bits(result[i])))"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "AddSubtract", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(left[0] - right[0]) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "((i % 2 != 0) && (BitConverter.SingleToInt32Bits(left[i] + right[i]) != BitConverter.SingleToInt32Bits(result[i]))) || ((i % 2 == 0) && (BitConverter.SingleToInt32Bits(left[i] - right[i]) != BitConverter.SingleToInt32Bits(result[i])))"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "And", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "(BitConverter.DoubleToInt64Bits(left[0]) & BitConverter.DoubleToInt64Bits(right[0])) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "(BitConverter.DoubleToInt64Bits(left[i]) & BitConverter.DoubleToInt64Bits(right[i])) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "And", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "(BitConverter.SingleToInt32Bits(left[0]) & BitConverter.SingleToInt32Bits(right[0])) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "(BitConverter.SingleToInt32Bits(left[i]) & BitConverter.SingleToInt32Bits(right[i])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "AndNot", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "((~BitConverter.DoubleToInt64Bits(left[0])) & BitConverter.DoubleToInt64Bits(right[0])) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "((~BitConverter.DoubleToInt64Bits(left[i])) & BitConverter.DoubleToInt64Bits(right[i])) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "AndNot", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "((~BitConverter.SingleToInt32Bits(left[0])) & BitConverter.SingleToInt32Bits(right[0])) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "((~BitConverter.SingleToInt32Bits(left[i])) & BitConverter.SingleToInt32Bits(right[i])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("SimpleTernOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "BlendVariable", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Double", ["Op3VectorType"] = "Vector256", ["Op3BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp3"] = "(double)(((i % 2) == 0) ? -0.0 : 1.0)", ["ValidateFirstResult"] = "((BitConverter.DoubleToInt64Bits(thirdOp[0]) >> 63) & 1) == 1 ? BitConverter.DoubleToInt64Bits(secondOp[0]) != BitConverter.DoubleToInt64Bits(result[0]) : BitConverter.DoubleToInt64Bits(firstOp[0]) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "((BitConverter.DoubleToInt64Bits(thirdOp[i]) >> 63) & 1) == 1 ? BitConverter.DoubleToInt64Bits(secondOp[i]) != BitConverter.DoubleToInt64Bits(result[i]) : BitConverter.DoubleToInt64Bits(firstOp[i]) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("SimpleTernOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "BlendVariable", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Single", ["Op3VectorType"] = "Vector256", ["Op3BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp3"] = "(float)(((i % 2) == 0) ? -0.0 : 1.0)", ["ValidateFirstResult"] = "((BitConverter.SingleToInt32Bits(thirdOp[0]) >> 31) & 1) == 1 ? BitConverter.SingleToInt32Bits(secondOp[0]) != BitConverter.SingleToInt32Bits(result[0]) : BitConverter.SingleToInt32Bits(firstOp[0]) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "((BitConverter.SingleToInt32Bits(thirdOp[i]) >> 31) & 1) == 1 ? BitConverter.SingleToInt32Bits(secondOp[i]) != BitConverter.SingleToInt32Bits(result[i]) : BitConverter.SingleToInt32Bits(firstOp[i]) != BitConverter.SingleToInt32Bits(result[i])"}), - ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["Method"] = "BroadcastScalarToVector128",["RetVectorType"]="Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(firstOp[0]) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(firstOp[0]) != BitConverter.SingleToInt32Bits(result[i])"}), - ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["Method"] = "BroadcastScalarToVector256",["RetVectorType"]="Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(firstOp[0]) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(firstOp[0]) != BitConverter.SingleToInt32Bits(result[i])"}), - ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["Method"] = "BroadcastScalarToVector256",["RetVectorType"]="Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(firstOp[0]) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(firstOp[0]) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["Method"] = "BroadcastVector128ToVector256",["RetVectorType"]="Vector256",["RetBaseType"]= "Single",["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(firstOp[0]) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != (i < 4 ? BitConverter.SingleToInt32Bits(firstOp[i]) : BitConverter.SingleToInt32Bits(firstOp[i-4]))"}), - ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["Method"] = "BroadcastVector128ToVector256",["RetVectorType"]="Vector256",["RetBaseType"]= "Double",["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(firstOp[0]) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != (i < 2 ? BitConverter.DoubleToInt64Bits(firstOp[i]) : BitConverter.DoubleToInt64Bits(firstOp[i-2]))"}), - ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Ceiling", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits(Math.Ceiling(firstOp[0]))", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != BitConverter.DoubleToInt64Bits(Math.Ceiling(firstOp[i]))"}), - ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Ceiling", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits(MathF.Ceiling(firstOp[0]))", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(MathF.Ceiling(firstOp[i]))"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "CompareEqual", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != ((left[0] == right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != ((left[i] == right[i]) ? -1 : 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "CompareEqual", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != ((left[0] == right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != ((left[i] == right[i]) ? -1 : 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "CompareGreaterThan", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != ((left[0] > right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != ((left[i] > right[i]) ? -1 : 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "CompareGreaterThan", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != ((left[0] > right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != ((left[i] > right[i]) ? -1 : 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "CompareGreaterThanOrEqual", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != ((left[0] >= right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != ((left[i] >= right[i]) ? -1 : 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "CompareGreaterThanOrEqual", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != ((left[0] >= right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != ((left[i] >= right[i]) ? -1 : 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "CompareLessThan", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != ((left[0] < right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != ((left[i] < right[i]) ? -1 : 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "CompareLessThan", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != ((left[0] < right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != ((left[i] < right[i]) ? -1 : 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "CompareLessThanOrEqual", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != ((left[0] <= right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != ((left[i] <= right[i]) ? -1 : 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "CompareLessThanOrEqual", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != ((left[0] <= right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != ((left[i] <= right[i]) ? -1 : 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "CompareNotEqual", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != ((left[0] != right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != ((left[i] != right[i]) ? -1 : 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "CompareNotEqual", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != ((left[0] != right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != ((left[i] != right[i]) ? -1 : 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "CompareNotGreaterThan", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != (!(left[0] > right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != (!(left[i] > right[i]) ? -1 : 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "CompareNotGreaterThan", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != (!(left[0] > right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != (!(left[i] > right[i]) ? -1 : 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "CompareNotGreaterThanOrEqual", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != (!(left[0] >= right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != (!(left[i] >= right[i]) ? -1 : 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "CompareNotGreaterThanOrEqual", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != (!(left[0] >= right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != (!(left[i] >= right[i]) ? -1 : 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "CompareNotLessThan", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != (!(left[0] < right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != (!(left[i] < right[i]) ? -1 : 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "CompareNotLessThan", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != (!(left[0] < right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != (!(left[i] < right[i]) ? -1 : 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "CompareNotLessThanOrEqual", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != (!(left[0] <= right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != (!(left[i] <= right[i]) ? -1 : 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "CompareNotLessThanOrEqual", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != (!(left[0] <= right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != (!(left[i] <= right[i]) ? -1 : 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "CompareOrdered", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != ((!float.IsNaN(left[0]) && !float.IsNaN(right[0])) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != ((!float.IsNaN(left[i]) && !float.IsNaN(right[i])) ? -1 : 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "CompareOrdered", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != ((!double.IsNaN(left[0]) && !double.IsNaN(right[0])) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != ((!double.IsNaN(left[i]) && !double.IsNaN(right[i])) ? -1 : 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "CompareUnordered", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != ((float.IsNaN(left[0]) || float.IsNaN(right[0])) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != ((float.IsNaN(left[i]) || float.IsNaN(right[i])) ? -1 : 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "CompareUnordered", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != ((double.IsNaN(left[0]) || double.IsNaN(right[0])) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != ((double.IsNaN(left[i]) || double.IsNaN(right[i])) ? -1 : 0)"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Divide", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(left[0] / right[0]) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(left[i] / right[i]) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Divide", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(left[0] / right[0]) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(left[i] / right[i]) != BitConverter.SingleToInt32Bits(result[i])"}), - ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "DuplicateEvenIndexed", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(firstOp[0]) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "(i % 2 == 0) ? (BitConverter.DoubleToInt64Bits(firstOp[i]) != BitConverter.DoubleToInt64Bits(result[i])) : (BitConverter.DoubleToInt64Bits(firstOp[i - 1]) != BitConverter.DoubleToInt64Bits(result[i]))"}), - ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "DuplicateEvenIndexed", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(firstOp[0]) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "(i % 2 == 0) ? (BitConverter.SingleToInt32Bits(firstOp[i]) != BitConverter.SingleToInt32Bits(result[i])) : (BitConverter.SingleToInt32Bits(firstOp[i - 1]) != BitConverter.SingleToInt32Bits(result[i]))"}), - ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "DuplicateOddIndexed", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(firstOp[1]) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "(i % 2 == 0) ? (BitConverter.SingleToInt32Bits(firstOp[i + 1]) != BitConverter.SingleToInt32Bits(result[i])) : (BitConverter.SingleToInt32Bits(firstOp[i]) != BitConverter.SingleToInt32Bits(result[i]))"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "ExtractVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits(firstOp[4])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(firstOp[i+4])"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "ExtractVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits(firstOp[2])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != BitConverter.DoubleToInt64Bits(firstOp[i+2])"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "ExtractVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Byte", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "result[0] != firstOp[16]", ["ValidateRemainingResults"] = "result[i] != firstOp[i+16]"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "ExtractVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "SByte", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "result[0] != firstOp[16]", ["ValidateRemainingResults"] = "result[i] != firstOp[i+16]"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "ExtractVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int16", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "result[0] != firstOp[8]", ["ValidateRemainingResults"] = "result[i] != firstOp[i+8]"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "ExtractVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt16", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "result[0] != firstOp[8]", ["ValidateRemainingResults"] = "result[i] != firstOp[i+8]"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "ExtractVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int32", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "result[0] != firstOp[4]", ["ValidateRemainingResults"] = "result[i] != firstOp[i+4]"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "ExtractVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt32", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "result[0] != firstOp[4]", ["ValidateRemainingResults"] = "result[i] != firstOp[i+4]"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "ExtractVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int64", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "result[0] != firstOp[2]", ["ValidateRemainingResults"] = "result[i] != firstOp[i+2]"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "ExtractVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt64", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "result[0] != firstOp[2]", ["ValidateRemainingResults"] = "result[i] != firstOp[i+2]"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "InsertVector128", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Byte", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "result[0] != left[0]", ["ValidateRemainingResults"] = "result[i] != (i < 16 ? left[i] : right[i-16])"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "InsertVector128", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "result[0] != left[0]", ["ValidateRemainingResults"] = "result[i] != (i < 16 ? left[i] : right[i-16])"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "InsertVector128", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "result[0] != left[0]", ["ValidateRemainingResults"] = "result[i] != (i < 8 ? left[i] : right[i-8])"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "InsertVector128", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "result[0] != left[0]", ["ValidateRemainingResults"] = "result[i] != (i < 8 ? left[i] : right[i-8])"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "InsertVector128", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "result[0] != left[0]", ["ValidateRemainingResults"] = "result[i] != (i < 4 ? left[i] : right[i-4])"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "InsertVector128", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "result[0] != left[0]", ["ValidateRemainingResults"] = "result[i] != (i < 4 ? left[i] : right[i-4])"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "InsertVector128", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int64", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "result[0] != left[0]", ["ValidateRemainingResults"] = "result[i] != (i < 2 ? left[i] : right[i-2])"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "InsertVector128", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt64", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "result[0] != left[0]", ["ValidateRemainingResults"] = "result[i] != (i < 2 ? left[i] : right[i-2])"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "InsertVector128", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits(left[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != (i < 4 ? BitConverter.SingleToInt32Bits(left[i]) : BitConverter.SingleToInt32Bits(right[i-4]))"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "InsertVector128", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits(left[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != (i < 2 ? BitConverter.DoubleToInt64Bits(left[i]) : BitConverter.DoubleToInt64Bits(right[i-2]))"}), - ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Floor", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits(Math.Floor(firstOp[0]))", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != BitConverter.DoubleToInt64Bits(Math.Floor(firstOp[i]))"}), - ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Floor", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits(MathF.Floor(firstOp[0]))", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(MathF.Floor(firstOp[i]))"}), - ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["Method"] = "LoadVector256", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(firstOp[0]) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(firstOp[i]) != BitConverter.SingleToInt32Bits(result[i])"}), - ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["Method"] = "LoadVector256", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(firstOp[0]) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(firstOp[i]) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["Method"] = "LoadVector256", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Byte", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "firstOp[0] != result[0]", ["ValidateRemainingResults"] = "firstOp[i] != result[i]"}), - ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["Method"] = "LoadVector256", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "SByte", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "firstOp[0] != result[0]", ["ValidateRemainingResults"] = "firstOp[i] != result[i]"}), - ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["Method"] = "LoadVector256", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "firstOp[0] != result[0]", ["ValidateRemainingResults"] = "firstOp[i] != result[i]"}), - ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["Method"] = "LoadVector256", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt16", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "firstOp[0] != result[0]", ["ValidateRemainingResults"] = "firstOp[i] != result[i]"}), - ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["Method"] = "LoadVector256", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "firstOp[0] != result[0]", ["ValidateRemainingResults"] = "firstOp[i] != result[i]"}), - ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["Method"] = "LoadVector256", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt32", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "firstOp[0] != result[0]", ["ValidateRemainingResults"] = "firstOp[i] != result[i]"}), - ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["Method"] = "LoadVector256", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int64", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "firstOp[0] != result[0]", ["ValidateRemainingResults"] = "firstOp[i] != result[i]"}), - ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["Method"] = "LoadVector256", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt64", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "firstOp[0] != result[0]", ["ValidateRemainingResults"] = "firstOp[i] != result[i]"}), - ("LoadBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "MaskLoad", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits((BitConverter.DoubleToInt64Bits(right[0]) < 0) ? left[0] : 0)", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != BitConverter.DoubleToInt64Bits((BitConverter.DoubleToInt64Bits(right[i]) < 0) ? left[i] : 0)"}), - ("LoadBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "MaskLoad", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits((BitConverter.SingleToInt32Bits(right[0]) < 0) ? left[0] : 0)", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits((BitConverter.SingleToInt32Bits(right[i]) < 0) ? left[i] : 0)"}), - ("StoreBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "MaskStore", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits((BitConverter.DoubleToInt64Bits(left[0]) < 0) ? right[0] : BitConverter.DoubleToInt64Bits(result[0]))", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != BitConverter.DoubleToInt64Bits((BitConverter.DoubleToInt64Bits(left[i]) < 0) ? right[i] : BitConverter.DoubleToInt64Bits(result[i]))"}), - ("StoreBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "MaskStore", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits((BitConverter.SingleToInt32Bits(left[0]) < 0) ? right[0] : BitConverter.SingleToInt32Bits(result[0]))", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits((BitConverter.SingleToInt32Bits(left[i]) < 0) ? right[i] : BitConverter.SingleToInt32Bits(result[i]))"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Max", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(Math.Max(left[0], right[0])) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(Math.Max(left[i], right[i])) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Max", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(MathF.Max(left[0], right[0])) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(MathF.Max(left[i], right[i])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Min", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(Math.Min(left[0], right[0])) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(Math.Min(left[i], right[i])) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Min", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(MathF.Min(left[0], right[0])) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(MathF.Min(left[i], right[i])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Multiply", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(left[0] * right[0]) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(left[i] * right[i]) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Multiply", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(left[0] * right[0]) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(left[i] * right[i]) != BitConverter.SingleToInt32Bits(result[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Or", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "(BitConverter.DoubleToInt64Bits(left[0]) | BitConverter.DoubleToInt64Bits(right[0])) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "(BitConverter.DoubleToInt64Bits(left[i]) | BitConverter.DoubleToInt64Bits(right[i])) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Or", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "(BitConverter.SingleToInt32Bits(left[0]) | BitConverter.SingleToInt32Bits(right[0])) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "(BitConverter.SingleToInt32Bits(left[i]) | BitConverter.SingleToInt32Bits(right[i])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Permute", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits(firstOp[1])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[4]) != BitConverter.SingleToInt32Bits(firstOp[5])"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Permute", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits(firstOp[1])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[2]) != BitConverter.DoubleToInt64Bits(firstOp[2]) || BitConverter.DoubleToInt64Bits(result[2]) != BitConverter.DoubleToInt64Bits(firstOp[2])"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Sse", ["Method"] = "Permute", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Imm"] = "2", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits(firstOp[2])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[1]) != BitConverter.SingleToInt32Bits(firstOp[0]) || BitConverter.SingleToInt32Bits(result[2]) != BitConverter.SingleToInt32Bits(firstOp[0])"}), - ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Sse2",["Method"] = "Permute", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Imm"] = "2", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits(firstOp[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[1]) != BitConverter.DoubleToInt64Bits(firstOp[1])"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Permute2x128", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Double", ["Imm"] = "2", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits(right[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != (i < 2 ? BitConverter.DoubleToInt64Bits(right[i]) : BitConverter.DoubleToInt64Bits(left[i-2]))"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Permute2x128", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Single", ["Imm"] = "2", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits(right[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != (i < 4 ? BitConverter.SingleToInt32Bits(right[i]) : BitConverter.SingleToInt32Bits(left[i-4]))"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Permute2x128", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Byte", ["Imm"] = "2", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "result[0] != right[0]", ["ValidateRemainingResults"] = "result[i] != (i < 16 ? right[i] : left[i-16])"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Permute2x128", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "SByte", ["Imm"] = "2", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "result[0] != right[0]", ["ValidateRemainingResults"] = "result[i] != (i < 16 ? right[i] : left[i-16])"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Permute2x128", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int16", ["Imm"] = "2", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "result[0] != right[0]", ["ValidateRemainingResults"] = "result[i] != (i < 8 ? right[i] : left[i-8])"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Permute2x128", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt16", ["Imm"] = "2", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "result[0] != right[0]", ["ValidateRemainingResults"] = "result[i] != (i < 8 ? right[i] : left[i-8])"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Permute2x128", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int32", ["Imm"] = "2", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "result[0] != right[0]", ["ValidateRemainingResults"] = "result[i] != (i < 4 ? right[i] : left[i-4])"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Permute2x128", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt32", ["Imm"] = "2", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "result[0] != right[0]", ["ValidateRemainingResults"] = "result[i] != (i < 4 ? right[i] : left[i-4])"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Permute2x128", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int64", ["Imm"] = "2", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "result[0] != right[0]", ["ValidateRemainingResults"] = "result[i] != (i < 2 ? right[i] : left[i-2])"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Permute2x128", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt64", ["Imm"] = "2", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "result[0] != right[0]", ["ValidateRemainingResults"] = "result[i] != (i < 2 ? right[i] : left[i-2])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "PermuteVar", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "1", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(left[1]) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "i > 3 ? (BitConverter.SingleToInt32Bits(left[5]) != BitConverter.SingleToInt32Bits(result[i])) : (BitConverter.SingleToInt32Bits(left[1]) != BitConverter.SingleToInt32Bits(result[i]))"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "PermuteVar", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "(long)1", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(left[0]) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "i > 1 ? (BitConverter.DoubleToInt64Bits(left[2]) != BitConverter.DoubleToInt64Bits(result[i])) : (BitConverter.DoubleToInt64Bits(left[0]) != BitConverter.DoubleToInt64Bits(result[i]))"}), - ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "RoundCurrentDirection", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits(Math.Round(firstOp[0]))", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != BitConverter.DoubleToInt64Bits(Math.Round(firstOp[i]))"}), - ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "RoundCurrentDirection", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits(MathF.Round(firstOp[0]))", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(MathF.Round(firstOp[i]))"}), - ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "RoundToNearestInteger", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits(Math.Round(firstOp[0], MidpointRounding.AwayFromZero))", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != BitConverter.DoubleToInt64Bits(Math.Round(firstOp[i], MidpointRounding.AwayFromZero))"}), - ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "RoundToNearestInteger", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits(MathF.Round(firstOp[0], MidpointRounding.AwayFromZero))", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(MathF.Round(firstOp[i], MidpointRounding.AwayFromZero))"}), - ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "RoundToNegativeInfinity", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits(Math.Floor(firstOp[0]))", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != BitConverter.DoubleToInt64Bits(Math.Floor(firstOp[i]))"}), - ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "RoundToNegativeInfinity", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits(MathF.Floor(firstOp[0]))", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(MathF.Floor(firstOp[i]))"}), - ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "RoundToPositiveInfinity", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits(Math.Ceiling(firstOp[0]))", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != BitConverter.DoubleToInt64Bits(Math.Ceiling(firstOp[i]))"}), - ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "RoundToPositiveInfinity", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits(MathF.Ceiling(firstOp[0]))", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(MathF.Ceiling(firstOp[i]))"}), - ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "RoundToZero", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits((firstOp[0] > 0) ? Math.Floor(firstOp[0]) : Math.Ceiling(firstOp[0]))", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != BitConverter.DoubleToInt64Bits((firstOp[i] > 0) ? Math.Floor(firstOp[i]) : Math.Ceiling(firstOp[i]))"}), - ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "RoundToZero", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits((firstOp[0] > 0) ? MathF.Floor(firstOp[0]) : MathF.Ceiling(firstOp[0]))", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits((firstOp[i] > 0) ? MathF.Floor(firstOp[i]) : MathF.Ceiling(firstOp[i]))"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Shuffle", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Single", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits(left[1])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[7]) != BitConverter.SingleToInt32Bits(right[4])"}), - ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Shuffle", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Double", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits(left[1])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[3]) != BitConverter.DoubleToInt64Bits(right[2])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Subtract", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(left[0] - right[0]) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(left[i] - right[i]) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Subtract", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(left[0] - right[0]) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(left[i] - right[i]) != BitConverter.SingleToInt32Bits(result[i])"}), - ("BooleanBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "TestC", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "(~left[i] & right[i]) == 0"}), - ("BooleanBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "TestC", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "(~left[i] & right[i]) == 0"}), - ("BooleanBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "TestC", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "(~left[i] & right[i]) == 0"}), - ("BooleanBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "TestC", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "(~left[i] & right[i]) == 0"}), - ("BooleanBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "TestC", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "(~left[i] & right[i]) == 0"}), - ("BooleanBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "TestC", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "(~left[i] & right[i]) == 0"}), - ("BooleanBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "TestC", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "(~left[i] & right[i]) == 0"}), - ("BooleanBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "TestC", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "(~left[i] & right[i]) == 0"}), - ("BooleanTwoCmpOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "TestNotZAndNotC", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "((left[i] & right[i]) == 0)", ["ValidateRemainingResults"] = "((~left[i] & right[i]) == 0)"}), - ("BooleanTwoCmpOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "TestNotZAndNotC", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "((left[i] & right[i]) == 0)", ["ValidateRemainingResults"] = "((~left[i] & right[i]) == 0)"}), - ("BooleanTwoCmpOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "TestNotZAndNotC", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "((left[i] & right[i]) == 0)", ["ValidateRemainingResults"] = "((~left[i] & right[i]) == 0)"}), - ("BooleanTwoCmpOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "TestNotZAndNotC", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "((left[i] & right[i]) == 0)", ["ValidateRemainingResults"] = "((~left[i] & right[i]) == 0)"}), - ("BooleanTwoCmpOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "TestNotZAndNotC", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "((left[i] & right[i]) == 0)", ["ValidateRemainingResults"] = "((~left[i] & right[i]) == 0)"}), - ("BooleanTwoCmpOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "TestNotZAndNotC", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "((left[i] & right[i]) == 0)", ["ValidateRemainingResults"] = "((~left[i] & right[i]) == 0)"}), - ("BooleanTwoCmpOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "TestNotZAndNotC", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "((left[i] & right[i]) == 0)", ["ValidateRemainingResults"] = "((~left[i] & right[i]) == 0)"}), - ("BooleanTwoCmpOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "TestNotZAndNotC", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "((left[i] & right[i]) == 0)", ["ValidateRemainingResults"] = "((~left[i] & right[i]) == 0)"}), - ("BooleanBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "TestZ", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "(left[i] & right[i]) == 0"}), - ("BooleanBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "TestZ", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "(left[i] & right[i]) == 0"}), - ("BooleanBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "TestZ", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "(left[i] & right[i]) == 0"}), - ("BooleanBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "TestZ", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "(left[i] & right[i]) == 0"}), - ("BooleanBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "TestZ", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "(left[i] & right[i]) == 0"}), - ("BooleanBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "TestZ", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "(left[i] & right[i]) == 0"}), - ("BooleanBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "TestZ", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "(left[i] & right[i]) == 0"}), - ("BooleanBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "TestZ", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "(left[i] & right[i]) == 0"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Xor", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "(BitConverter.SingleToInt32Bits(left[0]) ^ BitConverter.SingleToInt32Bits(right[0])) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "(BitConverter.SingleToInt32Bits(left[i]) ^ BitConverter.SingleToInt32Bits(right[i])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Xor", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "(BitConverter.DoubleToInt64Bits(left[0]) ^ BitConverter.DoubleToInt64Bits(right[0])) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "(BitConverter.DoubleToInt64Bits(left[i]) ^ BitConverter.DoubleToInt64Bits(right[i])) != BitConverter.DoubleToInt64Bits(result[i])"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Add", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(left[0] + right[0]) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(left[i] + right[i]) != BitConverter.DoubleToInt64Bits(result[i])"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Add", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(left[0] + right[0]) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(left[i] + right[i]) != BitConverter.SingleToInt32Bits(result[i])"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "AddSubtract", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(left[0] - right[0]) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "((i % 2 != 0) && (BitConverter.DoubleToInt64Bits(left[i] + right[i]) != BitConverter.DoubleToInt64Bits(result[i]))) || ((i % 2 == 0) && (BitConverter.DoubleToInt64Bits(left[i] - right[i]) != BitConverter.DoubleToInt64Bits(result[i])))"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "AddSubtract", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(left[0] - right[0]) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "((i % 2 != 0) && (BitConverter.SingleToInt32Bits(left[i] + right[i]) != BitConverter.SingleToInt32Bits(result[i]))) || ((i % 2 == 0) && (BitConverter.SingleToInt32Bits(left[i] - right[i]) != BitConverter.SingleToInt32Bits(result[i])))"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "And", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "(BitConverter.DoubleToInt64Bits(left[0]) & BitConverter.DoubleToInt64Bits(right[0])) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "(BitConverter.DoubleToInt64Bits(left[i]) & BitConverter.DoubleToInt64Bits(right[i])) != BitConverter.DoubleToInt64Bits(result[i])"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "And", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "(BitConverter.SingleToInt32Bits(left[0]) & BitConverter.SingleToInt32Bits(right[0])) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "(BitConverter.SingleToInt32Bits(left[i]) & BitConverter.SingleToInt32Bits(right[i])) != BitConverter.SingleToInt32Bits(result[i])"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "AndNot", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "((~BitConverter.DoubleToInt64Bits(left[0])) & BitConverter.DoubleToInt64Bits(right[0])) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "((~BitConverter.DoubleToInt64Bits(left[i])) & BitConverter.DoubleToInt64Bits(right[i])) != BitConverter.DoubleToInt64Bits(result[i])"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "AndNot", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "((~BitConverter.SingleToInt32Bits(left[0])) & BitConverter.SingleToInt32Bits(right[0])) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "((~BitConverter.SingleToInt32Bits(left[i])) & BitConverter.SingleToInt32Bits(right[i])) != BitConverter.SingleToInt32Bits(result[i])"}), + ("SimpleTernOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "BlendVariable", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Double", ["Op3VectorType"] = "Vector256", ["Op3BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp3"] = "(double)(((i % 2) == 0) ? -0.0 : 1.0)", ["ValidateFirstResult"] = "((BitConverter.DoubleToInt64Bits(thirdOp[0]) >> 63) & 1) == 1 ? BitConverter.DoubleToInt64Bits(secondOp[0]) != BitConverter.DoubleToInt64Bits(result[0]) : BitConverter.DoubleToInt64Bits(firstOp[0]) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "((BitConverter.DoubleToInt64Bits(thirdOp[i]) >> 63) & 1) == 1 ? BitConverter.DoubleToInt64Bits(secondOp[i]) != BitConverter.DoubleToInt64Bits(result[i]) : BitConverter.DoubleToInt64Bits(firstOp[i]) != BitConverter.DoubleToInt64Bits(result[i])"}), + ("SimpleTernOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "BlendVariable", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Single", ["Op3VectorType"] = "Vector256", ["Op3BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp3"] = "(float)(((i % 2) == 0) ? -0.0 : 1.0)", ["ValidateFirstResult"] = "((BitConverter.SingleToInt32Bits(thirdOp[0]) >> 31) & 1) == 1 ? BitConverter.SingleToInt32Bits(secondOp[0]) != BitConverter.SingleToInt32Bits(result[0]) : BitConverter.SingleToInt32Bits(firstOp[0]) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "((BitConverter.SingleToInt32Bits(thirdOp[i]) >> 31) & 1) == 1 ? BitConverter.SingleToInt32Bits(secondOp[i]) != BitConverter.SingleToInt32Bits(result[i]) : BitConverter.SingleToInt32Bits(firstOp[i]) != BitConverter.SingleToInt32Bits(result[i])"}), + ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["Method"] = "BroadcastScalarToVector128", ["RetVectorType"]="Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(firstOp[0]) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(firstOp[0]) != BitConverter.SingleToInt32Bits(result[i])"}), + ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["Method"] = "BroadcastScalarToVector256", ["RetVectorType"]="Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(firstOp[0]) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(firstOp[0]) != BitConverter.SingleToInt32Bits(result[i])"}), + ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["Method"] = "BroadcastScalarToVector256", ["RetVectorType"]="Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(firstOp[0]) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(firstOp[0]) != BitConverter.DoubleToInt64Bits(result[i])"}), + ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["Method"] = "BroadcastVector128ToVector256", ["RetVectorType"]="Vector256",["RetBaseType"]= "Single",["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(firstOp[0]) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != (i < 4 ? BitConverter.SingleToInt32Bits(firstOp[i]) : BitConverter.SingleToInt32Bits(firstOp[i-4]))"}), + ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["Method"] = "BroadcastVector128ToVector256", ["RetVectorType"]="Vector256",["RetBaseType"]= "Double",["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(firstOp[0]) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != (i < 2 ? BitConverter.DoubleToInt64Bits(firstOp[i]) : BitConverter.DoubleToInt64Bits(firstOp[i-2]))"}), + ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Ceiling", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits(Math.Ceiling(firstOp[0]))", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != BitConverter.DoubleToInt64Bits(Math.Ceiling(firstOp[i]))"}), + ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Ceiling", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits(MathF.Ceiling(firstOp[0]))", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(MathF.Ceiling(firstOp[i]))"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "CompareEqual", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != ((left[0] == right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != ((left[i] == right[i]) ? -1 : 0)"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "CompareEqual", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != ((left[0] == right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != ((left[i] == right[i]) ? -1 : 0)"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "CompareGreaterThan", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != ((left[0] > right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != ((left[i] > right[i]) ? -1 : 0)"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "CompareGreaterThan", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != ((left[0] > right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != ((left[i] > right[i]) ? -1 : 0)"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "CompareGreaterThanOrEqual", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != ((left[0] >= right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != ((left[i] >= right[i]) ? -1 : 0)"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "CompareGreaterThanOrEqual", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != ((left[0] >= right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != ((left[i] >= right[i]) ? -1 : 0)"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "CompareLessThan", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != ((left[0] < right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != ((left[i] < right[i]) ? -1 : 0)"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "CompareLessThan", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != ((left[0] < right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != ((left[i] < right[i]) ? -1 : 0)"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "CompareLessThanOrEqual", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != ((left[0] <= right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != ((left[i] <= right[i]) ? -1 : 0)"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "CompareLessThanOrEqual", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != ((left[0] <= right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != ((left[i] <= right[i]) ? -1 : 0)"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "CompareNotEqual", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != ((left[0] != right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != ((left[i] != right[i]) ? -1 : 0)"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "CompareNotEqual", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != ((left[0] != right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != ((left[i] != right[i]) ? -1 : 0)"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "CompareNotGreaterThan", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != (!(left[0] > right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != (!(left[i] > right[i]) ? -1 : 0)"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "CompareNotGreaterThan", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != (!(left[0] > right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != (!(left[i] > right[i]) ? -1 : 0)"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "CompareNotGreaterThanOrEqual", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != (!(left[0] >= right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != (!(left[i] >= right[i]) ? -1 : 0)"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "CompareNotGreaterThanOrEqual", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != (!(left[0] >= right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != (!(left[i] >= right[i]) ? -1 : 0)"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "CompareNotLessThan", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != (!(left[0] < right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != (!(left[i] < right[i]) ? -1 : 0)"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "CompareNotLessThan", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != (!(left[0] < right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != (!(left[i] < right[i]) ? -1 : 0)"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "CompareNotLessThanOrEqual", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != (!(left[0] <= right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != (!(left[i] <= right[i]) ? -1 : 0)"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "CompareNotLessThanOrEqual", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != (!(left[0] <= right[0]) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != (!(left[i] <= right[i]) ? -1 : 0)"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "CompareOrdered", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != ((!float.IsNaN(left[0]) && !float.IsNaN(right[0])) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != ((!float.IsNaN(left[i]) && !float.IsNaN(right[i])) ? -1 : 0)"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "CompareOrdered", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != ((!double.IsNaN(left[0]) && !double.IsNaN(right[0])) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != ((!double.IsNaN(left[i]) && !double.IsNaN(right[i])) ? -1 : 0)"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "CompareUnordered", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != ((float.IsNaN(left[0]) || float.IsNaN(right[0])) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != ((float.IsNaN(left[i]) || float.IsNaN(right[i])) ? -1 : 0)"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "CompareUnordered", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != ((double.IsNaN(left[0]) || double.IsNaN(right[0])) ? -1 : 0)", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != ((double.IsNaN(left[i]) || double.IsNaN(right[i])) ? -1 : 0)"}), + ("SimpleUnOpConvTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "ConvertToVector256Int32", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "result[0] != (int)MathF.Round(firstOp[0])", ["ValidateRemainingResults"] = "result[i] != (int) MathF.Round(firstOp[i], 0)"}), + ("SimpleUnOpConvTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "ConvertToVector256Int32WithTruncation", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "result[0] != (int)firstOp[0]", ["ValidateRemainingResults"] = "result[i] != (int)firstOp[i]"}), + ("SimpleUnOpConvTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "ConvertToVector256Single", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits((float)firstOp[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits((float)firstOp[i])"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Divide", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(left[0] / right[0]) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(left[i] / right[i]) != BitConverter.DoubleToInt64Bits(result[i])"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Divide", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(left[0] / right[0]) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(left[i] / right[i]) != BitConverter.SingleToInt32Bits(result[i])"}), + ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "DuplicateEvenIndexed", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(firstOp[0]) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "(i % 2 == 0) ? (BitConverter.DoubleToInt64Bits(firstOp[i]) != BitConverter.DoubleToInt64Bits(result[i])) : (BitConverter.DoubleToInt64Bits(firstOp[i - 1]) != BitConverter.DoubleToInt64Bits(result[i]))"}), + ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "DuplicateEvenIndexed", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(firstOp[0]) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "(i % 2 == 0) ? (BitConverter.SingleToInt32Bits(firstOp[i]) != BitConverter.SingleToInt32Bits(result[i])) : (BitConverter.SingleToInt32Bits(firstOp[i - 1]) != BitConverter.SingleToInt32Bits(result[i]))"}), + ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "DuplicateOddIndexed", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(firstOp[1]) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "(i % 2 == 0) ? (BitConverter.SingleToInt32Bits(firstOp[i + 1]) != BitConverter.SingleToInt32Bits(result[i])) : (BitConverter.SingleToInt32Bits(firstOp[i]) != BitConverter.SingleToInt32Bits(result[i]))"}), + ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "ExtractVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits(firstOp[4])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(firstOp[i+4])"}), + ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "ExtractVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits(firstOp[2])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != BitConverter.DoubleToInt64Bits(firstOp[i+2])"}), + ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "ExtractVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Byte", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "result[0] != firstOp[16]", ["ValidateRemainingResults"] = "result[i] != firstOp[i+16]"}), + ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "ExtractVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "SByte", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "result[0] != firstOp[16]", ["ValidateRemainingResults"] = "result[i] != firstOp[i+16]"}), + ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "ExtractVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int16", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "result[0] != firstOp[8]", ["ValidateRemainingResults"] = "result[i] != firstOp[i+8]"}), + ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "ExtractVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt16", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "result[0] != firstOp[8]", ["ValidateRemainingResults"] = "result[i] != firstOp[i+8]"}), + ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "ExtractVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int32", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "result[0] != firstOp[4]", ["ValidateRemainingResults"] = "result[i] != firstOp[i+4]"}), + ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "ExtractVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt32", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "result[0] != firstOp[4]", ["ValidateRemainingResults"] = "result[i] != firstOp[i+4]"}), + ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "ExtractVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int64", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "result[0] != firstOp[2]", ["ValidateRemainingResults"] = "result[i] != firstOp[i+2]"}), + ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "ExtractVector128", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt64", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "result[0] != firstOp[2]", ["ValidateRemainingResults"] = "result[i] != firstOp[i+2]"}), + ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "InsertVector128", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Byte", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "result[0] != left[0]", ["ValidateRemainingResults"] = "result[i] != (i < 16 ? left[i] : right[i-16])"}), + ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "InsertVector128", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "result[0] != left[0]", ["ValidateRemainingResults"] = "result[i] != (i < 16 ? left[i] : right[i-16])"}), + ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "InsertVector128", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "result[0] != left[0]", ["ValidateRemainingResults"] = "result[i] != (i < 8 ? left[i] : right[i-8])"}), + ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "InsertVector128", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "result[0] != left[0]", ["ValidateRemainingResults"] = "result[i] != (i < 8 ? left[i] : right[i-8])"}), + ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "InsertVector128", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "result[0] != left[0]", ["ValidateRemainingResults"] = "result[i] != (i < 4 ? left[i] : right[i-4])"}), + ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "InsertVector128", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "result[0] != left[0]", ["ValidateRemainingResults"] = "result[i] != (i < 4 ? left[i] : right[i-4])"}), + ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "InsertVector128", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int64", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "result[0] != left[0]", ["ValidateRemainingResults"] = "result[i] != (i < 2 ? left[i] : right[i-2])"}), + ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "InsertVector128", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt64", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "result[0] != left[0]", ["ValidateRemainingResults"] = "result[i] != (i < 2 ? left[i] : right[i-2])"}), + ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "InsertVector128", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits(left[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != (i < 4 ? BitConverter.SingleToInt32Bits(left[i]) : BitConverter.SingleToInt32Bits(right[i-4]))"}), + ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "InsertVector128", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits(left[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != (i < 2 ? BitConverter.DoubleToInt64Bits(left[i]) : BitConverter.DoubleToInt64Bits(right[i-2]))"}), + ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Floor", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits(Math.Floor(firstOp[0]))", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != BitConverter.DoubleToInt64Bits(Math.Floor(firstOp[i]))"}), + ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Floor", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits(MathF.Floor(firstOp[0]))", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(MathF.Floor(firstOp[i]))"}), + ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["Method"] = "LoadVector256", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(firstOp[0]) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(firstOp[i]) != BitConverter.SingleToInt32Bits(result[i])"}), + ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["Method"] = "LoadVector256", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(firstOp[0]) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(firstOp[i]) != BitConverter.DoubleToInt64Bits(result[i])"}), + ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["Method"] = "LoadVector256", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Byte", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "firstOp[0] != result[0]", ["ValidateRemainingResults"] = "firstOp[i] != result[i]"}), + ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["Method"] = "LoadVector256", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "SByte", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "firstOp[0] != result[0]", ["ValidateRemainingResults"] = "firstOp[i] != result[i]"}), + ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["Method"] = "LoadVector256", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "firstOp[0] != result[0]", ["ValidateRemainingResults"] = "firstOp[i] != result[i]"}), + ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["Method"] = "LoadVector256", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt16", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "firstOp[0] != result[0]", ["ValidateRemainingResults"] = "firstOp[i] != result[i]"}), + ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["Method"] = "LoadVector256", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "firstOp[0] != result[0]", ["ValidateRemainingResults"] = "firstOp[i] != result[i]"}), + ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["Method"] = "LoadVector256", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt32", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "firstOp[0] != result[0]", ["ValidateRemainingResults"] = "firstOp[i] != result[i]"}), + ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["Method"] = "LoadVector256", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int64", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "firstOp[0] != result[0]", ["ValidateRemainingResults"] = "firstOp[i] != result[i]"}), + ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["Method"] = "LoadVector256", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt64", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "firstOp[0] != result[0]", ["ValidateRemainingResults"] = "firstOp[i] != result[i]"}), + ("LoadBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "MaskLoad", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits((BitConverter.DoubleToInt64Bits(right[0]) < 0) ? left[0] : 0)", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != BitConverter.DoubleToInt64Bits((BitConverter.DoubleToInt64Bits(right[i]) < 0) ? left[i] : 0)"}), + ("LoadBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "MaskLoad", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits((BitConverter.SingleToInt32Bits(right[0]) < 0) ? left[0] : 0)", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits((BitConverter.SingleToInt32Bits(right[i]) < 0) ? left[i] : 0)"}), + ("StoreBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "MaskStore", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits((BitConverter.DoubleToInt64Bits(left[0]) < 0) ? right[0] : BitConverter.DoubleToInt64Bits(result[0]))", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != BitConverter.DoubleToInt64Bits((BitConverter.DoubleToInt64Bits(left[i]) < 0) ? right[i] : BitConverter.DoubleToInt64Bits(result[i]))"}), + ("StoreBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "MaskStore", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits((BitConverter.SingleToInt32Bits(left[0]) < 0) ? right[0] : BitConverter.SingleToInt32Bits(result[0]))", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits((BitConverter.SingleToInt32Bits(left[i]) < 0) ? right[i] : BitConverter.SingleToInt32Bits(result[i]))"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Max", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(Math.Max(left[0], right[0])) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(Math.Max(left[i], right[i])) != BitConverter.DoubleToInt64Bits(result[i])"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Max", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(MathF.Max(left[0], right[0])) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(MathF.Max(left[i], right[i])) != BitConverter.SingleToInt32Bits(result[i])"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Min", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(Math.Min(left[0], right[0])) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(Math.Min(left[i], right[i])) != BitConverter.DoubleToInt64Bits(result[i])"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Min", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(MathF.Min(left[0], right[0])) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(MathF.Min(left[i], right[i])) != BitConverter.SingleToInt32Bits(result[i])"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Multiply", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(left[0] * right[0]) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(left[i] * right[i]) != BitConverter.DoubleToInt64Bits(result[i])"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Multiply", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(left[0] * right[0]) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(left[i] * right[i]) != BitConverter.SingleToInt32Bits(result[i])"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Or", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "(BitConverter.DoubleToInt64Bits(left[0]) | BitConverter.DoubleToInt64Bits(right[0])) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "(BitConverter.DoubleToInt64Bits(left[i]) | BitConverter.DoubleToInt64Bits(right[i])) != BitConverter.DoubleToInt64Bits(result[i])"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Or", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "(BitConverter.SingleToInt32Bits(left[0]) | BitConverter.SingleToInt32Bits(right[0])) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "(BitConverter.SingleToInt32Bits(left[i]) | BitConverter.SingleToInt32Bits(right[i])) != BitConverter.SingleToInt32Bits(result[i])"}), + ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Permute", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits(firstOp[1])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[4]) != BitConverter.SingleToInt32Bits(firstOp[5])"}), + ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Permute", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits(firstOp[1])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[2]) != BitConverter.DoubleToInt64Bits(firstOp[2]) || BitConverter.DoubleToInt64Bits(result[2]) != BitConverter.DoubleToInt64Bits(firstOp[2])"}), + ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Sse", ["Method"] = "Permute", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Imm"] = "2", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits(firstOp[2])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[1]) != BitConverter.SingleToInt32Bits(firstOp[0]) || BitConverter.SingleToInt32Bits(result[2]) != BitConverter.SingleToInt32Bits(firstOp[0])"}), + ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Sse2",["Method"] = "Permute", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Imm"] = "2", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits(firstOp[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[1]) != BitConverter.DoubleToInt64Bits(firstOp[1])"}), + ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Permute2x128", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Double", ["Imm"] = "2", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits(right[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != (i < 2 ? BitConverter.DoubleToInt64Bits(right[i]) : BitConverter.DoubleToInt64Bits(left[i-2]))"}), + ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Permute2x128", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Single", ["Imm"] = "2", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits(right[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != (i < 4 ? BitConverter.SingleToInt32Bits(right[i]) : BitConverter.SingleToInt32Bits(left[i-4]))"}), + ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Permute2x128", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Byte", ["Imm"] = "2", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "result[0] != right[0]", ["ValidateRemainingResults"] = "result[i] != (i < 16 ? right[i] : left[i-16])"}), + ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Permute2x128", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "SByte", ["Imm"] = "2", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "result[0] != right[0]", ["ValidateRemainingResults"] = "result[i] != (i < 16 ? right[i] : left[i-16])"}), + ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Permute2x128", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int16", ["Imm"] = "2", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "result[0] != right[0]", ["ValidateRemainingResults"] = "result[i] != (i < 8 ? right[i] : left[i-8])"}), + ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Permute2x128", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt16", ["Imm"] = "2", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "result[0] != right[0]", ["ValidateRemainingResults"] = "result[i] != (i < 8 ? right[i] : left[i-8])"}), + ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Permute2x128", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int32", ["Imm"] = "2", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "result[0] != right[0]", ["ValidateRemainingResults"] = "result[i] != (i < 4 ? right[i] : left[i-4])"}), + ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Permute2x128", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt32", ["Imm"] = "2", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "result[0] != right[0]", ["ValidateRemainingResults"] = "result[i] != (i < 4 ? right[i] : left[i-4])"}), + ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Permute2x128", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int64", ["Imm"] = "2", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "result[0] != right[0]", ["ValidateRemainingResults"] = "result[i] != (i < 2 ? right[i] : left[i-2])"}), + ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Permute2x128", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt64", ["Imm"] = "2", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "result[0] != right[0]", ["ValidateRemainingResults"] = "result[i] != (i < 2 ? right[i] : left[i-2])"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "PermuteVar", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "1", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(left[1]) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "i > 3 ? (BitConverter.SingleToInt32Bits(left[5]) != BitConverter.SingleToInt32Bits(result[i])) : (BitConverter.SingleToInt32Bits(left[1]) != BitConverter.SingleToInt32Bits(result[i]))"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "PermuteVar", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "(long)1", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(left[0]) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "i > 1 ? (BitConverter.DoubleToInt64Bits(left[2]) != BitConverter.DoubleToInt64Bits(result[i])) : (BitConverter.DoubleToInt64Bits(left[0]) != BitConverter.DoubleToInt64Bits(result[i]))"}), + ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "RoundCurrentDirection", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits(Math.Round(firstOp[0]))", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != BitConverter.DoubleToInt64Bits(Math.Round(firstOp[i]))"}), + ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "RoundCurrentDirection", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits(MathF.Round(firstOp[0]))", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(MathF.Round(firstOp[i]))"}), + ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "RoundToNearestInteger", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits(Math.Round(firstOp[0], MidpointRounding.AwayFromZero))", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != BitConverter.DoubleToInt64Bits(Math.Round(firstOp[i], MidpointRounding.AwayFromZero))"}), + ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "RoundToNearestInteger", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits(MathF.Round(firstOp[0], MidpointRounding.AwayFromZero))", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(MathF.Round(firstOp[i], MidpointRounding.AwayFromZero))"}), + ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "RoundToNegativeInfinity", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits(Math.Floor(firstOp[0]))", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != BitConverter.DoubleToInt64Bits(Math.Floor(firstOp[i]))"}), + ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "RoundToNegativeInfinity", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits(MathF.Floor(firstOp[0]))", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(MathF.Floor(firstOp[i]))"}), + ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "RoundToPositiveInfinity", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits(Math.Ceiling(firstOp[0]))", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != BitConverter.DoubleToInt64Bits(Math.Ceiling(firstOp[i]))"}), + ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "RoundToPositiveInfinity", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits(MathF.Ceiling(firstOp[0]))", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(MathF.Ceiling(firstOp[i]))"}), + ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "RoundToZero", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits((firstOp[0] > 0) ? Math.Floor(firstOp[0]) : Math.Ceiling(firstOp[0]))", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != BitConverter.DoubleToInt64Bits((firstOp[i] > 0) ? Math.Floor(firstOp[i]) : Math.Ceiling(firstOp[i]))"}), + ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "RoundToZero", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits((firstOp[0] > 0) ? MathF.Floor(firstOp[0]) : MathF.Ceiling(firstOp[0]))", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits((firstOp[i] > 0) ? MathF.Floor(firstOp[i]) : MathF.Ceiling(firstOp[i]))"}), + ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Shuffle", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Single", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits(left[1])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[7]) != BitConverter.SingleToInt32Bits(right[4])"}), + ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Shuffle", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Double", ["Imm"] = "1", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits(left[1])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[3]) != BitConverter.DoubleToInt64Bits(right[2])"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Subtract", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(left[0] - right[0]) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(left[i] - right[i]) != BitConverter.DoubleToInt64Bits(result[i])"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Subtract", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(left[0] - right[0]) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(left[i] - right[i]) != BitConverter.SingleToInt32Bits(result[i])"}), + ("BooleanBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "TestC", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "(~left[i] & right[i]) == 0"}), + ("BooleanBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "TestC", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "(~left[i] & right[i]) == 0"}), + ("BooleanBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "TestC", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "(~left[i] & right[i]) == 0"}), + ("BooleanBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "TestC", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "(~left[i] & right[i]) == 0"}), + ("BooleanBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "TestC", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "(~left[i] & right[i]) == 0"}), + ("BooleanBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "TestC", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "(~left[i] & right[i]) == 0"}), + ("BooleanBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "TestC", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "(~left[i] & right[i]) == 0"}), + ("BooleanBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "TestC", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "(~left[i] & right[i]) == 0"}), + ("BooleanTwoCmpOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "TestNotZAndNotC", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "((left[i] & right[i]) == 0)", ["ValidateRemainingResults"] = "((~left[i] & right[i]) == 0)"}), + ("BooleanTwoCmpOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "TestNotZAndNotC", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "((left[i] & right[i]) == 0)", ["ValidateRemainingResults"] = "((~left[i] & right[i]) == 0)"}), + ("BooleanTwoCmpOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "TestNotZAndNotC", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "((left[i] & right[i]) == 0)", ["ValidateRemainingResults"] = "((~left[i] & right[i]) == 0)"}), + ("BooleanTwoCmpOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "TestNotZAndNotC", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "((left[i] & right[i]) == 0)", ["ValidateRemainingResults"] = "((~left[i] & right[i]) == 0)"}), + ("BooleanTwoCmpOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "TestNotZAndNotC", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "((left[i] & right[i]) == 0)", ["ValidateRemainingResults"] = "((~left[i] & right[i]) == 0)"}), + ("BooleanTwoCmpOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "TestNotZAndNotC", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "((left[i] & right[i]) == 0)", ["ValidateRemainingResults"] = "((~left[i] & right[i]) == 0)"}), + ("BooleanTwoCmpOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "TestNotZAndNotC", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "((left[i] & right[i]) == 0)", ["ValidateRemainingResults"] = "((~left[i] & right[i]) == 0)"}), + ("BooleanTwoCmpOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "TestNotZAndNotC", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "((left[i] & right[i]) == 0)", ["ValidateRemainingResults"] = "((~left[i] & right[i]) == 0)"}), + ("BooleanBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "TestZ", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "(left[i] & right[i]) == 0"}), + ("BooleanBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "TestZ", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "(left[i] & right[i]) == 0"}), + ("BooleanBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "TestZ", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "(left[i] & right[i]) == 0"}), + ("BooleanBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "TestZ", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "(left[i] & right[i]) == 0"}), + ("BooleanBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "TestZ", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "(left[i] & right[i]) == 0"}), + ("BooleanBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "TestZ", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "(left[i] & right[i]) == 0"}), + ("BooleanBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "TestZ", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "(left[i] & right[i]) == 0"}), + ("BooleanBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "TestZ", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "(left[i] & right[i]) == 0"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Xor", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "(BitConverter.SingleToInt32Bits(left[0]) ^ BitConverter.SingleToInt32Bits(right[0])) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "(BitConverter.SingleToInt32Bits(left[i]) ^ BitConverter.SingleToInt32Bits(right[i])) != BitConverter.SingleToInt32Bits(result[i])"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Xor", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "(BitConverter.DoubleToInt64Bits(left[0]) ^ BitConverter.DoubleToInt64Bits(right[0])) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "(BitConverter.DoubleToInt64Bits(left[i]) ^ BitConverter.DoubleToInt64Bits(right[i])) != BitConverter.DoubleToInt64Bits(result[i])"}), }; (string templateFileName, Dictionary templateData)[] Avx1_Vector128Inputs = new [] @@ -793,6 +796,9 @@ (string templateFileName, Dictionary templateData)[] Avx2Inputs = new [] { + ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "Abs", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "SByte", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "result[0] != (byte)((firstOp[0] < 0) ? -firstOp[0] : firstOp[0])", ["ValidateRemainingResults"] = "result[i] != (byte)((firstOp[i] < 0) ? -firstOp[i] : firstOp[i])"}), + ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "Abs", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "result[0] != (ushort)((firstOp[0] < 0) ? -firstOp[0] : firstOp[0])", ["ValidateRemainingResults"] = "result[i] != (ushort)((firstOp[i] < 0) ? -firstOp[i] : firstOp[i])"}), + ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "Abs", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "result[0] != (uint)((firstOp[0] < 0) ? -firstOp[0] : firstOp[0])", ["ValidateRemainingResults"] = "result[i] != (uint)((firstOp[i] < 0) ? -firstOp[i] : firstOp[i])"}), ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "Add", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "(byte)(left[0] + right[0]) != result[0]", ["ValidateRemainingResults"] = "(byte)(left[i] + right[i]) != result[i]"}), ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "Add", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "(short)(left[0] + right[0]) != result[0]", ["ValidateRemainingResults"] = "(short)(left[i] + right[i]) != result[i]"}), ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "Add", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "(int)(left[0] + right[0]) != result[0]", ["ValidateRemainingResults"] = "(int)(left[i] + right[i]) != result[i]"}), @@ -801,6 +807,10 @@ ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "Add", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "(ushort)(left[0] + right[0]) != result[0]", ["ValidateRemainingResults"] = "(ushort)(left[i] + right[i]) != result[i]"}), ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "Add", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "(uint)(left[0] + right[0]) != result[0]", ["ValidateRemainingResults"] = "(uint)(left[i] + right[i]) != result[i]"}), ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "Add", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "(ulong)(left[0] + right[0]) != result[0]", ["ValidateRemainingResults"] = "(ulong)(left[i] + right[i]) != result[i]"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "AddSaturate", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "Sse2Verify.AddSaturate(left[0], right[0], result[0])", ["ValidateRemainingResults"] = "Sse2Verify.AddSaturate(left[i], right[i], result[i])"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "AddSaturate", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "Sse2Verify.AddSaturate(left[0], right[0], result[0])", ["ValidateRemainingResults"] = "Sse2Verify.AddSaturate(left[i], right[i], result[i])"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "AddSaturate", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "Sse2Verify.AddSaturate(left[0], right[0], result[0])", ["ValidateRemainingResults"] = "Sse2Verify.AddSaturate(left[i], right[i], result[i])"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "AddSaturate", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "Sse2Verify.AddSaturate(left[0], right[0], result[0])", ["ValidateRemainingResults"] = "Sse2Verify.AddSaturate(left[i], right[i], result[i])"}), ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "AlignRight", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "SByte", ["Imm"] = "5", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "result[0] != right[5]", ["ValidateRemainingResults"] = "(result[i] != ((i < 16) ? ((i < 11) ? right[i + 5] : left[i - 11]) : ((i < 27) ? right[i + 5] : left[i - 11])))"}), ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "AlignRight", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "SByte", ["Imm"] = "27", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "result[0] != left[11]", ["ValidateRemainingResults"] = "(result[i] != ((i < 16) ? ((i < 5) ? left[i + 11] : 0) : ((i < 21) ? left[i + 11] : 0)))"}), ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "AlignRight", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "SByte", ["Imm"] = "228", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "result[0] != 0", ["ValidateRemainingResults"] = "result[i] != 0"}), @@ -1030,6 +1040,10 @@ ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "Subtract", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "(ushort)(left[0] - right[0]) != result[0]", ["ValidateRemainingResults"] = "(ushort)(left[i] - right[i]) != result[i]"}), ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "Subtract", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "(uint)(left[0] - right[0]) != result[0]", ["ValidateRemainingResults"] = "(uint)(left[i] - right[i]) != result[i]"}), ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "Subtract", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "(ulong)(left[0] - right[0]) != result[0]", ["ValidateRemainingResults"] = "(ulong)(left[i] - right[i]) != result[i]"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "SubtractSaturate", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "Sse2Verify.SubtractSaturate(left[0], right[0], result[0])", ["ValidateRemainingResults"] = "Sse2Verify.SubtractSaturate(left[i], right[i], result[i])"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "SubtractSaturate", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "Sse2Verify.SubtractSaturate(left[0], right[0], result[0])", ["ValidateRemainingResults"] = "Sse2Verify.SubtractSaturate(left[i], right[i], result[i])"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "SubtractSaturate", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "Sse2Verify.SubtractSaturate(left[0], right[0], result[0])", ["ValidateRemainingResults"] = "Sse2Verify.SubtractSaturate(left[i], right[i], result[i])"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "SubtractSaturate", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "Sse2Verify.SubtractSaturate(left[0], right[0], result[0])", ["ValidateRemainingResults"] = "Sse2Verify.SubtractSaturate(left[i], right[i], result[i])"}), ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "Xor", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "(byte)(left[0] ^ right[0]) != result[0]", ["ValidateRemainingResults"] = "(byte)(left[i] ^ right[i]) != result[i]"}), ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "Xor", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "(short)(left[0] ^ right[0]) != result[0]", ["ValidateRemainingResults"] = "(short)(left[i] ^ right[i]) != result[i]"}), ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx2", ["LoadIsa"] = "Avx", ["Method"] = "Xor", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "(int)(left[0] ^ right[0]) != result[0]", ["ValidateRemainingResults"] = "(int)(left[i] ^ right[i]) != result[i]"}), @@ -1079,57 +1093,230 @@ (string templateFileName, Dictionary templateData)[] Avx512FInputs = new [] { + ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "Abs", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "result[0] != (uint)((firstOp[0] < 0) ? -firstOp[0] : firstOp[0])", ["ValidateRemainingResults"] = "result[i] != (uint)((firstOp[i] < 0) ? -firstOp[i] : firstOp[i])"}), + ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "Abs", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Int64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "result[0] != (ulong)((firstOp[0] < 0) ? -firstOp[0] : firstOp[0])", ["ValidateRemainingResults"] = "result[i] != (ulong)((firstOp[i] < 0) ? -firstOp[i] : firstOp[i])"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "Add", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(left[0] + right[0]) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(left[i] + right[i]) != BitConverter.DoubleToInt64Bits(result[i])"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "Add", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "(int)(left[0] + right[0]) != result[0]", ["ValidateRemainingResults"] = "(int)(left[i] + right[i]) != result[i]"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "Add", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "(long)(left[0] + right[0]) != result[0]", ["ValidateRemainingResults"] = "(long)(left[i] + right[i]) != result[i]"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "Add", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(left[0] + right[0]) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(left[i] + right[i]) != BitConverter.SingleToInt32Bits(result[i])"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "Add", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "(uint)(left[0] + right[0]) != result[0]", ["ValidateRemainingResults"] = "(uint)(left[i] + right[i]) != result[i]"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "Add", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "(ulong)(left[0] + right[0]) != result[0]", ["ValidateRemainingResults"] = "(ulong)(left[i] + right[i]) != result[i]"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "And", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "(byte)(left[0] & right[0]) != result[0]", ["ValidateRemainingResults"] = "(byte)(left[i] & right[i]) != result[i]"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "And", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "(short)(left[0] & right[0]) != result[0]", ["ValidateRemainingResults"] = "(short)(left[i] & right[i]) != result[i]"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "And", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "(int)(left[0] & right[0]) != result[0]", ["ValidateRemainingResults"] = "(int)(left[i] & right[i]) != result[i]"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "And", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "(long)(left[0] & right[0]) != result[0]", ["ValidateRemainingResults"] = "(long)(left[i] & right[i]) != result[i]"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "And", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "(sbyte)(left[0] & right[0]) != result[0]", ["ValidateRemainingResults"] = "(sbyte)(left[i] & right[i]) != result[i]"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "And", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "(ushort)(left[0] & right[0]) != result[0]", ["ValidateRemainingResults"] = "(ushort)(left[i] & right[i]) != result[i]"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "And", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "(uint)(left[0] & right[0]) != result[0]", ["ValidateRemainingResults"] = "(uint)(left[i] & right[i]) != result[i]"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "And", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "(ulong)(left[0] & right[0]) != result[0]", ["ValidateRemainingResults"] = "(ulong)(left[i] & right[i]) != result[i]"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "AndNot", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "(byte)(~left[0] & right[0]) != result[0]", ["ValidateRemainingResults"] = "(byte)(~left[i] & right[i]) != result[i]"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "AndNot", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "(short)(~left[0] & right[0]) != result[0]", ["ValidateRemainingResults"] = "(short)(~left[i] & right[i]) != result[i]"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "AndNot", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "(int)(~left[0] & right[0]) != result[0]", ["ValidateRemainingResults"] = "(int)(~left[i] & right[i]) != result[i]"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "AndNot", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "(long)(~left[0] & right[0]) != result[0]", ["ValidateRemainingResults"] = "(long)(~left[i] & right[i]) != result[i]"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "AndNot", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "(sbyte)(~left[0] & right[0]) != result[0]", ["ValidateRemainingResults"] = "(sbyte)(~left[i] & right[i]) != result[i]"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "AndNot", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "(ushort)(~left[0] & right[0]) != result[0]", ["ValidateRemainingResults"] = "(ushort)(~left[i] & right[i]) != result[i]"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "AndNot", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "(uint)(~left[0] & right[0]) != result[0]", ["ValidateRemainingResults"] = "(uint)(~left[i] & right[i]) != result[i]"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "AndNot", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "(ulong)(~left[0] & right[0]) != result[0]", ["ValidateRemainingResults"] = "(ulong)(~left[i] & right[i]) != result[i]"}), + ("SimpleUnOpConvTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "ConvertToVector512Int32", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "result[0] != (int)MathF.Round(firstOp[0])", ["ValidateRemainingResults"] = "result[i] != (int) MathF.Round(firstOp[i], 0)"}), + ("SimpleUnOpConvTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "ConvertToVector512Int32WithTruncation", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "result[0] != (int)firstOp[0]", ["ValidateRemainingResults"] = "result[i] != (int)firstOp[i]"}), + ("SimpleUnOpConvTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "ConvertToVector512Single", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits((float)firstOp[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits((float)firstOp[i])"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "Divide", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(left[0] / right[0]) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(left[i] / right[i]) != BitConverter.DoubleToInt64Bits(result[i])"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "Divide", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(left[0] / right[0]) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(left[i] / right[i]) != BitConverter.SingleToInt32Bits(result[i])"}), + ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "DuplicateEvenIndexed", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(firstOp[0]) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "(i % 2 == 0) ? (BitConverter.DoubleToInt64Bits(firstOp[i]) != BitConverter.DoubleToInt64Bits(result[i])) : (BitConverter.DoubleToInt64Bits(firstOp[i - 1]) != BitConverter.DoubleToInt64Bits(result[i]))"}), + ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "DuplicateEvenIndexed", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(firstOp[0]) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "(i % 2 == 0) ? (BitConverter.SingleToInt32Bits(firstOp[i]) != BitConverter.SingleToInt32Bits(result[i])) : (BitConverter.SingleToInt32Bits(firstOp[i - 1]) != BitConverter.SingleToInt32Bits(result[i]))"}), + ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "DuplicateOddIndexed", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(firstOp[1]) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "(i % 2 == 0) ? (BitConverter.SingleToInt32Bits(firstOp[i + 1]) != BitConverter.SingleToInt32Bits(result[i])) : (BitConverter.SingleToInt32Bits(firstOp[i]) != BitConverter.SingleToInt32Bits(result[i]))"}), + ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["Method"] = "LoadVector512", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(firstOp[0]) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(firstOp[i]) != BitConverter.SingleToInt32Bits(result[i])"}), + ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["Method"] = "LoadVector512", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(firstOp[0]) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(firstOp[i]) != BitConverter.DoubleToInt64Bits(result[i])"}), + ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["Method"] = "LoadVector512", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Byte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "firstOp[0] != result[0]", ["ValidateRemainingResults"] = "firstOp[i] != result[i]"}), + ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["Method"] = "LoadVector512", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "SByte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "firstOp[0] != result[0]", ["ValidateRemainingResults"] = "firstOp[i] != result[i]"}), + ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["Method"] = "LoadVector512", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "firstOp[0] != result[0]", ["ValidateRemainingResults"] = "firstOp[i] != result[i]"}), + ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["Method"] = "LoadVector512", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "UInt16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "firstOp[0] != result[0]", ["ValidateRemainingResults"] = "firstOp[i] != result[i]"}), + ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["Method"] = "LoadVector512", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "firstOp[0] != result[0]", ["ValidateRemainingResults"] = "firstOp[i] != result[i]"}), + ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["Method"] = "LoadVector512", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "UInt32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "firstOp[0] != result[0]", ["ValidateRemainingResults"] = "firstOp[i] != result[i]"}), + ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["Method"] = "LoadVector512", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Int64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "firstOp[0] != result[0]", ["ValidateRemainingResults"] = "firstOp[i] != result[i]"}), + ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["Method"] = "LoadVector512", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "firstOp[0] != result[0]", ["ValidateRemainingResults"] = "firstOp[i] != result[i]"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "Max", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(Math.Max(left[0], right[0])) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(Math.Max(left[i], right[i])) != BitConverter.DoubleToInt64Bits(result[i])"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "Max", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "result[0] != Math.Max(left[0], right[0])", ["ValidateRemainingResults"] = "result[i] != Math.Max(left[i], right[i])"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "Max", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "result[0] != Math.Max(left[0], right[0])", ["ValidateRemainingResults"] = "result[i] != Math.Max(left[i], right[i])"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "Max", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(MathF.Max(left[0], right[0])) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(MathF.Max(left[i], right[i])) != BitConverter.SingleToInt32Bits(result[i])"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "Max", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "result[0] != Math.Max(left[0], right[0])", ["ValidateRemainingResults"] = "result[i] != Math.Max(left[i], right[i])"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "Max", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "result[0] != Math.Max(left[0], right[0])", ["ValidateRemainingResults"] = "result[i] != Math.Max(left[i], right[i])"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "Min", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(Math.Min(left[0], right[0])) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(Math.Min(left[i], right[i])) != BitConverter.DoubleToInt64Bits(result[i])"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "Min", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "result[0] != Math.Min(left[0], right[0])", ["ValidateRemainingResults"] = "result[i] != Math.Min(left[i], right[i])"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "Min", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "result[0] != Math.Min(left[0], right[0])", ["ValidateRemainingResults"] = "result[i] != Math.Min(left[i], right[i])"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "Min", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(MathF.Min(left[0], right[0])) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(MathF.Min(left[i], right[i])) != BitConverter.SingleToInt32Bits(result[i])"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "Min", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "result[0] != Math.Min(left[0], right[0])", ["ValidateRemainingResults"] = "result[i] != Math.Min(left[i], right[i])"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "Min", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "result[0] != Math.Min(left[0], right[0])", ["ValidateRemainingResults"] = "result[i] != Math.Min(left[i], right[i])"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "Multiply", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(left[0] * right[0]) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(left[i] * right[i]) != BitConverter.DoubleToInt64Bits(result[i])"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "Multiply", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(left[0] * right[0]) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(left[i] * right[i]) != BitConverter.SingleToInt32Bits(result[i])"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "MultiplyLow", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "result[0] != BitConverter.ToInt32(BitConverter.GetBytes(((long)(left[0])) * right[0]), 0)", ["ValidateRemainingResults"] = "result[i] != BitConverter.ToInt32(BitConverter.GetBytes(((long)(left[i])) * right[i]), 0)"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "MultiplyLow", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "result[0] != BitConverter.ToUInt32(BitConverter.GetBytes(((ulong)(left[0])) * right[0]), 0)", ["ValidateRemainingResults"] = "result[i] != BitConverter.ToUInt32(BitConverter.GetBytes(((ulong)(left[i])) * right[i]), 0)"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "Or", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "(byte)(left[0] | right[0]) != result[0]", ["ValidateRemainingResults"] = "(byte)(left[i] | right[i]) != result[i]"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "Or", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "(short)(left[0] | right[0]) != result[0]", ["ValidateRemainingResults"] = "(short)(left[i] | right[i]) != result[i]"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "Or", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "(int)(left[0] | right[0]) != result[0]", ["ValidateRemainingResults"] = "(int)(left[i] | right[i]) != result[i]"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "Or", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "(long)(left[0] | right[0]) != result[0]", ["ValidateRemainingResults"] = "(long)(left[i] | right[i]) != result[i]"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "Or", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "(sbyte)(left[0] | right[0]) != result[0]", ["ValidateRemainingResults"] = "(sbyte)(left[i] | right[i]) != result[i]"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "Or", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "(ushort)(left[0] | right[0]) != result[0]", ["ValidateRemainingResults"] = "(ushort)(left[i] | right[i]) != result[i]"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "Or", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "(uint)(left[0] | right[0]) != result[0]", ["ValidateRemainingResults"] = "(uint)(left[i] | right[i]) != result[i]"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "Or", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "(ulong)(left[0] | right[0]) != result[0]", ["ValidateRemainingResults"] = "(ulong)(left[i] | right[i]) != result[i]"}), + ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Int32", ["Imm"] = "1", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "(int)(firstOp[0] << 1) != result[0]", ["ValidateRemainingResults"] = "(int)(firstOp[i] << 1) != result[i]"}), + ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Int32", ["Imm"] = "32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "0 != result[0]", ["ValidateRemainingResults"] = "0 != result[i]"}), + ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Int64", ["Imm"] = "1", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "(long)(firstOp[0] << 1) != result[0]", ["ValidateRemainingResults"] = "(long)(firstOp[i] << 1) != result[i]"}), + ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Int64", ["Imm"] = "64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "0 != result[0]", ["ValidateRemainingResults"] = "0 != result[i]"}), + ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "UInt32", ["Imm"] = "1", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "(uint)(firstOp[0] << 1) != result[0]", ["ValidateRemainingResults"] = "(uint)(firstOp[i] << 1) != result[i]"}), + ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "UInt32", ["Imm"] = "32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "0 != result[0]", ["ValidateRemainingResults"] = "0!= result[i]"}), + ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "UInt64", ["Imm"] = "1", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "(ulong)(firstOp[0] << 1) != result[0]", ["ValidateRemainingResults"] = "(ulong)(firstOp[i] << 1) != result[i]"}), + ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "UInt64", ["Imm"] = "64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "0 != result[0]", ["ValidateRemainingResults"] = "0 != result[i]"}), + ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "ShiftRightArithmetic", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Int32", ["Imm"] = "1", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "(int)(firstOp[0] >> 1) != result[0]", ["ValidateRemainingResults"] = "(int)(firstOp[i] >> 1) != result[i]"}), + ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "ShiftRightArithmetic", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Int32", ["Imm"] = "32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "(int)(firstOp[0] >> 31) != result[0]", ["ValidateRemainingResults"] = "(int)(firstOp[i] >> 31) != result[i]"}), + ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "ShiftRightArithmetic", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Int64", ["Imm"] = "1", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "(long)(firstOp[0] >> 1) != result[0]", ["ValidateRemainingResults"] = "(long)(firstOp[i] >> 1) != result[i]"}), + ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "ShiftRightArithmetic", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Int64", ["Imm"] = "64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "(long)(firstOp[0] >> 63) != result[0]", ["ValidateRemainingResults"] = "(long)(firstOp[i] >> 63) != result[i]"}), + ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Int32", ["Imm"] = "1", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "(int)(firstOp[0] >> 1) != result[0]", ["ValidateRemainingResults"] = "(int)(firstOp[i] >> 1) != result[i]"}), + ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Int32", ["Imm"] = "32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "0 != result[0]", ["ValidateRemainingResults"] = "0 != result[i]"}), + ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Int64", ["Imm"] = "1", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "(long)(firstOp[0] >> 1) != result[0]", ["ValidateRemainingResults"] = "(long)(firstOp[i] >> 1) != result[i]"}), + ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Int64", ["Imm"] = "64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "0 != result[0]", ["ValidateRemainingResults"] = "0 != result[i]"}), + ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "UInt32", ["Imm"] = "1", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "(uint)(firstOp[0] >> 1) != result[0]", ["ValidateRemainingResults"] = "(uint)(firstOp[i] >> 1) != result[i]"}), + ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "UInt32", ["Imm"] = "32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "0 != result[0]", ["ValidateRemainingResults"] = "0!= result[i]"}), + ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "UInt64", ["Imm"] = "1", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "(ulong)(firstOp[0] >> 1) != result[0]", ["ValidateRemainingResults"] = "(ulong)(firstOp[i] >> 1) != result[i]"}), + ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "UInt64", ["Imm"] = "64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "0 != result[0]", ["ValidateRemainingResults"] = "0 != result[i]"}), + ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "Shuffle", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Single", ["Imm"] = "1", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits(left[1])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[7]) != BitConverter.SingleToInt32Bits(right[4])"}), + ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "Shuffle", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Double", ["Imm"] = "1", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits(left[1])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[3]) != BitConverter.DoubleToInt64Bits(right[2])"}), + ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "Shuffle", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Int32", ["Imm"] = "1", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "result[0] != firstOp[1]", ["ValidateRemainingResults"] = "result[i] != (i < 4 ? firstOp[0] : (i == 4 ? firstOp[5] : firstOp[4]))"}), + ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "Shuffle", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "UInt32", ["Imm"] = "1", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "result[0] != firstOp[1]", ["ValidateRemainingResults"] = "result[i] != (i < 4 ? firstOp[0] : (i == 4 ? firstOp[5] : firstOp[4]))"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "Subtract", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(left[0] - right[0]) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(left[i] - right[i]) != BitConverter.DoubleToInt64Bits(result[i])"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "Subtract", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "(int)(left[0] - right[0]) != result[0]", ["ValidateRemainingResults"] = "(int)(left[i] - right[i]) != result[i]"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "Subtract", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "(long)(left[0] - right[0]) != result[0]", ["ValidateRemainingResults"] = "(long)(left[i] - right[i]) != result[i]"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "Subtract", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(left[0] - right[0]) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(left[i] - right[i]) != BitConverter.SingleToInt32Bits(result[i])"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "Subtract", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "(uint)(left[0] - right[0]) != result[0]", ["ValidateRemainingResults"] = "(uint)(left[i] - right[i]) != result[i]"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "Subtract", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "(ulong)(left[0] - right[0]) != result[0]", ["ValidateRemainingResults"] = "(ulong)(left[i] - right[i]) != result[i]"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "Xor", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "(byte)(left[0] ^ right[0]) != result[0]", ["ValidateRemainingResults"] = "(byte)(left[i] ^ right[i]) != result[i]"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "Xor", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "(short)(left[0] ^ right[0]) != result[0]", ["ValidateRemainingResults"] = "(short)(left[i] ^ right[i]) != result[i]"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "Xor", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "(int)(left[0] ^ right[0]) != result[0]", ["ValidateRemainingResults"] = "(int)(left[i] ^ right[i]) != result[i]"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "Xor", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "(long)(left[0] ^ right[0]) != result[0]", ["ValidateRemainingResults"] = "(long)(left[i] ^ right[i]) != result[i]"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "Xor", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "(sbyte)(left[0] ^ right[0]) != result[0]", ["ValidateRemainingResults"] = "(sbyte)(left[i] ^ right[i]) != result[i]"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "Xor", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "(ushort)(left[0] ^ right[0]) != result[0]", ["ValidateRemainingResults"] = "(ushort)(left[i] ^ right[i]) != result[i]"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "Xor", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "(uint)(left[0] ^ right[0]) != result[0]", ["ValidateRemainingResults"] = "(uint)(left[i] ^ right[i]) != result[i]"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "Xor", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "(ulong)(left[0] ^ right[0]) != result[0]", ["ValidateRemainingResults"] = "(ulong)(left[i] ^ right[i]) != result[i]"}), +}; - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "And", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "(byte)(left[0] & right[0]) != result[0]", ["ValidateRemainingResults"] = "(byte)(left[i] & right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "And", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "(BitConverter.DoubleToInt64Bits(left[0]) & BitConverter.DoubleToInt64Bits(right[0])) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "(BitConverter.DoubleToInt64Bits(left[i]) & BitConverter.DoubleToInt64Bits(right[i])) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "And", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "(short)(left[0] & right[0]) != result[0]", ["ValidateRemainingResults"] = "(short)(left[i] & right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "And", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "(int)(left[0] & right[0]) != result[0]", ["ValidateRemainingResults"] = "(int)(left[i] & right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "And", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "(long)(left[0] & right[0]) != result[0]", ["ValidateRemainingResults"] = "(long)(left[i] & right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "And", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "(sbyte)(left[0] & right[0]) != result[0]", ["ValidateRemainingResults"] = "(sbyte)(left[i] & right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "And", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "(BitConverter.SingleToInt32Bits(left[0]) & BitConverter.SingleToInt32Bits(right[0])) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "(BitConverter.SingleToInt32Bits(left[i]) & BitConverter.SingleToInt32Bits(right[i])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "And", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "(ushort)(left[0] & right[0]) != result[0]", ["ValidateRemainingResults"] = "(ushort)(left[i] & right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "And", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "(uint)(left[0] & right[0]) != result[0]", ["ValidateRemainingResults"] = "(uint)(left[i] & right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "And", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "(ulong)(left[0] & right[0]) != result[0]", ["ValidateRemainingResults"] = "(ulong)(left[i] & right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "AndNot", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "(byte)(~left[0] & right[0]) != result[0]", ["ValidateRemainingResults"] = "(byte)(~left[i] & right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "AndNot", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "((~BitConverter.DoubleToInt64Bits(left[0])) & BitConverter.DoubleToInt64Bits(right[0])) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "((~BitConverter.DoubleToInt64Bits(left[i])) & BitConverter.DoubleToInt64Bits(right[i])) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "AndNot", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "(short)(~left[0] & right[0]) != result[0]", ["ValidateRemainingResults"] = "(short)(~left[i] & right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "AndNot", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "(int)(~left[0] & right[0]) != result[0]", ["ValidateRemainingResults"] = "(int)(~left[i] & right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "AndNot", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "(long)(~left[0] & right[0]) != result[0]", ["ValidateRemainingResults"] = "(long)(~left[i] & right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "AndNot", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "(sbyte)(~left[0] & right[0]) != result[0]", ["ValidateRemainingResults"] = "(sbyte)(~left[i] & right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "AndNot", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "((~BitConverter.SingleToInt32Bits(left[0])) & BitConverter.SingleToInt32Bits(right[0])) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "((~BitConverter.SingleToInt32Bits(left[i])) & BitConverter.SingleToInt32Bits(right[i])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "AndNot", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "(ushort)(~left[0] & right[0]) != result[0]", ["ValidateRemainingResults"] = "(ushort)(~left[i] & right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "AndNot", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "(uint)(~left[0] & right[0]) != result[0]", ["ValidateRemainingResults"] = "(uint)(~left[i] & right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "AndNot", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "(ulong)(~left[0] & right[0]) != result[0]", ["ValidateRemainingResults"] = "(ulong)(~left[i] & right[i]) != result[i]"}), - ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["Method"] = "LoadVector512", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(firstOp[0]) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(firstOp[i]) != BitConverter.SingleToInt32Bits(result[i])"}), - ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["Method"] = "LoadVector512", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(firstOp[0]) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(firstOp[i]) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["Method"] = "LoadVector512", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Byte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "firstOp[0] != result[0]", ["ValidateRemainingResults"] = "firstOp[i] != result[i]"}), - ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["Method"] = "LoadVector512", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "SByte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "firstOp[0] != result[0]", ["ValidateRemainingResults"] = "firstOp[i] != result[i]"}), - ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["Method"] = "LoadVector512", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "firstOp[0] != result[0]", ["ValidateRemainingResults"] = "firstOp[i] != result[i]"}), - ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["Method"] = "LoadVector512", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "UInt16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "firstOp[0] != result[0]", ["ValidateRemainingResults"] = "firstOp[i] != result[i]"}), - ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["Method"] = "LoadVector512", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "firstOp[0] != result[0]", ["ValidateRemainingResults"] = "firstOp[i] != result[i]"}), - ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["Method"] = "LoadVector512", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "UInt32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "firstOp[0] != result[0]", ["ValidateRemainingResults"] = "firstOp[i] != result[i]"}), - ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["Method"] = "LoadVector512", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Int64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "firstOp[0] != result[0]", ["ValidateRemainingResults"] = "firstOp[i] != result[i]"}), - ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["Method"] = "LoadVector512", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "firstOp[0] != result[0]", ["ValidateRemainingResults"] = "firstOp[i] != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "Or", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "(byte)(left[0] | right[0]) != result[0]", ["ValidateRemainingResults"] = "(byte)(left[i] | right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "Or", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "(BitConverter.DoubleToInt64Bits(left[0]) | BitConverter.DoubleToInt64Bits(right[0])) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "(BitConverter.DoubleToInt64Bits(left[i]) | BitConverter.DoubleToInt64Bits(right[i])) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "Or", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "(short)(left[0] | right[0]) != result[0]", ["ValidateRemainingResults"] = "(short)(left[i] | right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "Or", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "(int)(left[0] | right[0]) != result[0]", ["ValidateRemainingResults"] = "(int)(left[i] | right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "Or", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "(long)(left[0] | right[0]) != result[0]", ["ValidateRemainingResults"] = "(long)(left[i] | right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "Or", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "(sbyte)(left[0] | right[0]) != result[0]", ["ValidateRemainingResults"] = "(sbyte)(left[i] | right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "Or", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "(BitConverter.SingleToInt32Bits(left[0]) | BitConverter.SingleToInt32Bits(right[0])) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "(BitConverter.SingleToInt32Bits(left[i]) | BitConverter.SingleToInt32Bits(right[i])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "Or", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "(ushort)(left[0] | right[0]) != result[0]", ["ValidateRemainingResults"] = "(ushort)(left[i] | right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "Or", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "(uint)(left[0] | right[0]) != result[0]", ["ValidateRemainingResults"] = "(uint)(left[i] | right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "Or", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "(ulong)(left[0] | right[0]) != result[0]", ["ValidateRemainingResults"] = "(ulong)(left[i] | right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "Xor", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "(byte)(left[0] ^ right[0]) != result[0]", ["ValidateRemainingResults"] = "(byte)(left[i] ^ right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "Xor", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "(BitConverter.SingleToInt32Bits(left[0]) ^ BitConverter.SingleToInt32Bits(right[0])) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "(BitConverter.SingleToInt32Bits(left[i]) ^ BitConverter.SingleToInt32Bits(right[i])) != BitConverter.SingleToInt32Bits(result[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "Xor", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "(short)(left[0] ^ right[0]) != result[0]", ["ValidateRemainingResults"] = "(short)(left[i] ^ right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "Xor", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "(int)(left[0] ^ right[0]) != result[0]", ["ValidateRemainingResults"] = "(int)(left[i] ^ right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "Xor", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "(long)(left[0] ^ right[0]) != result[0]", ["ValidateRemainingResults"] = "(long)(left[i] ^ right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "Xor", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "(sbyte)(left[0] ^ right[0]) != result[0]", ["ValidateRemainingResults"] = "(sbyte)(left[i] ^ right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "Xor", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "(BitConverter.DoubleToInt64Bits(left[0]) ^ BitConverter.DoubleToInt64Bits(right[0])) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "(BitConverter.DoubleToInt64Bits(left[i]) ^ BitConverter.DoubleToInt64Bits(right[i])) != BitConverter.DoubleToInt64Bits(result[i])"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "Xor", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "(ushort)(left[0] ^ right[0]) != result[0]", ["ValidateRemainingResults"] = "(ushort)(left[i] ^ right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "Xor", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateFirstResult"] = "(uint)(left[0] ^ right[0]) != result[0]", ["ValidateRemainingResults"] = "(uint)(left[i] ^ right[i]) != result[i]"}), - ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "Xor", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "(ulong)(left[0] ^ right[0]) != result[0]", ["ValidateRemainingResults"] = "(ulong)(left[i] ^ right[i]) != result[i]"}), +(string templateFileName, Dictionary templateData)[] Avx512F_VL_Vector128Inputs = new [] +{ + ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Avx512F.VL", ["LoadIsa"] = "Sse2", ["Method"] = "Abs", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "result[0] != (ulong)((firstOp[0] < 0) ? -firstOp[0] : firstOp[0])", ["ValidateRemainingResults"] = "result[i] != (ulong)((firstOp[i] < 0) ? -firstOp[i] : firstOp[i])"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F.VL", ["LoadIsa"] = "Sse2", ["Method"] = "Max", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "result[0] != Math.Max(left[0], right[0])", ["ValidateRemainingResults"] = "result[i] != Math.Max(left[i], right[i])"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F.VL", ["LoadIsa"] = "Sse2", ["Method"] = "Max", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "result[0] != Math.Max(left[0], right[0])", ["ValidateRemainingResults"] = "result[i] != Math.Max(left[i], right[i])"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F.VL", ["LoadIsa"] = "Sse2", ["Method"] = "Min", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "result[0] != Math.Min(left[0], right[0])", ["ValidateRemainingResults"] = "result[i] != Math.Min(left[i], right[i])"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F.VL", ["LoadIsa"] = "Sse2", ["Method"] = "Min", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "result[0] != Math.Min(left[0], right[0])", ["ValidateRemainingResults"] = "result[i] != Math.Min(left[i], right[i])"}), +}; + +(string templateFileName, Dictionary templateData)[] Avx512F_VL_Vector256Inputs = new [] +{ + ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Avx512F.VL", ["LoadIsa"] = "Avx", ["Method"] = "Abs", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int64", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "result[0] != (ulong)((firstOp[0] < 0) ? -firstOp[0] : firstOp[0])", ["ValidateRemainingResults"] = "result[i] != (ulong)((firstOp[i] < 0) ? -firstOp[i] : firstOp[i])"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F.VL", ["LoadIsa"] = "Avx", ["Method"] = "Max", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "result[0] != Math.Max(left[0], right[0])", ["ValidateRemainingResults"] = "result[i] != Math.Max(left[i], right[i])"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F.VL", ["LoadIsa"] = "Avx", ["Method"] = "Max", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "result[0] != Math.Max(left[0], right[0])", ["ValidateRemainingResults"] = "result[i] != Math.Max(left[i], right[i])"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F.VL", ["LoadIsa"] = "Avx", ["Method"] = "Min", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "result[0] != Math.Min(left[0], right[0])", ["ValidateRemainingResults"] = "result[i] != Math.Min(left[i], right[i])"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512F.VL", ["LoadIsa"] = "Avx", ["Method"] = "Min", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "result[0] != Math.Min(left[0], right[0])", ["ValidateRemainingResults"] = "result[i] != Math.Min(left[i], right[i])"}), +}; + +(string templateFileName, Dictionary templateData)[] Avx512BWInputs = new [] +{ + ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Avx512BW", ["LoadIsa"] = "Avx512F", ["Method"] = "Abs", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "SByte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "result[0] != (byte)((firstOp[0] < 0) ? -firstOp[0] : firstOp[0])", ["ValidateRemainingResults"] = "result[i] != (byte)((firstOp[i] < 0) ? -firstOp[i] : firstOp[i])"}), + ("SimpleUnOpTest.template", new Dictionary { ["Isa"] = "Avx512BW", ["LoadIsa"] = "Avx512F", ["Method"] = "Abs", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "result[0] != (ushort)((firstOp[0] < 0) ? -firstOp[0] : firstOp[0])", ["ValidateRemainingResults"] = "result[i] != (ushort)((firstOp[i] < 0) ? -firstOp[i] : firstOp[i])"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512BW", ["LoadIsa"] = "Avx512F", ["Method"] = "Add", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "(byte)(left[0] + right[0]) != result[0]", ["ValidateRemainingResults"] = "(byte)(left[i] + right[i]) != result[i]"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512BW", ["LoadIsa"] = "Avx512F", ["Method"] = "Add", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "(short)(left[0] + right[0]) != result[0]", ["ValidateRemainingResults"] = "(short)(left[i] + right[i]) != result[i]"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512BW", ["LoadIsa"] = "Avx512F", ["Method"] = "Add", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "(sbyte)(left[0] + right[0]) != result[0]", ["ValidateRemainingResults"] = "(sbyte)(left[i] + right[i]) != result[i]"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512BW", ["LoadIsa"] = "Avx512F", ["Method"] = "Add", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "(ushort)(left[0] + right[0]) != result[0]", ["ValidateRemainingResults"] = "(ushort)(left[i] + right[i]) != result[i]"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512BW", ["LoadIsa"] = "Avx512F", ["Method"] = "AddSaturate", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "Sse2Verify.AddSaturate(left[0], right[0], result[0])", ["ValidateRemainingResults"] = "Sse2Verify.AddSaturate(left[i], right[i], result[i])"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512BW", ["LoadIsa"] = "Avx512F", ["Method"] = "AddSaturate", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "Sse2Verify.AddSaturate(left[0], right[0], result[0])", ["ValidateRemainingResults"] = "Sse2Verify.AddSaturate(left[i], right[i], result[i])"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512BW", ["LoadIsa"] = "Avx512F", ["Method"] = "AddSaturate", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "Sse2Verify.AddSaturate(left[0], right[0], result[0])", ["ValidateRemainingResults"] = "Sse2Verify.AddSaturate(left[i], right[i], result[i])"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512BW", ["LoadIsa"] = "Avx512F", ["Method"] = "AddSaturate", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "Sse2Verify.AddSaturate(left[0], right[0], result[0])", ["ValidateRemainingResults"] = "Sse2Verify.AddSaturate(left[i], right[i], result[i])"}), + ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx512BW", ["LoadIsa"] = "Avx512F", ["Method"] = "AlignRight", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "SByte", ["Imm"] = "5", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "result[0] != right[5]", ["ValidateRemainingResults"] = "(result[i] != ((i < 48) ? (((i % 16) < 11) ? right[i + 5] : left[i - 11]) : ((i < 59) ? right[i + 5] : left[i - 11])))"}), + ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx512BW", ["LoadIsa"] = "Avx512F", ["Method"] = "AlignRight", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "SByte", ["Imm"] = "27", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "result[0] != left[11]", ["ValidateRemainingResults"] = "(result[i] != ((i < 48) ? (((i % 16) < 5) ? left[i + 11] : 0) : ((i < 53) ? left[i + 11] : 0)))"}), + ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx512BW", ["LoadIsa"] = "Avx512F", ["Method"] = "AlignRight", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "SByte", ["Imm"] = "228", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "result[0] != 0", ["ValidateRemainingResults"] = "result[i] != 0"}), + ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx512BW", ["LoadIsa"] = "Avx512F", ["Method"] = "AlignRight", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "SByte", ["Imm"] = "250", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "result[0] != 0", ["ValidateRemainingResults"] = "result[i] != 0"}), + ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx512BW", ["LoadIsa"] = "Avx512F", ["Method"] = "AlignRight", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Byte", ["Imm"] = "5", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "result[0] != right[5]", ["ValidateRemainingResults"] = "(result[i] != ((i < 48) ? (((i % 16) < 11) ? right[i + 5] : left[i - 11]) : ((i < 59) ? right[i + 5] : left[i - 11])))"}), + ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx512BW", ["LoadIsa"] = "Avx512F", ["Method"] = "AlignRight", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Byte", ["Imm"] = "27", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "result[0] != left[11]", ["ValidateRemainingResults"] = "(result[i] != ((i < 48) ? (((i % 16) < 5) ? left[i + 11] : 0) : ((i < 53) ? left[i + 11] : 0)))"}), + ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx512BW", ["LoadIsa"] = "Avx512F", ["Method"] = "AlignRight", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Byte", ["Imm"] = "228", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "result[0] != 0", ["ValidateRemainingResults"] = "result[i] != 0"}), + ("ImmBinOpTest.template", new Dictionary { ["Isa"] = "Avx512BW", ["LoadIsa"] = "Avx512F", ["Method"] = "AlignRight", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Byte", ["Imm"] = "250", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "result[0] != 0", ["ValidateRemainingResults"] = "result[i] != 0"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512BW", ["LoadIsa"] = "Avx512F", ["Method"] = "Average", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "(byte)((left[0] + right[0] + 1) >> 1) != result[0]", ["ValidateRemainingResults"] = "(byte)((left[i] + right[i] + 1) >> 1) != result[i]"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512BW", ["LoadIsa"] = "Avx512F", ["Method"] = "Average", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "(ushort)((left[0] + right[0] + 1) >> 1) != result[0]", ["ValidateRemainingResults"] = "(ushort)((left[i] + right[i] + 1) >> 1) != result[i]"}), + ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Avx512BW", ["Method"] = "LoadVector512", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Byte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "firstOp[0] != result[0]", ["ValidateRemainingResults"] = "firstOp[i] != result[i]"}), + ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Avx512BW", ["Method"] = "LoadVector512", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "SByte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "firstOp[0] != result[0]", ["ValidateRemainingResults"] = "firstOp[i] != result[i]"}), + ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Avx512BW", ["Method"] = "LoadVector512", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "firstOp[0] != result[0]", ["ValidateRemainingResults"] = "firstOp[i] != result[i]"}), + ("LoadUnOpTest.template", new Dictionary { ["Isa"] = "Avx512BW", ["Method"] = "LoadVector512", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "UInt16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "firstOp[0] != result[0]", ["ValidateRemainingResults"] = "firstOp[i] != result[i]"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512BW", ["LoadIsa"] = "Avx512F", ["Method"] = "Max", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "result[0] != Math.Max(left[0], right[0])", ["ValidateRemainingResults"] = "result[i] != Math.Max(left[i], right[i])"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512BW", ["LoadIsa"] = "Avx512F", ["Method"] = "Max", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "result[0] != Math.Max(left[0], right[0])", ["ValidateRemainingResults"] = "result[i] != Math.Max(left[i], right[i])"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512BW", ["LoadIsa"] = "Avx512F", ["Method"] = "Max", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "result[0] != Math.Max(left[0], right[0])", ["ValidateRemainingResults"] = "result[i] != Math.Max(left[i], right[i])"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512BW", ["LoadIsa"] = "Avx512F", ["Method"] = "Max", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "result[0] != Math.Max(left[0], right[0])", ["ValidateRemainingResults"] = "result[i] != Math.Max(left[i], right[i])"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512BW", ["LoadIsa"] = "Avx512F", ["Method"] = "Min", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "result[0] != Math.Min(left[0], right[0])", ["ValidateRemainingResults"] = "result[i] != Math.Min(left[i], right[i])"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512BW", ["LoadIsa"] = "Avx512F", ["Method"] = "Min", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "result[0] != Math.Min(left[0], right[0])", ["ValidateRemainingResults"] = "result[i] != Math.Min(left[i], right[i])"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512BW", ["LoadIsa"] = "Avx512F", ["Method"] = "Min", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "result[0] != Math.Min(left[0], right[0])", ["ValidateRemainingResults"] = "result[i] != Math.Min(left[i], right[i])"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512BW", ["LoadIsa"] = "Avx512F", ["Method"] = "Min", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "result[0] != Math.Min(left[0], right[0])", ["ValidateRemainingResults"] = "result[i] != Math.Min(left[i], right[i])"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512BW", ["LoadIsa"] = "Avx512F", ["Method"] = "MultiplyAddAdjacent", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "result[0] != Math.Clamp(((right[1] * left[1]) + (right[0] * left[0])), short.MinValue, short.MaxValue)", ["ValidateRemainingResults"] = "result[i] != Math.Clamp(((right[(i * 2) + 1] * left[(i * 2) + 1]) + (right[i * 2] * left[i * 2])), short.MinValue, short.MaxValue)"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512BW", ["LoadIsa"] = "Avx512F", ["Method"] = "MultiplyAddAdjacent", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "result[0] != Math.Clamp(((right[1] * left[1]) + (right[0] * left[0])), int.MinValue, int.MaxValue)", ["ValidateRemainingResults"] = "result[i] != Math.Clamp(((right[(i * 2) + 1] * left[(i * 2) + 1]) + (right[i * 2] * left[i * 2])), int.MinValue, int.MaxValue)"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512BW", ["LoadIsa"] = "Avx512F", ["Method"] = "MultiplyHigh", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "result[0] != BitConverter.ToInt16(BitConverter.GetBytes((((int)(left[0])) * right[0]) >> 16), 0)", ["ValidateRemainingResults"] = "result[i] != BitConverter.ToInt16(BitConverter.GetBytes((((int)(left[i])) * right[i]) >> 16), 0)"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512BW", ["LoadIsa"] = "Avx512F", ["Method"] = "MultiplyHigh", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "result[0] != BitConverter.ToUInt16(BitConverter.GetBytes((((uint)(left[0])) * right[0]) >> 16), 0)", ["ValidateRemainingResults"] = "result[i] != BitConverter.ToUInt16(BitConverter.GetBytes((((uint)(left[i])) * right[i]) >> 16), 0)"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512BW", ["LoadIsa"] = "Avx512F", ["Method"] = "MultiplyHighRoundScale", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "result[0] != (short)((((left[0] * right[0]) >> 14) + 1) >> 1)", ["ValidateRemainingResults"] = "result[i] != (short)((((left[i] * right[i]) >> 14) + 1) >> 1)"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512BW", ["LoadIsa"] = "Avx512F", ["Method"] = "MultiplyLow", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "result[0] != BitConverter.ToInt16(BitConverter.GetBytes(((int)(left[0])) * right[0]), 0)", ["ValidateRemainingResults"] = "result[i] != BitConverter.ToInt16(BitConverter.GetBytes(((int)(left[i])) * right[i]), 0)"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512BW", ["LoadIsa"] = "Avx512F", ["Method"] = "MultiplyLow", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "result[0] != BitConverter.ToUInt16(BitConverter.GetBytes(((uint)(left[0])) * right[0]), 0)", ["ValidateRemainingResults"] = "result[i] != BitConverter.ToUInt16(BitConverter.GetBytes(((uint)(left[i])) * right[i]), 0)"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512BW", ["LoadIsa"] = "Avx512F", ["Method"] = "PackSignedSaturate", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "result[0] != (short)Math.Clamp(left[0], short.MinValue, short.MaxValue)", ["ValidateRemainingResults"] = "result[i] != ((i % 8) < 4 ? (short)Math.Clamp(left[i - ((i / 8) * 4)], short.MinValue, short.MaxValue) : (short)Math.Clamp(right[i - 4 - ((i / 8) * 4)], short.MinValue, short.MaxValue))"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512BW", ["LoadIsa"] = "Avx512F", ["Method"] = "PackSignedSaturate", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "result[0] != (sbyte)Math.Clamp(left[0], sbyte.MinValue, sbyte.MaxValue)", ["ValidateRemainingResults"] = "result[i] != ((i % 16) < 8 ? (sbyte)Math.Clamp(left[i- ((i / 16) * 8)], sbyte.MinValue, sbyte.MaxValue) : (sbyte)Math.Clamp(right[i - 8 - ((i / 16) * 8)], sbyte.MinValue, sbyte.MaxValue))"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512BW", ["LoadIsa"] = "Avx512F", ["Method"] = "PackUnsignedSaturate", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "result[0] != (byte)Math.Clamp(left[0], byte.MinValue, byte.MaxValue)", ["ValidateRemainingResults"] = "result[i] != ((i % 16) < 8 ? (byte)Math.Clamp(left[i- ((i / 16) * 8)], byte.MinValue, byte.MaxValue) : (byte)Math.Clamp(right[i - 8 - ((i / 16) * 8)], byte.MinValue, byte.MaxValue))"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512BW", ["LoadIsa"] = "Avx512F", ["Method"] = "PackUnsignedSaturate", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateFirstResult"] = "result[0] != (ushort)Math.Clamp(left[0], ushort.MinValue, ushort.MaxValue)", ["ValidateRemainingResults"] = "result[i] != ((i % 8) < 4 ? (ushort)Math.Clamp(left[i- ((i / 8) * 4)], ushort.MinValue, ushort.MaxValue) : (ushort)Math.Clamp(right[i - 4 - ((i / 8) * 4)], ushort.MinValue, ushort.MaxValue))"}), + ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx512BW", ["LoadIsa"] = "Avx512F", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Int16", ["Imm"] = "1", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "(short)(firstOp[0] << 1) != result[0]", ["ValidateRemainingResults"] = "(short)(firstOp[i] << 1) != result[i]"}), + ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx512BW", ["LoadIsa"] = "Avx512F", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Int16", ["Imm"] = "16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "0 != result[0]", ["ValidateRemainingResults"] = "0 != result[i]"}), + ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx512BW", ["LoadIsa"] = "Avx512F", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "UInt16", ["Imm"] = "1", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "(ushort)(firstOp[0] << 1) != result[0]", ["ValidateRemainingResults"] = "(ushort)(firstOp[i] << 1) != result[i]"}), + ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx512BW", ["LoadIsa"] = "Avx512F", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "UInt16", ["Imm"] = "16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "0 != result[0]", ["ValidateRemainingResults"] = "0 != result[i]"}), + ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx512BW", ["LoadIsa"] = "Avx512F", ["Method"] = "ShiftLeftLogical128BitLane", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Byte", ["Imm"] = "1", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "(byte)8", ["ValidateFirstResult"] = "result[0] != 0", ["ValidateRemainingResults"] = "((i % 16) == 0 ? result[i] != 0 : result[i] != 8)"}), + ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx512BW", ["LoadIsa"] = "Avx512F", ["Method"] = "ShiftLeftLogical128BitLane", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "SByte", ["Imm"] = "1", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "(sbyte)8", ["ValidateFirstResult"] = "result[0] != 0", ["ValidateRemainingResults"] = "((i % 16) == 0 ? result[i] != 0 : result[i] != 8)"}), + ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx512BW", ["LoadIsa"] = "Avx512F", ["Method"] = "ShiftRightArithmetic", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Int16", ["Imm"] = "1", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "(short)(firstOp[0] >> 1) != result[0]", ["ValidateRemainingResults"] = "(short)(firstOp[i] >> 1) != result[i]"}), + ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx512BW", ["LoadIsa"] = "Avx512F", ["Method"] = "ShiftRightArithmetic", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Int16", ["Imm"] = "16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "(short)(firstOp[0] >> 15) != result[0]", ["ValidateRemainingResults"] = "(short)(firstOp[i] >> 15) != result[i]"}), + ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx512BW", ["LoadIsa"] = "Avx512F", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Int16", ["Imm"] = "1", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "(short)(firstOp[0] >> 1) != result[0]", ["ValidateRemainingResults"] = "(short)(firstOp[i] >> 1) != result[i]"}), + ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx512BW", ["LoadIsa"] = "Avx512F", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Int16", ["Imm"] = "16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "0 != result[0]", ["ValidateRemainingResults"] = "0 != result[i]"}), + ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx512BW", ["LoadIsa"] = "Avx512F", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "UInt16", ["Imm"] = "1", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "(ushort)(firstOp[0] >> 1) != result[0]", ["ValidateRemainingResults"] = "(ushort)(firstOp[i] >> 1) != result[i]"}), + ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx512BW", ["LoadIsa"] = "Avx512F", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "UInt16", ["Imm"] = "16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "0 != result[0]", ["ValidateRemainingResults"] = "0 != result[i]"}), + ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx512BW", ["LoadIsa"] = "Avx512F", ["Method"] = "ShiftRightLogical128BitLane", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Byte", ["Imm"] = "1", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "(byte)8", ["ValidateFirstResult"] = "result[0] != 8", ["ValidateRemainingResults"] = "((i % 16) == 15 ? result[i] != 0 : result[i] != 8)"}), + ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx512BW", ["LoadIsa"] = "Avx512F", ["Method"] = "ShiftRightLogical128BitLane", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "SByte", ["Imm"] = "1", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "(sbyte)8", ["ValidateFirstResult"] = "result[0] != 8", ["ValidateRemainingResults"] = "((i % 16) == 15 ? result[i] != 0 : result[i] != 8)"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512BW", ["LoadIsa"] = "Avx512F", ["Method"] = "Shuffle", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "result[0] != ((right[0] > 127) ? 0 : left[right[0] & 0x0F])", ["ValidateRemainingResults"] = "result[i] != (right[i] > 127 ? 0 : left[(right[i] & 0x0F) + ((i / 16) * 16)])"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512BW", ["LoadIsa"] = "Avx512F", ["Method"] = "Shuffle", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "result[0] != ((right[0] < 0) ? 0 : left[right[0] & 0x0F])", ["ValidateRemainingResults"] = "result[i] != (right[i] < 0 ? 0 : left[(right[i] & 0x0F) + ((i / 16) * 16)])"}), + ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx512BW", ["LoadIsa"] = "Avx512F", ["Method"] = "ShuffleHigh", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Int16", ["Imm"] = "228", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "result[0] != firstOp[0]", ["ValidateRemainingResults"] = "result[i] != firstOp[i]"}), + ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx512BW", ["LoadIsa"] = "Avx512F", ["Method"] = "ShuffleHigh", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "UInt16", ["Imm"] = "228", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "result[0] != firstOp[0]", ["ValidateRemainingResults"] = "result[i] != firstOp[i]"}), + ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx512BW", ["LoadIsa"] = "Avx512F", ["Method"] = "ShuffleLow", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Int16", ["Imm"] = "228", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "result[0] != firstOp[0]", ["ValidateRemainingResults"] = "result[i] != firstOp[i]"}), + ("ImmUnOpTest.template", new Dictionary { ["Isa"] = "Avx512BW", ["LoadIsa"] = "Avx512F", ["Method"] = "ShuffleLow", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "UInt16", ["Imm"] = "228", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "result[0] != firstOp[0]", ["ValidateRemainingResults"] = "result[i] != firstOp[i]"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512BW", ["LoadIsa"] = "Avx512F", ["Method"] = "Subtract", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "(byte)(left[0] - right[0]) != result[0]", ["ValidateRemainingResults"] = "(byte)(left[i] - right[i]) != result[i]"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512BW", ["LoadIsa"] = "Avx512F", ["Method"] = "Subtract", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "(short)(left[0] - right[0]) != result[0]", ["ValidateRemainingResults"] = "(short)(left[i] - right[i]) != result[i]"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512BW", ["LoadIsa"] = "Avx512F", ["Method"] = "Subtract", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "(sbyte)(left[0] - right[0]) != result[0]", ["ValidateRemainingResults"] = "(sbyte)(left[i] - right[i]) != result[i]"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512BW", ["LoadIsa"] = "Avx512F", ["Method"] = "Subtract", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "(ushort)(left[0] - right[0]) != result[0]", ["ValidateRemainingResults"] = "(ushort)(left[i] - right[i]) != result[i]"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512BW", ["LoadIsa"] = "Avx512F", ["Method"] = "SubtractSaturate", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "Sse2Verify.SubtractSaturate(left[0], right[0], result[0])", ["ValidateRemainingResults"] = "Sse2Verify.SubtractSaturate(left[i], right[i], result[i])"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512BW", ["LoadIsa"] = "Avx512F", ["Method"] = "SubtractSaturate", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateFirstResult"] = "Sse2Verify.SubtractSaturate(left[0], right[0], result[0])", ["ValidateRemainingResults"] = "Sse2Verify.SubtractSaturate(left[i], right[i], result[i])"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512BW", ["LoadIsa"] = "Avx512F", ["Method"] = "SubtractSaturate", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateFirstResult"] = "Sse2Verify.SubtractSaturate(left[0], right[0], result[0])", ["ValidateRemainingResults"] = "Sse2Verify.SubtractSaturate(left[i], right[i], result[i])"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512BW", ["LoadIsa"] = "Avx512F", ["Method"] = "SubtractSaturate", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateFirstResult"] = "Sse2Verify.SubtractSaturate(left[0], right[0], result[0])", ["ValidateRemainingResults"] = "Sse2Verify.SubtractSaturate(left[i], right[i], result[i])"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512BW", ["LoadIsa"] = "Avx512F", ["Method"] = "SumAbsoluteDifferences", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateFirstResult"] = "result[0] != Math.Abs(left[0] - right[0]) + Math.Abs(left[1] - right[1]) + Math.Abs(left[2] - right[2]) + Math.Abs(left[3] - right[3]) + Math.Abs(left[4] - right[4]) + Math.Abs(left[5] - right[5]) + Math.Abs(left[6] - right[6]) + Math.Abs(left[7] - right[7])", ["ValidateRemainingResults"] = "result[i] != ((i % 4 != 0) ? 0 : Math.Abs(left[(i/4)*8] - right[(i/4)*8]) + Math.Abs(left[(i/4)*8+1] - right[(i/4)*8+1]) + Math.Abs(left[(i/4)*8+2] - right[(i/4)*8+2]) + Math.Abs(left[(i/4)*8+3] - right[(i/4)*8+3]) + Math.Abs(left[(i/4)*8+4] - right[(i/4)*8+4]) + Math.Abs(left[(i/4)*8+5] - right[(i/4)*8+5]) + Math.Abs(left[(i/4)*8+6] - right[(i/4)*8+6]) + Math.Abs(left[(i/4)*8+7] - right[(i/4)*8+7]))"}), +}; + +(string templateFileName, Dictionary templateData)[] Avx512DQInputs = new [] +{ + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512DQ", ["LoadIsa"] = "Avx512F", ["Method"] = "And", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "(BitConverter.DoubleToInt64Bits(left[0]) & BitConverter.DoubleToInt64Bits(right[0])) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "(BitConverter.DoubleToInt64Bits(left[i]) & BitConverter.DoubleToInt64Bits(right[i])) != BitConverter.DoubleToInt64Bits(result[i])"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512DQ", ["LoadIsa"] = "Avx512F", ["Method"] = "And", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "(BitConverter.SingleToInt32Bits(left[0]) & BitConverter.SingleToInt32Bits(right[0])) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "(BitConverter.SingleToInt32Bits(left[i]) & BitConverter.SingleToInt32Bits(right[i])) != BitConverter.SingleToInt32Bits(result[i])"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512DQ", ["LoadIsa"] = "Avx512F", ["Method"] = "AndNot", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "((~BitConverter.DoubleToInt64Bits(left[0])) & BitConverter.DoubleToInt64Bits(right[0])) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "((~BitConverter.DoubleToInt64Bits(left[i])) & BitConverter.DoubleToInt64Bits(right[i])) != BitConverter.DoubleToInt64Bits(result[i])"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512DQ", ["LoadIsa"] = "Avx512F", ["Method"] = "AndNot", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "((~BitConverter.SingleToInt32Bits(left[0])) & BitConverter.SingleToInt32Bits(right[0])) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "((~BitConverter.SingleToInt32Bits(left[i])) & BitConverter.SingleToInt32Bits(right[i])) != BitConverter.SingleToInt32Bits(result[i])"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512DQ", ["LoadIsa"] = "Avx512F", ["Method"] = "MultiplyLow", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "result[0] != (long)(((Int128)(left[0])) * right[0])", ["ValidateRemainingResults"] = "result[i] != (long)(((Int128)(left[i])) * right[i])"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512DQ", ["LoadIsa"] = "Avx512F", ["Method"] = "MultiplyLow", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "result[0] != (ulong)(((UInt128)(left[0])) * right[0])", ["ValidateRemainingResults"] = "result[i] != (ulong)(((UInt128)(left[i])) * right[i])"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512DQ", ["LoadIsa"] = "Avx512F", ["Method"] = "Or", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "(BitConverter.DoubleToInt64Bits(left[0]) | BitConverter.DoubleToInt64Bits(right[0])) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "(BitConverter.DoubleToInt64Bits(left[i]) | BitConverter.DoubleToInt64Bits(right[i])) != BitConverter.DoubleToInt64Bits(result[i])"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512DQ", ["LoadIsa"] = "Avx512F", ["Method"] = "Or", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "(BitConverter.SingleToInt32Bits(left[0]) | BitConverter.SingleToInt32Bits(right[0])) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "(BitConverter.SingleToInt32Bits(left[i]) | BitConverter.SingleToInt32Bits(right[i])) != BitConverter.SingleToInt32Bits(result[i])"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512DQ", ["LoadIsa"] = "Avx512F", ["Method"] = "Xor", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateFirstResult"] = "(BitConverter.DoubleToInt64Bits(left[0]) ^ BitConverter.DoubleToInt64Bits(right[0])) != BitConverter.DoubleToInt64Bits(result[0])", ["ValidateRemainingResults"] = "(BitConverter.DoubleToInt64Bits(left[i]) ^ BitConverter.DoubleToInt64Bits(right[i])) != BitConverter.DoubleToInt64Bits(result[i])"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512DQ", ["LoadIsa"] = "Avx512F", ["Method"] = "Xor", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateFirstResult"] = "(BitConverter.SingleToInt32Bits(left[0]) ^ BitConverter.SingleToInt32Bits(right[0])) != BitConverter.SingleToInt32Bits(result[0])", ["ValidateRemainingResults"] = "(BitConverter.SingleToInt32Bits(left[i]) ^ BitConverter.SingleToInt32Bits(right[i])) != BitConverter.SingleToInt32Bits(result[i])"}), +}; + +(string templateFileName, Dictionary templateData)[] Avx512DQ_VL_Vector128Inputs = new [] +{ + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512DQ.VL", ["LoadIsa"] = "Sse2", ["Method"] = "MultiplyLow", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "result[0] != (long)(((Int128)(left[0])) * right[0])", ["ValidateRemainingResults"] = "result[i] != (long)(((Int128)(left[i])) * right[i])"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512DQ.VL", ["LoadIsa"] = "Sse2", ["Method"] = "MultiplyLow", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "result[0] != (ulong)(((UInt128)(left[0])) * right[0])", ["ValidateRemainingResults"] = "result[i] != (ulong)(((UInt128)(left[i])) * right[i])"}), +}; + +(string templateFileName, Dictionary templateData)[] Avx512DQ_VL_Vector256Inputs = new [] +{ + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512DQ.VL", ["LoadIsa"] = "Avx", ["Method"] = "MultiplyLow", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateFirstResult"] = "result[0] != (long)(((Int128)(left[0])) * right[0])", ["ValidateRemainingResults"] = "result[i] != (long)(((Int128)(left[i])) * right[i])"}), + ("SimpleBinOpTest.template", new Dictionary { ["Isa"] = "Avx512DQ.VL", ["LoadIsa"] = "Avx", ["Method"] = "MultiplyLow", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector256", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateFirstResult"] = "result[0] != (ulong)(((UInt128)(left[0])) * right[0])", ["ValidateRemainingResults"] = "result[i] != (ulong)(((UInt128)(left[i])) * right[i])"}), }; (string templateFileName, Dictionary templateData)[] Fma_Vector128Inputs = new [] @@ -1372,6 +1559,12 @@ bool isImmTemplate(string name) ProcessInputs("Avx2", Avx2Inputs); ProcessInputs("Avx2_Vector128", Avx2_Vector128Inputs); ProcessInputs("Avx512F", Avx512FInputs); +ProcessInputs("Avx512F_VL_Vector128", Avx512F_VL_Vector128Inputs); +ProcessInputs("Avx512F_VL_Vector256", Avx512F_VL_Vector256Inputs); +ProcessInputs("Avx512BW", Avx512BWInputs); +ProcessInputs("Avx512DQ", Avx512DQInputs); +ProcessInputs("Avx512DQ_VL_Vector128", Avx512DQ_VL_Vector128Inputs); +ProcessInputs("Avx512DQ_VL_Vector256", Avx512DQ_VL_Vector256Inputs); ProcessInputs("Fma_Vector128", Fma_Vector128Inputs); ProcessInputs("Fma_Vector256", Fma_Vector256Inputs); ProcessInputs("Bmi1", Bmi1Inputs); diff --git a/src/tests/JIT/HardwareIntrinsics/HardwareIntrinsics_X86_Avx512_r.csproj b/src/tests/JIT/HardwareIntrinsics/HardwareIntrinsics_X86_Avx512_r.csproj index df320f929b54a..0f29a87517c5d 100644 --- a/src/tests/JIT/HardwareIntrinsics/HardwareIntrinsics_X86_Avx512_r.csproj +++ b/src/tests/JIT/HardwareIntrinsics/HardwareIntrinsics_X86_Avx512_r.csproj @@ -10,6 +10,9 @@ true true true + + + 1 diff --git a/src/tests/JIT/HardwareIntrinsics/HardwareIntrinsics_X86_Avx512_ro.csproj b/src/tests/JIT/HardwareIntrinsics/HardwareIntrinsics_X86_Avx512_ro.csproj index dee18eae0419e..059a89d14120d 100644 --- a/src/tests/JIT/HardwareIntrinsics/HardwareIntrinsics_X86_Avx512_ro.csproj +++ b/src/tests/JIT/HardwareIntrinsics/HardwareIntrinsics_X86_Avx512_ro.csproj @@ -10,6 +10,9 @@ true true true + + + 1 diff --git a/src/tests/JIT/HardwareIntrinsics/X86_Avx/Avx1/Avx1_handwritten_r.csproj b/src/tests/JIT/HardwareIntrinsics/X86_Avx/Avx1/Avx1_handwritten_r.csproj index 8ee34fbd4726a..837da2e03acb9 100644 --- a/src/tests/JIT/HardwareIntrinsics/X86_Avx/Avx1/Avx1_handwritten_r.csproj +++ b/src/tests/JIT/HardwareIntrinsics/X86_Avx/Avx1/Avx1_handwritten_r.csproj @@ -16,12 +16,9 @@ - - + - - diff --git a/src/tests/JIT/HardwareIntrinsics/X86_Avx/Avx1/Avx1_handwritten_ro.csproj b/src/tests/JIT/HardwareIntrinsics/X86_Avx/Avx1/Avx1_handwritten_ro.csproj index abbf5aec4b8ae..52dec8c4fda62 100644 --- a/src/tests/JIT/HardwareIntrinsics/X86_Avx/Avx1/Avx1_handwritten_ro.csproj +++ b/src/tests/JIT/HardwareIntrinsics/X86_Avx/Avx1/Avx1_handwritten_ro.csproj @@ -16,12 +16,9 @@ - - + - - diff --git a/src/tests/JIT/HardwareIntrinsics/X86_Avx/Avx1/ConvertToVector256Int32.Single.cs b/src/tests/JIT/HardwareIntrinsics/X86_Avx/Avx1/ConvertToVector256Int32.Single.cs index 5cac5b8d27609..5cb91f4a2ab03 100644 --- a/src/tests/JIT/HardwareIntrinsics/X86_Avx/Avx1/ConvertToVector256Int32.Single.cs +++ b/src/tests/JIT/HardwareIntrinsics/X86_Avx/Avx1/ConvertToVector256Int32.Single.cs @@ -15,21 +15,21 @@ using System.Runtime.Intrinsics.X86; using Xunit; -namespace JIT.HardwareIntrinsics.X86._Avx1.handwritten +namespace JIT.HardwareIntrinsics.X86._Avx512F.handwritten { public static partial class Program { [Fact] - public static void ConvertToVector256Int32Single() + public static void ConvertToVector512DoubleSingle() { - var test = new SimpleUnaryOpTest__ConvertToVector256Int32Single(); + var test = new SimpleUnaryOpTest__ConvertToVector512DoubleSingle(); if (test.IsSupported) { // Validates basic functionality works, using Unsafe.Read test.RunBasicScenario_UnsafeRead(); - if (Avx.IsSupported) + if (Sse.IsSupported) { // Validates basic functionality works, using Load test.RunBasicScenario_Load(); @@ -41,7 +41,7 @@ public static void ConvertToVector256Int32Single() // Validates calling via reflection works, using Unsafe.Read test.RunReflectionScenario_UnsafeRead(); - if (Avx.IsSupported) + if (Sse.IsSupported) { // Validates calling via reflection works, using Load test.RunReflectionScenario_Load(); @@ -56,7 +56,7 @@ public static void ConvertToVector256Int32Single() // Validates passing a local works, using Unsafe.Read test.RunLclVarScenario_UnsafeRead(); - if (Avx.IsSupported) + if (Sse.IsSupported) { // Validates passing a local works, using Load test.RunLclVarScenario_Load(); @@ -84,12 +84,12 @@ public static void ConvertToVector256Int32Single() } } - public sealed unsafe class SimpleUnaryOpTest__ConvertToVector256Int32Single + public sealed unsafe class SimpleUnaryOpTest__ConvertToVector512DoubleSingle { - private static readonly int LargestVectorSize = 32; + private static readonly int LargestVectorSize = 64; private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int32); + private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); private static Single[] _data = new Single[Op1ElementCount]; @@ -97,9 +97,9 @@ public sealed unsafe class SimpleUnaryOpTest__ConvertToVector256Int32Single private Vector256 _fld; - private SimpleUnaryOpTest__DataTable _dataTable; + private SimpleUnaryOpTest__DataTable _dataTable; - static SimpleUnaryOpTest__ConvertToVector256Int32Single() + static SimpleUnaryOpTest__ConvertToVector512DoubleSingle() { var random = new Random(); @@ -107,7 +107,7 @@ static SimpleUnaryOpTest__ConvertToVector256Int32Single() Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } - public SimpleUnaryOpTest__ConvertToVector256Int32Single() + public SimpleUnaryOpTest__ConvertToVector512DoubleSingle() { Succeeded = true; @@ -117,16 +117,16 @@ public SimpleUnaryOpTest__ConvertToVector256Int32Single() Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (float)(random.NextDouble()); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int32[RetElementCount], LargestVectorSize); + _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Double[RetElementCount], LargestVectorSize); } - public bool IsSupported => Avx.IsSupported; + public bool IsSupported => Avx512F.IsSupported; public bool Succeeded { get; set; } public void RunBasicScenario_UnsafeRead() { - var result = Avx.ConvertToVector256Int32( + var result = Avx512F.ConvertToVector512Double( Unsafe.Read>(_dataTable.inArrayPtr) ); @@ -136,7 +136,7 @@ public void RunBasicScenario_UnsafeRead() public void RunBasicScenario_Load() { - var result = Avx.ConvertToVector256Int32( + var result = Avx512F.ConvertToVector512Double( Avx.LoadVector256((Single*)(_dataTable.inArrayPtr)) ); @@ -146,7 +146,7 @@ public void RunBasicScenario_Load() public void RunBasicScenario_LoadAligned() { - var result = Avx.ConvertToVector256Int32( + var result = Avx512F.ConvertToVector512Double( Avx.LoadAlignedVector256((Single*)(_dataTable.inArrayPtr)) ); @@ -156,40 +156,40 @@ public void RunBasicScenario_LoadAligned() public void RunReflectionScenario_UnsafeRead() { - var result = typeof(Avx).GetMethod(nameof(Avx.ConvertToVector256Int32), new Type[] { typeof(Vector256) }) + var result = typeof(Avx512F).GetMethod(nameof(Avx512F.ConvertToVector512Double), new Type[] { typeof(Vector256) }) .Invoke(null, new object[] { Unsafe.Read>(_dataTable.inArrayPtr) }); - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); + Unsafe.Write(_dataTable.outArrayPtr, (Vector512)(result)); ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); } public void RunReflectionScenario_Load() { - var result = typeof(Avx).GetMethod(nameof(Avx.ConvertToVector256Int32), new Type[] { typeof(Vector256) }) + var result = typeof(Avx512F).GetMethod(nameof(Avx512F.ConvertToVector512Double), new Type[] { typeof(Vector256) }) .Invoke(null, new object[] { Avx.LoadVector256((Single*)(_dataTable.inArrayPtr)) }); - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); + Unsafe.Write(_dataTable.outArrayPtr, (Vector512)(result)); ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); } public void RunReflectionScenario_LoadAligned() { - var result = typeof(Avx).GetMethod(nameof(Avx.ConvertToVector256Int32), new Type[] { typeof(Vector256) }) + var result = typeof(Avx512F).GetMethod(nameof(Avx512F.ConvertToVector512Double), new Type[] { typeof(Vector256) }) .Invoke(null, new object[] { Avx.LoadAlignedVector256((Single*)(_dataTable.inArrayPtr)) }); - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); + Unsafe.Write(_dataTable.outArrayPtr, (Vector512)(result)); ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); } public void RunClsVarScenario() { - var result = Avx.ConvertToVector256Int32( + var result = Avx512F.ConvertToVector512Double( _clsVar ); @@ -200,7 +200,7 @@ public void RunClsVarScenario() public void RunLclVarScenario_UnsafeRead() { var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Avx.ConvertToVector256Int32(firstOp); + var result = Avx512F.ConvertToVector512Double(firstOp); Unsafe.Write(_dataTable.outArrayPtr, result); ValidateResult(firstOp, _dataTable.outArrayPtr); @@ -209,7 +209,7 @@ public void RunLclVarScenario_UnsafeRead() public void RunLclVarScenario_Load() { var firstOp = Avx.LoadVector256((Single*)(_dataTable.inArrayPtr)); - var result = Avx.ConvertToVector256Int32(firstOp); + var result = Avx512F.ConvertToVector512Double(firstOp); Unsafe.Write(_dataTable.outArrayPtr, result); ValidateResult(firstOp, _dataTable.outArrayPtr); @@ -218,7 +218,7 @@ public void RunLclVarScenario_Load() public void RunLclVarScenario_LoadAligned() { var firstOp = Avx.LoadAlignedVector256((Single*)(_dataTable.inArrayPtr)); - var result = Avx.ConvertToVector256Int32(firstOp); + var result = Avx512F.ConvertToVector512Double(firstOp); Unsafe.Write(_dataTable.outArrayPtr, result); ValidateResult(firstOp, _dataTable.outArrayPtr); @@ -226,8 +226,8 @@ public void RunLclVarScenario_LoadAligned() public void RunLclFldScenario() { - var test = new SimpleUnaryOpTest__ConvertToVector256Int32Single(); - var result = Avx.ConvertToVector256Int32(test._fld); + var test = new SimpleUnaryOpTest__ConvertToVector512DoubleSingle(); + var result = Avx512F.ConvertToVector512Double(test._fld); Unsafe.Write(_dataTable.outArrayPtr, result); ValidateResult(test._fld, _dataTable.outArrayPtr); @@ -235,7 +235,7 @@ public void RunLclFldScenario() public void RunFldScenario() { - var result = Avx.ConvertToVector256Int32(_fld); + var result = Avx512F.ConvertToVector512Double(_fld); Unsafe.Write(_dataTable.outArrayPtr, result); ValidateResult(_fld, _dataTable.outArrayPtr); @@ -258,10 +258,10 @@ public void RunUnsupportedScenario() private void ValidateResult(Vector256 firstOp, void* result, [CallerMemberName] string method = "") { Single[] inArray = new Single[Op1ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; + Double[] outArray = new Double[RetElementCount]; Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); + Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); ValidateResult(inArray, outArray, method); } @@ -269,17 +269,17 @@ private void ValidateResult(Vector256 firstOp, void* result, [CallerMemb private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") { Single[] inArray = new Single[Op1ElementCount]; - Int32[] outArray = new Int32[RetElementCount]; + Double[] outArray = new Double[RetElementCount]; Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); + Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); ValidateResult(inArray, outArray, method); } - private void ValidateResult(Single[] firstOp, Int32[] result, [CallerMemberName] string method = "") + private void ValidateResult(Single[] firstOp, Double[] result, [CallerMemberName] string method = "") { - if (result[0] != (Int32)(MathF.Round(firstOp[0]))) + if (result[0] != (Double)(firstOp[0])) { Succeeded = false; } @@ -287,7 +287,7 @@ private void ValidateResult(Single[] firstOp, Int32[] result, [CallerMemberName] { for (var i = 1; i < RetElementCount; i++) { - if (result[i] != (Int32)(MathF.Round(firstOp[i]))) + if (result[i] != (Double)(firstOp[i])) { Succeeded = false; break; @@ -297,7 +297,7 @@ private void ValidateResult(Single[] firstOp, Int32[] result, [CallerMemberName] if (!Succeeded) { - Console.WriteLine($"{nameof(Avx)}.{nameof(Avx.ConvertToVector256Int32)}(Vector256): {method} failed:"); + Console.WriteLine($"{nameof(Avx512F)}.{nameof(Avx512F.ConvertToVector512Double)}(Vector256): {method} failed:"); Console.WriteLine($" firstOp: ({string.Join(", ", firstOp)})"); Console.WriteLine($" result: ({string.Join(", ", result)})"); Console.WriteLine(); diff --git a/src/tests/JIT/HardwareIntrinsics/X86_Avx/Avx1/ConvertToVector256Int32WithTruncation.Single.cs b/src/tests/JIT/HardwareIntrinsics/X86_Avx/Avx1/ConvertToVector256Int32WithTruncation.Single.cs index 1610d7fd1b84a..eec2d0f2098dd 100644 --- a/src/tests/JIT/HardwareIntrinsics/X86_Avx/Avx1/ConvertToVector256Int32WithTruncation.Single.cs +++ b/src/tests/JIT/HardwareIntrinsics/X86_Avx/Avx1/ConvertToVector256Int32WithTruncation.Single.cs @@ -15,21 +15,21 @@ using System.Runtime.Intrinsics.X86; using Xunit; -namespace JIT.HardwareIntrinsics.X86._Avx1.handwritten +namespace JIT.HardwareIntrinsics.X86._Avx512F.handwritten { public static partial class Program { [Fact] - public static void ConvertToVector256Int32WithTruncationSingle() + public static void ConvertToVector256Int32Double() { - var test = new SimpleUnaryOpTest__ConvertToVector256Int32WithTruncationSingle(); + var test = new SimpleUnaryOpTest__ConvertToVector256Int32Double(); if (test.IsSupported) { // Validates basic functionality works, using Unsafe.Read test.RunBasicScenario_UnsafeRead(); - if (Avx.IsSupported) + if (Avx512F.IsSupported) { // Validates basic functionality works, using Load test.RunBasicScenario_Load(); @@ -41,7 +41,7 @@ public static void ConvertToVector256Int32WithTruncationSingle() // Validates calling via reflection works, using Unsafe.Read test.RunReflectionScenario_UnsafeRead(); - if (Avx.IsSupported) + if (Avx512F.IsSupported) { // Validates calling via reflection works, using Load test.RunReflectionScenario_Load(); @@ -56,7 +56,7 @@ public static void ConvertToVector256Int32WithTruncationSingle() // Validates passing a local works, using Unsafe.Read test.RunLclVarScenario_UnsafeRead(); - if (Avx.IsSupported) + if (Avx512F.IsSupported) { // Validates passing a local works, using Load test.RunLclVarScenario_Load(); @@ -84,50 +84,50 @@ public static void ConvertToVector256Int32WithTruncationSingle() } } - public sealed unsafe class SimpleUnaryOpTest__ConvertToVector256Int32WithTruncationSingle + public sealed unsafe class SimpleUnaryOpTest__ConvertToVector256Int32Double { - private static readonly int LargestVectorSize = 32; + private static readonly int LargestVectorSize = 64; - private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); + private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static Single[] _data = new Single[Op1ElementCount]; + private static Double[] _data = new Double[Op1ElementCount]; - private static Vector256 _clsVar; + private static Vector512 _clsVar; - private Vector256 _fld; + private Vector512 _fld; - private SimpleUnaryOpTest__DataTable _dataTable; + private SimpleUnaryOpTest__DataTable _dataTable; - static SimpleUnaryOpTest__ConvertToVector256Int32WithTruncationSingle() + static SimpleUnaryOpTest__ConvertToVector256Int32Double() { var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (float)(random.NextDouble()); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (double)(random.NextDouble()); } + Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } - public SimpleUnaryOpTest__ConvertToVector256Int32WithTruncationSingle() + public SimpleUnaryOpTest__ConvertToVector256Int32Double() { Succeeded = true; var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (float)(random.NextDouble()); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (double)(random.NextDouble()); } + Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (float)(random.NextDouble()); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int32[RetElementCount], LargestVectorSize); + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (double)(random.NextDouble()); } + _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int32[RetElementCount], LargestVectorSize); } - public bool IsSupported => Avx.IsSupported; + public bool IsSupported => Avx512F.IsSupported; public bool Succeeded { get; set; } public void RunBasicScenario_UnsafeRead() { - var result = Avx.ConvertToVector256Int32WithTruncation( - Unsafe.Read>(_dataTable.inArrayPtr) + var result = Avx512F.ConvertToVector256Int32( + Unsafe.Read>(_dataTable.inArrayPtr) ); Unsafe.Write(_dataTable.outArrayPtr, result); @@ -136,8 +136,8 @@ public void RunBasicScenario_UnsafeRead() public void RunBasicScenario_Load() { - var result = Avx.ConvertToVector256Int32WithTruncation( - Avx.LoadVector256((Single*)(_dataTable.inArrayPtr)) + var result = Avx512F.ConvertToVector256Int32( + Avx512F.LoadVector512((Double*)(_dataTable.inArrayPtr)) ); Unsafe.Write(_dataTable.outArrayPtr, result); @@ -146,8 +146,8 @@ public void RunBasicScenario_Load() public void RunBasicScenario_LoadAligned() { - var result = Avx.ConvertToVector256Int32WithTruncation( - Avx.LoadAlignedVector256((Single*)(_dataTable.inArrayPtr)) + var result = Avx512F.ConvertToVector256Int32( + Avx512F.LoadAlignedVector512((Double*)(_dataTable.inArrayPtr)) ); Unsafe.Write(_dataTable.outArrayPtr, result); @@ -156,9 +156,9 @@ public void RunBasicScenario_LoadAligned() public void RunReflectionScenario_UnsafeRead() { - var result = typeof(Avx).GetMethod(nameof(Avx.ConvertToVector256Int32WithTruncation), new Type[] { typeof(Vector256) }) + var result = typeof(Avx512F).GetMethod(nameof(Avx512F.ConvertToVector256Int32), new Type[] { typeof(Vector512) }) .Invoke(null, new object[] { - Unsafe.Read>(_dataTable.inArrayPtr) + Unsafe.Read>(_dataTable.inArrayPtr) }); Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); @@ -167,9 +167,9 @@ public void RunReflectionScenario_UnsafeRead() public void RunReflectionScenario_Load() { - var result = typeof(Avx).GetMethod(nameof(Avx.ConvertToVector256Int32WithTruncation), new Type[] { typeof(Vector256) }) + var result = typeof(Avx512F).GetMethod(nameof(Avx512F.ConvertToVector256Int32), new Type[] { typeof(Vector512) }) .Invoke(null, new object[] { - Avx.LoadVector256((Single*)(_dataTable.inArrayPtr)) + Avx512F.LoadVector512((Double*)(_dataTable.inArrayPtr)) }); Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); @@ -178,9 +178,9 @@ public void RunReflectionScenario_Load() public void RunReflectionScenario_LoadAligned() { - var result = typeof(Avx).GetMethod(nameof(Avx.ConvertToVector256Int32WithTruncation), new Type[] { typeof(Vector256) }) + var result = typeof(Avx512F).GetMethod(nameof(Avx512F.ConvertToVector256Int32), new Type[] { typeof(Vector512) }) .Invoke(null, new object[] { - Avx.LoadAlignedVector256((Single*)(_dataTable.inArrayPtr)) + Avx512F.LoadAlignedVector512((Double*)(_dataTable.inArrayPtr)) }); Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); @@ -189,7 +189,7 @@ public void RunReflectionScenario_LoadAligned() public void RunClsVarScenario() { - var result = Avx.ConvertToVector256Int32WithTruncation( + var result = Avx512F.ConvertToVector256Int32( _clsVar ); @@ -199,8 +199,8 @@ public void RunClsVarScenario() public void RunLclVarScenario_UnsafeRead() { - var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Avx.ConvertToVector256Int32WithTruncation(firstOp); + var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); + var result = Avx512F.ConvertToVector256Int32(firstOp); Unsafe.Write(_dataTable.outArrayPtr, result); ValidateResult(firstOp, _dataTable.outArrayPtr); @@ -208,8 +208,8 @@ public void RunLclVarScenario_UnsafeRead() public void RunLclVarScenario_Load() { - var firstOp = Avx.LoadVector256((Single*)(_dataTable.inArrayPtr)); - var result = Avx.ConvertToVector256Int32WithTruncation(firstOp); + var firstOp = Avx512F.LoadVector512((Double*)(_dataTable.inArrayPtr)); + var result = Avx512F.ConvertToVector256Int32(firstOp); Unsafe.Write(_dataTable.outArrayPtr, result); ValidateResult(firstOp, _dataTable.outArrayPtr); @@ -217,8 +217,8 @@ public void RunLclVarScenario_Load() public void RunLclVarScenario_LoadAligned() { - var firstOp = Avx.LoadAlignedVector256((Single*)(_dataTable.inArrayPtr)); - var result = Avx.ConvertToVector256Int32WithTruncation(firstOp); + var firstOp = Avx512F.LoadAlignedVector512((Double*)(_dataTable.inArrayPtr)); + var result = Avx512F.ConvertToVector256Int32(firstOp); Unsafe.Write(_dataTable.outArrayPtr, result); ValidateResult(firstOp, _dataTable.outArrayPtr); @@ -226,8 +226,8 @@ public void RunLclVarScenario_LoadAligned() public void RunLclFldScenario() { - var test = new SimpleUnaryOpTest__ConvertToVector256Int32WithTruncationSingle(); - var result = Avx.ConvertToVector256Int32WithTruncation(test._fld); + var test = new SimpleUnaryOpTest__ConvertToVector256Int32Double(); + var result = Avx512F.ConvertToVector256Int32(test._fld); Unsafe.Write(_dataTable.outArrayPtr, result); ValidateResult(test._fld, _dataTable.outArrayPtr); @@ -235,7 +235,7 @@ public void RunLclFldScenario() public void RunFldScenario() { - var result = Avx.ConvertToVector256Int32WithTruncation(_fld); + var result = Avx512F.ConvertToVector256Int32(_fld); Unsafe.Write(_dataTable.outArrayPtr, result); ValidateResult(_fld, _dataTable.outArrayPtr); @@ -255,12 +255,12 @@ public void RunUnsupportedScenario() } } - private void ValidateResult(Vector256 firstOp, void* result, [CallerMemberName] string method = "") + private void ValidateResult(Vector512 firstOp, void* result, [CallerMemberName] string method = "") { - Single[] inArray = new Single[Op1ElementCount]; + Double[] inArray = new Double[Op1ElementCount]; Int32[] outArray = new Int32[RetElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); + Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); ValidateResult(inArray, outArray, method); @@ -268,18 +268,18 @@ private void ValidateResult(Vector256 firstOp, void* result, [CallerMemb private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") { - Single[] inArray = new Single[Op1ElementCount]; + Double[] inArray = new Double[Op1ElementCount]; Int32[] outArray = new Int32[RetElementCount]; - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); + Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); ValidateResult(inArray, outArray, method); } - private void ValidateResult(Single[] firstOp, Int32[] result, [CallerMemberName] string method = "") + private void ValidateResult(Double[] firstOp, Int32[] result, [CallerMemberName] string method = "") { - if (result[0] != (Int32)(firstOp[0])) + if (result[0] != (Int32)(Math.Round(firstOp[0]))) { Succeeded = false; } @@ -287,7 +287,7 @@ private void ValidateResult(Single[] firstOp, Int32[] result, [CallerMemberName] { for (var i = 1; i < RetElementCount; i++) { - if (result[i] != (Int32)(firstOp[i])) + if (result[i] != (Int32)(Math.Round(firstOp[i]))) { Succeeded = false; break; @@ -297,7 +297,7 @@ private void ValidateResult(Single[] firstOp, Int32[] result, [CallerMemberName] if (!Succeeded) { - Console.WriteLine($"{nameof(Avx)}.{nameof(Avx.ConvertToVector256Int32WithTruncation)}(Vector256): {method} failed:"); + Console.WriteLine($"{nameof(Avx512F)}.{nameof(Avx512F.ConvertToVector256Int32)}(Vector512): {method} failed:"); Console.WriteLine($" firstOp: ({string.Join(", ", firstOp)})"); Console.WriteLine($" result: ({string.Join(", ", result)})"); Console.WriteLine(); diff --git a/src/tests/JIT/HardwareIntrinsics/X86_Avx/Avx1/ConvertToVector256Single.Int32.cs b/src/tests/JIT/HardwareIntrinsics/X86_Avx/Avx1/ConvertToVector256Single.Int32.cs index 926e68b8f4349..e0d71a2e797f8 100644 --- a/src/tests/JIT/HardwareIntrinsics/X86_Avx/Avx1/ConvertToVector256Single.Int32.cs +++ b/src/tests/JIT/HardwareIntrinsics/X86_Avx/Avx1/ConvertToVector256Single.Int32.cs @@ -15,14 +15,14 @@ using System.Runtime.Intrinsics.X86; using Xunit; -namespace JIT.HardwareIntrinsics.X86._Avx1.handwritten +namespace JIT.HardwareIntrinsics.X86._Avx512F.handwritten { public static partial class Program { [Fact] - public static void ConvertToVector256SingleInt32() + public static void ConvertToVector512DoubleInt32() { - var test = new SimpleUnaryOpTest__ConvertToVector256SingleInt32(); + var test = new SimpleUnaryOpTest__ConvertToVector512DoubleInt32(); if (test.IsSupported) { @@ -84,12 +84,12 @@ public static void ConvertToVector256SingleInt32() } } - public sealed unsafe class SimpleUnaryOpTest__ConvertToVector256SingleInt32 + public sealed unsafe class SimpleUnaryOpTest__ConvertToVector512DoubleInt32 { - private static readonly int LargestVectorSize = 32; + private static readonly int LargestVectorSize = 64; private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int32); - private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); + private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); private static Int32[] _data = new Int32[Op1ElementCount]; @@ -97,9 +97,9 @@ public sealed unsafe class SimpleUnaryOpTest__ConvertToVector256SingleInt32 private Vector256 _fld; - private SimpleUnaryOpTest__DataTable _dataTable; + private SimpleUnaryOpTest__DataTable _dataTable; - static SimpleUnaryOpTest__ConvertToVector256SingleInt32() + static SimpleUnaryOpTest__ConvertToVector512DoubleInt32() { var random = new Random(); @@ -107,7 +107,7 @@ static SimpleUnaryOpTest__ConvertToVector256SingleInt32() Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } - public SimpleUnaryOpTest__ConvertToVector256SingleInt32() + public SimpleUnaryOpTest__ConvertToVector512DoubleInt32() { Succeeded = true; @@ -117,16 +117,16 @@ public SimpleUnaryOpTest__ConvertToVector256SingleInt32() Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } - _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Single[RetElementCount], LargestVectorSize); + _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Double[RetElementCount], LargestVectorSize); } - public bool IsSupported => Avx.IsSupported; + public bool IsSupported => Avx512F.IsSupported; public bool Succeeded { get; set; } public void RunBasicScenario_UnsafeRead() { - var result = Avx.ConvertToVector256Single( + var result = Avx512F.ConvertToVector512Double( Unsafe.Read>(_dataTable.inArrayPtr) ); @@ -136,7 +136,7 @@ public void RunBasicScenario_UnsafeRead() public void RunBasicScenario_Load() { - var result = Avx.ConvertToVector256Single( + var result = Avx512F.ConvertToVector512Double( Avx.LoadVector256((Int32*)(_dataTable.inArrayPtr)) ); @@ -146,7 +146,7 @@ public void RunBasicScenario_Load() public void RunBasicScenario_LoadAligned() { - var result = Avx.ConvertToVector256Single( + var result = Avx512F.ConvertToVector512Double( Avx.LoadAlignedVector256((Int32*)(_dataTable.inArrayPtr)) ); @@ -156,40 +156,40 @@ public void RunBasicScenario_LoadAligned() public void RunReflectionScenario_UnsafeRead() { - var result = typeof(Avx).GetMethod(nameof(Avx.ConvertToVector256Single), new Type[] { typeof(Vector256) }) + var result = typeof(Avx512F).GetMethod(nameof(Avx512F.ConvertToVector512Double), new Type[] { typeof(Vector256) }) .Invoke(null, new object[] { Unsafe.Read>(_dataTable.inArrayPtr) }); - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); + Unsafe.Write(_dataTable.outArrayPtr, (Vector512)(result)); ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); } public void RunReflectionScenario_Load() { - var result = typeof(Avx).GetMethod(nameof(Avx.ConvertToVector256Single), new Type[] { typeof(Vector256) }) + var result = typeof(Avx512F).GetMethod(nameof(Avx512F.ConvertToVector512Double), new Type[] { typeof(Vector256) }) .Invoke(null, new object[] { Avx.LoadVector256((Int32*)(_dataTable.inArrayPtr)) }); - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); + Unsafe.Write(_dataTable.outArrayPtr, (Vector512)(result)); ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); } public void RunReflectionScenario_LoadAligned() { - var result = typeof(Avx).GetMethod(nameof(Avx.ConvertToVector256Single), new Type[] { typeof(Vector256) }) + var result = typeof(Avx512F).GetMethod(nameof(Avx512F.ConvertToVector512Double), new Type[] { typeof(Vector256) }) .Invoke(null, new object[] { Avx.LoadAlignedVector256((Int32*)(_dataTable.inArrayPtr)) }); - Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); + Unsafe.Write(_dataTable.outArrayPtr, (Vector512)(result)); ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); } public void RunClsVarScenario() { - var result = Avx.ConvertToVector256Single( + var result = Avx512F.ConvertToVector512Double( _clsVar ); @@ -200,7 +200,7 @@ public void RunClsVarScenario() public void RunLclVarScenario_UnsafeRead() { var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); - var result = Avx.ConvertToVector256Single(firstOp); + var result = Avx512F.ConvertToVector512Double(firstOp); Unsafe.Write(_dataTable.outArrayPtr, result); ValidateResult(firstOp, _dataTable.outArrayPtr); @@ -209,7 +209,7 @@ public void RunLclVarScenario_UnsafeRead() public void RunLclVarScenario_Load() { var firstOp = Avx.LoadVector256((Int32*)(_dataTable.inArrayPtr)); - var result = Avx.ConvertToVector256Single(firstOp); + var result = Avx512F.ConvertToVector512Double(firstOp); Unsafe.Write(_dataTable.outArrayPtr, result); ValidateResult(firstOp, _dataTable.outArrayPtr); @@ -218,7 +218,7 @@ public void RunLclVarScenario_Load() public void RunLclVarScenario_LoadAligned() { var firstOp = Avx.LoadAlignedVector256((Int32*)(_dataTable.inArrayPtr)); - var result = Avx.ConvertToVector256Single(firstOp); + var result = Avx512F.ConvertToVector512Double(firstOp); Unsafe.Write(_dataTable.outArrayPtr, result); ValidateResult(firstOp, _dataTable.outArrayPtr); @@ -226,8 +226,8 @@ public void RunLclVarScenario_LoadAligned() public void RunLclFldScenario() { - var test = new SimpleUnaryOpTest__ConvertToVector256SingleInt32(); - var result = Avx.ConvertToVector256Single(test._fld); + var test = new SimpleUnaryOpTest__ConvertToVector512DoubleInt32(); + var result = Avx512F.ConvertToVector512Double(test._fld); Unsafe.Write(_dataTable.outArrayPtr, result); ValidateResult(test._fld, _dataTable.outArrayPtr); @@ -235,7 +235,7 @@ public void RunLclFldScenario() public void RunFldScenario() { - var result = Avx.ConvertToVector256Single(_fld); + var result = Avx512F.ConvertToVector512Double(_fld); Unsafe.Write(_dataTable.outArrayPtr, result); ValidateResult(_fld, _dataTable.outArrayPtr); @@ -258,10 +258,10 @@ public void RunUnsupportedScenario() private void ValidateResult(Vector256 firstOp, void* result, [CallerMemberName] string method = "") { Int32[] inArray = new Int32[Op1ElementCount]; - Single[] outArray = new Single[RetElementCount]; + Double[] outArray = new Double[RetElementCount]; Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); + Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); ValidateResult(inArray, outArray, method); } @@ -269,17 +269,17 @@ private void ValidateResult(Vector256 firstOp, void* result, [CallerMembe private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") { Int32[] inArray = new Int32[Op1ElementCount]; - Single[] outArray = new Single[RetElementCount]; + Double[] outArray = new Double[RetElementCount]; Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); + Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); ValidateResult(inArray, outArray, method); } - private void ValidateResult(Int32[] firstOp, Single[] result, [CallerMemberName] string method = "") + private void ValidateResult(Int32[] firstOp, Double[] result, [CallerMemberName] string method = "") { - if (result[0] != (Single)(firstOp[0])) + if (result[0] != (Double)(firstOp[0])) { Succeeded = false; } @@ -287,7 +287,7 @@ private void ValidateResult(Int32[] firstOp, Single[] result, [CallerMemberName] { for (var i = 1; i < RetElementCount; i++) { - if (result[i] != (Single)(firstOp[i])) + if (result[i] != (Double)(firstOp[i])) { Succeeded = false; break; @@ -297,7 +297,7 @@ private void ValidateResult(Int32[] firstOp, Single[] result, [CallerMemberName] if (!Succeeded) { - Console.WriteLine($"{nameof(Avx)}.{nameof(Avx.ConvertToVector256Single)}(Vector256): {method} failed:"); + Console.WriteLine($"{nameof(Avx512F)}.{nameof(Avx512F.ConvertToVector512Double)}(Vector256): {method} failed:"); Console.WriteLine($" firstOp: ({string.Join(", ", firstOp)})"); Console.WriteLine($" result: ({string.Join(", ", result)})"); Console.WriteLine(); diff --git a/src/tests/JIT/HardwareIntrinsics/X86_Avx/Avx2/AddSaturate.cs b/src/tests/JIT/HardwareIntrinsics/X86_Avx/Avx2/AddSaturate.cs deleted file mode 100644 index f877d199bf508..0000000000000 --- a/src/tests/JIT/HardwareIntrinsics/X86_Avx/Avx2/AddSaturate.cs +++ /dev/null @@ -1,115 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics.X86; -using System.Runtime.Intrinsics; -using Xunit; - -namespace IntelHardwareIntrinsicTest._Avx2 -{ - public partial class Program - { - [Fact] - public static unsafe void AddSaturate() - { - int testResult = Pass; - - if (Avx2.IsSupported) - { - using (TestTable byteTable = new TestTable(new byte[32] { 1, 5, 100, 0, 1, 5, 100, 0, 1, 5, 100, 0, 1, 5, 100, 0, 1, 5, 100, 0, 1, 5, 100, 0, 1, 5, 100, 0, 1, 5, 100, 0 }, new byte[32] { 22, 1, 50, 0, 22, 1, 50, 0, 22, 1, 50, 0, 22, 1, 50, 0, 22, 1, 50, 0, 22, 1, 50, 0, 22, 1, 50, 0, 22, 1, 50, 0 }, new byte[32])) - using (TestTable sbyteTable = new TestTable(new sbyte[32] { 1, -5, 100, 0, 1, -5, 100, 0, 1, -5, 100, 0, 1, -5, 100, 0, 1, -5, 100, 0, 1, -5, 100, 0, 1, -5, 100, 0, 1, -5, 100, 0 }, new sbyte[32] { 22, -1, -50, 0, 22, -1, -50, 0, 22, -1, -50, 0, 22, -1, -50, 0, 22, -1, -50, 0, 22, -1, -50, 0, 22, -1, -50, 0, 22, -1, -50, 0 }, new sbyte[32])) - using (TestTable shortTable = new TestTable(new short[16] { 1, -5, 100, 0, 1, -5, 100, 0, 1, -5, 100, 0, 1, -5, 100, 0 }, new short[16] { 22, -1, -50, 0, 22, -1, -50, 0, 22, -1, -50, 0, 22, -1, -50, 0}, new short[16])) - using (TestTable ushortTable = new TestTable(new ushort[16] { 1, 5, 100, 0, 1, 5, 100, 0, 1, 5, 100, 0, 1, 5, 100, 0 }, new ushort[16] { 22, 1, 50, 0, 22, 1, 50, 0, 22, 1, 50, 0, 22, 1, 50, 0 }, new ushort[16])) - { - - var vb1 = Unsafe.Read>(byteTable.inArray1Ptr); - var vb2 = Unsafe.Read>(byteTable.inArray2Ptr); - var vb3 = Avx2.AddSaturate(vb1, vb2); - Unsafe.Write(byteTable.outArrayPtr, vb3); - - var vsb1 = Unsafe.Read>(sbyteTable.inArray1Ptr); - var vsb2 = Unsafe.Read>(sbyteTable.inArray2Ptr); - var vsb3 = Avx2.AddSaturate(vsb1, vsb2); - Unsafe.Write(sbyteTable.outArrayPtr, vsb3); - - var vs1 = Unsafe.Read>(shortTable.inArray1Ptr); - var vs2 = Unsafe.Read>(shortTable.inArray2Ptr); - var vs3 = Avx2.AddSaturate(vs1, vs2); - Unsafe.Write(shortTable.outArrayPtr, vs3); - - var vus1 = Unsafe.Read>(ushortTable.inArray1Ptr); - var vus2 = Unsafe.Read>(ushortTable.inArray2Ptr); - var vus3 = Avx2.AddSaturate(vus1, vus2); - Unsafe.Write(ushortTable.outArrayPtr, vus3); - - for (int i = 0; i < byteTable.outArray.Length; i++) - { - int value = byteTable.inArray1[i] + byteTable.inArray2[i]; - value = Math.Max(value, 0); - value = Math.Min(value, byte.MaxValue); - if ((byte)value != byteTable.outArray[i]) - { - Console.WriteLine("AVX2 AddSaturate failed on byte:"); - Console.WriteLine(); - - testResult = Fail; - break; - } - } - - for (int i = 0; i < sbyteTable.outArray.Length; i++) - { - int value = sbyteTable.inArray1[i] + sbyteTable.inArray2[i]; - value = Math.Max(value, sbyte.MinValue); - value = Math.Min(value, sbyte.MaxValue); - if ((sbyte) value != sbyteTable.outArray[i]) - { - Console.WriteLine("AVX2 AddSaturate failed on sbyte:"); - Console.WriteLine(); - - testResult = Fail; - break; - } - } - - - for (int i = 0; i < shortTable.outArray.Length; i++) - { - int value = shortTable.inArray1[i] + shortTable.inArray2[i]; - value = Math.Max(value, short.MinValue); - value = Math.Min(value, short.MaxValue); - if ((short) value != shortTable.outArray[i]) - { - Console.WriteLine("AVX2 AddSaturate failed on short:"); - Console.WriteLine(); - - testResult = Fail; - break; - } - } - - for (int i = 0; i < ushortTable.outArray.Length; i++) - { - int value = ushortTable.inArray1[i] + ushortTable.inArray2[i]; - value = Math.Max(value, 0); - value = Math.Min(value, ushort.MaxValue); - if ((ushort)value != ushortTable.outArray[i]) - { - Console.WriteLine("AVX2 AddSaturate failed on ushort:"); - Console.WriteLine(); - - testResult = Fail; - break; - } - } - } - } - - Assert.Equal(Pass, testResult); - } - } -} diff --git a/src/tests/JIT/HardwareIntrinsics/X86_Avx/Avx2/Avx2_handwritten_r.csproj b/src/tests/JIT/HardwareIntrinsics/X86_Avx/Avx2/Avx2_handwritten_r.csproj index d47a1f8e75d5c..f048f123a8637 100644 --- a/src/tests/JIT/HardwareIntrinsics/X86_Avx/Avx2/Avx2_handwritten_r.csproj +++ b/src/tests/JIT/HardwareIntrinsics/X86_Avx/Avx2/Avx2_handwritten_r.csproj @@ -11,7 +11,6 @@ - @@ -36,7 +35,6 @@ - diff --git a/src/tests/JIT/HardwareIntrinsics/X86_Avx/Avx2/Avx2_handwritten_ro.csproj b/src/tests/JIT/HardwareIntrinsics/X86_Avx/Avx2/Avx2_handwritten_ro.csproj index 9b4beeb237033..b32fbba928995 100644 --- a/src/tests/JIT/HardwareIntrinsics/X86_Avx/Avx2/Avx2_handwritten_ro.csproj +++ b/src/tests/JIT/HardwareIntrinsics/X86_Avx/Avx2/Avx2_handwritten_ro.csproj @@ -11,7 +11,6 @@ - @@ -36,7 +35,6 @@ - diff --git a/src/tests/JIT/HardwareIntrinsics/X86_Avx/Avx2/HandwrittenProgram.cs b/src/tests/JIT/HardwareIntrinsics/X86_Avx/Avx2/HandwrittenProgram.cs index 365a4ac66b8d8..bc7e6b2d17ed9 100644 --- a/src/tests/JIT/HardwareIntrinsics/X86_Avx/Avx2/HandwrittenProgram.cs +++ b/src/tests/JIT/HardwareIntrinsics/X86_Avx/Avx2/HandwrittenProgram.cs @@ -210,7 +210,5 @@ public void Dispose() outHandle.Free(); } } - - } -} \ No newline at end of file +} diff --git a/src/tests/JIT/HardwareIntrinsics/X86_Avx/Avx2/SubtractSaturate.cs b/src/tests/JIT/HardwareIntrinsics/X86_Avx/Avx2/SubtractSaturate.cs deleted file mode 100644 index 7351eb95a8061..0000000000000 --- a/src/tests/JIT/HardwareIntrinsics/X86_Avx/Avx2/SubtractSaturate.cs +++ /dev/null @@ -1,115 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Intrinsics.X86; -using System.Runtime.Intrinsics; -using Xunit; - -namespace IntelHardwareIntrinsicTest._Avx2 -{ - public partial class Program - { - [Fact] - public static unsafe void SubtractSaturate() - { - int testResult = Pass; - - if (Avx2.IsSupported) - { - using (TestTable byteTable = new TestTable(new byte[32] { 1, 5, 100, 0, 1, 5, 100, 0, 1, 5, 100, 0, 1, 5, 100, 0, 1, 5, 100, 0, 1, 5, 100, 0, 1, 5, 100, 0, 1, 5, 100, 0 }, new byte[32] { 22, 1, 50, 0, 22, 1, 50, 0, 22, 1, 50, 0, 22, 1, 50, 0, 22, 1, 50, 0, 22, 1, 50, 0, 22, 1, 50, 0, 22, 1, 50, 0 }, new byte[32])) - using (TestTable sbyteTable = new TestTable(new sbyte[32] { 1, -5, 100, 0, 1, -5, 100, 0, 1, -5, 100, 0, 1, -5, 100, 0, 1, -5, 100, 0, 1, -5, 100, 0, 1, -5, 100, 0, 1, -5, 100, 0 }, new sbyte[32] { 22, -1, -50, 0, 22, -1, -50, 0, 22, -1, -50, 0, 22, -1, -50, 0, 22, -1, -50, 0, 22, -1, -50, 0, 22, -1, -50, 0, 22, -1, -50, 0 }, new sbyte[32])) - using (TestTable shortTable = new TestTable(new short[16] { 1, -5, 100, 0, 1, -5, 100, 0, 1, -5, 100, 0, 1, -5, 100, 0 }, new short[16] { 22, -1, -50, 0, 22, -1, -50, 0, 22, -1, -50, 0, 22, -1, -50, 0}, new short[16])) - using (TestTable ushortTable = new TestTable(new ushort[16] { 1, 5, 100, 0, 1, 5, 100, 0, 1, 5, 100, 0, 1, 5, 100, 0 }, new ushort[16] { 22, 1, 50, 0, 22, 1, 50, 0, 22, 1, 50, 0, 22, 1, 50, 0 }, new ushort[16])) - { - - var vb1 = Unsafe.Read>(byteTable.inArray1Ptr); - var vb2 = Unsafe.Read>(byteTable.inArray2Ptr); - var vb3 = Avx2.SubtractSaturate(vb1, vb2); - Unsafe.Write(byteTable.outArrayPtr, vb3); - - var vsb1 = Unsafe.Read>(sbyteTable.inArray1Ptr); - var vsb2 = Unsafe.Read>(sbyteTable.inArray2Ptr); - var vsb3 = Avx2.SubtractSaturate(vsb1, vsb2); - Unsafe.Write(sbyteTable.outArrayPtr, vsb3); - - var vs1 = Unsafe.Read>(shortTable.inArray1Ptr); - var vs2 = Unsafe.Read>(shortTable.inArray2Ptr); - var vs3 = Avx2.SubtractSaturate(vs1, vs2); - Unsafe.Write(shortTable.outArrayPtr, vs3); - - var vus1 = Unsafe.Read>(ushortTable.inArray1Ptr); - var vus2 = Unsafe.Read>(ushortTable.inArray2Ptr); - var vus3 = Avx2.SubtractSaturate(vus1, vus2); - Unsafe.Write(ushortTable.outArrayPtr, vus3); - - for (int i = 0; i < byteTable.outArray.Length; i++) - { - int value = byteTable.inArray1[i] - byteTable.inArray2[i]; - value = Math.Max(value, 0); - value = Math.Min(value, byte.MaxValue); - if ((byte)value != byteTable.outArray[i]) - { - Console.WriteLine("AVX2 SubtractSaturate failed on byte:"); - Console.WriteLine(); - - testResult = Fail; - break; - } - } - - for (int i = 0; i < sbyteTable.outArray.Length; i++) - { - int value = sbyteTable.inArray1[i] - sbyteTable.inArray2[i]; - value = Math.Max(value, sbyte.MinValue); - value = Math.Min(value, sbyte.MaxValue); - if ((sbyte)value != sbyteTable.outArray[i]) - { - Console.WriteLine("AVX2 SubtractSaturate failed on sbyte:"); - Console.WriteLine(); - - testResult = Fail; - break; - } - } - - - for (int i = 0; i < shortTable.outArray.Length; i++) - { - int value = shortTable.inArray1[i] - shortTable.inArray2[i]; - value = Math.Max(value, short.MinValue); - value = Math.Min(value, short.MaxValue); - if ((short)value != shortTable.outArray[i]) - { - Console.WriteLine("AVX2 SubtractSaturate failed on short:"); - Console.WriteLine(); - - testResult = Fail; - break; - } - } - - for (int i = 0; i < ushortTable.outArray.Length; i++) - { - int value = ushortTable.inArray1[i] - ushortTable.inArray2[i]; - value = Math.Max(value, 0); - value = Math.Min(value, ushort.MaxValue); - if ((ushort)value != ushortTable.outArray[i]) - { - Console.WriteLine("AVX2 SubtractSaturate failed on ushort:"); - Console.WriteLine(); - - testResult = Fail; - break; - } - } - } - } - - Assert.Equal(Pass, testResult); - } - } -} diff --git a/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512BW/Avx512BW_handwritten_r.csproj b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512BW/Avx512BW_handwritten_r.csproj new file mode 100644 index 0000000000000..458c1ba3dbd3b --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512BW/Avx512BW_handwritten_r.csproj @@ -0,0 +1,20 @@ + + + X86_Avx512BW_handwritten_r + true + + + Embedded + + + + + + + + + + + + + diff --git a/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512BW/Avx512BW_handwritten_ro.csproj b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512BW/Avx512BW_handwritten_ro.csproj new file mode 100644 index 0000000000000..f43f40d009f36 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512BW/Avx512BW_handwritten_ro.csproj @@ -0,0 +1,20 @@ + + + X86_Avx512BW_handwritten_ro + true + + + Embedded + True + + + + + + + + + + + + diff --git a/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512BW/Avx512BW_r.csproj b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512BW/Avx512BW_r.csproj new file mode 100644 index 0000000000000..29bc200bf2a9d --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512BW/Avx512BW_r.csproj @@ -0,0 +1,14 @@ + + + X86_Avx512BW_r + true + + + Embedded + + + + + + + diff --git a/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512BW/Avx512BW_ro.csproj b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512BW/Avx512BW_ro.csproj new file mode 100644 index 0000000000000..d67bb4886daf2 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512BW/Avx512BW_ro.csproj @@ -0,0 +1,14 @@ + + + X86_Avx512BW_ro + true + + + Embedded + True + + + + + + diff --git a/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512BW/ConvertToVector512Int16.Byte.cs b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512BW/ConvertToVector512Int16.Byte.cs new file mode 100644 index 0000000000000..37d765e5bd1d4 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512BW/ConvertToVector512Int16.Byte.cs @@ -0,0 +1,308 @@ +// 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\X86\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.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Runtime.Intrinsics; +using System.Runtime.Intrinsics.X86; +using Xunit; + +namespace JIT.HardwareIntrinsics.X86._Avx512BW.handwritten +{ + public static partial class Program + { + [Fact] + public static void ConvertToVector512Int16Byte() + { + var test = new SimpleUnaryOpTest__ConvertToVector512Int16Byte(); + + if (test.IsSupported) + { + // Validates basic functionality works, using Unsafe.Read + test.RunBasicScenario_UnsafeRead(); + + if (Avx.IsSupported) + { + // Validates basic functionality works, using Load + test.RunBasicScenario_Load(); + + // Validates basic functionality works, using LoadAligned + test.RunBasicScenario_LoadAligned(); + } + + // Validates calling via reflection works, using Unsafe.Read + test.RunReflectionScenario_UnsafeRead(); + + if (Avx.IsSupported) + { + // Validates calling via reflection works, using Load + test.RunReflectionScenario_Load(); + + // Validates calling via reflection works, using LoadAligned + test.RunReflectionScenario_LoadAligned(); + } + + // Validates passing a static member works + test.RunClsVarScenario(); + + // Validates passing a local works, using Unsafe.Read + test.RunLclVarScenario_UnsafeRead(); + + if (Avx.IsSupported) + { + // Validates passing a local works, using Load + test.RunLclVarScenario_Load(); + + // Validates passing a local works, using LoadAligned + test.RunLclVarScenario_LoadAligned(); + } + + // Validates passing the field of a local works + test.RunLclFldScenario(); + + // Validates passing an instance member works + test.RunFldScenario(); + } + 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 SimpleUnaryOpTest__ConvertToVector512Int16Byte + { + private const int VectorSize = 64; + + private const int Op1ElementCount = 32 / sizeof(Byte); + private const int RetElementCount = VectorSize / sizeof(Int16); + + private static Byte[] _data = new Byte[Op1ElementCount]; + + private static Vector256 _clsVar; + + private Vector256 _fld; + + private SimpleUnaryOpTest__DataTable _dataTable; + + static SimpleUnaryOpTest__ConvertToVector512Int16Byte() + { + var random = new Random(); + + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)(random.Next(0, byte.MaxValue)); } + Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), 16); + } + + public SimpleUnaryOpTest__ConvertToVector512Int16Byte() + { + Succeeded = true; + + var random = new Random(); + + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)(random.Next(0, byte.MaxValue)); } + Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), 16); + + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)(random.Next(0, byte.MaxValue)); } + _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt16[RetElementCount], VectorSize); + } + + public bool IsSupported => Avx512BW.IsSupported; + + public bool Succeeded { get; set; } + + public void RunBasicScenario_UnsafeRead() + { + var result = Avx512BW.ConvertToVector512Int16( + Unsafe.Read>(_dataTable.inArrayPtr) + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunBasicScenario_Load() + { + var result = Avx512BW.ConvertToVector512Int16( + Avx.LoadVector256((Byte*)(_dataTable.inArrayPtr)) + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunBasicScenario_LoadAligned() + { + var result = Avx512BW.ConvertToVector512Int16( + Avx.LoadAlignedVector256((Byte*)(_dataTable.inArrayPtr)) + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunReflectionScenario_UnsafeRead() + { + var result = typeof(Avx512BW).GetMethod(nameof(Avx512BW.ConvertToVector512Int16), new Type[] { typeof(Vector256) }) + .Invoke(null, new object[] { + Unsafe.Read>(_dataTable.inArrayPtr) + }); + + Unsafe.Write(_dataTable.outArrayPtr, (Vector512)(result)); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunReflectionScenario_Load() + { + var result = typeof(Avx512BW).GetMethod(nameof(Avx512BW.ConvertToVector512Int16), new Type[] { typeof(Vector256) }) + .Invoke(null, new object[] { + Avx.LoadVector256((Byte*)(_dataTable.inArrayPtr)) + }); + + Unsafe.Write(_dataTable.outArrayPtr, (Vector512)(result)); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunReflectionScenario_LoadAligned() + { + var result = typeof(Avx512BW).GetMethod(nameof(Avx512BW.ConvertToVector512Int16), new Type[] { typeof(Vector256) }) + .Invoke(null, new object[] { + Avx.LoadAlignedVector256((Byte*)(_dataTable.inArrayPtr)) + }); + + Unsafe.Write(_dataTable.outArrayPtr, (Vector512)(result)); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunClsVarScenario() + { + var result = Avx512BW.ConvertToVector512Int16( + _clsVar + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_clsVar, _dataTable.outArrayPtr); + } + + public void RunLclVarScenario_UnsafeRead() + { + var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); + var result = Avx512BW.ConvertToVector512Int16(firstOp); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(firstOp, _dataTable.outArrayPtr); + } + + public void RunLclVarScenario_Load() + { + var firstOp = Avx.LoadVector256((Byte*)(_dataTable.inArrayPtr)); + var result = Avx512BW.ConvertToVector512Int16(firstOp); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(firstOp, _dataTable.outArrayPtr); + } + + public void RunLclVarScenario_LoadAligned() + { + var firstOp = Avx.LoadAlignedVector256((Byte*)(_dataTable.inArrayPtr)); + var result = Avx512BW.ConvertToVector512Int16(firstOp); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(firstOp, _dataTable.outArrayPtr); + } + + public void RunLclFldScenario() + { + var test = new SimpleUnaryOpTest__ConvertToVector512Int16Byte(); + var result = Avx512BW.ConvertToVector512Int16(test._fld); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(test._fld, _dataTable.outArrayPtr); + } + + public void RunFldScenario() + { + var result = Avx512BW.ConvertToVector512Int16(_fld); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_fld, _dataTable.outArrayPtr); + } + + public void RunUnsupportedScenario() + { + Succeeded = false; + + try + { + RunBasicScenario_UnsafeRead(); + } + catch (PlatformNotSupportedException) + { + Succeeded = true; + } + } + + private void ValidateResult(Vector256 firstOp, void* result, [CallerMemberName] string method = "") + { + Byte[] inArray = new Byte[Op1ElementCount]; + UInt16[] outArray = new UInt16[RetElementCount]; + + Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); + Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), VectorSize); + + ValidateResult(inArray, outArray, method); + } + + private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") + { + Byte[] inArray = new Byte[Op1ElementCount]; + UInt16[] outArray = new UInt16[RetElementCount]; + + Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), 32); + Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), VectorSize); + + ValidateResult(inArray, outArray, method); + } + + private void ValidateResult(Byte[] firstOp, UInt16[] result, [CallerMemberName] string method = "") + { + if (result[0] != (short)firstOp[0]) + { + Succeeded = false; + } + else + { + for (var i = 1; i < RetElementCount; i++) + { + if (result[i] != (short)firstOp[i]) + { + Succeeded = false; + break; + } + } + } + + if (!Succeeded) + { + Console.WriteLine($"{nameof(Avx512BW)}.{nameof(Avx512BW.ConvertToVector512Int16)}(Vector256): {method} failed:"); + Console.WriteLine($" firstOp: ({string.Join(", ", firstOp)})"); + Console.WriteLine($" result: ({string.Join(", ", result)})"); + Console.WriteLine(); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512BW/ConvertToVector512Int16.SByte.cs b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512BW/ConvertToVector512Int16.SByte.cs new file mode 100644 index 0000000000000..7e5d6fccafa46 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512BW/ConvertToVector512Int16.SByte.cs @@ -0,0 +1,310 @@ +// 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\X86\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.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Runtime.Intrinsics; +using System.Runtime.Intrinsics.X86; +using Xunit; + +namespace JIT.HardwareIntrinsics.X86._Avx512BW.handwritten +{ + public static partial class Program + { + [Fact] + public static void ConvertToVector512Int16SByte() + { + var test = new SimpleUnaryOpTest__ConvertToVector512Int16SByte(); + + if (test.IsSupported) + { + // Validates basic functionality works, using Unsafe.Read + test.RunBasicScenario_UnsafeRead(); + + if (Avx.IsSupported) + { + // Validates basic functionality works, using Load + test.RunBasicScenario_Load(); + + // Validates basic functionality works, using LoadAligned + test.RunBasicScenario_LoadAligned(); + } + + // Validates calling via reflection works, using Unsafe.Read + test.RunReflectionScenario_UnsafeRead(); + + if (Avx.IsSupported) + { + // Validates calling via reflection works, using Load + test.RunReflectionScenario_Load(); + + // Validates calling via reflection works, using LoadAligned + test.RunReflectionScenario_LoadAligned(); + } + + // Validates passing a static member works + test.RunClsVarScenario(); + + // Validates passing a local works, using Unsafe.Read + test.RunLclVarScenario_UnsafeRead(); + + if (Avx.IsSupported) + { + // Validates passing a local works, using Load + test.RunLclVarScenario_Load(); + + // Validates passing a local works, using LoadAligned + test.RunLclVarScenario_LoadAligned(); + } + + // Validates passing the field of a local works + test.RunLclFldScenario(); + + // Validates passing an instance member works + test.RunFldScenario(); + } + 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 SimpleUnaryOpTest__ConvertToVector512Int16SByte + { + private const int VectorSize = 64; + + private const int Op1ElementCount = 32 / sizeof(SByte); + private const int RetElementCount = VectorSize / sizeof(Int16); + + private static SByte[] _data = new SByte[Op1ElementCount]; + + private static Vector256 _clsVar; + + private Vector256 _fld; + + private SimpleUnaryOpTest__DataTable _dataTable; + + static SimpleUnaryOpTest__ConvertToVector512Int16SByte() + { + var random = new Random(); + + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), 16); + } + + public SimpleUnaryOpTest__ConvertToVector512Int16SByte() + { + Succeeded = true; + + var random = new Random(); + + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), 16); + + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int16[RetElementCount], VectorSize); + } + + public bool IsSupported => Avx512BW.IsSupported; + + public bool Succeeded { get; set; } + + public void RunBasicScenario_UnsafeRead() + { + var result = Avx512BW.ConvertToVector512Int16( + Unsafe.Read>(_dataTable.inArrayPtr) + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunBasicScenario_Load() + { + var result = Avx512BW.ConvertToVector512Int16( + Avx.LoadVector256((SByte*)(_dataTable.inArrayPtr)) + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunBasicScenario_LoadAligned() + { + var result = Avx512BW.ConvertToVector512Int16( + Avx.LoadAlignedVector256((SByte*)(_dataTable.inArrayPtr)) + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunReflectionScenario_UnsafeRead() + { + var result = typeof(Avx512BW).GetMethod(nameof(Avx512BW.ConvertToVector512Int16), new Type[] { typeof(Vector256) }) + .Invoke(null, new object[] { + Unsafe.Read>(_dataTable.inArrayPtr) + }); + + Unsafe.Write(_dataTable.outArrayPtr, (Vector512)(result)); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunReflectionScenario_Load() + { + var result = typeof(Avx512BW).GetMethod(nameof(Avx512BW.ConvertToVector512Int16), new Type[] { typeof(Vector256) }) + .Invoke(null, new object[] { + Avx.LoadVector256((SByte*)(_dataTable.inArrayPtr)) + }); + + Unsafe.Write(_dataTable.outArrayPtr, (Vector512)(result)); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunReflectionScenario_LoadAligned() + { + var result = typeof(Avx512BW).GetMethod(nameof(Avx512BW.ConvertToVector512Int16), new Type[] { typeof(Vector256) }) + .Invoke(null, new object[] { + Avx.LoadAlignedVector256((SByte*)(_dataTable.inArrayPtr)) + }); + + Unsafe.Write(_dataTable.outArrayPtr, (Vector512)(result)); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunClsVarScenario() + { + var result = Avx512BW.ConvertToVector512Int16( + _clsVar + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_clsVar, _dataTable.outArrayPtr); + } + + public void RunLclVarScenario_UnsafeRead() + { + var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); + var result = Avx512BW.ConvertToVector512Int16(firstOp); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(firstOp, _dataTable.outArrayPtr); + } + + public void RunLclVarScenario_Load() + { + var firstOp = Avx.LoadVector256((SByte*)(_dataTable.inArrayPtr)); + var result = Avx512BW.ConvertToVector512Int16(firstOp); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(firstOp, _dataTable.outArrayPtr); + } + + public void RunLclVarScenario_LoadAligned() + { + var firstOp = Avx.LoadAlignedVector256((SByte*)(_dataTable.inArrayPtr)); + var result = Avx512BW.ConvertToVector512Int16(firstOp); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(firstOp, _dataTable.outArrayPtr); + } + + public void RunLclFldScenario() + { + var test = new SimpleUnaryOpTest__ConvertToVector512Int16SByte(); + var result = Avx512BW.ConvertToVector512Int16(test._fld); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(test._fld, _dataTable.outArrayPtr); + } + + public void RunFldScenario() + { + var result = Avx512BW.ConvertToVector512Int16(_fld); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_fld, _dataTable.outArrayPtr); + } + + public void RunUnsupportedScenario() + { + Succeeded = false; + + try + { + RunBasicScenario_UnsafeRead(); + } + catch (PlatformNotSupportedException) + { + Succeeded = true; + } + } + + private void ValidateResult(Vector256 firstOp, void* result, [CallerMemberName] string method = "") + { + SByte[] inArray = new SByte[Op1ElementCount]; + Int16[] outArray = new Int16[RetElementCount]; + + Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); + Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), VectorSize); + + ValidateResult(inArray, outArray, method); + } + + private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") + { + SByte[] inArray = new SByte[Op1ElementCount]; + Int16[] outArray = new Int16[RetElementCount]; + + Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), 32); + Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), VectorSize); + + ValidateResult(inArray, outArray, method); + } + + private void ValidateResult(SByte[] firstOp, Int16[] result, [CallerMemberName] string method = "") + { + if (result[0] != (short)firstOp[0]) + { + Console.WriteLine($"{0}: {result[0]} != {(short)firstOp[0]})"); + Succeeded = false; + } + else + { + for (var i = 1; i < RetElementCount; i++) + { + if (result[i] != (short)firstOp[i]) + { + Console.WriteLine($"{i}: {result[i]} != {(short)firstOp[i]})"); + Succeeded = false; + break; + } + } + } + + if (!Succeeded) + { + Console.WriteLine($"{nameof(Avx512BW)}.{nameof(Avx512BW.ConvertToVector512Int16)}(Vector256): {method} failed:"); + Console.WriteLine($" firstOp: ({string.Join(", ", firstOp)})"); + Console.WriteLine($" result: ({string.Join(", ", result)})"); + Console.WriteLine(); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512BW/ConvertToVector512UInt16.Byte.cs b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512BW/ConvertToVector512UInt16.Byte.cs new file mode 100644 index 0000000000000..658b8a2adf462 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512BW/ConvertToVector512UInt16.Byte.cs @@ -0,0 +1,308 @@ +// 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\X86\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.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Runtime.Intrinsics; +using System.Runtime.Intrinsics.X86; +using Xunit; + +namespace JIT.HardwareIntrinsics.X86._Avx512BW.handwritten +{ + public static partial class Program + { + [Fact] + public static void ConvertToVector512UInt16Byte() + { + var test = new SimpleUnaryOpTest__ConvertToVector512UInt16Byte(); + + if (test.IsSupported) + { + // Validates basic functionality works, using Unsafe.Read + test.RunBasicScenario_UnsafeRead(); + + if (Avx.IsSupported) + { + // Validates basic functionality works, using Load + test.RunBasicScenario_Load(); + + // Validates basic functionality works, using LoadAligned + test.RunBasicScenario_LoadAligned(); + } + + // Validates calling via reflection works, using Unsafe.Read + test.RunReflectionScenario_UnsafeRead(); + + if (Avx.IsSupported) + { + // Validates calling via reflection works, using Load + test.RunReflectionScenario_Load(); + + // Validates calling via reflection works, using LoadAligned + test.RunReflectionScenario_LoadAligned(); + } + + // Validates passing a static member works + test.RunClsVarScenario(); + + // Validates passing a local works, using Unsafe.Read + test.RunLclVarScenario_UnsafeRead(); + + if (Avx.IsSupported) + { + // Validates passing a local works, using Load + test.RunLclVarScenario_Load(); + + // Validates passing a local works, using LoadAligned + test.RunLclVarScenario_LoadAligned(); + } + + // Validates passing the field of a local works + test.RunLclFldScenario(); + + // Validates passing an instance member works + test.RunFldScenario(); + } + 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 SimpleUnaryOpTest__ConvertToVector512UInt16Byte + { + private const int VectorSize = 64; + + private const int Op1ElementCount = 32 / sizeof(Byte); + private const int RetElementCount = VectorSize / sizeof(UInt16); + + private static Byte[] _data = new Byte[Op1ElementCount]; + + private static Vector256 _clsVar; + + private Vector256 _fld; + + private SimpleUnaryOpTest__DataTable _dataTable; + + static SimpleUnaryOpTest__ConvertToVector512UInt16Byte() + { + var random = new Random(); + + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)(random.Next(0, byte.MaxValue)); } + Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), 16); + } + + public SimpleUnaryOpTest__ConvertToVector512UInt16Byte() + { + Succeeded = true; + + var random = new Random(); + + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)(random.Next(0, byte.MaxValue)); } + Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), 16); + + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)(random.Next(0, byte.MaxValue)); } + _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt16[RetElementCount], VectorSize); + } + + public bool IsSupported => Avx512BW.IsSupported; + + public bool Succeeded { get; set; } + + public void RunBasicScenario_UnsafeRead() + { + var result = Avx512BW.ConvertToVector512UInt16( + Unsafe.Read>(_dataTable.inArrayPtr) + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunBasicScenario_Load() + { + var result = Avx512BW.ConvertToVector512UInt16( + Avx.LoadVector256((Byte*)(_dataTable.inArrayPtr)) + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunBasicScenario_LoadAligned() + { + var result = Avx512BW.ConvertToVector512UInt16( + Avx.LoadAlignedVector256((Byte*)(_dataTable.inArrayPtr)) + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunReflectionScenario_UnsafeRead() + { + var result = typeof(Avx512BW).GetMethod(nameof(Avx512BW.ConvertToVector512UInt16), new Type[] { typeof(Vector256) }) + .Invoke(null, new object[] { + Unsafe.Read>(_dataTable.inArrayPtr) + }); + + Unsafe.Write(_dataTable.outArrayPtr, (Vector512)(result)); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunReflectionScenario_Load() + { + var result = typeof(Avx512BW).GetMethod(nameof(Avx512BW.ConvertToVector512UInt16), new Type[] { typeof(Vector256) }) + .Invoke(null, new object[] { + Avx.LoadVector256((Byte*)(_dataTable.inArrayPtr)) + }); + + Unsafe.Write(_dataTable.outArrayPtr, (Vector512)(result)); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunReflectionScenario_LoadAligned() + { + var result = typeof(Avx512BW).GetMethod(nameof(Avx512BW.ConvertToVector512UInt16), new Type[] { typeof(Vector256) }) + .Invoke(null, new object[] { + Avx.LoadAlignedVector256((Byte*)(_dataTable.inArrayPtr)) + }); + + Unsafe.Write(_dataTable.outArrayPtr, (Vector512)(result)); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunClsVarScenario() + { + var result = Avx512BW.ConvertToVector512UInt16( + _clsVar + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_clsVar, _dataTable.outArrayPtr); + } + + public void RunLclVarScenario_UnsafeRead() + { + var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); + var result = Avx512BW.ConvertToVector512UInt16(firstOp); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(firstOp, _dataTable.outArrayPtr); + } + + public void RunLclVarScenario_Load() + { + var firstOp = Avx.LoadVector256((Byte*)(_dataTable.inArrayPtr)); + var result = Avx512BW.ConvertToVector512UInt16(firstOp); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(firstOp, _dataTable.outArrayPtr); + } + + public void RunLclVarScenario_LoadAligned() + { + var firstOp = Avx.LoadAlignedVector256((Byte*)(_dataTable.inArrayPtr)); + var result = Avx512BW.ConvertToVector512UInt16(firstOp); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(firstOp, _dataTable.outArrayPtr); + } + + public void RunLclFldScenario() + { + var test = new SimpleUnaryOpTest__ConvertToVector512UInt16Byte(); + var result = Avx512BW.ConvertToVector512UInt16(test._fld); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(test._fld, _dataTable.outArrayPtr); + } + + public void RunFldScenario() + { + var result = Avx512BW.ConvertToVector512UInt16(_fld); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_fld, _dataTable.outArrayPtr); + } + + public void RunUnsupportedScenario() + { + Succeeded = false; + + try + { + RunBasicScenario_UnsafeRead(); + } + catch (PlatformNotSupportedException) + { + Succeeded = true; + } + } + + private void ValidateResult(Vector256 firstOp, void* result, [CallerMemberName] string method = "") + { + Byte[] inArray = new Byte[Op1ElementCount]; + UInt16[] outArray = new UInt16[RetElementCount]; + + Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); + Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), VectorSize); + + ValidateResult(inArray, outArray, method); + } + + private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") + { + Byte[] inArray = new Byte[Op1ElementCount]; + UInt16[] outArray = new UInt16[RetElementCount]; + + Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), 32); + Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), VectorSize); + + ValidateResult(inArray, outArray, method); + } + + private void ValidateResult(Byte[] firstOp, UInt16[] result, [CallerMemberName] string method = "") + { + if (result[0] != (ushort)firstOp[0]) + { + Succeeded = false; + } + else + { + for (var i = 1; i < RetElementCount; i++) + { + if (result[i] != (ushort)firstOp[i]) + { + Succeeded = false; + break; + } + } + } + + if (!Succeeded) + { + Console.WriteLine($"{nameof(Avx512BW)}.{nameof(Avx512BW.ConvertToVector512UInt16)}(Vector256): {method} failed:"); + Console.WriteLine($" firstOp: ({string.Join(", ", firstOp)})"); + Console.WriteLine($" result: ({string.Join(", ", result)})"); + Console.WriteLine(); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512BW/ConvertToVector512UInt16.SByte.cs b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512BW/ConvertToVector512UInt16.SByte.cs new file mode 100644 index 0000000000000..82dc660568aac --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512BW/ConvertToVector512UInt16.SByte.cs @@ -0,0 +1,308 @@ +// 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\X86\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.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Runtime.Intrinsics; +using System.Runtime.Intrinsics.X86; +using Xunit; + +namespace JIT.HardwareIntrinsics.X86._Avx512BW.handwritten +{ + public static partial class Program + { + [Fact] + public static void ConvertToVector512UInt16SByte() + { + var test = new SimpleUnaryOpTest__ConvertToVector512UInt16SByte(); + + if (test.IsSupported) + { + // Validates basic functionality works, using Unsafe.Read + test.RunBasicScenario_UnsafeRead(); + + if (Avx.IsSupported) + { + // Validates basic functionality works, using Load + test.RunBasicScenario_Load(); + + // Validates basic functionality works, using LoadAligned + test.RunBasicScenario_LoadAligned(); + } + + // Validates calling via reflection works, using Unsafe.Read + test.RunReflectionScenario_UnsafeRead(); + + if (Avx.IsSupported) + { + // Validates calling via reflection works, using Load + test.RunReflectionScenario_Load(); + + // Validates calling via reflection works, using LoadAligned + test.RunReflectionScenario_LoadAligned(); + } + + // Validates passing a static member works + test.RunClsVarScenario(); + + // Validates passing a local works, using Unsafe.Read + test.RunLclVarScenario_UnsafeRead(); + + if (Avx.IsSupported) + { + // Validates passing a local works, using Load + test.RunLclVarScenario_Load(); + + // Validates passing a local works, using LoadAligned + test.RunLclVarScenario_LoadAligned(); + } + + // Validates passing the field of a local works + test.RunLclFldScenario(); + + // Validates passing an instance member works + test.RunFldScenario(); + } + 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 SimpleUnaryOpTest__ConvertToVector512UInt16SByte + { + private const int VectorSize = 64; + + private const int Op1ElementCount = 32 / sizeof(SByte); + private const int RetElementCount = VectorSize / sizeof(UInt16); + + private static SByte[] _data = new SByte[Op1ElementCount]; + + private static Vector256 _clsVar; + + private Vector256 _fld; + + private SimpleUnaryOpTest__DataTable _dataTable; + + static SimpleUnaryOpTest__ConvertToVector512UInt16SByte() + { + var random = new Random(); + + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), 16); + } + + public SimpleUnaryOpTest__ConvertToVector512UInt16SByte() + { + Succeeded = true; + + var random = new Random(); + + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), 16); + + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt16[RetElementCount], VectorSize); + } + + public bool IsSupported => Avx512BW.IsSupported; + + public bool Succeeded { get; set; } + + public void RunBasicScenario_UnsafeRead() + { + var result = Avx512BW.ConvertToVector512UInt16( + Unsafe.Read>(_dataTable.inArrayPtr) + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunBasicScenario_Load() + { + var result = Avx512BW.ConvertToVector512UInt16( + Avx.LoadVector256((SByte*)(_dataTable.inArrayPtr)) + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunBasicScenario_LoadAligned() + { + var result = Avx512BW.ConvertToVector512UInt16( + Avx.LoadAlignedVector256((SByte*)(_dataTable.inArrayPtr)) + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunReflectionScenario_UnsafeRead() + { + var result = typeof(Avx512BW).GetMethod(nameof(Avx512BW.ConvertToVector512UInt16), new Type[] { typeof(Vector256) }) + .Invoke(null, new object[] { + Unsafe.Read>(_dataTable.inArrayPtr) + }); + + Unsafe.Write(_dataTable.outArrayPtr, (Vector512)(result)); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunReflectionScenario_Load() + { + var result = typeof(Avx512BW).GetMethod(nameof(Avx512BW.ConvertToVector512UInt16), new Type[] { typeof(Vector256) }) + .Invoke(null, new object[] { + Avx.LoadVector256((SByte*)(_dataTable.inArrayPtr)) + }); + + Unsafe.Write(_dataTable.outArrayPtr, (Vector512)(result)); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunReflectionScenario_LoadAligned() + { + var result = typeof(Avx512BW).GetMethod(nameof(Avx512BW.ConvertToVector512UInt16), new Type[] { typeof(Vector256) }) + .Invoke(null, new object[] { + Avx.LoadAlignedVector256((SByte*)(_dataTable.inArrayPtr)) + }); + + Unsafe.Write(_dataTable.outArrayPtr, (Vector512)(result)); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunClsVarScenario() + { + var result = Avx512BW.ConvertToVector512UInt16( + _clsVar + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_clsVar, _dataTable.outArrayPtr); + } + + public void RunLclVarScenario_UnsafeRead() + { + var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); + var result = Avx512BW.ConvertToVector512UInt16(firstOp); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(firstOp, _dataTable.outArrayPtr); + } + + public void RunLclVarScenario_Load() + { + var firstOp = Avx.LoadVector256((SByte*)(_dataTable.inArrayPtr)); + var result = Avx512BW.ConvertToVector512UInt16(firstOp); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(firstOp, _dataTable.outArrayPtr); + } + + public void RunLclVarScenario_LoadAligned() + { + var firstOp = Avx.LoadAlignedVector256((SByte*)(_dataTable.inArrayPtr)); + var result = Avx512BW.ConvertToVector512UInt16(firstOp); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(firstOp, _dataTable.outArrayPtr); + } + + public void RunLclFldScenario() + { + var test = new SimpleUnaryOpTest__ConvertToVector512UInt16SByte(); + var result = Avx512BW.ConvertToVector512UInt16(test._fld); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(test._fld, _dataTable.outArrayPtr); + } + + public void RunFldScenario() + { + var result = Avx512BW.ConvertToVector512UInt16(_fld); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_fld, _dataTable.outArrayPtr); + } + + public void RunUnsupportedScenario() + { + Succeeded = false; + + try + { + RunBasicScenario_UnsafeRead(); + } + catch (PlatformNotSupportedException) + { + Succeeded = true; + } + } + + private void ValidateResult(Vector256 firstOp, void* result, [CallerMemberName] string method = "") + { + SByte[] inArray = new SByte[Op1ElementCount]; + UInt16[] outArray = new UInt16[RetElementCount]; + + Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); + Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), VectorSize); + + ValidateResult(inArray, outArray, method); + } + + private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") + { + SByte[] inArray = new SByte[Op1ElementCount]; + UInt16[] outArray = new UInt16[RetElementCount]; + + Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), 32); + Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), VectorSize); + + ValidateResult(inArray, outArray, method); + } + + private void ValidateResult(SByte[] firstOp, UInt16[] result, [CallerMemberName] string method = "") + { + if (result[0] != (ushort)firstOp[0]) + { + Succeeded = false; + } + else + { + for (var i = 1; i < RetElementCount; i++) + { + if (result[i] != (ushort)firstOp[i]) + { + Succeeded = false; + break; + } + } + } + + if (!Succeeded) + { + Console.WriteLine($"{nameof(Avx512BW)}.{nameof(Avx512BW.ConvertToVector512UInt16)}(Vector256): {method} failed:"); + Console.WriteLine($" firstOp: ({string.Join(", ", firstOp)})"); + Console.WriteLine($" result: ({string.Join(", ", result)})"); + Console.WriteLine(); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512BW/HandwrittenProgram.cs b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512BW/HandwrittenProgram.cs new file mode 100644 index 0000000000000..ca5a5b8aa3656 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512BW/HandwrittenProgram.cs @@ -0,0 +1,214 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Runtime.Intrinsics.X86; +using System.Runtime.Intrinsics; +using Xunit; + +namespace IntelHardwareIntrinsicTest._Avx512BW +{ + public partial class Program + { + const int Pass = 100; + const int Fail = 0; + + static unsafe void* Align(byte* buffer, byte expectedAlignment) + { + // Compute how bad the misalignment is, which is at most (expectedAlignment - 1). + // Then subtract that from the expectedAlignment and add it to the original address + // to compute the aligned address. + + var misalignment = expectedAlignment - ((ulong)(buffer) % expectedAlignment); + return (void*)(buffer + misalignment); + } + + public unsafe struct TestTable : IDisposable where T : struct + { + public T[] inArray; + public T[] outArray; + + public void* inArrayPtr => inHandle.AddrOfPinnedObject().ToPointer(); + public void* outArrayPtr => outHandle.AddrOfPinnedObject().ToPointer(); + + GCHandle inHandle; + GCHandle outHandle; + public TestTable(T[] a, T[] b) + { + this.inArray = a; + this.outArray = b; + + inHandle = GCHandle.Alloc(inArray, GCHandleType.Pinned); + outHandle = GCHandle.Alloc(outArray, GCHandleType.Pinned); + } + public bool CheckResult(Func check) + { + return check(inArray, outArray); + } + public bool CheckResult(Func check) + { + for (int i = 0; i < inArray.Length; i++) + { + if (!check(inArray[i], outArray[i])) + { + return false; + } + } + return true; + } + public void Dispose() + { + inHandle.Free(); + outHandle.Free(); + } + } + + public unsafe struct TestTable : IDisposable where T1 : struct where T2 : struct where T3 : struct + { + public T1[] inArray1; + public T2[] inArray2; + public T3[] outArray; + + public void* inArray1Ptr => inHandle1.AddrOfPinnedObject().ToPointer(); + public void* inArray2Ptr => inHandle2.AddrOfPinnedObject().ToPointer(); + public void* outArrayPtr => outHandle.AddrOfPinnedObject().ToPointer(); + + GCHandle inHandle1; + GCHandle inHandle2; + GCHandle outHandle; + public TestTable(T1[] a, T2[] b, T3[] c) + { + this.inArray1 = a; + this.inArray2 = b; + this.outArray = c; + + inHandle1 = GCHandle.Alloc(inArray1, GCHandleType.Pinned); + inHandle2 = GCHandle.Alloc(inArray2, GCHandleType.Pinned); + outHandle = GCHandle.Alloc(outArray, GCHandleType.Pinned); + } + public bool CheckResult(Func check) + { + for (int i = 0; i < inArray1.Length; i++) + { + if (!check(inArray1[i], inArray2[i], outArray[i])) + { + return false; + } + } + return true; + } + + public void Dispose() + { + inHandle1.Free(); + inHandle2.Free(); + outHandle.Free(); + } + } + + public unsafe struct AlignedTestTable : IDisposable where T : struct + { + private byte[] inArray; + public T[] outArray; + + private GCHandle inHandle; + private GCHandle outHandle; + + private byte simdSize; + + public AlignedTestTable(T[] a, T[] b) + { + this.inArray = new byte[64]; + this.outArray = b; + + this.inHandle = GCHandle.Alloc(this.inArray, GCHandleType.Pinned); + this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); + + this.simdSize = 64; + + Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArrayPtr), ref Unsafe.As(ref a[0]), this.simdSize); + } + + public void* inArrayPtr => Align((byte*)(inHandle.AddrOfPinnedObject().ToPointer()), simdSize); + public void* outArrayPtr => outHandle.AddrOfPinnedObject().ToPointer(); + + public bool CheckResult(Func check) + { + for (int i = 0; i < outArray.Length; i++) + { + if (!check(Unsafe.Add(ref Unsafe.AsRef(inArrayPtr), i), outArray[i])) + { + return false; + } + } + return true; + } + + public void Dispose() + { + inHandle.Free(); + outHandle.Free(); + } + + private static unsafe void* Align(byte* buffer, byte expectedAlignment) + { + // Compute how bad the misalignment is, which is at most (expectedAlignment - 1). + // Then subtract that from the expectedAlignment and add it to the original address + // to compute the aligned address. + + var misalignment = expectedAlignment - ((ulong)(buffer) % expectedAlignment); + return (void*)(buffer + misalignment); + } + } + + public unsafe struct TestTable_2Input : IDisposable where T : struct + { + public T[] inArray1; + public T[] inArray2; + public T[] outArray; + + public void* inArray1Ptr => inHandle1.AddrOfPinnedObject().ToPointer(); + public void* inArray2Ptr => inHandle2.AddrOfPinnedObject().ToPointer(); + public void* outArrayPtr => outHandle.AddrOfPinnedObject().ToPointer(); + + GCHandle inHandle1; + GCHandle inHandle2; + GCHandle outHandle; + public TestTable_2Input(T[] a, T[] b, T[] c) + { + this.inArray1 = a; + this.inArray2 = b; + this.outArray = c; + + inHandle1 = GCHandle.Alloc(inArray1, GCHandleType.Pinned); + inHandle2 = GCHandle.Alloc(inArray2, GCHandleType.Pinned); + outHandle = GCHandle.Alloc(outArray, GCHandleType.Pinned); + } + public bool CheckResult(Func check) + { + return check(inArray1, inArray2, outArray); + } + public bool CheckResult(Func check) + { + for (int i = 0; i < inArray1.Length; i++) + { + if (!check(inArray1[i], inArray2[i], outArray[i])) + { + return false; + } + } + return true; + } + + public void Dispose() + { + inHandle1.Free(); + inHandle2.Free(); + outHandle.Free(); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512BW/Program.Avx512BW.cs b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512BW/Program.Avx512BW.cs new file mode 100644 index 0000000000000..0174c3d14dabf --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512BW/Program.Avx512BW.cs @@ -0,0 +1,16 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System; +using System.Collections.Generic; + +namespace JIT.HardwareIntrinsics.X86._Avx512BW +{ + public static partial class Program + { + static Program() + { + + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512BW/Store.cs b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512BW/Store.cs new file mode 100644 index 0000000000000..8babcc42231cf --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512BW/Store.cs @@ -0,0 +1,96 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Runtime.Intrinsics.X86; +using System.Runtime.Intrinsics; +using Xunit; + +namespace IntelHardwareIntrinsicTest._Avx512BW +{ + public partial class Program + { + [Fact] + public static unsafe void Store() + { + int testResult = Pass; + + if (Avx512BW.IsSupported) + { + using (TestTable intTable = new TestTable(new short[32] { 1, -5, 100, 0, 1, 2, 3, 4, 1, -5, 100, 0, 1, 2, 3, 4, 1, -5, 100, 0, 1, 2, 3, 4, 1, -5, 100, 0, 1, 2, 3, 4 }, new short[32])) + { + var vf = Unsafe.Read>(intTable.inArrayPtr); + Avx512BW.Store((short*)(intTable.outArrayPtr), vf); + + if (!intTable.CheckResult((short x, short y) => x == y)) + { + Console.WriteLine("AVX512BW Store failed on short:"); + foreach (var item in intTable.outArray) + { + Console.Write(item + ", "); + } + Console.WriteLine(); + testResult = Fail; + } + } + + using (TestTable intTable = new TestTable(new ushort[32] { 1, 5, 100, 0, 1, 2, 3, 4, 1, 5, 100, 0, 1, 2, 3, 4, 1, 5, 100, 0, 1, 2, 3, 4, 1, 5, 100, 0, 1, 2, 3, 4 }, new ushort[32])) + { + var vf = Unsafe.Read>(intTable.inArrayPtr); + Avx512BW.Store((ushort*)(intTable.outArrayPtr), vf); + + if (!intTable.CheckResult((ushort x, ushort y) => x == y)) + { + Console.WriteLine("AVX512BW Store failed on ushort:"); + foreach (var item in intTable.outArray) + { + Console.Write(item + ", "); + } + Console.WriteLine(); + testResult = Fail; + } + } + + using (TestTable intTable = new TestTable(new sbyte[64] { 1, -5, 100, 0, 1, 2, 3, 4, 1, -5, 100, 0, 1, 2, 3, 4, 1, -5, 100, 0, 1, 2, 3, 4, 1, -5, 100, 0, 1, 2, 3, 4, 1, -5, 100, 0, 1, 2, 3, 4, 1, -5, 100, 0, 1, 2, 3, 4, 1, -5, 100, 0, 1, 2, 3, 4, 1, -5, 100, 0, 1, 2, 3, 4 }, new sbyte[64])) + { + var vf = Unsafe.Read>(intTable.inArrayPtr); + Avx512BW.Store((sbyte*)(intTable.outArrayPtr), vf); + + if (!intTable.CheckResult((sbyte x, sbyte y) => x == y)) + { + Console.WriteLine("AVX512BW Store failed on sbyte:"); + foreach (var item in intTable.outArray) + { + Console.Write(item + ", "); + } + Console.WriteLine(); + testResult = Fail; + } + } + + using (TestTable intTable = new TestTable(new byte[64] { 1, 5, 100, 0, 1, 2, 3, 4, 1, 5, 100, 0, 1, 2, 3, 4, 1, 5, 100, 0, 1, 2, 3, 4, 1, 5, 100, 0, 1, 2, 3, 4, 1, 5, 100, 0, 1, 2, 3, 4, 1, 5, 100, 0, 1, 2, 3, 4, 1, 5, 100, 0, 1, 2, 3, 4, 1, 5, 100, 0, 1, 2, 3, 4 }, new byte[64])) + { + var vf = Unsafe.Read>(intTable.inArrayPtr); + Avx512BW.Store((byte*)(intTable.outArrayPtr), vf); + + if (!intTable.CheckResult((byte x, byte y) => x == y)) + { + Console.WriteLine("AVX512BW Store failed on byte:"); + foreach (var item in intTable.outArray) + { + Console.Write(item + ", "); + } + Console.WriteLine(); + testResult = Fail; + } + } + + } + + Assert.Equal(Pass, testResult); + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512BW/UnpackHigh.cs b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512BW/UnpackHigh.cs new file mode 100644 index 0000000000000..3081e11b560c1 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512BW/UnpackHigh.cs @@ -0,0 +1,189 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Runtime.Intrinsics.X86; +using System.Runtime.Intrinsics; +using Xunit; + +namespace IntelHardwareIntrinsicTest._Avx512BW +{ + public partial class Program + { + [Fact] + public static unsafe void UnpackHigh() + { + int testResult = Pass; + + if (Avx512BW.IsSupported) + { + using (TestTable byteTable = new TestTable(new byte[64] { 1, 5, 100, 0, 1, 5, 100, 0, 1, 5, 100, 0, 1, 5, 100, 0, 1, 5, 100, 0, 1, 5, 100, 0, 1, 5, 100, 0, 1, 5, 100, 0, 1, 5, 100, 0, 1, 5, 100, 0, 1, 5, 100, 0, 1, 5, 100, 0, 1, 5, 100, 0, 1, 5, 100, 0, 1, 5, 100, 0, 1, 5, 100, 0 }, new byte[64] { 22, 1, 50, 0, 22, 1, 50, 0, 22, 1, 50, 0, 22, 1, 50, 0, 22, 1, 50, 0, 22, 1, 50, 0, 22, 1, 50, 0, 22, 1, 50, 0, 22, 1, 50, 0, 22, 1, 50, 0, 22, 1, 50, 0, 22, 1, 50, 0, 22, 1, 50, 0, 22, 1, 50, 0, 22, 1, 50, 0, 22, 1, 50, 0 }, new byte[64])) + using (TestTable sbyteTable = new TestTable(new sbyte[64] { 1, -5, 100, 0, 1, -5, 100, 0, 1, -5, 100, 0, 1, -5, 100, 0, 1, -5, 100, 0, 1, -5, 100, 0, 1, -5, 100, 0, 1, -5, 100, 0, 1, -5, 100, 0, 1, -5, 100, 0, 1, -5, 100, 0, 1, -5, 100, 0, 1, -5, 100, 0, 1, -5, 100, 0, 1, -5, 100, 0, 1, -5, 100, 0 }, new sbyte[64] { 22, -1, -50, 0, 22, -1, -50, 0, 22, -1, -50, 0, 22, -1, -50, 0, 22, -1, -50, 0, 22, -1, -50, 0, 22, -1, -50, 0, 22, -1, -50, 0, 22, -1, -50, 0, 22, -1, -50, 0, 22, -1, -50, 0, 22, -1, -50, 0, 22, -1, -50, 0, 22, -1, -50, 0, 22, -1, -50, 0, 22, -1, -50, 0 }, new sbyte[64])) + using (TestTable shortTable = new TestTable(new short[32] { 1, -5, 100, 0, 1, -5, 100, 0, 1, -5, 100, 0, 1, -5, 100, 0, 1, -5, 100, 0, 1, -5, 100, 0, 1, -5, 100, 0, 1, -5, 100, 0 }, new short[32] { 22, -1, -50, 0, 22, -1, -50, 0, 22, -1, -50, 0, 22, -1, -50, 0, 22, -1, -50, 0, 22, -1, -50, 0, 22, -1, -50, 0, 22, -1, -50, 0 }, new short[32])) + using (TestTable ushortTable = new TestTable(new ushort[32] { 1, 5, 100, 0, 1, 5, 100, 0, 1, 5, 100, 0, 1, 5, 100, 0, 1, 5, 100, 0, 1, 5, 100, 0, 1, 5, 100, 0, 1, 5, 100, 0 }, new ushort[32] { 22, 1, 50, 0, 22, 1, 50, 0, 22, 1, 50, 0, 22, 1, 50, 0, 22, 1, 50, 0, 22, 1, 50, 0, 22, 1, 50, 0, 22, 1, 50, 0 }, new ushort[32])) + { + var vb1 = Unsafe.Read>(byteTable.inArray1Ptr); + var vb2 = Unsafe.Read>(byteTable.inArray2Ptr); + var vb3 = Avx512BW.UnpackHigh(vb1, vb2); + Unsafe.Write(byteTable.outArrayPtr, vb3); + + var vsb1 = Unsafe.Read>(sbyteTable.inArray1Ptr); + var vsb2 = Unsafe.Read>(sbyteTable.inArray2Ptr); + var vsb3 = Avx512BW.UnpackHigh(vsb1, vsb2); + Unsafe.Write(sbyteTable.outArrayPtr, vsb3); + + var vs1 = Unsafe.Read>(shortTable.inArray1Ptr); + var vs2 = Unsafe.Read>(shortTable.inArray2Ptr); + var vs3 = Avx512BW.UnpackHigh(vs1, vs2); + Unsafe.Write(shortTable.outArrayPtr, vs3); + + var vus1 = Unsafe.Read>(ushortTable.inArray1Ptr); + var vus2 = Unsafe.Read>(ushortTable.inArray2Ptr); + var vus3 = Avx512BW.UnpackHigh(vus1, vus2); + Unsafe.Write(ushortTable.outArrayPtr, vus3); + + if ((byteTable.inArray1[8] != byteTable.outArray[0]) || (byteTable.inArray2[8] != byteTable.outArray[1]) || + (byteTable.inArray1[9] != byteTable.outArray[2]) || (byteTable.inArray2[9] != byteTable.outArray[3]) || + (byteTable.inArray1[10] != byteTable.outArray[4]) || (byteTable.inArray2[10] != byteTable.outArray[5]) || + (byteTable.inArray1[11] != byteTable.outArray[6]) || (byteTable.inArray2[11] != byteTable.outArray[7]) || + (byteTable.inArray1[12] != byteTable.outArray[8]) || (byteTable.inArray2[12] != byteTable.outArray[9]) || + (byteTable.inArray1[13] != byteTable.outArray[10]) || (byteTable.inArray2[13] != byteTable.outArray[11]) || + (byteTable.inArray1[14] != byteTable.outArray[12]) || (byteTable.inArray2[14] != byteTable.outArray[13]) || + (byteTable.inArray1[15] != byteTable.outArray[14]) || (byteTable.inArray2[15] != byteTable.outArray[15]) || + (byteTable.inArray1[24] != byteTable.outArray[16]) || (byteTable.inArray2[24] != byteTable.outArray[17]) || + (byteTable.inArray1[25] != byteTable.outArray[18]) || (byteTable.inArray2[25] != byteTable.outArray[19]) || + (byteTable.inArray1[26] != byteTable.outArray[20]) || (byteTable.inArray2[26] != byteTable.outArray[21]) || + (byteTable.inArray1[27] != byteTable.outArray[22]) || (byteTable.inArray2[27] != byteTable.outArray[23]) || + (byteTable.inArray1[28] != byteTable.outArray[24]) || (byteTable.inArray2[28] != byteTable.outArray[25]) || + (byteTable.inArray1[29] != byteTable.outArray[26]) || (byteTable.inArray2[29] != byteTable.outArray[27]) || + (byteTable.inArray1[30] != byteTable.outArray[28]) || (byteTable.inArray2[30] != byteTable.outArray[29]) || + (byteTable.inArray1[31] != byteTable.outArray[30]) || (byteTable.inArray2[31] != byteTable.outArray[31]) || + (byteTable.inArray1[40] != byteTable.outArray[32]) || (byteTable.inArray2[40] != byteTable.outArray[33]) || + (byteTable.inArray1[41] != byteTable.outArray[34]) || (byteTable.inArray2[41] != byteTable.outArray[35]) || + (byteTable.inArray1[42] != byteTable.outArray[36]) || (byteTable.inArray2[42] != byteTable.outArray[37]) || + (byteTable.inArray1[43] != byteTable.outArray[38]) || (byteTable.inArray2[43] != byteTable.outArray[39]) || + (byteTable.inArray1[44] != byteTable.outArray[40]) || (byteTable.inArray2[44] != byteTable.outArray[41]) || + (byteTable.inArray1[45] != byteTable.outArray[42]) || (byteTable.inArray2[45] != byteTable.outArray[43]) || + (byteTable.inArray1[46] != byteTable.outArray[44]) || (byteTable.inArray2[46] != byteTable.outArray[45]) || + (byteTable.inArray1[47] != byteTable.outArray[46]) || (byteTable.inArray2[47] != byteTable.outArray[47]) || + (byteTable.inArray1[56] != byteTable.outArray[48]) || (byteTable.inArray2[56] != byteTable.outArray[49]) || + (byteTable.inArray1[57] != byteTable.outArray[50]) || (byteTable.inArray2[57] != byteTable.outArray[51]) || + (byteTable.inArray1[58] != byteTable.outArray[52]) || (byteTable.inArray2[58] != byteTable.outArray[53]) || + (byteTable.inArray1[59] != byteTable.outArray[54]) || (byteTable.inArray2[59] != byteTable.outArray[55]) || + (byteTable.inArray1[60] != byteTable.outArray[56]) || (byteTable.inArray2[60] != byteTable.outArray[57]) || + (byteTable.inArray1[61] != byteTable.outArray[58]) || (byteTable.inArray2[61] != byteTable.outArray[59]) || + (byteTable.inArray1[62] != byteTable.outArray[60]) || (byteTable.inArray2[62] != byteTable.outArray[61]) || + (byteTable.inArray1[63] != byteTable.outArray[62]) || (byteTable.inArray2[63] != byteTable.outArray[63])) + { + Console.WriteLine("Avx512BW UnpackHigh failed on byte:"); + Console.WriteLine($" left: ({string.Join(", ", byteTable.inArray1)})"); + Console.WriteLine($" right: ({string.Join(", ", byteTable.inArray2)})"); + Console.WriteLine($" result: ({string.Join(", ", byteTable.outArray)})"); + Console.WriteLine(); + + testResult = Fail; + } + + if ((sbyteTable.inArray1[8] != sbyteTable.outArray[0]) || (sbyteTable.inArray2[8] != sbyteTable.outArray[1]) || + (sbyteTable.inArray1[9] != sbyteTable.outArray[2]) || (sbyteTable.inArray2[9] != sbyteTable.outArray[3]) || + (sbyteTable.inArray1[10] != sbyteTable.outArray[4]) || (sbyteTable.inArray2[10] != sbyteTable.outArray[5]) || + (sbyteTable.inArray1[11] != sbyteTable.outArray[6]) || (sbyteTable.inArray2[11] != sbyteTable.outArray[7]) || + (sbyteTable.inArray1[12] != sbyteTable.outArray[8]) || (sbyteTable.inArray2[12] != sbyteTable.outArray[9]) || + (sbyteTable.inArray1[13] != sbyteTable.outArray[10]) || (sbyteTable.inArray2[13] != sbyteTable.outArray[11]) || + (sbyteTable.inArray1[14] != sbyteTable.outArray[12]) || (sbyteTable.inArray2[14] != sbyteTable.outArray[13]) || + (sbyteTable.inArray1[15] != sbyteTable.outArray[14]) || (sbyteTable.inArray2[15] != sbyteTable.outArray[15]) || + (sbyteTable.inArray1[24] != sbyteTable.outArray[16]) || (sbyteTable.inArray2[24] != sbyteTable.outArray[17]) || + (sbyteTable.inArray1[25] != sbyteTable.outArray[18]) || (sbyteTable.inArray2[25] != sbyteTable.outArray[19]) || + (sbyteTable.inArray1[26] != sbyteTable.outArray[20]) || (sbyteTable.inArray2[26] != sbyteTable.outArray[21]) || + (sbyteTable.inArray1[27] != sbyteTable.outArray[22]) || (sbyteTable.inArray2[27] != sbyteTable.outArray[23]) || + (sbyteTable.inArray1[28] != sbyteTable.outArray[24]) || (sbyteTable.inArray2[28] != sbyteTable.outArray[25]) || + (sbyteTable.inArray1[29] != sbyteTable.outArray[26]) || (sbyteTable.inArray2[29] != sbyteTable.outArray[27]) || + (sbyteTable.inArray1[30] != sbyteTable.outArray[28]) || (sbyteTable.inArray2[30] != sbyteTable.outArray[29]) || + (sbyteTable.inArray1[31] != sbyteTable.outArray[30]) || (sbyteTable.inArray2[31] != sbyteTable.outArray[31]) || + (sbyteTable.inArray1[40] != sbyteTable.outArray[32]) || (sbyteTable.inArray2[40] != sbyteTable.outArray[33]) || + (sbyteTable.inArray1[41] != sbyteTable.outArray[34]) || (sbyteTable.inArray2[41] != sbyteTable.outArray[35]) || + (sbyteTable.inArray1[42] != sbyteTable.outArray[36]) || (sbyteTable.inArray2[42] != sbyteTable.outArray[37]) || + (sbyteTable.inArray1[43] != sbyteTable.outArray[38]) || (sbyteTable.inArray2[43] != sbyteTable.outArray[39]) || + (sbyteTable.inArray1[44] != sbyteTable.outArray[40]) || (sbyteTable.inArray2[44] != sbyteTable.outArray[41]) || + (sbyteTable.inArray1[45] != sbyteTable.outArray[42]) || (sbyteTable.inArray2[45] != sbyteTable.outArray[43]) || + (sbyteTable.inArray1[46] != sbyteTable.outArray[44]) || (sbyteTable.inArray2[46] != sbyteTable.outArray[45]) || + (sbyteTable.inArray1[47] != sbyteTable.outArray[46]) || (sbyteTable.inArray2[47] != sbyteTable.outArray[47]) || + (sbyteTable.inArray1[56] != sbyteTable.outArray[48]) || (sbyteTable.inArray2[56] != sbyteTable.outArray[49]) || + (sbyteTable.inArray1[57] != sbyteTable.outArray[50]) || (sbyteTable.inArray2[57] != sbyteTable.outArray[51]) || + (sbyteTable.inArray1[58] != sbyteTable.outArray[52]) || (sbyteTable.inArray2[58] != sbyteTable.outArray[53]) || + (sbyteTable.inArray1[59] != sbyteTable.outArray[54]) || (sbyteTable.inArray2[59] != sbyteTable.outArray[55]) || + (sbyteTable.inArray1[60] != sbyteTable.outArray[56]) || (sbyteTable.inArray2[60] != sbyteTable.outArray[57]) || + (sbyteTable.inArray1[61] != sbyteTable.outArray[58]) || (sbyteTable.inArray2[61] != sbyteTable.outArray[59]) || + (sbyteTable.inArray1[62] != sbyteTable.outArray[60]) || (sbyteTable.inArray2[62] != sbyteTable.outArray[61]) || + (sbyteTable.inArray1[63] != sbyteTable.outArray[62]) || (sbyteTable.inArray2[63] != sbyteTable.outArray[63])) + { + Console.WriteLine("Avx512BW UnpackHigh failed on sbyte:"); + Console.WriteLine($" left: ({string.Join(", ", sbyteTable.inArray1)})"); + Console.WriteLine($" right: ({string.Join(", ", sbyteTable.inArray2)})"); + Console.WriteLine($" result: ({string.Join(", ", sbyteTable.outArray)})"); + Console.WriteLine(); + + testResult = Fail; + } + + if ((shortTable.inArray1[4] != shortTable.outArray[0]) || (shortTable.inArray2[4] != shortTable.outArray[1]) || + (shortTable.inArray1[5] != shortTable.outArray[2]) || (shortTable.inArray2[5] != shortTable.outArray[3]) || + (shortTable.inArray1[6] != shortTable.outArray[4]) || (shortTable.inArray2[6] != shortTable.outArray[5]) || + (shortTable.inArray1[7] != shortTable.outArray[6]) || (shortTable.inArray2[7] != shortTable.outArray[7]) || + (shortTable.inArray1[12] != shortTable.outArray[8]) || (shortTable.inArray2[12] != shortTable.outArray[9]) || + (shortTable.inArray1[13] != shortTable.outArray[10]) || (shortTable.inArray2[13] != shortTable.outArray[11]) || + (shortTable.inArray1[14] != shortTable.outArray[12]) || (shortTable.inArray2[14] != shortTable.outArray[13]) || + (shortTable.inArray1[15] != shortTable.outArray[14]) || (shortTable.inArray2[15] != shortTable.outArray[15]) || + (shortTable.inArray1[20] != shortTable.outArray[16]) || (shortTable.inArray2[20] != shortTable.outArray[17]) || + (shortTable.inArray1[21] != shortTable.outArray[18]) || (shortTable.inArray2[21] != shortTable.outArray[19]) || + (shortTable.inArray1[22] != shortTable.outArray[20]) || (shortTable.inArray2[22] != shortTable.outArray[21]) || + (shortTable.inArray1[23] != shortTable.outArray[22]) || (shortTable.inArray2[23] != shortTable.outArray[23]) || + (shortTable.inArray1[28] != shortTable.outArray[24]) || (shortTable.inArray2[28] != shortTable.outArray[25]) || + (shortTable.inArray1[29] != shortTable.outArray[26]) || (shortTable.inArray2[29] != shortTable.outArray[27]) || + (shortTable.inArray1[30] != shortTable.outArray[28]) || (shortTable.inArray2[30] != shortTable.outArray[29]) || + (shortTable.inArray1[31] != shortTable.outArray[30]) || (shortTable.inArray2[31] != shortTable.outArray[31])) + { + Console.WriteLine("Avx512BW UnpackHigh failed on short:"); + Console.WriteLine($" left: ({string.Join(", ", shortTable.inArray1)})"); + Console.WriteLine($" right: ({string.Join(", ", shortTable.inArray2)})"); + Console.WriteLine($" result: ({string.Join(", ", shortTable.outArray)})"); + Console.WriteLine(); + + testResult = Fail; + } + + if ((ushortTable.inArray1[4] != ushortTable.outArray[0]) || (ushortTable.inArray2[4] != ushortTable.outArray[1]) || + (ushortTable.inArray1[5] != ushortTable.outArray[2]) || (ushortTable.inArray2[5] != ushortTable.outArray[3]) || + (ushortTable.inArray1[6] != ushortTable.outArray[4]) || (ushortTable.inArray2[6] != ushortTable.outArray[5]) || + (ushortTable.inArray1[7] != ushortTable.outArray[6]) || (ushortTable.inArray2[7] != ushortTable.outArray[7]) || + (ushortTable.inArray1[12] != ushortTable.outArray[8]) || (ushortTable.inArray2[12] != ushortTable.outArray[9]) || + (ushortTable.inArray1[13] != ushortTable.outArray[10]) || (ushortTable.inArray2[13] != ushortTable.outArray[11]) || + (ushortTable.inArray1[14] != ushortTable.outArray[12]) || (ushortTable.inArray2[14] != ushortTable.outArray[13]) || + (ushortTable.inArray1[15] != ushortTable.outArray[14]) || (ushortTable.inArray2[15] != ushortTable.outArray[15]) || + (ushortTable.inArray1[20] != ushortTable.outArray[16]) || (ushortTable.inArray2[20] != ushortTable.outArray[17]) || + (ushortTable.inArray1[21] != ushortTable.outArray[18]) || (ushortTable.inArray2[21] != ushortTable.outArray[19]) || + (ushortTable.inArray1[22] != ushortTable.outArray[20]) || (ushortTable.inArray2[22] != ushortTable.outArray[21]) || + (ushortTable.inArray1[23] != ushortTable.outArray[22]) || (ushortTable.inArray2[23] != ushortTable.outArray[23]) || + (ushortTable.inArray1[28] != ushortTable.outArray[24]) || (ushortTable.inArray2[28] != ushortTable.outArray[25]) || + (ushortTable.inArray1[29] != ushortTable.outArray[26]) || (ushortTable.inArray2[29] != ushortTable.outArray[27]) || + (ushortTable.inArray1[30] != ushortTable.outArray[28]) || (ushortTable.inArray2[30] != ushortTable.outArray[29]) || + (ushortTable.inArray1[31] != ushortTable.outArray[30]) || (ushortTable.inArray2[31] != ushortTable.outArray[31])) + { + Console.WriteLine("Avx512BW UnpackHigh failed on ushort:"); + Console.WriteLine($" left: ({string.Join(", ", ushortTable.inArray1)})"); + Console.WriteLine($" right: ({string.Join(", ", ushortTable.inArray2)})"); + Console.WriteLine($" result: ({string.Join(", ", ushortTable.outArray)})"); + Console.WriteLine(); + + testResult = Fail; + } + } + } + + Assert.Equal(Pass, testResult); + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512BW/UnpackLow.cs b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512BW/UnpackLow.cs new file mode 100644 index 0000000000000..61c63e93de57e --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512BW/UnpackLow.cs @@ -0,0 +1,189 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Runtime.Intrinsics.X86; +using System.Runtime.Intrinsics; +using Xunit; + +namespace IntelHardwareIntrinsicTest._Avx512BW +{ + public partial class Program + { + [Fact] + public static unsafe void UnpackLow() + { + int testResult = Pass; + + if (Avx512BW.IsSupported) + { + using (TestTable byteTable = new TestTable(new byte[64] { 1, 5, 100, 0, 1, 5, 100, 0, 1, 5, 100, 0, 1, 5, 100, 0, 1, 5, 100, 0, 1, 5, 100, 0, 1, 5, 100, 0, 1, 5, 100, 0, 1, 5, 100, 0, 1, 5, 100, 0, 1, 5, 100, 0, 1, 5, 100, 0, 1, 5, 100, 0, 1, 5, 100, 0, 1, 5, 100, 0, 1, 5, 100, 0 }, new byte[64] { 22, 1, 50, 0, 22, 1, 50, 0, 22, 1, 50, 0, 22, 1, 50, 0, 22, 1, 50, 0, 22, 1, 50, 0, 22, 1, 50, 0, 22, 1, 50, 0, 22, 1, 50, 0, 22, 1, 50, 0, 22, 1, 50, 0, 22, 1, 50, 0, 22, 1, 50, 0, 22, 1, 50, 0, 22, 1, 50, 0, 22, 1, 50, 0 }, new byte[64])) + using (TestTable sbyteTable = new TestTable(new sbyte[64] { 1, -5, 100, 0, 1, -5, 100, 0, 1, -5, 100, 0, 1, -5, 100, 0, 1, -5, 100, 0, 1, -5, 100, 0, 1, -5, 100, 0, 1, -5, 100, 0, 1, -5, 100, 0, 1, -5, 100, 0, 1, -5, 100, 0, 1, -5, 100, 0, 1, -5, 100, 0, 1, -5, 100, 0, 1, -5, 100, 0, 1, -5, 100, 0 }, new sbyte[64] { 22, -1, -50, 0, 22, -1, -50, 0, 22, -1, -50, 0, 22, -1, -50, 0, 22, -1, -50, 0, 22, -1, -50, 0, 22, -1, -50, 0, 22, -1, -50, 0, 22, -1, -50, 0, 22, -1, -50, 0, 22, -1, -50, 0, 22, -1, -50, 0, 22, -1, -50, 0, 22, -1, -50, 0, 22, -1, -50, 0, 22, -1, -50, 0 }, new sbyte[64])) + using (TestTable shortTable = new TestTable(new short[32] { 1, -5, 100, 0, 1, -5, 100, 0, 1, -5, 100, 0, 1, -5, 100, 0, 1, -5, 100, 0, 1, -5, 100, 0, 1, -5, 100, 0, 1, -5, 100, 0 }, new short[32] { 22, -1, -50, 0, 22, -1, -50, 0, 22, -1, -50, 0, 22, -1, -50, 0, 22, -1, -50, 0, 22, -1, -50, 0, 22, -1, -50, 0, 22, -1, -50, 0 }, new short[32])) + using (TestTable ushortTable = new TestTable(new ushort[32] { 1, 5, 100, 0, 1, 5, 100, 0, 1, 5, 100, 0, 1, 5, 100, 0, 1, 5, 100, 0, 1, 5, 100, 0, 1, 5, 100, 0, 1, 5, 100, 0 }, new ushort[32] { 22, 1, 50, 0, 22, 1, 50, 0, 22, 1, 50, 0, 22, 1, 50, 0, 22, 1, 50, 0, 22, 1, 50, 0, 22, 1, 50, 0, 22, 1, 50, 0 }, new ushort[32])) + { + var vb1 = Unsafe.Read>(byteTable.inArray1Ptr); + var vb2 = Unsafe.Read>(byteTable.inArray2Ptr); + var vb3 = Avx512BW.UnpackLow(vb1, vb2); + Unsafe.Write(byteTable.outArrayPtr, vb3); + + var vsb1 = Unsafe.Read>(sbyteTable.inArray1Ptr); + var vsb2 = Unsafe.Read>(sbyteTable.inArray2Ptr); + var vsb3 = Avx512BW.UnpackLow(vsb1, vsb2); + Unsafe.Write(sbyteTable.outArrayPtr, vsb3); + + var vs1 = Unsafe.Read>(shortTable.inArray1Ptr); + var vs2 = Unsafe.Read>(shortTable.inArray2Ptr); + var vs3 = Avx512BW.UnpackLow(vs1, vs2); + Unsafe.Write(shortTable.outArrayPtr, vs3); + + var vus1 = Unsafe.Read>(ushortTable.inArray1Ptr); + var vus2 = Unsafe.Read>(ushortTable.inArray2Ptr); + var vus3 = Avx512BW.UnpackLow(vus1, vus2); + Unsafe.Write(ushortTable.outArrayPtr, vus3); + + if ((byteTable.inArray1[0] != byteTable.outArray[0]) || (byteTable.inArray2[0] != byteTable.outArray[1]) || + (byteTable.inArray1[1] != byteTable.outArray[2]) || (byteTable.inArray2[1] != byteTable.outArray[3]) || + (byteTable.inArray1[2] != byteTable.outArray[4]) || (byteTable.inArray2[2] != byteTable.outArray[5]) || + (byteTable.inArray1[3] != byteTable.outArray[6]) || (byteTable.inArray2[3] != byteTable.outArray[7]) || + (byteTable.inArray1[4] != byteTable.outArray[8]) || (byteTable.inArray2[4] != byteTable.outArray[9]) || + (byteTable.inArray1[5] != byteTable.outArray[10]) || (byteTable.inArray2[5] != byteTable.outArray[11]) || + (byteTable.inArray1[6] != byteTable.outArray[12]) || (byteTable.inArray2[6] != byteTable.outArray[13]) || + (byteTable.inArray1[7] != byteTable.outArray[14]) || (byteTable.inArray2[7] != byteTable.outArray[15]) || + (byteTable.inArray1[16] != byteTable.outArray[16]) || (byteTable.inArray2[16] != byteTable.outArray[17]) || + (byteTable.inArray1[17] != byteTable.outArray[18]) || (byteTable.inArray2[17] != byteTable.outArray[19]) || + (byteTable.inArray1[18] != byteTable.outArray[20]) || (byteTable.inArray2[18] != byteTable.outArray[21]) || + (byteTable.inArray1[19] != byteTable.outArray[22]) || (byteTable.inArray2[19] != byteTable.outArray[23]) || + (byteTable.inArray1[20] != byteTable.outArray[24]) || (byteTable.inArray2[20] != byteTable.outArray[25]) || + (byteTable.inArray1[21] != byteTable.outArray[26]) || (byteTable.inArray2[21] != byteTable.outArray[27]) || + (byteTable.inArray1[22] != byteTable.outArray[28]) || (byteTable.inArray2[22] != byteTable.outArray[29]) || + (byteTable.inArray1[23] != byteTable.outArray[30]) || (byteTable.inArray2[23] != byteTable.outArray[31]) || + (byteTable.inArray1[32] != byteTable.outArray[32]) || (byteTable.inArray2[32] != byteTable.outArray[33]) || + (byteTable.inArray1[33] != byteTable.outArray[34]) || (byteTable.inArray2[33] != byteTable.outArray[35]) || + (byteTable.inArray1[34] != byteTable.outArray[36]) || (byteTable.inArray2[34] != byteTable.outArray[37]) || + (byteTable.inArray1[35] != byteTable.outArray[38]) || (byteTable.inArray2[35] != byteTable.outArray[39]) || + (byteTable.inArray1[36] != byteTable.outArray[40]) || (byteTable.inArray2[36] != byteTable.outArray[41]) || + (byteTable.inArray1[37] != byteTable.outArray[42]) || (byteTable.inArray2[37] != byteTable.outArray[43]) || + (byteTable.inArray1[38] != byteTable.outArray[44]) || (byteTable.inArray2[38] != byteTable.outArray[45]) || + (byteTable.inArray1[39] != byteTable.outArray[46]) || (byteTable.inArray2[39] != byteTable.outArray[47]) || + (byteTable.inArray1[48] != byteTable.outArray[48]) || (byteTable.inArray2[48] != byteTable.outArray[49]) || + (byteTable.inArray1[49] != byteTable.outArray[50]) || (byteTable.inArray2[49] != byteTable.outArray[51]) || + (byteTable.inArray1[50] != byteTable.outArray[52]) || (byteTable.inArray2[50] != byteTable.outArray[53]) || + (byteTable.inArray1[51] != byteTable.outArray[54]) || (byteTable.inArray2[51] != byteTable.outArray[55]) || + (byteTable.inArray1[52] != byteTable.outArray[56]) || (byteTable.inArray2[52] != byteTable.outArray[57]) || + (byteTable.inArray1[53] != byteTable.outArray[58]) || (byteTable.inArray2[53] != byteTable.outArray[59]) || + (byteTable.inArray1[54] != byteTable.outArray[60]) || (byteTable.inArray2[54] != byteTable.outArray[61]) || + (byteTable.inArray1[55] != byteTable.outArray[62]) || (byteTable.inArray2[55] != byteTable.outArray[63])) + { + Console.WriteLine("Avx512BW UnpackLow failed on byte:"); + Console.WriteLine($" left: ({string.Join(", ", byteTable.inArray1)})"); + Console.WriteLine($" right: ({string.Join(", ", byteTable.inArray2)})"); + Console.WriteLine($" result: ({string.Join(", ", byteTable.outArray)})"); + Console.WriteLine(); + + testResult = Fail; + } + + if ((sbyteTable.inArray1[0] != sbyteTable.outArray[0]) || (sbyteTable.inArray2[0] != sbyteTable.outArray[1]) || + (sbyteTable.inArray1[1] != sbyteTable.outArray[2]) || (sbyteTable.inArray2[1] != sbyteTable.outArray[3]) || + (sbyteTable.inArray1[2] != sbyteTable.outArray[4]) || (sbyteTable.inArray2[2] != sbyteTable.outArray[5]) || + (sbyteTable.inArray1[3] != sbyteTable.outArray[6]) || (sbyteTable.inArray2[3] != sbyteTable.outArray[7]) || + (sbyteTable.inArray1[4] != sbyteTable.outArray[8]) || (sbyteTable.inArray2[4] != sbyteTable.outArray[9]) || + (sbyteTable.inArray1[5] != sbyteTable.outArray[10]) || (sbyteTable.inArray2[5] != sbyteTable.outArray[11]) || + (sbyteTable.inArray1[6] != sbyteTable.outArray[12]) || (sbyteTable.inArray2[6] != sbyteTable.outArray[13]) || + (sbyteTable.inArray1[7] != sbyteTable.outArray[14]) || (sbyteTable.inArray2[7] != sbyteTable.outArray[15]) || + (sbyteTable.inArray1[16] != sbyteTable.outArray[16]) || (sbyteTable.inArray2[16] != sbyteTable.outArray[17]) || + (sbyteTable.inArray1[17] != sbyteTable.outArray[18]) || (sbyteTable.inArray2[17] != sbyteTable.outArray[19]) || + (sbyteTable.inArray1[18] != sbyteTable.outArray[20]) || (sbyteTable.inArray2[18] != sbyteTable.outArray[21]) || + (sbyteTable.inArray1[19] != sbyteTable.outArray[22]) || (sbyteTable.inArray2[19] != sbyteTable.outArray[23]) || + (sbyteTable.inArray1[20] != sbyteTable.outArray[24]) || (sbyteTable.inArray2[20] != sbyteTable.outArray[25]) || + (sbyteTable.inArray1[21] != sbyteTable.outArray[26]) || (sbyteTable.inArray2[21] != sbyteTable.outArray[27]) || + (sbyteTable.inArray1[22] != sbyteTable.outArray[28]) || (sbyteTable.inArray2[22] != sbyteTable.outArray[29]) || + (sbyteTable.inArray1[23] != sbyteTable.outArray[30]) || (sbyteTable.inArray2[23] != sbyteTable.outArray[31]) || + (sbyteTable.inArray1[32] != sbyteTable.outArray[32]) || (sbyteTable.inArray2[32] != sbyteTable.outArray[33]) || + (sbyteTable.inArray1[33] != sbyteTable.outArray[34]) || (sbyteTable.inArray2[33] != sbyteTable.outArray[35]) || + (sbyteTable.inArray1[34] != sbyteTable.outArray[36]) || (sbyteTable.inArray2[34] != sbyteTable.outArray[37]) || + (sbyteTable.inArray1[35] != sbyteTable.outArray[38]) || (sbyteTable.inArray2[35] != sbyteTable.outArray[39]) || + (sbyteTable.inArray1[36] != sbyteTable.outArray[40]) || (sbyteTable.inArray2[36] != sbyteTable.outArray[41]) || + (sbyteTable.inArray1[37] != sbyteTable.outArray[42]) || (sbyteTable.inArray2[37] != sbyteTable.outArray[43]) || + (sbyteTable.inArray1[38] != sbyteTable.outArray[44]) || (sbyteTable.inArray2[38] != sbyteTable.outArray[45]) || + (sbyteTable.inArray1[39] != sbyteTable.outArray[46]) || (sbyteTable.inArray2[39] != sbyteTable.outArray[47]) || + (sbyteTable.inArray1[48] != sbyteTable.outArray[48]) || (sbyteTable.inArray2[48] != sbyteTable.outArray[49]) || + (sbyteTable.inArray1[49] != sbyteTable.outArray[50]) || (sbyteTable.inArray2[49] != sbyteTable.outArray[51]) || + (sbyteTable.inArray1[50] != sbyteTable.outArray[52]) || (sbyteTable.inArray2[50] != sbyteTable.outArray[53]) || + (sbyteTable.inArray1[51] != sbyteTable.outArray[54]) || (sbyteTable.inArray2[51] != sbyteTable.outArray[55]) || + (sbyteTable.inArray1[52] != sbyteTable.outArray[56]) || (sbyteTable.inArray2[52] != sbyteTable.outArray[57]) || + (sbyteTable.inArray1[53] != sbyteTable.outArray[58]) || (sbyteTable.inArray2[53] != sbyteTable.outArray[59]) || + (sbyteTable.inArray1[54] != sbyteTable.outArray[60]) || (sbyteTable.inArray2[54] != sbyteTable.outArray[61]) || + (sbyteTable.inArray1[55] != sbyteTable.outArray[62]) || (sbyteTable.inArray2[55] != sbyteTable.outArray[63])) + { + Console.WriteLine("Avx512BW UnpackLow failed on sbyte:"); + Console.WriteLine($" left: ({string.Join(", ", sbyteTable.inArray1)})"); + Console.WriteLine($" right: ({string.Join(", ", sbyteTable.inArray2)})"); + Console.WriteLine($" result: ({string.Join(", ", sbyteTable.outArray)})"); + Console.WriteLine(); + + testResult = Fail; + } + + if ((shortTable.inArray1[0] != shortTable.outArray[0]) || (shortTable.inArray2[0] != shortTable.outArray[1]) || + (shortTable.inArray1[1] != shortTable.outArray[2]) || (shortTable.inArray2[1] != shortTable.outArray[3]) || + (shortTable.inArray1[2] != shortTable.outArray[4]) || (shortTable.inArray2[2] != shortTable.outArray[5]) || + (shortTable.inArray1[3] != shortTable.outArray[6]) || (shortTable.inArray2[3] != shortTable.outArray[7]) || + (shortTable.inArray1[8] != shortTable.outArray[8]) || (shortTable.inArray2[8] != shortTable.outArray[9]) || + (shortTable.inArray1[9] != shortTable.outArray[10]) || (shortTable.inArray2[9] != shortTable.outArray[11]) || + (shortTable.inArray1[10] != shortTable.outArray[12]) || (shortTable.inArray2[10] != shortTable.outArray[13]) || + (shortTable.inArray1[11] != shortTable.outArray[14]) || (shortTable.inArray2[11] != shortTable.outArray[15]) || + (shortTable.inArray1[16] != shortTable.outArray[16]) || (shortTable.inArray2[16] != shortTable.outArray[17]) || + (shortTable.inArray1[17] != shortTable.outArray[18]) || (shortTable.inArray2[17] != shortTable.outArray[19]) || + (shortTable.inArray1[18] != shortTable.outArray[20]) || (shortTable.inArray2[18] != shortTable.outArray[21]) || + (shortTable.inArray1[19] != shortTable.outArray[22]) || (shortTable.inArray2[19] != shortTable.outArray[23]) || + (shortTable.inArray1[24] != shortTable.outArray[24]) || (shortTable.inArray2[24] != shortTable.outArray[25]) || + (shortTable.inArray1[25] != shortTable.outArray[26]) || (shortTable.inArray2[25] != shortTable.outArray[27]) || + (shortTable.inArray1[26] != shortTable.outArray[28]) || (shortTable.inArray2[26] != shortTable.outArray[29]) || + (shortTable.inArray1[27] != shortTable.outArray[30]) || (shortTable.inArray2[27] != shortTable.outArray[31])) + { + Console.WriteLine("Avx512BW UnpackLow failed on short:"); + Console.WriteLine($" left: ({string.Join(", ", shortTable.inArray1)})"); + Console.WriteLine($" right: ({string.Join(", ", shortTable.inArray2)})"); + Console.WriteLine($" result: ({string.Join(", ", shortTable.outArray)})"); + Console.WriteLine(); + + testResult = Fail; + } + + if ((ushortTable.inArray1[0] != ushortTable.outArray[0]) || (ushortTable.inArray2[0] != ushortTable.outArray[1]) || + (ushortTable.inArray1[1] != ushortTable.outArray[2]) || (ushortTable.inArray2[1] != ushortTable.outArray[3]) || + (ushortTable.inArray1[2] != ushortTable.outArray[4]) || (ushortTable.inArray2[2] != ushortTable.outArray[5]) || + (ushortTable.inArray1[3] != ushortTable.outArray[6]) || (ushortTable.inArray2[3] != ushortTable.outArray[7]) || + (ushortTable.inArray1[8] != ushortTable.outArray[8]) || (ushortTable.inArray2[8] != ushortTable.outArray[9]) || + (ushortTable.inArray1[9] != ushortTable.outArray[10]) || (ushortTable.inArray2[9] != ushortTable.outArray[11]) || + (ushortTable.inArray1[10] != ushortTable.outArray[12]) || (ushortTable.inArray2[10] != ushortTable.outArray[13]) || + (ushortTable.inArray1[11] != ushortTable.outArray[14]) || (ushortTable.inArray2[11] != ushortTable.outArray[15]) || + (ushortTable.inArray1[16] != ushortTable.outArray[16]) || (ushortTable.inArray2[16] != ushortTable.outArray[17]) || + (ushortTable.inArray1[17] != ushortTable.outArray[18]) || (ushortTable.inArray2[17] != ushortTable.outArray[19]) || + (ushortTable.inArray1[18] != ushortTable.outArray[20]) || (ushortTable.inArray2[18] != ushortTable.outArray[21]) || + (ushortTable.inArray1[19] != ushortTable.outArray[22]) || (ushortTable.inArray2[19] != ushortTable.outArray[23]) || + (ushortTable.inArray1[24] != ushortTable.outArray[24]) || (ushortTable.inArray2[24] != ushortTable.outArray[25]) || + (ushortTable.inArray1[25] != ushortTable.outArray[26]) || (ushortTable.inArray2[25] != ushortTable.outArray[27]) || + (ushortTable.inArray1[26] != ushortTable.outArray[28]) || (ushortTable.inArray2[26] != ushortTable.outArray[29]) || + (ushortTable.inArray1[27] != ushortTable.outArray[30]) || (ushortTable.inArray2[27] != ushortTable.outArray[31])) + { + Console.WriteLine("Avx512BW UnpackLow failed on ushort:"); + Console.WriteLine($" left: ({string.Join(", ", ushortTable.inArray1)})"); + Console.WriteLine($" right: ({string.Join(", ", ushortTable.inArray2)})"); + Console.WriteLine($" result: ({string.Join(", ", ushortTable.outArray)})"); + Console.WriteLine(); + + testResult = Fail; + } + } + } + + Assert.Equal(Pass, testResult); + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512DQ/Avx512DQ_r.csproj b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512DQ/Avx512DQ_r.csproj new file mode 100644 index 0000000000000..a24e4e24c679a --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512DQ/Avx512DQ_r.csproj @@ -0,0 +1,14 @@ + + + X86_Avx512DQ_r + true + + + Embedded + + + + + + + diff --git a/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512DQ/Avx512DQ_ro.csproj b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512DQ/Avx512DQ_ro.csproj new file mode 100644 index 0000000000000..cabe20c7c9fc8 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512DQ/Avx512DQ_ro.csproj @@ -0,0 +1,14 @@ + + + X86_Avx512DQ_ro + true + + + Embedded + True + + + + + + diff --git a/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512DQ/Program.Avx512DQ.cs b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512DQ/Program.Avx512DQ.cs new file mode 100644 index 0000000000000..27bf3146e6a74 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512DQ/Program.Avx512DQ.cs @@ -0,0 +1,16 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System; +using System.Collections.Generic; + +namespace JIT.HardwareIntrinsics.X86._Avx512DQ +{ + public static partial class Program + { + static Program() + { + + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512DQ_VL_Vector128/Avx512DQ_VL_Vector128_r.csproj b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512DQ_VL_Vector128/Avx512DQ_VL_Vector128_r.csproj new file mode 100644 index 0000000000000..f1eec7757cce5 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512DQ_VL_Vector128/Avx512DQ_VL_Vector128_r.csproj @@ -0,0 +1,14 @@ + + + X86_Avx512DQ_VL_Vector128_r + true + + + Embedded + + + + + + + diff --git a/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512DQ_VL_Vector128/Avx512DQ_VL_Vector128_ro.csproj b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512DQ_VL_Vector128/Avx512DQ_VL_Vector128_ro.csproj new file mode 100644 index 0000000000000..fd6363eb22906 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512DQ_VL_Vector128/Avx512DQ_VL_Vector128_ro.csproj @@ -0,0 +1,14 @@ + + + X86_Avx512DQ_VL_Vector128_ro + true + + + Embedded + True + + + + + + diff --git a/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512DQ_VL_Vector128/Program.Avx512DQ_VL_Vector128.cs b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512DQ_VL_Vector128/Program.Avx512DQ_VL_Vector128.cs new file mode 100644 index 0000000000000..98810ee2b27fa --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512DQ_VL_Vector128/Program.Avx512DQ_VL_Vector128.cs @@ -0,0 +1,16 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System; +using System.Collections.Generic; + +namespace JIT.HardwareIntrinsics.X86._Avx512DQ_VL_Vector128 +{ + public static partial class Program + { + static Program() + { + + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512DQ_VL_Vector256/Avx512DQ_VL_Vector256_r.csproj b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512DQ_VL_Vector256/Avx512DQ_VL_Vector256_r.csproj new file mode 100644 index 0000000000000..9783408513c4d --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512DQ_VL_Vector256/Avx512DQ_VL_Vector256_r.csproj @@ -0,0 +1,14 @@ + + + X86_Avx512DQ_VL_Vector256_r + true + + + Embedded + + + + + + + diff --git a/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512DQ_VL_Vector256/Avx512DQ_VL_Vector256_ro.csproj b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512DQ_VL_Vector256/Avx512DQ_VL_Vector256_ro.csproj new file mode 100644 index 0000000000000..a01d78eff7482 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512DQ_VL_Vector256/Avx512DQ_VL_Vector256_ro.csproj @@ -0,0 +1,14 @@ + + + X86_Avx512DQ_VL_Vector256_ro + true + + + Embedded + True + + + + + + diff --git a/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512DQ_VL_Vector256/Program.Avx512DQ_VL_Vector256.cs b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512DQ_VL_Vector256/Program.Avx512DQ_VL_Vector256.cs new file mode 100644 index 0000000000000..2db79ac0e62e0 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512DQ_VL_Vector256/Program.Avx512DQ_VL_Vector256.cs @@ -0,0 +1,16 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System; +using System.Collections.Generic; + +namespace JIT.HardwareIntrinsics.X86._Avx512DQ_VL_Vector256 +{ + public static partial class Program + { + static Program() + { + + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/Avx512F_handwritten_r.csproj b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/Avx512F_handwritten_r.csproj index 89ddd7eb8e058..fd0d21f01bc54 100644 --- a/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/Avx512F_handwritten_r.csproj +++ b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/Avx512F_handwritten_r.csproj @@ -11,9 +11,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/Avx512F_handwritten_ro.csproj b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/Avx512F_handwritten_ro.csproj index 50df8ce50f557..082d6f4ee197a 100644 --- a/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/Avx512F_handwritten_ro.csproj +++ b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/Avx512F_handwritten_ro.csproj @@ -11,9 +11,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/ConvertToVector256Int32.Double.cs b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/ConvertToVector256Int32.Double.cs new file mode 100644 index 0000000000000..eec2d0f2098dd --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/ConvertToVector256Int32.Double.cs @@ -0,0 +1,307 @@ +// 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\X86\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.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Runtime.Intrinsics; +using System.Runtime.Intrinsics.X86; +using Xunit; + +namespace JIT.HardwareIntrinsics.X86._Avx512F.handwritten +{ + public static partial class Program + { + [Fact] + public static void ConvertToVector256Int32Double() + { + var test = new SimpleUnaryOpTest__ConvertToVector256Int32Double(); + + if (test.IsSupported) + { + // Validates basic functionality works, using Unsafe.Read + test.RunBasicScenario_UnsafeRead(); + + if (Avx512F.IsSupported) + { + // Validates basic functionality works, using Load + test.RunBasicScenario_Load(); + + // Validates basic functionality works, using LoadAligned + test.RunBasicScenario_LoadAligned(); + } + + // Validates calling via reflection works, using Unsafe.Read + test.RunReflectionScenario_UnsafeRead(); + + if (Avx512F.IsSupported) + { + // Validates calling via reflection works, using Load + test.RunReflectionScenario_Load(); + + // Validates calling via reflection works, using LoadAligned + test.RunReflectionScenario_LoadAligned(); + } + + // Validates passing a static member works + test.RunClsVarScenario(); + + // Validates passing a local works, using Unsafe.Read + test.RunLclVarScenario_UnsafeRead(); + + if (Avx512F.IsSupported) + { + // Validates passing a local works, using Load + test.RunLclVarScenario_Load(); + + // Validates passing a local works, using LoadAligned + test.RunLclVarScenario_LoadAligned(); + } + + // Validates passing the field of a local works + test.RunLclFldScenario(); + + // Validates passing an instance member works + test.RunFldScenario(); + } + 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 SimpleUnaryOpTest__ConvertToVector256Int32Double + { + private static readonly int LargestVectorSize = 64; + + private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); + private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int32); + + private static Double[] _data = new Double[Op1ElementCount]; + + private static Vector512 _clsVar; + + private Vector512 _fld; + + private SimpleUnaryOpTest__DataTable _dataTable; + + static SimpleUnaryOpTest__ConvertToVector256Int32Double() + { + var random = new Random(); + + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (double)(random.NextDouble()); } + Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); + } + + public SimpleUnaryOpTest__ConvertToVector256Int32Double() + { + Succeeded = true; + + var random = new Random(); + + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (double)(random.NextDouble()); } + Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); + + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (double)(random.NextDouble()); } + _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int32[RetElementCount], LargestVectorSize); + } + + public bool IsSupported => Avx512F.IsSupported; + + public bool Succeeded { get; set; } + + public void RunBasicScenario_UnsafeRead() + { + var result = Avx512F.ConvertToVector256Int32( + Unsafe.Read>(_dataTable.inArrayPtr) + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunBasicScenario_Load() + { + var result = Avx512F.ConvertToVector256Int32( + Avx512F.LoadVector512((Double*)(_dataTable.inArrayPtr)) + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunBasicScenario_LoadAligned() + { + var result = Avx512F.ConvertToVector256Int32( + Avx512F.LoadAlignedVector512((Double*)(_dataTable.inArrayPtr)) + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunReflectionScenario_UnsafeRead() + { + var result = typeof(Avx512F).GetMethod(nameof(Avx512F.ConvertToVector256Int32), new Type[] { typeof(Vector512) }) + .Invoke(null, new object[] { + Unsafe.Read>(_dataTable.inArrayPtr) + }); + + Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunReflectionScenario_Load() + { + var result = typeof(Avx512F).GetMethod(nameof(Avx512F.ConvertToVector256Int32), new Type[] { typeof(Vector512) }) + .Invoke(null, new object[] { + Avx512F.LoadVector512((Double*)(_dataTable.inArrayPtr)) + }); + + Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunReflectionScenario_LoadAligned() + { + var result = typeof(Avx512F).GetMethod(nameof(Avx512F.ConvertToVector256Int32), new Type[] { typeof(Vector512) }) + .Invoke(null, new object[] { + Avx512F.LoadAlignedVector512((Double*)(_dataTable.inArrayPtr)) + }); + + Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunClsVarScenario() + { + var result = Avx512F.ConvertToVector256Int32( + _clsVar + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_clsVar, _dataTable.outArrayPtr); + } + + public void RunLclVarScenario_UnsafeRead() + { + var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); + var result = Avx512F.ConvertToVector256Int32(firstOp); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(firstOp, _dataTable.outArrayPtr); + } + + public void RunLclVarScenario_Load() + { + var firstOp = Avx512F.LoadVector512((Double*)(_dataTable.inArrayPtr)); + var result = Avx512F.ConvertToVector256Int32(firstOp); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(firstOp, _dataTable.outArrayPtr); + } + + public void RunLclVarScenario_LoadAligned() + { + var firstOp = Avx512F.LoadAlignedVector512((Double*)(_dataTable.inArrayPtr)); + var result = Avx512F.ConvertToVector256Int32(firstOp); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(firstOp, _dataTable.outArrayPtr); + } + + public void RunLclFldScenario() + { + var test = new SimpleUnaryOpTest__ConvertToVector256Int32Double(); + var result = Avx512F.ConvertToVector256Int32(test._fld); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(test._fld, _dataTable.outArrayPtr); + } + + public void RunFldScenario() + { + var result = Avx512F.ConvertToVector256Int32(_fld); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_fld, _dataTable.outArrayPtr); + } + + public void RunUnsupportedScenario() + { + Succeeded = false; + + try + { + RunBasicScenario_UnsafeRead(); + } + catch (PlatformNotSupportedException) + { + Succeeded = true; + } + } + + private void ValidateResult(Vector512 firstOp, void* result, [CallerMemberName] string method = "") + { + Double[] inArray = new Double[Op1ElementCount]; + Int32[] outArray = new Int32[RetElementCount]; + + Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); + Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); + + ValidateResult(inArray, outArray, method); + } + + private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") + { + Double[] inArray = new Double[Op1ElementCount]; + Int32[] outArray = new Int32[RetElementCount]; + + Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); + Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); + + ValidateResult(inArray, outArray, method); + } + + private void ValidateResult(Double[] firstOp, Int32[] result, [CallerMemberName] string method = "") + { + if (result[0] != (Int32)(Math.Round(firstOp[0]))) + { + Succeeded = false; + } + else + { + for (var i = 1; i < RetElementCount; i++) + { + if (result[i] != (Int32)(Math.Round(firstOp[i]))) + { + Succeeded = false; + break; + } + } + } + + if (!Succeeded) + { + Console.WriteLine($"{nameof(Avx512F)}.{nameof(Avx512F.ConvertToVector256Int32)}(Vector512): {method} failed:"); + Console.WriteLine($" firstOp: ({string.Join(", ", firstOp)})"); + Console.WriteLine($" result: ({string.Join(", ", result)})"); + Console.WriteLine(); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/ConvertToVector256Int32WithTruncation.Double.cs b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/ConvertToVector256Int32WithTruncation.Double.cs new file mode 100644 index 0000000000000..05653e49077dc --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/ConvertToVector256Int32WithTruncation.Double.cs @@ -0,0 +1,309 @@ +// 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\X86\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.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Runtime.Intrinsics; +using System.Runtime.Intrinsics.X86; +using Xunit; + +namespace JIT.HardwareIntrinsics.X86._Avx512F.handwritten +{ + public static partial class Program + { + [Fact] + public static void ConvertToVector256Int32WithTruncationDouble() + { + var test = new SimpleUnaryOpTest__ConvertToVector256Int32WithTruncationDouble(); + + if (test.IsSupported) + { + // Validates basic functionality works, using Unsafe.Read + test.RunBasicScenario_UnsafeRead(); + + if (Avx512F.IsSupported) + { + // Validates basic functionality works, using Load + test.RunBasicScenario_Load(); + + // Validates basic functionality works, using LoadAligned + test.RunBasicScenario_LoadAligned(); + } + + // Validates calling via reflection works, using Unsafe.Read + test.RunReflectionScenario_UnsafeRead(); + + if (Avx512F.IsSupported) + { + // Validates calling via reflection works, using Load + test.RunReflectionScenario_Load(); + + // Validates calling via reflection works, using LoadAligned + test.RunReflectionScenario_LoadAligned(); + } + + // Validates passing a static member works + test.RunClsVarScenario(); + + // Validates passing a local works, using Unsafe.Read + test.RunLclVarScenario_UnsafeRead(); + + if (Avx512F.IsSupported) + { + // Validates passing a local works, using Load + test.RunLclVarScenario_Load(); + + // Validates passing a local works, using LoadAligned + test.RunLclVarScenario_LoadAligned(); + } + + // Validates passing the field of a local works + test.RunLclFldScenario(); + + // Validates passing an instance member works + test.RunFldScenario(); + } + 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 SimpleUnaryOpTest__ConvertToVector256Int32WithTruncationDouble + { + private static readonly int LargestVectorSize = 64; + + private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); + private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int32); + + private static Double[] _data = new Double[Op1ElementCount]; + + private static Vector512 _clsVar; + + private Vector512 _fld; + + private SimpleUnaryOpTest__DataTable _dataTable; + + static SimpleUnaryOpTest__ConvertToVector256Int32WithTruncationDouble() + { + var random = new Random(); + + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (double)(random.NextDouble()); } + Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); + } + + public SimpleUnaryOpTest__ConvertToVector256Int32WithTruncationDouble() + { + Succeeded = true; + + var random = new Random(); + + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (double)(random.NextDouble()); } + Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); + + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (double)(random.NextDouble()); } + _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int32[RetElementCount], LargestVectorSize); + } + + public bool IsSupported => Avx512F.IsSupported; + + public bool Succeeded { get; set; } + + public void RunBasicScenario_UnsafeRead() + { + var result = Avx512F.ConvertToVector256Int32WithTruncation( + Unsafe.Read>(_dataTable.inArrayPtr) + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunBasicScenario_Load() + { + var result = Avx512F.ConvertToVector256Int32WithTruncation( + Avx512F.LoadVector512((Double*)(_dataTable.inArrayPtr)) + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunBasicScenario_LoadAligned() + { + var result = Avx512F.ConvertToVector256Int32WithTruncation( + Avx512F.LoadAlignedVector512((Double*)(_dataTable.inArrayPtr)) + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunReflectionScenario_UnsafeRead() + { + var result = typeof(Avx512F).GetMethod(nameof(Avx512F.ConvertToVector256Int32WithTruncation), new Type[] { typeof(Vector512) }) + .Invoke(null, new object[] { + Unsafe.Read>(_dataTable.inArrayPtr) + }); + + Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunReflectionScenario_Load() + { + var result = typeof(Avx512F).GetMethod(nameof(Avx512F.ConvertToVector256Int32WithTruncation), new Type[] { typeof(Vector512) }) + .Invoke(null, new object[] { + Avx512F.LoadVector512((Double*)(_dataTable.inArrayPtr)) + }); + + Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunReflectionScenario_LoadAligned() + { + var result = typeof(Avx512F).GetMethod(nameof(Avx512F.ConvertToVector256Int32WithTruncation), new Type[] { typeof(Vector512) }) + .Invoke(null, new object[] { + Avx512F.LoadAlignedVector512((Double*)(_dataTable.inArrayPtr)) + }); + + Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunClsVarScenario() + { + var result = Avx512F.ConvertToVector256Int32WithTruncation( + _clsVar + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_clsVar, _dataTable.outArrayPtr); + } + + public void RunLclVarScenario_UnsafeRead() + { + var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); + var result = Avx512F.ConvertToVector256Int32WithTruncation(firstOp); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(firstOp, _dataTable.outArrayPtr); + } + + public void RunLclVarScenario_Load() + { + var firstOp = Avx512F.LoadVector512((Double*)(_dataTable.inArrayPtr)); + var result = Avx512F.ConvertToVector256Int32WithTruncation(firstOp); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(firstOp, _dataTable.outArrayPtr); + } + + public void RunLclVarScenario_LoadAligned() + { + var firstOp = Avx512F.LoadAlignedVector512((Double*)(_dataTable.inArrayPtr)); + var result = Avx512F.ConvertToVector256Int32WithTruncation(firstOp); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(firstOp, _dataTable.outArrayPtr); + } + + public void RunLclFldScenario() + { + var test = new SimpleUnaryOpTest__ConvertToVector256Int32WithTruncationDouble(); + var result = Avx512F.ConvertToVector256Int32WithTruncation(test._fld); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(test._fld, _dataTable.outArrayPtr); + } + + public void RunFldScenario() + { + var result = Avx512F.ConvertToVector256Int32WithTruncation(_fld); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_fld, _dataTable.outArrayPtr); + } + + public void RunUnsupportedScenario() + { + Succeeded = false; + + try + { + RunBasicScenario_UnsafeRead(); + } + catch (PlatformNotSupportedException) + { + Succeeded = true; + } + } + + private void ValidateResult(Vector512 firstOp, void* result, [CallerMemberName] string method = "") + { + Double[] inArray = new Double[Op1ElementCount]; + Int32[] outArray = new Int32[RetElementCount]; + + Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); + Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); + + ValidateResult(inArray, outArray, method); + } + + private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") + { + Double[] inArray = new Double[Op1ElementCount]; + Int32[] outArray = new Int32[RetElementCount]; + + Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); + Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); + + ValidateResult(inArray, outArray, method); + } + + private void ValidateResult(Double[] firstOp, Int32[] result, [CallerMemberName] string method = "") + { + for (var i = 0; i < Op1ElementCount; i++) + { + if (result[i] != (Int32)(firstOp[i])) + { + Succeeded = false; + break; + } + } + + for (var i = Op1ElementCount; i < RetElementCount; i++) + { + if (result[i] != 0) + { + Succeeded = false; + break; + } + } + + if (!Succeeded) + { + Console.WriteLine($"{nameof(Avx512F)}.{nameof(Avx512F.ConvertToVector256Int32WithTruncation)}(Vector512): {method} failed:"); + Console.WriteLine($" firstOp: ({string.Join(", ", firstOp)})"); + Console.WriteLine($" result: ({string.Join(", ", result)})"); + Console.WriteLine(); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/ConvertToVector256Single.Double.cs b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/ConvertToVector256Single.Double.cs new file mode 100644 index 0000000000000..7abcff0a2f109 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/ConvertToVector256Single.Double.cs @@ -0,0 +1,307 @@ +// 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\X86\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.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Runtime.Intrinsics; +using System.Runtime.Intrinsics.X86; +using Xunit; + +namespace JIT.HardwareIntrinsics.X86._Avx512F.handwritten +{ + public static partial class Program + { + [Fact] + public static void ConvertToVector256SingleDouble() + { + var test = new SimpleUnaryOpTest__ConvertToVector256SingleDouble(); + + if (test.IsSupported) + { + // Validates basic functionality works, using Unsafe.Read + test.RunBasicScenario_UnsafeRead(); + + if (Avx512F.IsSupported) + { + // Validates basic functionality works, using Load + test.RunBasicScenario_Load(); + + // Validates basic functionality works, using LoadAligned + test.RunBasicScenario_LoadAligned(); + } + + // Validates calling via reflection works, using Unsafe.Read + test.RunReflectionScenario_UnsafeRead(); + + if (Avx512F.IsSupported) + { + // Validates calling via reflection works, using Load + test.RunReflectionScenario_Load(); + + // Validates calling via reflection works, using LoadAligned + test.RunReflectionScenario_LoadAligned(); + } + + // Validates passing a static member works + test.RunClsVarScenario(); + + // Validates passing a local works, using Unsafe.Read + test.RunLclVarScenario_UnsafeRead(); + + if (Avx512F.IsSupported) + { + // Validates passing a local works, using Load + test.RunLclVarScenario_Load(); + + // Validates passing a local works, using LoadAligned + test.RunLclVarScenario_LoadAligned(); + } + + // Validates passing the field of a local works + test.RunLclFldScenario(); + + // Validates passing an instance member works + test.RunFldScenario(); + } + 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 SimpleUnaryOpTest__ConvertToVector256SingleDouble + { + private static readonly int LargestVectorSize = 64; + + private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Double); + private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Single); + + private static Double[] _data = new Double[Op1ElementCount]; + + private static Vector512 _clsVar; + + private Vector512 _fld; + + private SimpleUnaryOpTest__DataTable _dataTable; + + static SimpleUnaryOpTest__ConvertToVector256SingleDouble() + { + var random = new Random(); + + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (double)(random.NextDouble()); } + Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); + } + + public SimpleUnaryOpTest__ConvertToVector256SingleDouble() + { + Succeeded = true; + + var random = new Random(); + + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (double)(random.NextDouble()); } + Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); + + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (double)(random.NextDouble()); } + _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Single[RetElementCount], LargestVectorSize); + } + + public bool IsSupported => Avx512F.IsSupported; + + public bool Succeeded { get; set; } + + public void RunBasicScenario_UnsafeRead() + { + var result = Avx512F.ConvertToVector256Single( + Unsafe.Read>(_dataTable.inArrayPtr) + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunBasicScenario_Load() + { + var result = Avx512F.ConvertToVector256Single( + Avx512F.LoadVector512((Double*)(_dataTable.inArrayPtr)) + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunBasicScenario_LoadAligned() + { + var result = Avx512F.ConvertToVector256Single( + Avx512F.LoadAlignedVector512((Double*)(_dataTable.inArrayPtr)) + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunReflectionScenario_UnsafeRead() + { + var result = typeof(Avx512F).GetMethod(nameof(Avx512F.ConvertToVector256Single), new Type[] { typeof(Vector512) }) + .Invoke(null, new object[] { + Unsafe.Read>(_dataTable.inArrayPtr) + }); + + Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunReflectionScenario_Load() + { + var result = typeof(Avx512F).GetMethod(nameof(Avx512F.ConvertToVector256Single), new Type[] { typeof(Vector512) }) + .Invoke(null, new object[] { + Avx512F.LoadVector512((Double*)(_dataTable.inArrayPtr)) + }); + + Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunReflectionScenario_LoadAligned() + { + var result = typeof(Avx512F).GetMethod(nameof(Avx512F.ConvertToVector256Single), new Type[] { typeof(Vector512) }) + .Invoke(null, new object[] { + Avx512F.LoadAlignedVector512((Double*)(_dataTable.inArrayPtr)) + }); + + Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result)); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunClsVarScenario() + { + var result = Avx512F.ConvertToVector256Single( + _clsVar + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_clsVar, _dataTable.outArrayPtr); + } + + public void RunLclVarScenario_UnsafeRead() + { + var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); + var result = Avx512F.ConvertToVector256Single(firstOp); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(firstOp, _dataTable.outArrayPtr); + } + + public void RunLclVarScenario_Load() + { + var firstOp = Avx512F.LoadVector512((Double*)(_dataTable.inArrayPtr)); + var result = Avx512F.ConvertToVector256Single(firstOp); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(firstOp, _dataTable.outArrayPtr); + } + + public void RunLclVarScenario_LoadAligned() + { + var firstOp = Avx512F.LoadAlignedVector512((Double*)(_dataTable.inArrayPtr)); + var result = Avx512F.ConvertToVector256Single(firstOp); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(firstOp, _dataTable.outArrayPtr); + } + + public void RunLclFldScenario() + { + var test = new SimpleUnaryOpTest__ConvertToVector256SingleDouble(); + var result = Avx512F.ConvertToVector256Single(test._fld); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(test._fld, _dataTable.outArrayPtr); + } + + public void RunFldScenario() + { + var result = Avx512F.ConvertToVector256Single(_fld); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_fld, _dataTable.outArrayPtr); + } + + public void RunUnsupportedScenario() + { + Succeeded = false; + + try + { + RunBasicScenario_UnsafeRead(); + } + catch (PlatformNotSupportedException) + { + Succeeded = true; + } + } + + private void ValidateResult(Vector512 firstOp, void* result, [CallerMemberName] string method = "") + { + Double[] inArray = new Double[Op1ElementCount]; + Single[] outArray = new Single[RetElementCount]; + + Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); + Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); + + ValidateResult(inArray, outArray, method); + } + + private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") + { + Double[] inArray = new Double[Op1ElementCount]; + Single[] outArray = new Single[RetElementCount]; + + Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); + Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); + + ValidateResult(inArray, outArray, method); + } + + private void ValidateResult(Double[] firstOp, Single[] result, [CallerMemberName] string method = "") + { + if (result[0] != (Single)(firstOp[0])) + { + Succeeded = false; + } + else + { + for (var i = 1; i < RetElementCount; i++) + { + if (result[i] != (Single)(firstOp[i])) + { + Succeeded = false; + break; + } + } + } + + if (!Succeeded) + { + Console.WriteLine($"{nameof(Avx512F)}.{nameof(Avx512F.ConvertToVector256Single)}(Vector512): {method} failed:"); + Console.WriteLine($" firstOp: ({string.Join(", ", firstOp)})"); + Console.WriteLine($" result: ({string.Join(", ", result)})"); + Console.WriteLine(); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/ConvertToVector512Double.Int32.cs b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/ConvertToVector512Double.Int32.cs new file mode 100644 index 0000000000000..e0d71a2e797f8 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/ConvertToVector512Double.Int32.cs @@ -0,0 +1,307 @@ +// 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\X86\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.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Runtime.Intrinsics; +using System.Runtime.Intrinsics.X86; +using Xunit; + +namespace JIT.HardwareIntrinsics.X86._Avx512F.handwritten +{ + public static partial class Program + { + [Fact] + public static void ConvertToVector512DoubleInt32() + { + var test = new SimpleUnaryOpTest__ConvertToVector512DoubleInt32(); + + if (test.IsSupported) + { + // Validates basic functionality works, using Unsafe.Read + test.RunBasicScenario_UnsafeRead(); + + if (Avx.IsSupported) + { + // Validates basic functionality works, using Load + test.RunBasicScenario_Load(); + + // Validates basic functionality works, using LoadAligned + test.RunBasicScenario_LoadAligned(); + } + + // Validates calling via reflection works, using Unsafe.Read + test.RunReflectionScenario_UnsafeRead(); + + if (Avx.IsSupported) + { + // Validates calling via reflection works, using Load + test.RunReflectionScenario_Load(); + + // Validates calling via reflection works, using LoadAligned + test.RunReflectionScenario_LoadAligned(); + } + + // Validates passing a static member works + test.RunClsVarScenario(); + + // Validates passing a local works, using Unsafe.Read + test.RunLclVarScenario_UnsafeRead(); + + if (Avx.IsSupported) + { + // Validates passing a local works, using Load + test.RunLclVarScenario_Load(); + + // Validates passing a local works, using LoadAligned + test.RunLclVarScenario_LoadAligned(); + } + + // Validates passing the field of a local works + test.RunLclFldScenario(); + + // Validates passing an instance member works + test.RunFldScenario(); + } + 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 SimpleUnaryOpTest__ConvertToVector512DoubleInt32 + { + private static readonly int LargestVectorSize = 64; + + private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int32); + private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); + + private static Int32[] _data = new Int32[Op1ElementCount]; + + private static Vector256 _clsVar; + + private Vector256 _fld; + + private SimpleUnaryOpTest__DataTable _dataTable; + + static SimpleUnaryOpTest__ConvertToVector512DoubleInt32() + { + var random = new Random(); + + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); + } + + public SimpleUnaryOpTest__ConvertToVector512DoubleInt32() + { + Succeeded = true; + + var random = new Random(); + + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); + + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Double[RetElementCount], LargestVectorSize); + } + + public bool IsSupported => Avx512F.IsSupported; + + public bool Succeeded { get; set; } + + public void RunBasicScenario_UnsafeRead() + { + var result = Avx512F.ConvertToVector512Double( + Unsafe.Read>(_dataTable.inArrayPtr) + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunBasicScenario_Load() + { + var result = Avx512F.ConvertToVector512Double( + Avx.LoadVector256((Int32*)(_dataTable.inArrayPtr)) + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunBasicScenario_LoadAligned() + { + var result = Avx512F.ConvertToVector512Double( + Avx.LoadAlignedVector256((Int32*)(_dataTable.inArrayPtr)) + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunReflectionScenario_UnsafeRead() + { + var result = typeof(Avx512F).GetMethod(nameof(Avx512F.ConvertToVector512Double), new Type[] { typeof(Vector256) }) + .Invoke(null, new object[] { + Unsafe.Read>(_dataTable.inArrayPtr) + }); + + Unsafe.Write(_dataTable.outArrayPtr, (Vector512)(result)); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunReflectionScenario_Load() + { + var result = typeof(Avx512F).GetMethod(nameof(Avx512F.ConvertToVector512Double), new Type[] { typeof(Vector256) }) + .Invoke(null, new object[] { + Avx.LoadVector256((Int32*)(_dataTable.inArrayPtr)) + }); + + Unsafe.Write(_dataTable.outArrayPtr, (Vector512)(result)); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunReflectionScenario_LoadAligned() + { + var result = typeof(Avx512F).GetMethod(nameof(Avx512F.ConvertToVector512Double), new Type[] { typeof(Vector256) }) + .Invoke(null, new object[] { + Avx.LoadAlignedVector256((Int32*)(_dataTable.inArrayPtr)) + }); + + Unsafe.Write(_dataTable.outArrayPtr, (Vector512)(result)); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunClsVarScenario() + { + var result = Avx512F.ConvertToVector512Double( + _clsVar + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_clsVar, _dataTable.outArrayPtr); + } + + public void RunLclVarScenario_UnsafeRead() + { + var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); + var result = Avx512F.ConvertToVector512Double(firstOp); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(firstOp, _dataTable.outArrayPtr); + } + + public void RunLclVarScenario_Load() + { + var firstOp = Avx.LoadVector256((Int32*)(_dataTable.inArrayPtr)); + var result = Avx512F.ConvertToVector512Double(firstOp); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(firstOp, _dataTable.outArrayPtr); + } + + public void RunLclVarScenario_LoadAligned() + { + var firstOp = Avx.LoadAlignedVector256((Int32*)(_dataTable.inArrayPtr)); + var result = Avx512F.ConvertToVector512Double(firstOp); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(firstOp, _dataTable.outArrayPtr); + } + + public void RunLclFldScenario() + { + var test = new SimpleUnaryOpTest__ConvertToVector512DoubleInt32(); + var result = Avx512F.ConvertToVector512Double(test._fld); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(test._fld, _dataTable.outArrayPtr); + } + + public void RunFldScenario() + { + var result = Avx512F.ConvertToVector512Double(_fld); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_fld, _dataTable.outArrayPtr); + } + + public void RunUnsupportedScenario() + { + Succeeded = false; + + try + { + RunBasicScenario_UnsafeRead(); + } + catch (PlatformNotSupportedException) + { + Succeeded = true; + } + } + + private void ValidateResult(Vector256 firstOp, void* result, [CallerMemberName] string method = "") + { + Int32[] inArray = new Int32[Op1ElementCount]; + Double[] outArray = new Double[RetElementCount]; + + Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); + Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); + + ValidateResult(inArray, outArray, method); + } + + private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") + { + Int32[] inArray = new Int32[Op1ElementCount]; + Double[] outArray = new Double[RetElementCount]; + + Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); + Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); + + ValidateResult(inArray, outArray, method); + } + + private void ValidateResult(Int32[] firstOp, Double[] result, [CallerMemberName] string method = "") + { + if (result[0] != (Double)(firstOp[0])) + { + Succeeded = false; + } + else + { + for (var i = 1; i < RetElementCount; i++) + { + if (result[i] != (Double)(firstOp[i])) + { + Succeeded = false; + break; + } + } + } + + if (!Succeeded) + { + Console.WriteLine($"{nameof(Avx512F)}.{nameof(Avx512F.ConvertToVector512Double)}(Vector256): {method} failed:"); + Console.WriteLine($" firstOp: ({string.Join(", ", firstOp)})"); + Console.WriteLine($" result: ({string.Join(", ", result)})"); + Console.WriteLine(); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/ConvertToVector512Double.Single.cs b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/ConvertToVector512Double.Single.cs new file mode 100644 index 0000000000000..5cb91f4a2ab03 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/ConvertToVector512Double.Single.cs @@ -0,0 +1,307 @@ +// 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\X86\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.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Runtime.Intrinsics; +using System.Runtime.Intrinsics.X86; +using Xunit; + +namespace JIT.HardwareIntrinsics.X86._Avx512F.handwritten +{ + public static partial class Program + { + [Fact] + public static void ConvertToVector512DoubleSingle() + { + var test = new SimpleUnaryOpTest__ConvertToVector512DoubleSingle(); + + if (test.IsSupported) + { + // Validates basic functionality works, using Unsafe.Read + test.RunBasicScenario_UnsafeRead(); + + if (Sse.IsSupported) + { + // Validates basic functionality works, using Load + test.RunBasicScenario_Load(); + + // Validates basic functionality works, using LoadAligned + test.RunBasicScenario_LoadAligned(); + } + + // Validates calling via reflection works, using Unsafe.Read + test.RunReflectionScenario_UnsafeRead(); + + if (Sse.IsSupported) + { + // Validates calling via reflection works, using Load + test.RunReflectionScenario_Load(); + + // Validates calling via reflection works, using LoadAligned + test.RunReflectionScenario_LoadAligned(); + } + + // Validates passing a static member works + test.RunClsVarScenario(); + + // Validates passing a local works, using Unsafe.Read + test.RunLclVarScenario_UnsafeRead(); + + if (Sse.IsSupported) + { + // Validates passing a local works, using Load + test.RunLclVarScenario_Load(); + + // Validates passing a local works, using LoadAligned + test.RunLclVarScenario_LoadAligned(); + } + + // Validates passing the field of a local works + test.RunLclFldScenario(); + + // Validates passing an instance member works + test.RunFldScenario(); + } + 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 SimpleUnaryOpTest__ConvertToVector512DoubleSingle + { + private static readonly int LargestVectorSize = 64; + + private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Single); + private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Double); + + private static Single[] _data = new Single[Op1ElementCount]; + + private static Vector256 _clsVar; + + private Vector256 _fld; + + private SimpleUnaryOpTest__DataTable _dataTable; + + static SimpleUnaryOpTest__ConvertToVector512DoubleSingle() + { + var random = new Random(); + + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (float)(random.NextDouble()); } + Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); + } + + public SimpleUnaryOpTest__ConvertToVector512DoubleSingle() + { + Succeeded = true; + + var random = new Random(); + + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (float)(random.NextDouble()); } + Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); + + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (float)(random.NextDouble()); } + _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Double[RetElementCount], LargestVectorSize); + } + + public bool IsSupported => Avx512F.IsSupported; + + public bool Succeeded { get; set; } + + public void RunBasicScenario_UnsafeRead() + { + var result = Avx512F.ConvertToVector512Double( + Unsafe.Read>(_dataTable.inArrayPtr) + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunBasicScenario_Load() + { + var result = Avx512F.ConvertToVector512Double( + Avx.LoadVector256((Single*)(_dataTable.inArrayPtr)) + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunBasicScenario_LoadAligned() + { + var result = Avx512F.ConvertToVector512Double( + Avx.LoadAlignedVector256((Single*)(_dataTable.inArrayPtr)) + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunReflectionScenario_UnsafeRead() + { + var result = typeof(Avx512F).GetMethod(nameof(Avx512F.ConvertToVector512Double), new Type[] { typeof(Vector256) }) + .Invoke(null, new object[] { + Unsafe.Read>(_dataTable.inArrayPtr) + }); + + Unsafe.Write(_dataTable.outArrayPtr, (Vector512)(result)); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunReflectionScenario_Load() + { + var result = typeof(Avx512F).GetMethod(nameof(Avx512F.ConvertToVector512Double), new Type[] { typeof(Vector256) }) + .Invoke(null, new object[] { + Avx.LoadVector256((Single*)(_dataTable.inArrayPtr)) + }); + + Unsafe.Write(_dataTable.outArrayPtr, (Vector512)(result)); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunReflectionScenario_LoadAligned() + { + var result = typeof(Avx512F).GetMethod(nameof(Avx512F.ConvertToVector512Double), new Type[] { typeof(Vector256) }) + .Invoke(null, new object[] { + Avx.LoadAlignedVector256((Single*)(_dataTable.inArrayPtr)) + }); + + Unsafe.Write(_dataTable.outArrayPtr, (Vector512)(result)); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunClsVarScenario() + { + var result = Avx512F.ConvertToVector512Double( + _clsVar + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_clsVar, _dataTable.outArrayPtr); + } + + public void RunLclVarScenario_UnsafeRead() + { + var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); + var result = Avx512F.ConvertToVector512Double(firstOp); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(firstOp, _dataTable.outArrayPtr); + } + + public void RunLclVarScenario_Load() + { + var firstOp = Avx.LoadVector256((Single*)(_dataTable.inArrayPtr)); + var result = Avx512F.ConvertToVector512Double(firstOp); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(firstOp, _dataTable.outArrayPtr); + } + + public void RunLclVarScenario_LoadAligned() + { + var firstOp = Avx.LoadAlignedVector256((Single*)(_dataTable.inArrayPtr)); + var result = Avx512F.ConvertToVector512Double(firstOp); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(firstOp, _dataTable.outArrayPtr); + } + + public void RunLclFldScenario() + { + var test = new SimpleUnaryOpTest__ConvertToVector512DoubleSingle(); + var result = Avx512F.ConvertToVector512Double(test._fld); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(test._fld, _dataTable.outArrayPtr); + } + + public void RunFldScenario() + { + var result = Avx512F.ConvertToVector512Double(_fld); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_fld, _dataTable.outArrayPtr); + } + + public void RunUnsupportedScenario() + { + Succeeded = false; + + try + { + RunBasicScenario_UnsafeRead(); + } + catch (PlatformNotSupportedException) + { + Succeeded = true; + } + } + + private void ValidateResult(Vector256 firstOp, void* result, [CallerMemberName] string method = "") + { + Single[] inArray = new Single[Op1ElementCount]; + Double[] outArray = new Double[RetElementCount]; + + Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); + Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); + + ValidateResult(inArray, outArray, method); + } + + private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") + { + Single[] inArray = new Single[Op1ElementCount]; + Double[] outArray = new Double[RetElementCount]; + + Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), (uint)Unsafe.SizeOf>()); + Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>()); + + ValidateResult(inArray, outArray, method); + } + + private void ValidateResult(Single[] firstOp, Double[] result, [CallerMemberName] string method = "") + { + if (result[0] != (Double)(firstOp[0])) + { + Succeeded = false; + } + else + { + for (var i = 1; i < RetElementCount; i++) + { + if (result[i] != (Double)(firstOp[i])) + { + Succeeded = false; + break; + } + } + } + + if (!Succeeded) + { + Console.WriteLine($"{nameof(Avx512F)}.{nameof(Avx512F.ConvertToVector512Double)}(Vector256): {method} failed:"); + Console.WriteLine($" firstOp: ({string.Join(", ", firstOp)})"); + Console.WriteLine($" result: ({string.Join(", ", result)})"); + Console.WriteLine(); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/ConvertToVector512Int32.Byte.cs b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/ConvertToVector512Int32.Byte.cs new file mode 100644 index 0000000000000..b52e0accf5ccc --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/ConvertToVector512Int32.Byte.cs @@ -0,0 +1,308 @@ +// 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\X86\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.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Runtime.Intrinsics; +using System.Runtime.Intrinsics.X86; +using Xunit; + +namespace JIT.HardwareIntrinsics.X86._Avx512F.handwritten +{ + public static partial class Program + { + [Fact] + public static void ConvertToVector512Int32Byte() + { + var test = new SimpleUnaryOpTest__ConvertToVector512Int32Byte(); + + if (test.IsSupported) + { + // Validates basic functionality works, using Unsafe.Read + test.RunBasicScenario_UnsafeRead(); + + if (Avx.IsSupported) + { + // Validates basic functionality works, using Load + test.RunBasicScenario_Load(); + + // Validates basic functionality works, using LoadAligned + test.RunBasicScenario_LoadAligned(); + } + + // Validates calling via reflection works, using Unsafe.Read + test.RunReflectionScenario_UnsafeRead(); + + if (Avx.IsSupported) + { + // Validates calling via reflection works, using Load + test.RunReflectionScenario_Load(); + + // Validates calling via reflection works, using LoadAligned + test.RunReflectionScenario_LoadAligned(); + } + + // Validates passing a static member works + test.RunClsVarScenario(); + + // Validates passing a local works, using Unsafe.Read + test.RunLclVarScenario_UnsafeRead(); + + if (Avx.IsSupported) + { + // Validates passing a local works, using Load + test.RunLclVarScenario_Load(); + + // Validates passing a local works, using LoadAligned + test.RunLclVarScenario_LoadAligned(); + } + + // Validates passing the field of a local works + test.RunLclFldScenario(); + + // Validates passing an instance member works + test.RunFldScenario(); + } + 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 SimpleUnaryOpTest__ConvertToVector512Int32Byte + { + private const int VectorSize = 64; + + private const int Op1ElementCount = 16 / sizeof(Byte); + private const int RetElementCount = VectorSize / sizeof(Int32); + + private static Byte[] _data = new Byte[Op1ElementCount]; + + private static Vector128 _clsVar; + + private Vector128 _fld; + + private SimpleUnaryOpTest__DataTable _dataTable; + + static SimpleUnaryOpTest__ConvertToVector512Int32Byte() + { + var random = new Random(); + + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)(random.Next(0, byte.MaxValue)); } + Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), 16); + } + + public SimpleUnaryOpTest__ConvertToVector512Int32Byte() + { + Succeeded = true; + + var random = new Random(); + + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)(random.Next(0, byte.MaxValue)); } + Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), 16); + + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)(random.Next(0, byte.MaxValue)); } + _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt32[RetElementCount], VectorSize); + } + + public bool IsSupported => Avx512F.IsSupported; + + public bool Succeeded { get; set; } + + public void RunBasicScenario_UnsafeRead() + { + var result = Avx512F.ConvertToVector512Int32( + Unsafe.Read>(_dataTable.inArrayPtr) + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunBasicScenario_Load() + { + var result = Avx512F.ConvertToVector512Int32( + Sse2.LoadVector128((Byte*)(_dataTable.inArrayPtr)) + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunBasicScenario_LoadAligned() + { + var result = Avx512F.ConvertToVector512Int32( + Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArrayPtr)) + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunReflectionScenario_UnsafeRead() + { + var result = typeof(Avx512F).GetMethod(nameof(Avx512F.ConvertToVector512Int32), new Type[] { typeof(Vector128) }) + .Invoke(null, new object[] { + Unsafe.Read>(_dataTable.inArrayPtr) + }); + + Unsafe.Write(_dataTable.outArrayPtr, (Vector512)(result)); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunReflectionScenario_Load() + { + var result = typeof(Avx512F).GetMethod(nameof(Avx512F.ConvertToVector512Int32), new Type[] { typeof(Vector128) }) + .Invoke(null, new object[] { + Sse2.LoadVector128((Byte*)(_dataTable.inArrayPtr)) + }); + + Unsafe.Write(_dataTable.outArrayPtr, (Vector512)(result)); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunReflectionScenario_LoadAligned() + { + var result = typeof(Avx512F).GetMethod(nameof(Avx512F.ConvertToVector512Int32), new Type[] { typeof(Vector128) }) + .Invoke(null, new object[] { + Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArrayPtr)) + }); + + Unsafe.Write(_dataTable.outArrayPtr, (Vector512)(result)); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunClsVarScenario() + { + var result = Avx512F.ConvertToVector512Int32( + _clsVar + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_clsVar, _dataTable.outArrayPtr); + } + + public void RunLclVarScenario_UnsafeRead() + { + var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); + var result = Avx512F.ConvertToVector512Int32(firstOp); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(firstOp, _dataTable.outArrayPtr); + } + + public void RunLclVarScenario_Load() + { + var firstOp = Sse2.LoadVector128((Byte*)(_dataTable.inArrayPtr)); + var result = Avx512F.ConvertToVector512Int32(firstOp); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(firstOp, _dataTable.outArrayPtr); + } + + public void RunLclVarScenario_LoadAligned() + { + var firstOp = Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArrayPtr)); + var result = Avx512F.ConvertToVector512Int32(firstOp); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(firstOp, _dataTable.outArrayPtr); + } + + public void RunLclFldScenario() + { + var test = new SimpleUnaryOpTest__ConvertToVector512Int32Byte(); + var result = Avx512F.ConvertToVector512Int32(test._fld); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(test._fld, _dataTable.outArrayPtr); + } + + public void RunFldScenario() + { + var result = Avx512F.ConvertToVector512Int32(_fld); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_fld, _dataTable.outArrayPtr); + } + + public void RunUnsupportedScenario() + { + Succeeded = false; + + try + { + RunBasicScenario_UnsafeRead(); + } + catch (PlatformNotSupportedException) + { + Succeeded = true; + } + } + + private void ValidateResult(Vector128 firstOp, void* result, [CallerMemberName] string method = "") + { + Byte[] inArray = new Byte[Op1ElementCount]; + UInt32[] outArray = new UInt32[RetElementCount]; + + Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); + Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), VectorSize); + + ValidateResult(inArray, outArray, method); + } + + private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") + { + Byte[] inArray = new Byte[Op1ElementCount]; + UInt32[] outArray = new UInt32[RetElementCount]; + + Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), 16); + Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), VectorSize); + + ValidateResult(inArray, outArray, method); + } + + private void ValidateResult(Byte[] firstOp, UInt32[] result, [CallerMemberName] string method = "") + { + if (result[0] != firstOp[0]) + { + Succeeded = false; + } + else + { + for (var i = 1; i < RetElementCount; i++) + { + if (result[i] != firstOp[i]) + { + Succeeded = false; + break; + } + } + } + + if (!Succeeded) + { + Console.WriteLine($"{nameof(Avx512F)}.{nameof(Avx512F.ConvertToVector512Int32)}(Vector128): {method} failed:"); + Console.WriteLine($" firstOp: ({string.Join(", ", firstOp)})"); + Console.WriteLine($" result: ({string.Join(", ", result)})"); + Console.WriteLine(); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/ConvertToVector512Int32.Int16.cs b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/ConvertToVector512Int32.Int16.cs new file mode 100644 index 0000000000000..28f4ffa1f5947 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/ConvertToVector512Int32.Int16.cs @@ -0,0 +1,308 @@ +// 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\X86\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.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Runtime.Intrinsics; +using System.Runtime.Intrinsics.X86; +using Xunit; + +namespace JIT.HardwareIntrinsics.X86._Avx512F.handwritten +{ + public static partial class Program + { + [Fact] + public static void ConvertToVector512Int32Int16() + { + var test = new SimpleUnaryOpTest__ConvertToVector512Int32Int16(); + + if (test.IsSupported) + { + // Validates basic functionality works, using Unsafe.Read + test.RunBasicScenario_UnsafeRead(); + + if (Avx.IsSupported) + { + // Validates basic functionality works, using Load + test.RunBasicScenario_Load(); + + // Validates basic functionality works, using LoadAligned + test.RunBasicScenario_LoadAligned(); + } + + // Validates calling via reflection works, using Unsafe.Read + test.RunReflectionScenario_UnsafeRead(); + + if (Avx.IsSupported) + { + // Validates calling via reflection works, using Load + test.RunReflectionScenario_Load(); + + // Validates calling via reflection works, using LoadAligned + test.RunReflectionScenario_LoadAligned(); + } + + // Validates passing a static member works + test.RunClsVarScenario(); + + // Validates passing a local works, using Unsafe.Read + test.RunLclVarScenario_UnsafeRead(); + + if (Avx.IsSupported) + { + // Validates passing a local works, using Load + test.RunLclVarScenario_Load(); + + // Validates passing a local works, using LoadAligned + test.RunLclVarScenario_LoadAligned(); + } + + // Validates passing the field of a local works + test.RunLclFldScenario(); + + // Validates passing an instance member works + test.RunFldScenario(); + } + 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 SimpleUnaryOpTest__ConvertToVector512Int32Int16 + { + private const int VectorSize = 64; + + private const int Op1ElementCount = 32 / sizeof(Int16); + private const int RetElementCount = VectorSize / sizeof(Int32); + + private static Int16[] _data = new Int16[Op1ElementCount]; + + private static Vector256 _clsVar; + + private Vector256 _fld; + + private SimpleUnaryOpTest__DataTable _dataTable; + + static SimpleUnaryOpTest__ConvertToVector512Int32Int16() + { + var random = new Random(); + + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), 16); + } + + public SimpleUnaryOpTest__ConvertToVector512Int32Int16() + { + Succeeded = true; + + var random = new Random(); + + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), 16); + + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int32[RetElementCount], VectorSize); + } + + public bool IsSupported => Avx512F.IsSupported; + + public bool Succeeded { get; set; } + + public void RunBasicScenario_UnsafeRead() + { + var result = Avx512F.ConvertToVector512Int32( + Unsafe.Read>(_dataTable.inArrayPtr) + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunBasicScenario_Load() + { + var result = Avx512F.ConvertToVector512Int32( + Avx.LoadVector256((Int16*)(_dataTable.inArrayPtr)) + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunBasicScenario_LoadAligned() + { + var result = Avx512F.ConvertToVector512Int32( + Avx.LoadAlignedVector256((Int16*)(_dataTable.inArrayPtr)) + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunReflectionScenario_UnsafeRead() + { + var result = typeof(Avx512F).GetMethod(nameof(Avx512F.ConvertToVector512Int32), new Type[] { typeof(Vector256) }) + .Invoke(null, new object[] { + Unsafe.Read>(_dataTable.inArrayPtr) + }); + + Unsafe.Write(_dataTable.outArrayPtr, (Vector512)(result)); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunReflectionScenario_Load() + { + var result = typeof(Avx512F).GetMethod(nameof(Avx512F.ConvertToVector512Int32), new Type[] { typeof(Vector256) }) + .Invoke(null, new object[] { + Avx.LoadVector256((Int16*)(_dataTable.inArrayPtr)) + }); + + Unsafe.Write(_dataTable.outArrayPtr, (Vector512)(result)); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunReflectionScenario_LoadAligned() + { + var result = typeof(Avx512F).GetMethod(nameof(Avx512F.ConvertToVector512Int32), new Type[] { typeof(Vector256) }) + .Invoke(null, new object[] { + Avx.LoadAlignedVector256((Int16*)(_dataTable.inArrayPtr)) + }); + + Unsafe.Write(_dataTable.outArrayPtr, (Vector512)(result)); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunClsVarScenario() + { + var result = Avx512F.ConvertToVector512Int32( + _clsVar + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_clsVar, _dataTable.outArrayPtr); + } + + public void RunLclVarScenario_UnsafeRead() + { + var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); + var result = Avx512F.ConvertToVector512Int32(firstOp); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(firstOp, _dataTable.outArrayPtr); + } + + public void RunLclVarScenario_Load() + { + var firstOp = Avx.LoadVector256((Int16*)(_dataTable.inArrayPtr)); + var result = Avx512F.ConvertToVector512Int32(firstOp); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(firstOp, _dataTable.outArrayPtr); + } + + public void RunLclVarScenario_LoadAligned() + { + var firstOp = Avx.LoadAlignedVector256((Int16*)(_dataTable.inArrayPtr)); + var result = Avx512F.ConvertToVector512Int32(firstOp); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(firstOp, _dataTable.outArrayPtr); + } + + public void RunLclFldScenario() + { + var test = new SimpleUnaryOpTest__ConvertToVector512Int32Int16(); + var result = Avx512F.ConvertToVector512Int32(test._fld); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(test._fld, _dataTable.outArrayPtr); + } + + public void RunFldScenario() + { + var result = Avx512F.ConvertToVector512Int32(_fld); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_fld, _dataTable.outArrayPtr); + } + + public void RunUnsupportedScenario() + { + Succeeded = false; + + try + { + RunBasicScenario_UnsafeRead(); + } + catch (PlatformNotSupportedException) + { + Succeeded = true; + } + } + + private void ValidateResult(Vector256 firstOp, void* result, [CallerMemberName] string method = "") + { + Int16[] inArray = new Int16[Op1ElementCount]; + Int32[] outArray = new Int32[RetElementCount]; + + Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); + Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), VectorSize); + + ValidateResult(inArray, outArray, method); + } + + private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") + { + Int16[] inArray = new Int16[Op1ElementCount]; + Int32[] outArray = new Int32[RetElementCount]; + + Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), 16); + Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), VectorSize); + + ValidateResult(inArray, outArray, method); + } + + private void ValidateResult(Int16[] firstOp, Int32[] result, [CallerMemberName] string method = "") + { + if (result[0] != firstOp[0]) + { + Succeeded = false; + } + else + { + for (var i = 1; i < RetElementCount; i++) + { + if (result[i] != firstOp[i]) + { + Succeeded = false; + break; + } + } + } + + if (!Succeeded) + { + Console.WriteLine($"{nameof(Avx512F)}.{nameof(Avx512F.ConvertToVector512Int32)}(Vector256): {method} failed:"); + Console.WriteLine($" firstOp: ({string.Join(", ", firstOp)})"); + Console.WriteLine($" result: ({string.Join(", ", result)})"); + Console.WriteLine(); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/ConvertToVector512Int32.SByte.cs b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/ConvertToVector512Int32.SByte.cs new file mode 100644 index 0000000000000..950417bb00c87 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/ConvertToVector512Int32.SByte.cs @@ -0,0 +1,308 @@ +// 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\X86\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.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Runtime.Intrinsics; +using System.Runtime.Intrinsics.X86; +using Xunit; + +namespace JIT.HardwareIntrinsics.X86._Avx512F.handwritten +{ + public static partial class Program + { + [Fact] + public static void ConvertToVector512Int32SByte() + { + var test = new SimpleUnaryOpTest__ConvertToVector512Int32SByte(); + + if (test.IsSupported) + { + // Validates basic functionality works, using Unsafe.Read + test.RunBasicScenario_UnsafeRead(); + + if (Avx.IsSupported) + { + // Validates basic functionality works, using Load + test.RunBasicScenario_Load(); + + // Validates basic functionality works, using LoadAligned + test.RunBasicScenario_LoadAligned(); + } + + // Validates calling via reflection works, using Unsafe.Read + test.RunReflectionScenario_UnsafeRead(); + + if (Avx.IsSupported) + { + // Validates calling via reflection works, using Load + test.RunReflectionScenario_Load(); + + // Validates calling via reflection works, using LoadAligned + test.RunReflectionScenario_LoadAligned(); + } + + // Validates passing a static member works + test.RunClsVarScenario(); + + // Validates passing a local works, using Unsafe.Read + test.RunLclVarScenario_UnsafeRead(); + + if (Avx.IsSupported) + { + // Validates passing a local works, using Load + test.RunLclVarScenario_Load(); + + // Validates passing a local works, using LoadAligned + test.RunLclVarScenario_LoadAligned(); + } + + // Validates passing the field of a local works + test.RunLclFldScenario(); + + // Validates passing an instance member works + test.RunFldScenario(); + } + 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 SimpleUnaryOpTest__ConvertToVector512Int32SByte + { + private const int VectorSize = 64; + + private const int Op1ElementCount = 16 / sizeof(SByte); + private const int RetElementCount = VectorSize / sizeof(Int32); + + private static SByte[] _data = new SByte[Op1ElementCount]; + + private static Vector128 _clsVar; + + private Vector128 _fld; + + private SimpleUnaryOpTest__DataTable _dataTable; + + static SimpleUnaryOpTest__ConvertToVector512Int32SByte() + { + var random = new Random(); + + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), 16); + } + + public SimpleUnaryOpTest__ConvertToVector512Int32SByte() + { + Succeeded = true; + + var random = new Random(); + + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), 16); + + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int32[RetElementCount], VectorSize); + } + + public bool IsSupported => Avx512F.IsSupported; + + public bool Succeeded { get; set; } + + public void RunBasicScenario_UnsafeRead() + { + var result = Avx512F.ConvertToVector512Int32( + Unsafe.Read>(_dataTable.inArrayPtr) + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunBasicScenario_Load() + { + var result = Avx512F.ConvertToVector512Int32( + Sse2.LoadVector128((SByte*)(_dataTable.inArrayPtr)) + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunBasicScenario_LoadAligned() + { + var result = Avx512F.ConvertToVector512Int32( + Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArrayPtr)) + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunReflectionScenario_UnsafeRead() + { + var result = typeof(Avx512F).GetMethod(nameof(Avx512F.ConvertToVector512Int32), new Type[] { typeof(Vector128) }) + .Invoke(null, new object[] { + Unsafe.Read>(_dataTable.inArrayPtr) + }); + + Unsafe.Write(_dataTable.outArrayPtr, (Vector512)(result)); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunReflectionScenario_Load() + { + var result = typeof(Avx512F).GetMethod(nameof(Avx512F.ConvertToVector512Int32), new Type[] { typeof(Vector128) }) + .Invoke(null, new object[] { + Sse2.LoadVector128((SByte*)(_dataTable.inArrayPtr)) + }); + + Unsafe.Write(_dataTable.outArrayPtr, (Vector512)(result)); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunReflectionScenario_LoadAligned() + { + var result = typeof(Avx512F).GetMethod(nameof(Avx512F.ConvertToVector512Int32), new Type[] { typeof(Vector128) }) + .Invoke(null, new object[] { + Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArrayPtr)) + }); + + Unsafe.Write(_dataTable.outArrayPtr, (Vector512)(result)); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunClsVarScenario() + { + var result = Avx512F.ConvertToVector512Int32( + _clsVar + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_clsVar, _dataTable.outArrayPtr); + } + + public void RunLclVarScenario_UnsafeRead() + { + var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); + var result = Avx512F.ConvertToVector512Int32(firstOp); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(firstOp, _dataTable.outArrayPtr); + } + + public void RunLclVarScenario_Load() + { + var firstOp = Sse2.LoadVector128((SByte*)(_dataTable.inArrayPtr)); + var result = Avx512F.ConvertToVector512Int32(firstOp); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(firstOp, _dataTable.outArrayPtr); + } + + public void RunLclVarScenario_LoadAligned() + { + var firstOp = Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArrayPtr)); + var result = Avx512F.ConvertToVector512Int32(firstOp); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(firstOp, _dataTable.outArrayPtr); + } + + public void RunLclFldScenario() + { + var test = new SimpleUnaryOpTest__ConvertToVector512Int32SByte(); + var result = Avx512F.ConvertToVector512Int32(test._fld); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(test._fld, _dataTable.outArrayPtr); + } + + public void RunFldScenario() + { + var result = Avx512F.ConvertToVector512Int32(_fld); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_fld, _dataTable.outArrayPtr); + } + + public void RunUnsupportedScenario() + { + Succeeded = false; + + try + { + RunBasicScenario_UnsafeRead(); + } + catch (PlatformNotSupportedException) + { + Succeeded = true; + } + } + + private void ValidateResult(Vector128 firstOp, void* result, [CallerMemberName] string method = "") + { + SByte[] inArray = new SByte[Op1ElementCount]; + Int32[] outArray = new Int32[RetElementCount]; + + Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); + Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), VectorSize); + + ValidateResult(inArray, outArray, method); + } + + private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") + { + SByte[] inArray = new SByte[Op1ElementCount]; + Int32[] outArray = new Int32[RetElementCount]; + + Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), 16); + Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), VectorSize); + + ValidateResult(inArray, outArray, method); + } + + private void ValidateResult(SByte[] firstOp, Int32[] result, [CallerMemberName] string method = "") + { + if (result[0] != firstOp[0]) + { + Succeeded = false; + } + else + { + for (var i = 1; i < RetElementCount; i++) + { + if (result[i] != firstOp[i]) + { + Succeeded = false; + break; + } + } + } + + if (!Succeeded) + { + Console.WriteLine($"{nameof(Avx512F)}.{nameof(Avx512F.ConvertToVector512Int32)}(Vector128): {method} failed:"); + Console.WriteLine($" firstOp: ({string.Join(", ", firstOp)})"); + Console.WriteLine($" result: ({string.Join(", ", result)})"); + Console.WriteLine(); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/ConvertToVector512Int32.UInt16.cs b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/ConvertToVector512Int32.UInt16.cs new file mode 100644 index 0000000000000..e935b8a837a51 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/ConvertToVector512Int32.UInt16.cs @@ -0,0 +1,308 @@ +// 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\X86\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.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Runtime.Intrinsics; +using System.Runtime.Intrinsics.X86; +using Xunit; + +namespace JIT.HardwareIntrinsics.X86._Avx512F.handwritten +{ + public static partial class Program + { + [Fact] + public static void ConvertToVector512Int32UInt16() + { + var test = new SimpleUnaryOpTest__ConvertToVector512Int32UInt16(); + + if (test.IsSupported) + { + // Validates basic functionality works, using Unsafe.Read + test.RunBasicScenario_UnsafeRead(); + + if (Avx.IsSupported) + { + // Validates basic functionality works, using Load + test.RunBasicScenario_Load(); + + // Validates basic functionality works, using LoadAligned + test.RunBasicScenario_LoadAligned(); + } + + // Validates calling via reflection works, using Unsafe.Read + test.RunReflectionScenario_UnsafeRead(); + + if (Avx.IsSupported) + { + // Validates calling via reflection works, using Load + test.RunReflectionScenario_Load(); + + // Validates calling via reflection works, using LoadAligned + test.RunReflectionScenario_LoadAligned(); + } + + // Validates passing a static member works + test.RunClsVarScenario(); + + // Validates passing a local works, using Unsafe.Read + test.RunLclVarScenario_UnsafeRead(); + + if (Avx.IsSupported) + { + // Validates passing a local works, using Load + test.RunLclVarScenario_Load(); + + // Validates passing a local works, using LoadAligned + test.RunLclVarScenario_LoadAligned(); + } + + // Validates passing the field of a local works + test.RunLclFldScenario(); + + // Validates passing an instance member works + test.RunFldScenario(); + } + 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 SimpleUnaryOpTest__ConvertToVector512Int32UInt16 + { + private const int VectorSize = 64; + + private const int Op1ElementCount = 32 / sizeof(UInt16); + private const int RetElementCount = VectorSize / sizeof(Int32); + + private static UInt16[] _data = new UInt16[Op1ElementCount]; + + private static Vector256 _clsVar; + + private Vector256 _fld; + + private SimpleUnaryOpTest__DataTable _dataTable; + + static SimpleUnaryOpTest__ConvertToVector512Int32UInt16() + { + var random = new Random(); + + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), 16); + } + + public SimpleUnaryOpTest__ConvertToVector512Int32UInt16() + { + Succeeded = true; + + var random = new Random(); + + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), 16); + + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt32[RetElementCount], VectorSize); + } + + public bool IsSupported => Avx512F.IsSupported; + + public bool Succeeded { get; set; } + + public void RunBasicScenario_UnsafeRead() + { + var result = Avx512F.ConvertToVector512Int32( + Unsafe.Read>(_dataTable.inArrayPtr) + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunBasicScenario_Load() + { + var result = Avx512F.ConvertToVector512Int32( + Avx.LoadVector256((UInt16*)(_dataTable.inArrayPtr)) + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunBasicScenario_LoadAligned() + { + var result = Avx512F.ConvertToVector512Int32( + Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArrayPtr)) + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunReflectionScenario_UnsafeRead() + { + var result = typeof(Avx512F).GetMethod(nameof(Avx512F.ConvertToVector512Int32), new Type[] { typeof(Vector256) }) + .Invoke(null, new object[] { + Unsafe.Read>(_dataTable.inArrayPtr) + }); + + Unsafe.Write(_dataTable.outArrayPtr, (Vector512)(result)); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunReflectionScenario_Load() + { + var result = typeof(Avx512F).GetMethod(nameof(Avx512F.ConvertToVector512Int32), new Type[] { typeof(Vector256) }) + .Invoke(null, new object[] { + Avx.LoadVector256((UInt16*)(_dataTable.inArrayPtr)) + }); + + Unsafe.Write(_dataTable.outArrayPtr, (Vector512)(result)); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunReflectionScenario_LoadAligned() + { + var result = typeof(Avx512F).GetMethod(nameof(Avx512F.ConvertToVector512Int32), new Type[] { typeof(Vector256) }) + .Invoke(null, new object[] { + Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArrayPtr)) + }); + + Unsafe.Write(_dataTable.outArrayPtr, (Vector512)(result)); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunClsVarScenario() + { + var result = Avx512F.ConvertToVector512Int32( + _clsVar + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_clsVar, _dataTable.outArrayPtr); + } + + public void RunLclVarScenario_UnsafeRead() + { + var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); + var result = Avx512F.ConvertToVector512Int32(firstOp); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(firstOp, _dataTable.outArrayPtr); + } + + public void RunLclVarScenario_Load() + { + var firstOp = Avx.LoadVector256((UInt16*)(_dataTable.inArrayPtr)); + var result = Avx512F.ConvertToVector512Int32(firstOp); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(firstOp, _dataTable.outArrayPtr); + } + + public void RunLclVarScenario_LoadAligned() + { + var firstOp = Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArrayPtr)); + var result = Avx512F.ConvertToVector512Int32(firstOp); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(firstOp, _dataTable.outArrayPtr); + } + + public void RunLclFldScenario() + { + var test = new SimpleUnaryOpTest__ConvertToVector512Int32UInt16(); + var result = Avx512F.ConvertToVector512Int32(test._fld); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(test._fld, _dataTable.outArrayPtr); + } + + public void RunFldScenario() + { + var result = Avx512F.ConvertToVector512Int32(_fld); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_fld, _dataTable.outArrayPtr); + } + + public void RunUnsupportedScenario() + { + Succeeded = false; + + try + { + RunBasicScenario_UnsafeRead(); + } + catch (PlatformNotSupportedException) + { + Succeeded = true; + } + } + + private void ValidateResult(Vector256 firstOp, void* result, [CallerMemberName] string method = "") + { + UInt16[] inArray = new UInt16[Op1ElementCount]; + UInt32[] outArray = new UInt32[RetElementCount]; + + Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); + Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), VectorSize); + + ValidateResult(inArray, outArray, method); + } + + private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") + { + UInt16[] inArray = new UInt16[Op1ElementCount]; + UInt32[] outArray = new UInt32[RetElementCount]; + + Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), 16); + Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), VectorSize); + + ValidateResult(inArray, outArray, method); + } + + private void ValidateResult(UInt16[] firstOp, UInt32[] result, [CallerMemberName] string method = "") + { + if (result[0] != firstOp[0]) + { + Succeeded = false; + } + else + { + for (var i = 1; i < RetElementCount; i++) + { + if (result[i] != firstOp[i]) + { + Succeeded = false; + break; + } + } + } + + if (!Succeeded) + { + Console.WriteLine($"{nameof(Avx512F)}.{nameof(Avx512F.ConvertToVector512Int32)}(Vector256): {method} failed:"); + Console.WriteLine($" firstOp: ({string.Join(", ", firstOp)})"); + Console.WriteLine($" result: ({string.Join(", ", result)})"); + Console.WriteLine(); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/ConvertToVector512Int64.Byte.cs b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/ConvertToVector512Int64.Byte.cs new file mode 100644 index 0000000000000..9af28d0e9a037 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/ConvertToVector512Int64.Byte.cs @@ -0,0 +1,308 @@ +// 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\X86\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.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Runtime.Intrinsics; +using System.Runtime.Intrinsics.X86; +using Xunit; + +namespace JIT.HardwareIntrinsics.X86._Avx512F.handwritten +{ + public static partial class Program + { + [Fact] + public static void ConvertToVector512Int64Byte() + { + var test = new SimpleUnaryOpTest__ConvertToVector512Int64Byte(); + + if (test.IsSupported) + { + // Validates basic functionality works, using Unsafe.Read + test.RunBasicScenario_UnsafeRead(); + + if (Avx.IsSupported) + { + // Validates basic functionality works, using Load + test.RunBasicScenario_Load(); + + // Validates basic functionality works, using LoadAligned + test.RunBasicScenario_LoadAligned(); + } + + // Validates calling via reflection works, using Unsafe.Read + test.RunReflectionScenario_UnsafeRead(); + + if (Avx.IsSupported) + { + // Validates calling via reflection works, using Load + test.RunReflectionScenario_Load(); + + // Validates calling via reflection works, using LoadAligned + test.RunReflectionScenario_LoadAligned(); + } + + // Validates passing a static member works + test.RunClsVarScenario(); + + // Validates passing a local works, using Unsafe.Read + test.RunLclVarScenario_UnsafeRead(); + + if (Avx.IsSupported) + { + // Validates passing a local works, using Load + test.RunLclVarScenario_Load(); + + // Validates passing a local works, using LoadAligned + test.RunLclVarScenario_LoadAligned(); + } + + // Validates passing the field of a local works + test.RunLclFldScenario(); + + // Validates passing an instance member works + test.RunFldScenario(); + } + 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 SimpleUnaryOpTest__ConvertToVector512Int64Byte + { + private const int VectorSize = 64; + + private const int Op1ElementCount = 16 / sizeof(Byte); + private const int RetElementCount = VectorSize / sizeof(Int64); + + private static Byte[] _data = new Byte[Op1ElementCount]; + + private static Vector128 _clsVar; + + private Vector128 _fld; + + private SimpleUnaryOpTest__DataTable _dataTable; + + static SimpleUnaryOpTest__ConvertToVector512Int64Byte() + { + var random = new Random(); + + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)(random.Next(0, byte.MaxValue)); } + Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), 16); + } + + public SimpleUnaryOpTest__ConvertToVector512Int64Byte() + { + Succeeded = true; + + var random = new Random(); + + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)(random.Next(0, byte.MaxValue)); } + Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), 16); + + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)(random.Next(0, byte.MaxValue)); } + _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt64[RetElementCount], VectorSize); + } + + public bool IsSupported => Avx512F.IsSupported; + + public bool Succeeded { get; set; } + + public void RunBasicScenario_UnsafeRead() + { + var result = Avx512F.ConvertToVector512Int64( + Unsafe.Read>(_dataTable.inArrayPtr) + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunBasicScenario_Load() + { + var result = Avx512F.ConvertToVector512Int64( + Sse2.LoadVector128((Byte*)(_dataTable.inArrayPtr)) + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunBasicScenario_LoadAligned() + { + var result = Avx512F.ConvertToVector512Int64( + Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArrayPtr)) + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunReflectionScenario_UnsafeRead() + { + var result = typeof(Avx512F).GetMethod(nameof(Avx512F.ConvertToVector512Int64), new Type[] { typeof(Vector128) }) + .Invoke(null, new object[] { + Unsafe.Read>(_dataTable.inArrayPtr) + }); + + Unsafe.Write(_dataTable.outArrayPtr, (Vector512)(result)); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunReflectionScenario_Load() + { + var result = typeof(Avx512F).GetMethod(nameof(Avx512F.ConvertToVector512Int64), new Type[] { typeof(Vector128) }) + .Invoke(null, new object[] { + Sse2.LoadVector128((Byte*)(_dataTable.inArrayPtr)) + }); + + Unsafe.Write(_dataTable.outArrayPtr, (Vector512)(result)); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunReflectionScenario_LoadAligned() + { + var result = typeof(Avx512F).GetMethod(nameof(Avx512F.ConvertToVector512Int64), new Type[] { typeof(Vector128) }) + .Invoke(null, new object[] { + Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArrayPtr)) + }); + + Unsafe.Write(_dataTable.outArrayPtr, (Vector512)(result)); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunClsVarScenario() + { + var result = Avx512F.ConvertToVector512Int64( + _clsVar + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_clsVar, _dataTable.outArrayPtr); + } + + public void RunLclVarScenario_UnsafeRead() + { + var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); + var result = Avx512F.ConvertToVector512Int64(firstOp); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(firstOp, _dataTable.outArrayPtr); + } + + public void RunLclVarScenario_Load() + { + var firstOp = Sse2.LoadVector128((Byte*)(_dataTable.inArrayPtr)); + var result = Avx512F.ConvertToVector512Int64(firstOp); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(firstOp, _dataTable.outArrayPtr); + } + + public void RunLclVarScenario_LoadAligned() + { + var firstOp = Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArrayPtr)); + var result = Avx512F.ConvertToVector512Int64(firstOp); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(firstOp, _dataTable.outArrayPtr); + } + + public void RunLclFldScenario() + { + var test = new SimpleUnaryOpTest__ConvertToVector512Int64Byte(); + var result = Avx512F.ConvertToVector512Int64(test._fld); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(test._fld, _dataTable.outArrayPtr); + } + + public void RunFldScenario() + { + var result = Avx512F.ConvertToVector512Int64(_fld); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_fld, _dataTable.outArrayPtr); + } + + public void RunUnsupportedScenario() + { + Succeeded = false; + + try + { + RunBasicScenario_UnsafeRead(); + } + catch (PlatformNotSupportedException) + { + Succeeded = true; + } + } + + private void ValidateResult(Vector128 firstOp, void* result, [CallerMemberName] string method = "") + { + Byte[] inArray = new Byte[Op1ElementCount]; + UInt64[] outArray = new UInt64[RetElementCount]; + + Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); + Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), VectorSize); + + ValidateResult(inArray, outArray, method); + } + + private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") + { + Byte[] inArray = new Byte[Op1ElementCount]; + UInt64[] outArray = new UInt64[RetElementCount]; + + Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), 16); + Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), VectorSize); + + ValidateResult(inArray, outArray, method); + } + + private void ValidateResult(Byte[] firstOp, UInt64[] result, [CallerMemberName] string method = "") + { + if (result[0] != firstOp[0]) + { + Succeeded = false; + } + else + { + for (var i = 1; i < RetElementCount; i++) + { + if (result[i] != firstOp[i]) + { + Succeeded = false; + break; + } + } + } + + if (!Succeeded) + { + Console.WriteLine($"{nameof(Avx512F)}.{nameof(Avx512F.ConvertToVector512Int64)}(Vector128): {method} failed:"); + Console.WriteLine($" firstOp: ({string.Join(", ", firstOp)})"); + Console.WriteLine($" result: ({string.Join(", ", result)})"); + Console.WriteLine(); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/ConvertToVector512Int64.Int16.cs b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/ConvertToVector512Int64.Int16.cs new file mode 100644 index 0000000000000..def6ebb2c6f98 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/ConvertToVector512Int64.Int16.cs @@ -0,0 +1,308 @@ +// 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\X86\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.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Runtime.Intrinsics; +using System.Runtime.Intrinsics.X86; +using Xunit; + +namespace JIT.HardwareIntrinsics.X86._Avx512F.handwritten +{ + public static partial class Program + { + [Fact] + public static void ConvertToVector512Int64Int16() + { + var test = new SimpleUnaryOpTest__ConvertToVector512Int64Int16(); + + if (test.IsSupported) + { + // Validates basic functionality works, using Unsafe.Read + test.RunBasicScenario_UnsafeRead(); + + if (Avx.IsSupported) + { + // Validates basic functionality works, using Load + test.RunBasicScenario_Load(); + + // Validates basic functionality works, using LoadAligned + test.RunBasicScenario_LoadAligned(); + } + + // Validates calling via reflection works, using Unsafe.Read + test.RunReflectionScenario_UnsafeRead(); + + if (Avx.IsSupported) + { + // Validates calling via reflection works, using Load + test.RunReflectionScenario_Load(); + + // Validates calling via reflection works, using LoadAligned + test.RunReflectionScenario_LoadAligned(); + } + + // Validates passing a static member works + test.RunClsVarScenario(); + + // Validates passing a local works, using Unsafe.Read + test.RunLclVarScenario_UnsafeRead(); + + if (Avx.IsSupported) + { + // Validates passing a local works, using Load + test.RunLclVarScenario_Load(); + + // Validates passing a local works, using LoadAligned + test.RunLclVarScenario_LoadAligned(); + } + + // Validates passing the field of a local works + test.RunLclFldScenario(); + + // Validates passing an instance member works + test.RunFldScenario(); + } + 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 SimpleUnaryOpTest__ConvertToVector512Int64Int16 + { + private const int VectorSize = 64; + + private const int Op1ElementCount = 16 / sizeof(Int16); + private const int RetElementCount = VectorSize / sizeof(Int64); + + private static Int16[] _data = new Int16[Op1ElementCount]; + + private static Vector128 _clsVar; + + private Vector128 _fld; + + private SimpleUnaryOpTest__DataTable _dataTable; + + static SimpleUnaryOpTest__ConvertToVector512Int64Int16() + { + var random = new Random(); + + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), 16); + } + + public SimpleUnaryOpTest__ConvertToVector512Int64Int16() + { + Succeeded = true; + + var random = new Random(); + + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), 16); + + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int64[RetElementCount], VectorSize); + } + + public bool IsSupported => Avx512F.IsSupported; + + public bool Succeeded { get; set; } + + public void RunBasicScenario_UnsafeRead() + { + var result = Avx512F.ConvertToVector512Int64( + Unsafe.Read>(_dataTable.inArrayPtr) + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunBasicScenario_Load() + { + var result = Avx512F.ConvertToVector512Int64( + Sse2.LoadVector128((Int16*)(_dataTable.inArrayPtr)) + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunBasicScenario_LoadAligned() + { + var result = Avx512F.ConvertToVector512Int64( + Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArrayPtr)) + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunReflectionScenario_UnsafeRead() + { + var result = typeof(Avx512F).GetMethod(nameof(Avx512F.ConvertToVector512Int64), new Type[] { typeof(Vector128) }) + .Invoke(null, new object[] { + Unsafe.Read>(_dataTable.inArrayPtr) + }); + + Unsafe.Write(_dataTable.outArrayPtr, (Vector512)(result)); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunReflectionScenario_Load() + { + var result = typeof(Avx512F).GetMethod(nameof(Avx512F.ConvertToVector512Int64), new Type[] { typeof(Vector128) }) + .Invoke(null, new object[] { + Sse2.LoadVector128((Int16*)(_dataTable.inArrayPtr)) + }); + + Unsafe.Write(_dataTable.outArrayPtr, (Vector512)(result)); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunReflectionScenario_LoadAligned() + { + var result = typeof(Avx512F).GetMethod(nameof(Avx512F.ConvertToVector512Int64), new Type[] { typeof(Vector128) }) + .Invoke(null, new object[] { + Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArrayPtr)) + }); + + Unsafe.Write(_dataTable.outArrayPtr, (Vector512)(result)); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunClsVarScenario() + { + var result = Avx512F.ConvertToVector512Int64( + _clsVar + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_clsVar, _dataTable.outArrayPtr); + } + + public void RunLclVarScenario_UnsafeRead() + { + var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); + var result = Avx512F.ConvertToVector512Int64(firstOp); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(firstOp, _dataTable.outArrayPtr); + } + + public void RunLclVarScenario_Load() + { + var firstOp = Sse2.LoadVector128((Int16*)(_dataTable.inArrayPtr)); + var result = Avx512F.ConvertToVector512Int64(firstOp); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(firstOp, _dataTable.outArrayPtr); + } + + public void RunLclVarScenario_LoadAligned() + { + var firstOp = Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArrayPtr)); + var result = Avx512F.ConvertToVector512Int64(firstOp); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(firstOp, _dataTable.outArrayPtr); + } + + public void RunLclFldScenario() + { + var test = new SimpleUnaryOpTest__ConvertToVector512Int64Int16(); + var result = Avx512F.ConvertToVector512Int64(test._fld); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(test._fld, _dataTable.outArrayPtr); + } + + public void RunFldScenario() + { + var result = Avx512F.ConvertToVector512Int64(_fld); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_fld, _dataTable.outArrayPtr); + } + + public void RunUnsupportedScenario() + { + Succeeded = false; + + try + { + RunBasicScenario_UnsafeRead(); + } + catch (PlatformNotSupportedException) + { + Succeeded = true; + } + } + + private void ValidateResult(Vector128 firstOp, void* result, [CallerMemberName] string method = "") + { + Int16[] inArray = new Int16[Op1ElementCount]; + Int64[] outArray = new Int64[RetElementCount]; + + Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); + Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), VectorSize); + + ValidateResult(inArray, outArray, method); + } + + private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") + { + Int16[] inArray = new Int16[Op1ElementCount]; + Int64[] outArray = new Int64[RetElementCount]; + + Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), 16); + Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), VectorSize); + + ValidateResult(inArray, outArray, method); + } + + private void ValidateResult(Int16[] firstOp, Int64[] result, [CallerMemberName] string method = "") + { + if (result[0] != firstOp[0]) + { + Succeeded = false; + } + else + { + for (var i = 1; i < RetElementCount; i++) + { + if (result[i] != firstOp[i]) + { + Succeeded = false; + break; + } + } + } + + if (!Succeeded) + { + Console.WriteLine($"{nameof(Avx512F)}.{nameof(Avx512F.ConvertToVector512Int64)}(Vector128): {method} failed:"); + Console.WriteLine($" firstOp: ({string.Join(", ", firstOp)})"); + Console.WriteLine($" result: ({string.Join(", ", result)})"); + Console.WriteLine(); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/ConvertToVector512Int64.Int32.cs b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/ConvertToVector512Int64.Int32.cs new file mode 100644 index 0000000000000..34269547caa13 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/ConvertToVector512Int64.Int32.cs @@ -0,0 +1,308 @@ +// 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\X86\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.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Runtime.Intrinsics; +using System.Runtime.Intrinsics.X86; +using Xunit; + +namespace JIT.HardwareIntrinsics.X86._Avx512F.handwritten +{ + public static partial class Program + { + [Fact] + public static void ConvertToVector512Int64Int32() + { + var test = new SimpleUnaryOpTest__ConvertToVector512Int64Int32(); + + if (test.IsSupported) + { + // Validates basic functionality works, using Unsafe.Read + test.RunBasicScenario_UnsafeRead(); + + if (Avx.IsSupported) + { + // Validates basic functionality works, using Load + test.RunBasicScenario_Load(); + + // Validates basic functionality works, using LoadAligned + test.RunBasicScenario_LoadAligned(); + } + + // Validates calling via reflection works, using Unsafe.Read + test.RunReflectionScenario_UnsafeRead(); + + if (Avx.IsSupported) + { + // Validates calling via reflection works, using Load + test.RunReflectionScenario_Load(); + + // Validates calling via reflection works, using LoadAligned + test.RunReflectionScenario_LoadAligned(); + } + + // Validates passing a static member works + test.RunClsVarScenario(); + + // Validates passing a local works, using Unsafe.Read + test.RunLclVarScenario_UnsafeRead(); + + if (Avx.IsSupported) + { + // Validates passing a local works, using Load + test.RunLclVarScenario_Load(); + + // Validates passing a local works, using LoadAligned + test.RunLclVarScenario_LoadAligned(); + } + + // Validates passing the field of a local works + test.RunLclFldScenario(); + + // Validates passing an instance member works + test.RunFldScenario(); + } + 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 SimpleUnaryOpTest__ConvertToVector512Int64Int32 + { + private const int VectorSize = 64; + + private const int Op1ElementCount = 32 / sizeof(Int32); + private const int RetElementCount = VectorSize / sizeof(Int64); + + private static Int32[] _data = new Int32[Op1ElementCount]; + + private static Vector256 _clsVar; + + private Vector256 _fld; + + private SimpleUnaryOpTest__DataTable _dataTable; + + static SimpleUnaryOpTest__ConvertToVector512Int64Int32() + { + var random = new Random(); + + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), 16); + } + + public SimpleUnaryOpTest__ConvertToVector512Int64Int32() + { + Succeeded = true; + + var random = new Random(); + + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), 16); + + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int64[RetElementCount], VectorSize); + } + + public bool IsSupported => Avx512F.IsSupported; + + public bool Succeeded { get; set; } + + public void RunBasicScenario_UnsafeRead() + { + var result = Avx512F.ConvertToVector512Int64( + Unsafe.Read>(_dataTable.inArrayPtr) + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunBasicScenario_Load() + { + var result = Avx512F.ConvertToVector512Int64( + Avx.LoadVector256((Int32*)(_dataTable.inArrayPtr)) + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunBasicScenario_LoadAligned() + { + var result = Avx512F.ConvertToVector512Int64( + Avx.LoadAlignedVector256((Int32*)(_dataTable.inArrayPtr)) + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunReflectionScenario_UnsafeRead() + { + var result = typeof(Avx512F).GetMethod(nameof(Avx512F.ConvertToVector512Int64), new Type[] { typeof(Vector256) }) + .Invoke(null, new object[] { + Unsafe.Read>(_dataTable.inArrayPtr) + }); + + Unsafe.Write(_dataTable.outArrayPtr, (Vector512)(result)); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunReflectionScenario_Load() + { + var result = typeof(Avx512F).GetMethod(nameof(Avx512F.ConvertToVector512Int64), new Type[] { typeof(Vector256) }) + .Invoke(null, new object[] { + Avx.LoadVector256((Int32*)(_dataTable.inArrayPtr)) + }); + + Unsafe.Write(_dataTable.outArrayPtr, (Vector512)(result)); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunReflectionScenario_LoadAligned() + { + var result = typeof(Avx512F).GetMethod(nameof(Avx512F.ConvertToVector512Int64), new Type[] { typeof(Vector256) }) + .Invoke(null, new object[] { + Avx.LoadAlignedVector256((Int32*)(_dataTable.inArrayPtr)) + }); + + Unsafe.Write(_dataTable.outArrayPtr, (Vector512)(result)); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunClsVarScenario() + { + var result = Avx512F.ConvertToVector512Int64( + _clsVar + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_clsVar, _dataTable.outArrayPtr); + } + + public void RunLclVarScenario_UnsafeRead() + { + var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); + var result = Avx512F.ConvertToVector512Int64(firstOp); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(firstOp, _dataTable.outArrayPtr); + } + + public void RunLclVarScenario_Load() + { + var firstOp = Avx.LoadVector256((Int32*)(_dataTable.inArrayPtr)); + var result = Avx512F.ConvertToVector512Int64(firstOp); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(firstOp, _dataTable.outArrayPtr); + } + + public void RunLclVarScenario_LoadAligned() + { + var firstOp = Avx.LoadAlignedVector256((Int32*)(_dataTable.inArrayPtr)); + var result = Avx512F.ConvertToVector512Int64(firstOp); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(firstOp, _dataTable.outArrayPtr); + } + + public void RunLclFldScenario() + { + var test = new SimpleUnaryOpTest__ConvertToVector512Int64Int32(); + var result = Avx512F.ConvertToVector512Int64(test._fld); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(test._fld, _dataTable.outArrayPtr); + } + + public void RunFldScenario() + { + var result = Avx512F.ConvertToVector512Int64(_fld); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_fld, _dataTable.outArrayPtr); + } + + public void RunUnsupportedScenario() + { + Succeeded = false; + + try + { + RunBasicScenario_UnsafeRead(); + } + catch (PlatformNotSupportedException) + { + Succeeded = true; + } + } + + private void ValidateResult(Vector256 firstOp, void* result, [CallerMemberName] string method = "") + { + Int32[] inArray = new Int32[Op1ElementCount]; + Int64[] outArray = new Int64[RetElementCount]; + + Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); + Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), VectorSize); + + ValidateResult(inArray, outArray, method); + } + + private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") + { + Int32[] inArray = new Int32[Op1ElementCount]; + Int64[] outArray = new Int64[RetElementCount]; + + Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), 16); + Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), VectorSize); + + ValidateResult(inArray, outArray, method); + } + + private void ValidateResult(Int32[] firstOp, Int64[] result, [CallerMemberName] string method = "") + { + if (result[0] != firstOp[0]) + { + Succeeded = false; + } + else + { + for (var i = 1; i < RetElementCount; i++) + { + if (result[i] != firstOp[i]) + { + Succeeded = false; + break; + } + } + } + + if (!Succeeded) + { + Console.WriteLine($"{nameof(Avx512F)}.{nameof(Avx512F.ConvertToVector512Int64)}(Vector256): {method} failed:"); + Console.WriteLine($" firstOp: ({string.Join(", ", firstOp)})"); + Console.WriteLine($" result: ({string.Join(", ", result)})"); + Console.WriteLine(); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/ConvertToVector512Int64.SByte.cs b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/ConvertToVector512Int64.SByte.cs new file mode 100644 index 0000000000000..44e8e49117655 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/ConvertToVector512Int64.SByte.cs @@ -0,0 +1,308 @@ +// 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\X86\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.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Runtime.Intrinsics; +using System.Runtime.Intrinsics.X86; +using Xunit; + +namespace JIT.HardwareIntrinsics.X86._Avx512F.handwritten +{ + public static partial class Program + { + [Fact] + public static void ConvertToVector512Int64SByte() + { + var test = new SimpleUnaryOpTest__ConvertToVector512Int64SByte(); + + if (test.IsSupported) + { + // Validates basic functionality works, using Unsafe.Read + test.RunBasicScenario_UnsafeRead(); + + if (Avx.IsSupported) + { + // Validates basic functionality works, using Load + test.RunBasicScenario_Load(); + + // Validates basic functionality works, using LoadAligned + test.RunBasicScenario_LoadAligned(); + } + + // Validates calling via reflection works, using Unsafe.Read + test.RunReflectionScenario_UnsafeRead(); + + if (Avx.IsSupported) + { + // Validates calling via reflection works, using Load + test.RunReflectionScenario_Load(); + + // Validates calling via reflection works, using LoadAligned + test.RunReflectionScenario_LoadAligned(); + } + + // Validates passing a static member works + test.RunClsVarScenario(); + + // Validates passing a local works, using Unsafe.Read + test.RunLclVarScenario_UnsafeRead(); + + if (Avx.IsSupported) + { + // Validates passing a local works, using Load + test.RunLclVarScenario_Load(); + + // Validates passing a local works, using LoadAligned + test.RunLclVarScenario_LoadAligned(); + } + + // Validates passing the field of a local works + test.RunLclFldScenario(); + + // Validates passing an instance member works + test.RunFldScenario(); + } + 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 SimpleUnaryOpTest__ConvertToVector512Int64SByte + { + private const int VectorSize = 64; + + private const int Op1ElementCount = 16 / sizeof(SByte); + private const int RetElementCount = VectorSize / sizeof(Int64); + + private static SByte[] _data = new SByte[Op1ElementCount]; + + private static Vector128 _clsVar; + + private Vector128 _fld; + + private SimpleUnaryOpTest__DataTable _dataTable; + + static SimpleUnaryOpTest__ConvertToVector512Int64SByte() + { + var random = new Random(); + + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), 16); + } + + public SimpleUnaryOpTest__ConvertToVector512Int64SByte() + { + Succeeded = true; + + var random = new Random(); + + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), 16); + + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int64[RetElementCount], VectorSize); + } + + public bool IsSupported => Avx512F.IsSupported; + + public bool Succeeded { get; set; } + + public void RunBasicScenario_UnsafeRead() + { + var result = Avx512F.ConvertToVector512Int64( + Unsafe.Read>(_dataTable.inArrayPtr) + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunBasicScenario_Load() + { + var result = Avx512F.ConvertToVector512Int64( + Sse2.LoadVector128((SByte*)(_dataTable.inArrayPtr)) + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunBasicScenario_LoadAligned() + { + var result = Avx512F.ConvertToVector512Int64( + Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArrayPtr)) + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunReflectionScenario_UnsafeRead() + { + var result = typeof(Avx512F).GetMethod(nameof(Avx512F.ConvertToVector512Int64), new Type[] { typeof(Vector128) }) + .Invoke(null, new object[] { + Unsafe.Read>(_dataTable.inArrayPtr) + }); + + Unsafe.Write(_dataTable.outArrayPtr, (Vector512)(result)); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunReflectionScenario_Load() + { + var result = typeof(Avx512F).GetMethod(nameof(Avx512F.ConvertToVector512Int64), new Type[] { typeof(Vector128) }) + .Invoke(null, new object[] { + Sse2.LoadVector128((SByte*)(_dataTable.inArrayPtr)) + }); + + Unsafe.Write(_dataTable.outArrayPtr, (Vector512)(result)); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunReflectionScenario_LoadAligned() + { + var result = typeof(Avx512F).GetMethod(nameof(Avx512F.ConvertToVector512Int64), new Type[] { typeof(Vector128) }) + .Invoke(null, new object[] { + Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArrayPtr)) + }); + + Unsafe.Write(_dataTable.outArrayPtr, (Vector512)(result)); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunClsVarScenario() + { + var result = Avx512F.ConvertToVector512Int64( + _clsVar + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_clsVar, _dataTable.outArrayPtr); + } + + public void RunLclVarScenario_UnsafeRead() + { + var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); + var result = Avx512F.ConvertToVector512Int64(firstOp); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(firstOp, _dataTable.outArrayPtr); + } + + public void RunLclVarScenario_Load() + { + var firstOp = Sse2.LoadVector128((SByte*)(_dataTable.inArrayPtr)); + var result = Avx512F.ConvertToVector512Int64(firstOp); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(firstOp, _dataTable.outArrayPtr); + } + + public void RunLclVarScenario_LoadAligned() + { + var firstOp = Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArrayPtr)); + var result = Avx512F.ConvertToVector512Int64(firstOp); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(firstOp, _dataTable.outArrayPtr); + } + + public void RunLclFldScenario() + { + var test = new SimpleUnaryOpTest__ConvertToVector512Int64SByte(); + var result = Avx512F.ConvertToVector512Int64(test._fld); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(test._fld, _dataTable.outArrayPtr); + } + + public void RunFldScenario() + { + var result = Avx512F.ConvertToVector512Int64(_fld); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_fld, _dataTable.outArrayPtr); + } + + public void RunUnsupportedScenario() + { + Succeeded = false; + + try + { + RunBasicScenario_UnsafeRead(); + } + catch (PlatformNotSupportedException) + { + Succeeded = true; + } + } + + private void ValidateResult(Vector128 firstOp, void* result, [CallerMemberName] string method = "") + { + SByte[] inArray = new SByte[Op1ElementCount]; + Int64[] outArray = new Int64[RetElementCount]; + + Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); + Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), VectorSize); + + ValidateResult(inArray, outArray, method); + } + + private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") + { + SByte[] inArray = new SByte[Op1ElementCount]; + Int64[] outArray = new Int64[RetElementCount]; + + Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), 16); + Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), VectorSize); + + ValidateResult(inArray, outArray, method); + } + + private void ValidateResult(SByte[] firstOp, Int64[] result, [CallerMemberName] string method = "") + { + if (result[0] != firstOp[0]) + { + Succeeded = false; + } + else + { + for (var i = 1; i < RetElementCount; i++) + { + if (result[i] != firstOp[i]) + { + Succeeded = false; + break; + } + } + } + + if (!Succeeded) + { + Console.WriteLine($"{nameof(Avx512F)}.{nameof(Avx512F.ConvertToVector512Int64)}(Vector128): {method} failed:"); + Console.WriteLine($" firstOp: ({string.Join(", ", firstOp)})"); + Console.WriteLine($" result: ({string.Join(", ", result)})"); + Console.WriteLine(); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/ConvertToVector512Int64.UInt16.cs b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/ConvertToVector512Int64.UInt16.cs new file mode 100644 index 0000000000000..f5a9094cb80b1 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/ConvertToVector512Int64.UInt16.cs @@ -0,0 +1,308 @@ +// 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\X86\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.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Runtime.Intrinsics; +using System.Runtime.Intrinsics.X86; +using Xunit; + +namespace JIT.HardwareIntrinsics.X86._Avx512F.handwritten +{ + public static partial class Program + { + [Fact] + public static void ConvertToVector512Int64UInt16() + { + var test = new SimpleUnaryOpTest__ConvertToVector512Int64UInt16(); + + if (test.IsSupported) + { + // Validates basic functionality works, using Unsafe.Read + test.RunBasicScenario_UnsafeRead(); + + if (Avx.IsSupported) + { + // Validates basic functionality works, using Load + test.RunBasicScenario_Load(); + + // Validates basic functionality works, using LoadAligned + test.RunBasicScenario_LoadAligned(); + } + + // Validates calling via reflection works, using Unsafe.Read + test.RunReflectionScenario_UnsafeRead(); + + if (Avx.IsSupported) + { + // Validates calling via reflection works, using Load + test.RunReflectionScenario_Load(); + + // Validates calling via reflection works, using LoadAligned + test.RunReflectionScenario_LoadAligned(); + } + + // Validates passing a static member works + test.RunClsVarScenario(); + + // Validates passing a local works, using Unsafe.Read + test.RunLclVarScenario_UnsafeRead(); + + if (Avx.IsSupported) + { + // Validates passing a local works, using Load + test.RunLclVarScenario_Load(); + + // Validates passing a local works, using LoadAligned + test.RunLclVarScenario_LoadAligned(); + } + + // Validates passing the field of a local works + test.RunLclFldScenario(); + + // Validates passing an instance member works + test.RunFldScenario(); + } + 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 SimpleUnaryOpTest__ConvertToVector512Int64UInt16 + { + private const int VectorSize = 64; + + private const int Op1ElementCount = 16 / sizeof(UInt16); + private const int RetElementCount = VectorSize / sizeof(Int64); + + private static UInt16[] _data = new UInt16[Op1ElementCount]; + + private static Vector128 _clsVar; + + private Vector128 _fld; + + private SimpleUnaryOpTest__DataTable _dataTable; + + static SimpleUnaryOpTest__ConvertToVector512Int64UInt16() + { + var random = new Random(); + + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), 16); + } + + public SimpleUnaryOpTest__ConvertToVector512Int64UInt16() + { + Succeeded = true; + + var random = new Random(); + + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), 16); + + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt64[RetElementCount], VectorSize); + } + + public bool IsSupported => Avx512F.IsSupported; + + public bool Succeeded { get; set; } + + public void RunBasicScenario_UnsafeRead() + { + var result = Avx512F.ConvertToVector512Int64( + Unsafe.Read>(_dataTable.inArrayPtr) + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunBasicScenario_Load() + { + var result = Avx512F.ConvertToVector512Int64( + Sse2.LoadVector128((UInt16*)(_dataTable.inArrayPtr)) + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunBasicScenario_LoadAligned() + { + var result = Avx512F.ConvertToVector512Int64( + Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArrayPtr)) + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunReflectionScenario_UnsafeRead() + { + var result = typeof(Avx512F).GetMethod(nameof(Avx512F.ConvertToVector512Int64), new Type[] { typeof(Vector128) }) + .Invoke(null, new object[] { + Unsafe.Read>(_dataTable.inArrayPtr) + }); + + Unsafe.Write(_dataTable.outArrayPtr, (Vector512)(result)); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunReflectionScenario_Load() + { + var result = typeof(Avx512F).GetMethod(nameof(Avx512F.ConvertToVector512Int64), new Type[] { typeof(Vector128) }) + .Invoke(null, new object[] { + Sse2.LoadVector128((UInt16*)(_dataTable.inArrayPtr)) + }); + + Unsafe.Write(_dataTable.outArrayPtr, (Vector512)(result)); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunReflectionScenario_LoadAligned() + { + var result = typeof(Avx512F).GetMethod(nameof(Avx512F.ConvertToVector512Int64), new Type[] { typeof(Vector128) }) + .Invoke(null, new object[] { + Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArrayPtr)) + }); + + Unsafe.Write(_dataTable.outArrayPtr, (Vector512)(result)); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunClsVarScenario() + { + var result = Avx512F.ConvertToVector512Int64( + _clsVar + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_clsVar, _dataTable.outArrayPtr); + } + + public void RunLclVarScenario_UnsafeRead() + { + var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); + var result = Avx512F.ConvertToVector512Int64(firstOp); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(firstOp, _dataTable.outArrayPtr); + } + + public void RunLclVarScenario_Load() + { + var firstOp = Sse2.LoadVector128((UInt16*)(_dataTable.inArrayPtr)); + var result = Avx512F.ConvertToVector512Int64(firstOp); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(firstOp, _dataTable.outArrayPtr); + } + + public void RunLclVarScenario_LoadAligned() + { + var firstOp = Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArrayPtr)); + var result = Avx512F.ConvertToVector512Int64(firstOp); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(firstOp, _dataTable.outArrayPtr); + } + + public void RunLclFldScenario() + { + var test = new SimpleUnaryOpTest__ConvertToVector512Int64UInt16(); + var result = Avx512F.ConvertToVector512Int64(test._fld); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(test._fld, _dataTable.outArrayPtr); + } + + public void RunFldScenario() + { + var result = Avx512F.ConvertToVector512Int64(_fld); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_fld, _dataTable.outArrayPtr); + } + + public void RunUnsupportedScenario() + { + Succeeded = false; + + try + { + RunBasicScenario_UnsafeRead(); + } + catch (PlatformNotSupportedException) + { + Succeeded = true; + } + } + + private void ValidateResult(Vector128 firstOp, void* result, [CallerMemberName] string method = "") + { + UInt16[] inArray = new UInt16[Op1ElementCount]; + UInt64[] outArray = new UInt64[RetElementCount]; + + Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); + Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), VectorSize); + + ValidateResult(inArray, outArray, method); + } + + private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") + { + UInt16[] inArray = new UInt16[Op1ElementCount]; + UInt64[] outArray = new UInt64[RetElementCount]; + + Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), 16); + Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), VectorSize); + + ValidateResult(inArray, outArray, method); + } + + private void ValidateResult(UInt16[] firstOp, UInt64[] result, [CallerMemberName] string method = "") + { + if (result[0] != firstOp[0]) + { + Succeeded = false; + } + else + { + for (var i = 1; i < RetElementCount; i++) + { + if (result[i] != firstOp[i]) + { + Succeeded = false; + break; + } + } + } + + if (!Succeeded) + { + Console.WriteLine($"{nameof(Avx512F)}.{nameof(Avx512F.ConvertToVector512Int64)}(Vector128): {method} failed:"); + Console.WriteLine($" firstOp: ({string.Join(", ", firstOp)})"); + Console.WriteLine($" result: ({string.Join(", ", result)})"); + Console.WriteLine(); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/ConvertToVector512Int64.UInt32.cs b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/ConvertToVector512Int64.UInt32.cs new file mode 100644 index 0000000000000..ec444eae342eb --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/ConvertToVector512Int64.UInt32.cs @@ -0,0 +1,308 @@ +// 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\X86\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.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Runtime.Intrinsics; +using System.Runtime.Intrinsics.X86; +using Xunit; + +namespace JIT.HardwareIntrinsics.X86._Avx512F.handwritten +{ + public static partial class Program + { + [Fact] + public static void ConvertToVector512Int64UInt32() + { + var test = new SimpleUnaryOpTest__ConvertToVector512Int64UInt32(); + + if (test.IsSupported) + { + // Validates basic functionality works, using Unsafe.Read + test.RunBasicScenario_UnsafeRead(); + + if (Avx.IsSupported) + { + // Validates basic functionality works, using Load + test.RunBasicScenario_Load(); + + // Validates basic functionality works, using LoadAligned + test.RunBasicScenario_LoadAligned(); + } + + // Validates calling via reflection works, using Unsafe.Read + test.RunReflectionScenario_UnsafeRead(); + + if (Avx.IsSupported) + { + // Validates calling via reflection works, using Load + test.RunReflectionScenario_Load(); + + // Validates calling via reflection works, using LoadAligned + test.RunReflectionScenario_LoadAligned(); + } + + // Validates passing a static member works + test.RunClsVarScenario(); + + // Validates passing a local works, using Unsafe.Read + test.RunLclVarScenario_UnsafeRead(); + + if (Avx.IsSupported) + { + // Validates passing a local works, using Load + test.RunLclVarScenario_Load(); + + // Validates passing a local works, using LoadAligned + test.RunLclVarScenario_LoadAligned(); + } + + // Validates passing the field of a local works + test.RunLclFldScenario(); + + // Validates passing an instance member works + test.RunFldScenario(); + } + 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 SimpleUnaryOpTest__ConvertToVector512Int64UInt32 + { + private const int VectorSize = 64; + + private const int Op1ElementCount = 32 / sizeof(UInt32); + private const int RetElementCount = VectorSize / sizeof(Int64); + + private static UInt32[] _data = new UInt32[Op1ElementCount]; + + private static Vector256 _clsVar; + + private Vector256 _fld; + + private SimpleUnaryOpTest__DataTable _dataTable; + + static SimpleUnaryOpTest__ConvertToVector512Int64UInt32() + { + var random = new Random(); + + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), 16); + } + + public SimpleUnaryOpTest__ConvertToVector512Int64UInt32() + { + Succeeded = true; + + var random = new Random(); + + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), 16); + + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt64[RetElementCount], VectorSize); + } + + public bool IsSupported => Avx512F.IsSupported; + + public bool Succeeded { get; set; } + + public void RunBasicScenario_UnsafeRead() + { + var result = Avx512F.ConvertToVector512Int64( + Unsafe.Read>(_dataTable.inArrayPtr) + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunBasicScenario_Load() + { + var result = Avx512F.ConvertToVector512Int64( + Avx.LoadVector256((UInt32*)(_dataTable.inArrayPtr)) + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunBasicScenario_LoadAligned() + { + var result = Avx512F.ConvertToVector512Int64( + Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArrayPtr)) + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunReflectionScenario_UnsafeRead() + { + var result = typeof(Avx512F).GetMethod(nameof(Avx512F.ConvertToVector512Int64), new Type[] { typeof(Vector256) }) + .Invoke(null, new object[] { + Unsafe.Read>(_dataTable.inArrayPtr) + }); + + Unsafe.Write(_dataTable.outArrayPtr, (Vector512)(result)); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunReflectionScenario_Load() + { + var result = typeof(Avx512F).GetMethod(nameof(Avx512F.ConvertToVector512Int64), new Type[] { typeof(Vector256) }) + .Invoke(null, new object[] { + Avx.LoadVector256((UInt32*)(_dataTable.inArrayPtr)) + }); + + Unsafe.Write(_dataTable.outArrayPtr, (Vector512)(result)); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunReflectionScenario_LoadAligned() + { + var result = typeof(Avx512F).GetMethod(nameof(Avx512F.ConvertToVector512Int64), new Type[] { typeof(Vector256) }) + .Invoke(null, new object[] { + Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArrayPtr)) + }); + + Unsafe.Write(_dataTable.outArrayPtr, (Vector512)(result)); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunClsVarScenario() + { + var result = Avx512F.ConvertToVector512Int64( + _clsVar + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_clsVar, _dataTable.outArrayPtr); + } + + public void RunLclVarScenario_UnsafeRead() + { + var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); + var result = Avx512F.ConvertToVector512Int64(firstOp); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(firstOp, _dataTable.outArrayPtr); + } + + public void RunLclVarScenario_Load() + { + var firstOp = Avx.LoadVector256((UInt32*)(_dataTable.inArrayPtr)); + var result = Avx512F.ConvertToVector512Int64(firstOp); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(firstOp, _dataTable.outArrayPtr); + } + + public void RunLclVarScenario_LoadAligned() + { + var firstOp = Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArrayPtr)); + var result = Avx512F.ConvertToVector512Int64(firstOp); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(firstOp, _dataTable.outArrayPtr); + } + + public void RunLclFldScenario() + { + var test = new SimpleUnaryOpTest__ConvertToVector512Int64UInt32(); + var result = Avx512F.ConvertToVector512Int64(test._fld); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(test._fld, _dataTable.outArrayPtr); + } + + public void RunFldScenario() + { + var result = Avx512F.ConvertToVector512Int64(_fld); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_fld, _dataTable.outArrayPtr); + } + + public void RunUnsupportedScenario() + { + Succeeded = false; + + try + { + RunBasicScenario_UnsafeRead(); + } + catch (PlatformNotSupportedException) + { + Succeeded = true; + } + } + + private void ValidateResult(Vector256 firstOp, void* result, [CallerMemberName] string method = "") + { + UInt32[] inArray = new UInt32[Op1ElementCount]; + UInt64[] outArray = new UInt64[RetElementCount]; + + Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); + Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), VectorSize); + + ValidateResult(inArray, outArray, method); + } + + private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") + { + UInt32[] inArray = new UInt32[Op1ElementCount]; + UInt64[] outArray = new UInt64[RetElementCount]; + + Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), 16); + Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), VectorSize); + + ValidateResult(inArray, outArray, method); + } + + private void ValidateResult(UInt32[] firstOp, UInt64[] result, [CallerMemberName] string method = "") + { + if (result[0] != firstOp[0]) + { + Succeeded = false; + } + else + { + for (var i = 1; i < RetElementCount; i++) + { + if (result[i] != firstOp[i]) + { + Succeeded = false; + break; + } + } + } + + if (!Succeeded) + { + Console.WriteLine($"{nameof(Avx512F)}.{nameof(Avx512F.ConvertToVector512Int64)}(Vector256): {method} failed:"); + Console.WriteLine($" firstOp: ({string.Join(", ", firstOp)})"); + Console.WriteLine($" result: ({string.Join(", ", result)})"); + Console.WriteLine(); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/ConvertToVector512UInt32.Byte.cs b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/ConvertToVector512UInt32.Byte.cs new file mode 100644 index 0000000000000..b65ff0cd5a004 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/ConvertToVector512UInt32.Byte.cs @@ -0,0 +1,308 @@ +// 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\X86\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.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Runtime.Intrinsics; +using System.Runtime.Intrinsics.X86; +using Xunit; + +namespace JIT.HardwareIntrinsics.X86._Avx512F.handwritten +{ + public static partial class Program + { + [Fact] + public static void ConvertToVector512UInt32Byte() + { + var test = new SimpleUnaryOpTest__ConvertToVector512UInt32Byte(); + + if (test.IsSupported) + { + // Validates basic functionality works, using Unsafe.Read + test.RunBasicScenario_UnsafeRead(); + + if (Avx.IsSupported) + { + // Validates basic functionality works, using Load + test.RunBasicScenario_Load(); + + // Validates basic functionality works, using LoadAligned + test.RunBasicScenario_LoadAligned(); + } + + // Validates calling via reflection works, using Unsafe.Read + test.RunReflectionScenario_UnsafeRead(); + + if (Avx.IsSupported) + { + // Validates calling via reflection works, using Load + test.RunReflectionScenario_Load(); + + // Validates calling via reflection works, using LoadAligned + test.RunReflectionScenario_LoadAligned(); + } + + // Validates passing a static member works + test.RunClsVarScenario(); + + // Validates passing a local works, using Unsafe.Read + test.RunLclVarScenario_UnsafeRead(); + + if (Avx.IsSupported) + { + // Validates passing a local works, using Load + test.RunLclVarScenario_Load(); + + // Validates passing a local works, using LoadAligned + test.RunLclVarScenario_LoadAligned(); + } + + // Validates passing the field of a local works + test.RunLclFldScenario(); + + // Validates passing an instance member works + test.RunFldScenario(); + } + 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 SimpleUnaryOpTest__ConvertToVector512UInt32Byte + { + private const int VectorSize = 64; + + private const int Op1ElementCount = 16 / sizeof(Byte); + private const int RetElementCount = VectorSize / sizeof(UInt32); + + private static Byte[] _data = new Byte[Op1ElementCount]; + + private static Vector128 _clsVar; + + private Vector128 _fld; + + private SimpleUnaryOpTest__DataTable _dataTable; + + static SimpleUnaryOpTest__ConvertToVector512UInt32Byte() + { + var random = new Random(); + + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)(random.Next(0, byte.MaxValue)); } + Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), 16); + } + + public SimpleUnaryOpTest__ConvertToVector512UInt32Byte() + { + Succeeded = true; + + var random = new Random(); + + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)(random.Next(0, byte.MaxValue)); } + Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), 16); + + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)(random.Next(0, byte.MaxValue)); } + _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt32[RetElementCount], VectorSize); + } + + public bool IsSupported => Avx512F.IsSupported; + + public bool Succeeded { get; set; } + + public void RunBasicScenario_UnsafeRead() + { + var result = Avx512F.ConvertToVector512UInt32( + Unsafe.Read>(_dataTable.inArrayPtr) + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunBasicScenario_Load() + { + var result = Avx512F.ConvertToVector512UInt32( + Sse2.LoadVector128((Byte*)(_dataTable.inArrayPtr)) + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunBasicScenario_LoadAligned() + { + var result = Avx512F.ConvertToVector512UInt32( + Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArrayPtr)) + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunReflectionScenario_UnsafeRead() + { + var result = typeof(Avx512F).GetMethod(nameof(Avx512F.ConvertToVector512UInt32), new Type[] { typeof(Vector128) }) + .Invoke(null, new object[] { + Unsafe.Read>(_dataTable.inArrayPtr) + }); + + Unsafe.Write(_dataTable.outArrayPtr, (Vector512)(result)); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunReflectionScenario_Load() + { + var result = typeof(Avx512F).GetMethod(nameof(Avx512F.ConvertToVector512UInt32), new Type[] { typeof(Vector128) }) + .Invoke(null, new object[] { + Sse2.LoadVector128((Byte*)(_dataTable.inArrayPtr)) + }); + + Unsafe.Write(_dataTable.outArrayPtr, (Vector512)(result)); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunReflectionScenario_LoadAligned() + { + var result = typeof(Avx512F).GetMethod(nameof(Avx512F.ConvertToVector512UInt32), new Type[] { typeof(Vector128) }) + .Invoke(null, new object[] { + Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArrayPtr)) + }); + + Unsafe.Write(_dataTable.outArrayPtr, (Vector512)(result)); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunClsVarScenario() + { + var result = Avx512F.ConvertToVector512UInt32( + _clsVar + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_clsVar, _dataTable.outArrayPtr); + } + + public void RunLclVarScenario_UnsafeRead() + { + var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); + var result = Avx512F.ConvertToVector512UInt32(firstOp); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(firstOp, _dataTable.outArrayPtr); + } + + public void RunLclVarScenario_Load() + { + var firstOp = Sse2.LoadVector128((Byte*)(_dataTable.inArrayPtr)); + var result = Avx512F.ConvertToVector512UInt32(firstOp); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(firstOp, _dataTable.outArrayPtr); + } + + public void RunLclVarScenario_LoadAligned() + { + var firstOp = Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArrayPtr)); + var result = Avx512F.ConvertToVector512UInt32(firstOp); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(firstOp, _dataTable.outArrayPtr); + } + + public void RunLclFldScenario() + { + var test = new SimpleUnaryOpTest__ConvertToVector512UInt32Byte(); + var result = Avx512F.ConvertToVector512UInt32(test._fld); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(test._fld, _dataTable.outArrayPtr); + } + + public void RunFldScenario() + { + var result = Avx512F.ConvertToVector512UInt32(_fld); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_fld, _dataTable.outArrayPtr); + } + + public void RunUnsupportedScenario() + { + Succeeded = false; + + try + { + RunBasicScenario_UnsafeRead(); + } + catch (PlatformNotSupportedException) + { + Succeeded = true; + } + } + + private void ValidateResult(Vector128 firstOp, void* result, [CallerMemberName] string method = "") + { + Byte[] inArray = new Byte[Op1ElementCount]; + UInt32[] outArray = new UInt32[RetElementCount]; + + Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); + Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), VectorSize); + + ValidateResult(inArray, outArray, method); + } + + private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") + { + Byte[] inArray = new Byte[Op1ElementCount]; + UInt32[] outArray = new UInt32[RetElementCount]; + + Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), 16); + Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), VectorSize); + + ValidateResult(inArray, outArray, method); + } + + private void ValidateResult(Byte[] firstOp, UInt32[] result, [CallerMemberName] string method = "") + { + if (result[0] != firstOp[0]) + { + Succeeded = false; + } + else + { + for (var i = 1; i < RetElementCount; i++) + { + if (result[i] != firstOp[i]) + { + Succeeded = false; + break; + } + } + } + + if (!Succeeded) + { + Console.WriteLine($"{nameof(Avx512F)}.{nameof(Avx512F.ConvertToVector512UInt32)}(Vector128): {method} failed:"); + Console.WriteLine($" firstOp: ({string.Join(", ", firstOp)})"); + Console.WriteLine($" result: ({string.Join(", ", result)})"); + Console.WriteLine(); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/ConvertToVector512UInt32.Int16.cs b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/ConvertToVector512UInt32.Int16.cs new file mode 100644 index 0000000000000..74741dbac2490 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/ConvertToVector512UInt32.Int16.cs @@ -0,0 +1,308 @@ +// 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\X86\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.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Runtime.Intrinsics; +using System.Runtime.Intrinsics.X86; +using Xunit; + +namespace JIT.HardwareIntrinsics.X86._Avx512F.handwritten +{ + public static partial class Program + { + [Fact] + public static void ConvertToVector512UInt32Int16() + { + var test = new SimpleUnaryOpTest__ConvertToVector512UInt32Int16(); + + if (test.IsSupported) + { + // Validates basic functionality works, using Unsafe.Read + test.RunBasicScenario_UnsafeRead(); + + if (Avx.IsSupported) + { + // Validates basic functionality works, using Load + test.RunBasicScenario_Load(); + + // Validates basic functionality works, using LoadAligned + test.RunBasicScenario_LoadAligned(); + } + + // Validates calling via reflection works, using Unsafe.Read + test.RunReflectionScenario_UnsafeRead(); + + if (Avx.IsSupported) + { + // Validates calling via reflection works, using Load + test.RunReflectionScenario_Load(); + + // Validates calling via reflection works, using LoadAligned + test.RunReflectionScenario_LoadAligned(); + } + + // Validates passing a static member works + test.RunClsVarScenario(); + + // Validates passing a local works, using Unsafe.Read + test.RunLclVarScenario_UnsafeRead(); + + if (Avx.IsSupported) + { + // Validates passing a local works, using Load + test.RunLclVarScenario_Load(); + + // Validates passing a local works, using LoadAligned + test.RunLclVarScenario_LoadAligned(); + } + + // Validates passing the field of a local works + test.RunLclFldScenario(); + + // Validates passing an instance member works + test.RunFldScenario(); + } + 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 SimpleUnaryOpTest__ConvertToVector512UInt32Int16 + { + private const int VectorSize = 64; + + private const int Op1ElementCount = 32 / sizeof(Int16); + private const int RetElementCount = VectorSize / sizeof(UInt32); + + private static Int16[] _data = new Int16[Op1ElementCount]; + + private static Vector256 _clsVar; + + private Vector256 _fld; + + private SimpleUnaryOpTest__DataTable _dataTable; + + static SimpleUnaryOpTest__ConvertToVector512UInt32Int16() + { + var random = new Random(); + + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), 16); + } + + public SimpleUnaryOpTest__ConvertToVector512UInt32Int16() + { + Succeeded = true; + + var random = new Random(); + + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), 16); + + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int32[RetElementCount], VectorSize); + } + + public bool IsSupported => Avx512F.IsSupported; + + public bool Succeeded { get; set; } + + public void RunBasicScenario_UnsafeRead() + { + var result = Avx512F.ConvertToVector512UInt32( + Unsafe.Read>(_dataTable.inArrayPtr) + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunBasicScenario_Load() + { + var result = Avx512F.ConvertToVector512UInt32( + Avx.LoadVector256((Int16*)(_dataTable.inArrayPtr)) + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunBasicScenario_LoadAligned() + { + var result = Avx512F.ConvertToVector512UInt32( + Avx.LoadAlignedVector256((Int16*)(_dataTable.inArrayPtr)) + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunReflectionScenario_UnsafeRead() + { + var result = typeof(Avx512F).GetMethod(nameof(Avx512F.ConvertToVector512UInt32), new Type[] { typeof(Vector256) }) + .Invoke(null, new object[] { + Unsafe.Read>(_dataTable.inArrayPtr) + }); + + Unsafe.Write(_dataTable.outArrayPtr, (Vector512)(result)); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunReflectionScenario_Load() + { + var result = typeof(Avx512F).GetMethod(nameof(Avx512F.ConvertToVector512UInt32), new Type[] { typeof(Vector256) }) + .Invoke(null, new object[] { + Avx.LoadVector256((Int16*)(_dataTable.inArrayPtr)) + }); + + Unsafe.Write(_dataTable.outArrayPtr, (Vector512)(result)); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunReflectionScenario_LoadAligned() + { + var result = typeof(Avx512F).GetMethod(nameof(Avx512F.ConvertToVector512UInt32), new Type[] { typeof(Vector256) }) + .Invoke(null, new object[] { + Avx.LoadAlignedVector256((Int16*)(_dataTable.inArrayPtr)) + }); + + Unsafe.Write(_dataTable.outArrayPtr, (Vector512)(result)); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunClsVarScenario() + { + var result = Avx512F.ConvertToVector512UInt32( + _clsVar + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_clsVar, _dataTable.outArrayPtr); + } + + public void RunLclVarScenario_UnsafeRead() + { + var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); + var result = Avx512F.ConvertToVector512UInt32(firstOp); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(firstOp, _dataTable.outArrayPtr); + } + + public void RunLclVarScenario_Load() + { + var firstOp = Avx.LoadVector256((Int16*)(_dataTable.inArrayPtr)); + var result = Avx512F.ConvertToVector512UInt32(firstOp); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(firstOp, _dataTable.outArrayPtr); + } + + public void RunLclVarScenario_LoadAligned() + { + var firstOp = Avx.LoadAlignedVector256((Int16*)(_dataTable.inArrayPtr)); + var result = Avx512F.ConvertToVector512UInt32(firstOp); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(firstOp, _dataTable.outArrayPtr); + } + + public void RunLclFldScenario() + { + var test = new SimpleUnaryOpTest__ConvertToVector512UInt32Int16(); + var result = Avx512F.ConvertToVector512UInt32(test._fld); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(test._fld, _dataTable.outArrayPtr); + } + + public void RunFldScenario() + { + var result = Avx512F.ConvertToVector512UInt32(_fld); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_fld, _dataTable.outArrayPtr); + } + + public void RunUnsupportedScenario() + { + Succeeded = false; + + try + { + RunBasicScenario_UnsafeRead(); + } + catch (PlatformNotSupportedException) + { + Succeeded = true; + } + } + + private void ValidateResult(Vector256 firstOp, void* result, [CallerMemberName] string method = "") + { + Int16[] inArray = new Int16[Op1ElementCount]; + Int32[] outArray = new Int32[RetElementCount]; + + Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); + Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), VectorSize); + + ValidateResult(inArray, outArray, method); + } + + private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") + { + Int16[] inArray = new Int16[Op1ElementCount]; + Int32[] outArray = new Int32[RetElementCount]; + + Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), 16); + Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), VectorSize); + + ValidateResult(inArray, outArray, method); + } + + private void ValidateResult(Int16[] firstOp, Int32[] result, [CallerMemberName] string method = "") + { + if (result[0] != firstOp[0]) + { + Succeeded = false; + } + else + { + for (var i = 1; i < RetElementCount; i++) + { + if (result[i] != firstOp[i]) + { + Succeeded = false; + break; + } + } + } + + if (!Succeeded) + { + Console.WriteLine($"{nameof(Avx512F)}.{nameof(Avx512F.ConvertToVector512UInt32)}(Vector256): {method} failed:"); + Console.WriteLine($" firstOp: ({string.Join(", ", firstOp)})"); + Console.WriteLine($" result: ({string.Join(", ", result)})"); + Console.WriteLine(); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/ConvertToVector512UInt32.SByte.cs b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/ConvertToVector512UInt32.SByte.cs new file mode 100644 index 0000000000000..6c00ab9a76247 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/ConvertToVector512UInt32.SByte.cs @@ -0,0 +1,308 @@ +// 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\X86\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.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Runtime.Intrinsics; +using System.Runtime.Intrinsics.X86; +using Xunit; + +namespace JIT.HardwareIntrinsics.X86._Avx512F.handwritten +{ + public static partial class Program + { + [Fact] + public static void ConvertToVector512UInt32SByte() + { + var test = new SimpleUnaryOpTest__ConvertToVector512UInt32SByte(); + + if (test.IsSupported) + { + // Validates basic functionality works, using Unsafe.Read + test.RunBasicScenario_UnsafeRead(); + + if (Avx.IsSupported) + { + // Validates basic functionality works, using Load + test.RunBasicScenario_Load(); + + // Validates basic functionality works, using LoadAligned + test.RunBasicScenario_LoadAligned(); + } + + // Validates calling via reflection works, using Unsafe.Read + test.RunReflectionScenario_UnsafeRead(); + + if (Avx.IsSupported) + { + // Validates calling via reflection works, using Load + test.RunReflectionScenario_Load(); + + // Validates calling via reflection works, using LoadAligned + test.RunReflectionScenario_LoadAligned(); + } + + // Validates passing a static member works + test.RunClsVarScenario(); + + // Validates passing a local works, using Unsafe.Read + test.RunLclVarScenario_UnsafeRead(); + + if (Avx.IsSupported) + { + // Validates passing a local works, using Load + test.RunLclVarScenario_Load(); + + // Validates passing a local works, using LoadAligned + test.RunLclVarScenario_LoadAligned(); + } + + // Validates passing the field of a local works + test.RunLclFldScenario(); + + // Validates passing an instance member works + test.RunFldScenario(); + } + 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 SimpleUnaryOpTest__ConvertToVector512UInt32SByte + { + private const int VectorSize = 64; + + private const int Op1ElementCount = 16 / sizeof(SByte); + private const int RetElementCount = VectorSize / sizeof(UInt32); + + private static SByte[] _data = new SByte[Op1ElementCount]; + + private static Vector128 _clsVar; + + private Vector128 _fld; + + private SimpleUnaryOpTest__DataTable _dataTable; + + static SimpleUnaryOpTest__ConvertToVector512UInt32SByte() + { + var random = new Random(); + + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), 16); + } + + public SimpleUnaryOpTest__ConvertToVector512UInt32SByte() + { + Succeeded = true; + + var random = new Random(); + + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), 16); + + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int32[RetElementCount], VectorSize); + } + + public bool IsSupported => Avx512F.IsSupported; + + public bool Succeeded { get; set; } + + public void RunBasicScenario_UnsafeRead() + { + var result = Avx512F.ConvertToVector512UInt32( + Unsafe.Read>(_dataTable.inArrayPtr) + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunBasicScenario_Load() + { + var result = Avx512F.ConvertToVector512UInt32( + Sse2.LoadVector128((SByte*)(_dataTable.inArrayPtr)) + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunBasicScenario_LoadAligned() + { + var result = Avx512F.ConvertToVector512UInt32( + Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArrayPtr)) + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunReflectionScenario_UnsafeRead() + { + var result = typeof(Avx512F).GetMethod(nameof(Avx512F.ConvertToVector512UInt32), new Type[] { typeof(Vector128) }) + .Invoke(null, new object[] { + Unsafe.Read>(_dataTable.inArrayPtr) + }); + + Unsafe.Write(_dataTable.outArrayPtr, (Vector512)(result)); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunReflectionScenario_Load() + { + var result = typeof(Avx512F).GetMethod(nameof(Avx512F.ConvertToVector512UInt32), new Type[] { typeof(Vector128) }) + .Invoke(null, new object[] { + Sse2.LoadVector128((SByte*)(_dataTable.inArrayPtr)) + }); + + Unsafe.Write(_dataTable.outArrayPtr, (Vector512)(result)); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunReflectionScenario_LoadAligned() + { + var result = typeof(Avx512F).GetMethod(nameof(Avx512F.ConvertToVector512UInt32), new Type[] { typeof(Vector128) }) + .Invoke(null, new object[] { + Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArrayPtr)) + }); + + Unsafe.Write(_dataTable.outArrayPtr, (Vector512)(result)); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunClsVarScenario() + { + var result = Avx512F.ConvertToVector512UInt32( + _clsVar + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_clsVar, _dataTable.outArrayPtr); + } + + public void RunLclVarScenario_UnsafeRead() + { + var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); + var result = Avx512F.ConvertToVector512UInt32(firstOp); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(firstOp, _dataTable.outArrayPtr); + } + + public void RunLclVarScenario_Load() + { + var firstOp = Sse2.LoadVector128((SByte*)(_dataTable.inArrayPtr)); + var result = Avx512F.ConvertToVector512UInt32(firstOp); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(firstOp, _dataTable.outArrayPtr); + } + + public void RunLclVarScenario_LoadAligned() + { + var firstOp = Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArrayPtr)); + var result = Avx512F.ConvertToVector512UInt32(firstOp); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(firstOp, _dataTable.outArrayPtr); + } + + public void RunLclFldScenario() + { + var test = new SimpleUnaryOpTest__ConvertToVector512UInt32SByte(); + var result = Avx512F.ConvertToVector512UInt32(test._fld); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(test._fld, _dataTable.outArrayPtr); + } + + public void RunFldScenario() + { + var result = Avx512F.ConvertToVector512UInt32(_fld); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_fld, _dataTable.outArrayPtr); + } + + public void RunUnsupportedScenario() + { + Succeeded = false; + + try + { + RunBasicScenario_UnsafeRead(); + } + catch (PlatformNotSupportedException) + { + Succeeded = true; + } + } + + private void ValidateResult(Vector128 firstOp, void* result, [CallerMemberName] string method = "") + { + SByte[] inArray = new SByte[Op1ElementCount]; + Int32[] outArray = new Int32[RetElementCount]; + + Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); + Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), VectorSize); + + ValidateResult(inArray, outArray, method); + } + + private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") + { + SByte[] inArray = new SByte[Op1ElementCount]; + Int32[] outArray = new Int32[RetElementCount]; + + Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), 16); + Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), VectorSize); + + ValidateResult(inArray, outArray, method); + } + + private void ValidateResult(SByte[] firstOp, Int32[] result, [CallerMemberName] string method = "") + { + if (result[0] != firstOp[0]) + { + Succeeded = false; + } + else + { + for (var i = 1; i < RetElementCount; i++) + { + if (result[i] != firstOp[i]) + { + Succeeded = false; + break; + } + } + } + + if (!Succeeded) + { + Console.WriteLine($"{nameof(Avx512F)}.{nameof(Avx512F.ConvertToVector512UInt32)}(Vector128): {method} failed:"); + Console.WriteLine($" firstOp: ({string.Join(", ", firstOp)})"); + Console.WriteLine($" result: ({string.Join(", ", result)})"); + Console.WriteLine(); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/ConvertToVector512UInt32.UInt16.cs b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/ConvertToVector512UInt32.UInt16.cs new file mode 100644 index 0000000000000..4d40e06766c6a --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/ConvertToVector512UInt32.UInt16.cs @@ -0,0 +1,308 @@ +// 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\X86\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.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Runtime.Intrinsics; +using System.Runtime.Intrinsics.X86; +using Xunit; + +namespace JIT.HardwareIntrinsics.X86._Avx512F.handwritten +{ + public static partial class Program + { + [Fact] + public static void ConvertToVector512UInt32UInt16() + { + var test = new SimpleUnaryOpTest__ConvertToVector512UInt32UInt16(); + + if (test.IsSupported) + { + // Validates basic functionality works, using Unsafe.Read + test.RunBasicScenario_UnsafeRead(); + + if (Avx.IsSupported) + { + // Validates basic functionality works, using Load + test.RunBasicScenario_Load(); + + // Validates basic functionality works, using LoadAligned + test.RunBasicScenario_LoadAligned(); + } + + // Validates calling via reflection works, using Unsafe.Read + test.RunReflectionScenario_UnsafeRead(); + + if (Avx.IsSupported) + { + // Validates calling via reflection works, using Load + test.RunReflectionScenario_Load(); + + // Validates calling via reflection works, using LoadAligned + test.RunReflectionScenario_LoadAligned(); + } + + // Validates passing a static member works + test.RunClsVarScenario(); + + // Validates passing a local works, using Unsafe.Read + test.RunLclVarScenario_UnsafeRead(); + + if (Avx.IsSupported) + { + // Validates passing a local works, using Load + test.RunLclVarScenario_Load(); + + // Validates passing a local works, using LoadAligned + test.RunLclVarScenario_LoadAligned(); + } + + // Validates passing the field of a local works + test.RunLclFldScenario(); + + // Validates passing an instance member works + test.RunFldScenario(); + } + 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 SimpleUnaryOpTest__ConvertToVector512UInt32UInt16 + { + private const int VectorSize = 64; + + private const int Op1ElementCount = 32 / sizeof(UInt16); + private const int RetElementCount = VectorSize / sizeof(UInt32); + + private static UInt16[] _data = new UInt16[Op1ElementCount]; + + private static Vector256 _clsVar; + + private Vector256 _fld; + + private SimpleUnaryOpTest__DataTable _dataTable; + + static SimpleUnaryOpTest__ConvertToVector512UInt32UInt16() + { + var random = new Random(); + + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), 16); + } + + public SimpleUnaryOpTest__ConvertToVector512UInt32UInt16() + { + Succeeded = true; + + var random = new Random(); + + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), 16); + + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt32[RetElementCount], VectorSize); + } + + public bool IsSupported => Avx512F.IsSupported; + + public bool Succeeded { get; set; } + + public void RunBasicScenario_UnsafeRead() + { + var result = Avx512F.ConvertToVector512UInt32( + Unsafe.Read>(_dataTable.inArrayPtr) + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunBasicScenario_Load() + { + var result = Avx512F.ConvertToVector512UInt32( + Avx.LoadVector256((UInt16*)(_dataTable.inArrayPtr)) + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunBasicScenario_LoadAligned() + { + var result = Avx512F.ConvertToVector512UInt32( + Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArrayPtr)) + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunReflectionScenario_UnsafeRead() + { + var result = typeof(Avx512F).GetMethod(nameof(Avx512F.ConvertToVector512UInt32), new Type[] { typeof(Vector256) }) + .Invoke(null, new object[] { + Unsafe.Read>(_dataTable.inArrayPtr) + }); + + Unsafe.Write(_dataTable.outArrayPtr, (Vector512)(result)); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunReflectionScenario_Load() + { + var result = typeof(Avx512F).GetMethod(nameof(Avx512F.ConvertToVector512UInt32), new Type[] { typeof(Vector256) }) + .Invoke(null, new object[] { + Avx.LoadVector256((UInt16*)(_dataTable.inArrayPtr)) + }); + + Unsafe.Write(_dataTable.outArrayPtr, (Vector512)(result)); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunReflectionScenario_LoadAligned() + { + var result = typeof(Avx512F).GetMethod(nameof(Avx512F.ConvertToVector512UInt32), new Type[] { typeof(Vector256) }) + .Invoke(null, new object[] { + Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArrayPtr)) + }); + + Unsafe.Write(_dataTable.outArrayPtr, (Vector512)(result)); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunClsVarScenario() + { + var result = Avx512F.ConvertToVector512UInt32( + _clsVar + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_clsVar, _dataTable.outArrayPtr); + } + + public void RunLclVarScenario_UnsafeRead() + { + var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); + var result = Avx512F.ConvertToVector512UInt32(firstOp); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(firstOp, _dataTable.outArrayPtr); + } + + public void RunLclVarScenario_Load() + { + var firstOp = Avx.LoadVector256((UInt16*)(_dataTable.inArrayPtr)); + var result = Avx512F.ConvertToVector512UInt32(firstOp); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(firstOp, _dataTable.outArrayPtr); + } + + public void RunLclVarScenario_LoadAligned() + { + var firstOp = Avx.LoadAlignedVector256((UInt16*)(_dataTable.inArrayPtr)); + var result = Avx512F.ConvertToVector512UInt32(firstOp); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(firstOp, _dataTable.outArrayPtr); + } + + public void RunLclFldScenario() + { + var test = new SimpleUnaryOpTest__ConvertToVector512UInt32UInt16(); + var result = Avx512F.ConvertToVector512UInt32(test._fld); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(test._fld, _dataTable.outArrayPtr); + } + + public void RunFldScenario() + { + var result = Avx512F.ConvertToVector512UInt32(_fld); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_fld, _dataTable.outArrayPtr); + } + + public void RunUnsupportedScenario() + { + Succeeded = false; + + try + { + RunBasicScenario_UnsafeRead(); + } + catch (PlatformNotSupportedException) + { + Succeeded = true; + } + } + + private void ValidateResult(Vector256 firstOp, void* result, [CallerMemberName] string method = "") + { + UInt16[] inArray = new UInt16[Op1ElementCount]; + UInt32[] outArray = new UInt32[RetElementCount]; + + Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); + Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), VectorSize); + + ValidateResult(inArray, outArray, method); + } + + private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") + { + UInt16[] inArray = new UInt16[Op1ElementCount]; + UInt32[] outArray = new UInt32[RetElementCount]; + + Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), 16); + Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), VectorSize); + + ValidateResult(inArray, outArray, method); + } + + private void ValidateResult(UInt16[] firstOp, UInt32[] result, [CallerMemberName] string method = "") + { + if (result[0] != firstOp[0]) + { + Succeeded = false; + } + else + { + for (var i = 1; i < RetElementCount; i++) + { + if (result[i] != firstOp[i]) + { + Succeeded = false; + break; + } + } + } + + if (!Succeeded) + { + Console.WriteLine($"{nameof(Avx512F)}.{nameof(Avx512F.ConvertToVector512UInt32)}(Vector256): {method} failed:"); + Console.WriteLine($" firstOp: ({string.Join(", ", firstOp)})"); + Console.WriteLine($" result: ({string.Join(", ", result)})"); + Console.WriteLine(); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/ConvertToVector512UInt64.Byte.cs b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/ConvertToVector512UInt64.Byte.cs new file mode 100644 index 0000000000000..e8e4fb5d5912a --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/ConvertToVector512UInt64.Byte.cs @@ -0,0 +1,308 @@ +// 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\X86\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.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Runtime.Intrinsics; +using System.Runtime.Intrinsics.X86; +using Xunit; + +namespace JIT.HardwareIntrinsics.X86._Avx512F.handwritten +{ + public static partial class Program + { + [Fact] + public static void ConvertToVector512UInt64Byte() + { + var test = new SimpleUnaryOpTest__ConvertToVector512UInt64Byte(); + + if (test.IsSupported) + { + // Validates basic functionality works, using Unsafe.Read + test.RunBasicScenario_UnsafeRead(); + + if (Avx.IsSupported) + { + // Validates basic functionality works, using Load + test.RunBasicScenario_Load(); + + // Validates basic functionality works, using LoadAligned + test.RunBasicScenario_LoadAligned(); + } + + // Validates calling via reflection works, using Unsafe.Read + test.RunReflectionScenario_UnsafeRead(); + + if (Avx.IsSupported) + { + // Validates calling via reflection works, using Load + test.RunReflectionScenario_Load(); + + // Validates calling via reflection works, using LoadAligned + test.RunReflectionScenario_LoadAligned(); + } + + // Validates passing a static member works + test.RunClsVarScenario(); + + // Validates passing a local works, using Unsafe.Read + test.RunLclVarScenario_UnsafeRead(); + + if (Avx.IsSupported) + { + // Validates passing a local works, using Load + test.RunLclVarScenario_Load(); + + // Validates passing a local works, using LoadAligned + test.RunLclVarScenario_LoadAligned(); + } + + // Validates passing the field of a local works + test.RunLclFldScenario(); + + // Validates passing an instance member works + test.RunFldScenario(); + } + 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 SimpleUnaryOpTest__ConvertToVector512UInt64Byte + { + private const int VectorSize = 64; + + private const int Op1ElementCount = 16 / sizeof(Byte); + private const int RetElementCount = VectorSize / sizeof(UInt64); + + private static Byte[] _data = new Byte[Op1ElementCount]; + + private static Vector128 _clsVar; + + private Vector128 _fld; + + private SimpleUnaryOpTest__DataTable _dataTable; + + static SimpleUnaryOpTest__ConvertToVector512UInt64Byte() + { + var random = new Random(); + + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)(random.Next(0, byte.MaxValue)); } + Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), 16); + } + + public SimpleUnaryOpTest__ConvertToVector512UInt64Byte() + { + Succeeded = true; + + var random = new Random(); + + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)(random.Next(0, byte.MaxValue)); } + Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), 16); + + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)(random.Next(0, byte.MaxValue)); } + _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt64[RetElementCount], VectorSize); + } + + public bool IsSupported => Avx512F.IsSupported; + + public bool Succeeded { get; set; } + + public void RunBasicScenario_UnsafeRead() + { + var result = Avx512F.ConvertToVector512UInt64( + Unsafe.Read>(_dataTable.inArrayPtr) + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunBasicScenario_Load() + { + var result = Avx512F.ConvertToVector512UInt64( + Sse2.LoadVector128((Byte*)(_dataTable.inArrayPtr)) + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunBasicScenario_LoadAligned() + { + var result = Avx512F.ConvertToVector512UInt64( + Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArrayPtr)) + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunReflectionScenario_UnsafeRead() + { + var result = typeof(Avx512F).GetMethod(nameof(Avx512F.ConvertToVector512UInt64), new Type[] { typeof(Vector128) }) + .Invoke(null, new object[] { + Unsafe.Read>(_dataTable.inArrayPtr) + }); + + Unsafe.Write(_dataTable.outArrayPtr, (Vector512)(result)); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunReflectionScenario_Load() + { + var result = typeof(Avx512F).GetMethod(nameof(Avx512F.ConvertToVector512UInt64), new Type[] { typeof(Vector128) }) + .Invoke(null, new object[] { + Sse2.LoadVector128((Byte*)(_dataTable.inArrayPtr)) + }); + + Unsafe.Write(_dataTable.outArrayPtr, (Vector512)(result)); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunReflectionScenario_LoadAligned() + { + var result = typeof(Avx512F).GetMethod(nameof(Avx512F.ConvertToVector512UInt64), new Type[] { typeof(Vector128) }) + .Invoke(null, new object[] { + Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArrayPtr)) + }); + + Unsafe.Write(_dataTable.outArrayPtr, (Vector512)(result)); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunClsVarScenario() + { + var result = Avx512F.ConvertToVector512UInt64( + _clsVar + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_clsVar, _dataTable.outArrayPtr); + } + + public void RunLclVarScenario_UnsafeRead() + { + var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); + var result = Avx512F.ConvertToVector512UInt64(firstOp); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(firstOp, _dataTable.outArrayPtr); + } + + public void RunLclVarScenario_Load() + { + var firstOp = Sse2.LoadVector128((Byte*)(_dataTable.inArrayPtr)); + var result = Avx512F.ConvertToVector512UInt64(firstOp); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(firstOp, _dataTable.outArrayPtr); + } + + public void RunLclVarScenario_LoadAligned() + { + var firstOp = Sse2.LoadAlignedVector128((Byte*)(_dataTable.inArrayPtr)); + var result = Avx512F.ConvertToVector512UInt64(firstOp); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(firstOp, _dataTable.outArrayPtr); + } + + public void RunLclFldScenario() + { + var test = new SimpleUnaryOpTest__ConvertToVector512UInt64Byte(); + var result = Avx512F.ConvertToVector512UInt64(test._fld); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(test._fld, _dataTable.outArrayPtr); + } + + public void RunFldScenario() + { + var result = Avx512F.ConvertToVector512UInt64(_fld); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_fld, _dataTable.outArrayPtr); + } + + public void RunUnsupportedScenario() + { + Succeeded = false; + + try + { + RunBasicScenario_UnsafeRead(); + } + catch (PlatformNotSupportedException) + { + Succeeded = true; + } + } + + private void ValidateResult(Vector128 firstOp, void* result, [CallerMemberName] string method = "") + { + Byte[] inArray = new Byte[Op1ElementCount]; + UInt64[] outArray = new UInt64[RetElementCount]; + + Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); + Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), VectorSize); + + ValidateResult(inArray, outArray, method); + } + + private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") + { + Byte[] inArray = new Byte[Op1ElementCount]; + UInt64[] outArray = new UInt64[RetElementCount]; + + Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), 16); + Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), VectorSize); + + ValidateResult(inArray, outArray, method); + } + + private void ValidateResult(Byte[] firstOp, UInt64[] result, [CallerMemberName] string method = "") + { + if (result[0] != firstOp[0]) + { + Succeeded = false; + } + else + { + for (var i = 1; i < RetElementCount; i++) + { + if (result[i] != firstOp[i]) + { + Succeeded = false; + break; + } + } + } + + if (!Succeeded) + { + Console.WriteLine($"{nameof(Avx512F)}.{nameof(Avx512F.ConvertToVector512UInt64)}(Vector128): {method} failed:"); + Console.WriteLine($" firstOp: ({string.Join(", ", firstOp)})"); + Console.WriteLine($" result: ({string.Join(", ", result)})"); + Console.WriteLine(); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/ConvertToVector512UInt64.Int16.cs b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/ConvertToVector512UInt64.Int16.cs new file mode 100644 index 0000000000000..9f4c978047fc9 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/ConvertToVector512UInt64.Int16.cs @@ -0,0 +1,308 @@ +// 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\X86\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.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Runtime.Intrinsics; +using System.Runtime.Intrinsics.X86; +using Xunit; + +namespace JIT.HardwareIntrinsics.X86._Avx512F.handwritten +{ + public static partial class Program + { + [Fact] + public static void ConvertToVector512UInt64Int16() + { + var test = new SimpleUnaryOpTest__ConvertToVector512UInt64Int16(); + + if (test.IsSupported) + { + // Validates basic functionality works, using Unsafe.Read + test.RunBasicScenario_UnsafeRead(); + + if (Avx.IsSupported) + { + // Validates basic functionality works, using Load + test.RunBasicScenario_Load(); + + // Validates basic functionality works, using LoadAligned + test.RunBasicScenario_LoadAligned(); + } + + // Validates calling via reflection works, using Unsafe.Read + test.RunReflectionScenario_UnsafeRead(); + + if (Avx.IsSupported) + { + // Validates calling via reflection works, using Load + test.RunReflectionScenario_Load(); + + // Validates calling via reflection works, using LoadAligned + test.RunReflectionScenario_LoadAligned(); + } + + // Validates passing a static member works + test.RunClsVarScenario(); + + // Validates passing a local works, using Unsafe.Read + test.RunLclVarScenario_UnsafeRead(); + + if (Avx.IsSupported) + { + // Validates passing a local works, using Load + test.RunLclVarScenario_Load(); + + // Validates passing a local works, using LoadAligned + test.RunLclVarScenario_LoadAligned(); + } + + // Validates passing the field of a local works + test.RunLclFldScenario(); + + // Validates passing an instance member works + test.RunFldScenario(); + } + 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 SimpleUnaryOpTest__ConvertToVector512UInt64Int16 + { + private const int VectorSize = 64; + + private const int Op1ElementCount = 16 / sizeof(Int16); + private const int RetElementCount = VectorSize / sizeof(UInt64); + + private static Int16[] _data = new Int16[Op1ElementCount]; + + private static Vector128 _clsVar; + + private Vector128 _fld; + + private SimpleUnaryOpTest__DataTable _dataTable; + + static SimpleUnaryOpTest__ConvertToVector512UInt64Int16() + { + var random = new Random(); + + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), 16); + } + + public SimpleUnaryOpTest__ConvertToVector512UInt64Int16() + { + Succeeded = true; + + var random = new Random(); + + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), 16); + + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int64[RetElementCount], VectorSize); + } + + public bool IsSupported => Avx512F.IsSupported; + + public bool Succeeded { get; set; } + + public void RunBasicScenario_UnsafeRead() + { + var result = Avx512F.ConvertToVector512UInt64( + Unsafe.Read>(_dataTable.inArrayPtr) + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunBasicScenario_Load() + { + var result = Avx512F.ConvertToVector512UInt64( + Sse2.LoadVector128((Int16*)(_dataTable.inArrayPtr)) + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunBasicScenario_LoadAligned() + { + var result = Avx512F.ConvertToVector512UInt64( + Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArrayPtr)) + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunReflectionScenario_UnsafeRead() + { + var result = typeof(Avx512F).GetMethod(nameof(Avx512F.ConvertToVector512UInt64), new Type[] { typeof(Vector128) }) + .Invoke(null, new object[] { + Unsafe.Read>(_dataTable.inArrayPtr) + }); + + Unsafe.Write(_dataTable.outArrayPtr, (Vector512)(result)); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunReflectionScenario_Load() + { + var result = typeof(Avx512F).GetMethod(nameof(Avx512F.ConvertToVector512UInt64), new Type[] { typeof(Vector128) }) + .Invoke(null, new object[] { + Sse2.LoadVector128((Int16*)(_dataTable.inArrayPtr)) + }); + + Unsafe.Write(_dataTable.outArrayPtr, (Vector512)(result)); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunReflectionScenario_LoadAligned() + { + var result = typeof(Avx512F).GetMethod(nameof(Avx512F.ConvertToVector512UInt64), new Type[] { typeof(Vector128) }) + .Invoke(null, new object[] { + Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArrayPtr)) + }); + + Unsafe.Write(_dataTable.outArrayPtr, (Vector512)(result)); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunClsVarScenario() + { + var result = Avx512F.ConvertToVector512UInt64( + _clsVar + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_clsVar, _dataTable.outArrayPtr); + } + + public void RunLclVarScenario_UnsafeRead() + { + var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); + var result = Avx512F.ConvertToVector512UInt64(firstOp); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(firstOp, _dataTable.outArrayPtr); + } + + public void RunLclVarScenario_Load() + { + var firstOp = Sse2.LoadVector128((Int16*)(_dataTable.inArrayPtr)); + var result = Avx512F.ConvertToVector512UInt64(firstOp); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(firstOp, _dataTable.outArrayPtr); + } + + public void RunLclVarScenario_LoadAligned() + { + var firstOp = Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArrayPtr)); + var result = Avx512F.ConvertToVector512UInt64(firstOp); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(firstOp, _dataTable.outArrayPtr); + } + + public void RunLclFldScenario() + { + var test = new SimpleUnaryOpTest__ConvertToVector512UInt64Int16(); + var result = Avx512F.ConvertToVector512UInt64(test._fld); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(test._fld, _dataTable.outArrayPtr); + } + + public void RunFldScenario() + { + var result = Avx512F.ConvertToVector512UInt64(_fld); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_fld, _dataTable.outArrayPtr); + } + + public void RunUnsupportedScenario() + { + Succeeded = false; + + try + { + RunBasicScenario_UnsafeRead(); + } + catch (PlatformNotSupportedException) + { + Succeeded = true; + } + } + + private void ValidateResult(Vector128 firstOp, void* result, [CallerMemberName] string method = "") + { + Int16[] inArray = new Int16[Op1ElementCount]; + Int64[] outArray = new Int64[RetElementCount]; + + Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); + Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), VectorSize); + + ValidateResult(inArray, outArray, method); + } + + private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") + { + Int16[] inArray = new Int16[Op1ElementCount]; + Int64[] outArray = new Int64[RetElementCount]; + + Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), 16); + Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), VectorSize); + + ValidateResult(inArray, outArray, method); + } + + private void ValidateResult(Int16[] firstOp, Int64[] result, [CallerMemberName] string method = "") + { + if (result[0] != firstOp[0]) + { + Succeeded = false; + } + else + { + for (var i = 1; i < RetElementCount; i++) + { + if (result[i] != firstOp[i]) + { + Succeeded = false; + break; + } + } + } + + if (!Succeeded) + { + Console.WriteLine($"{nameof(Avx512F)}.{nameof(Avx512F.ConvertToVector512UInt64)}(Vector128): {method} failed:"); + Console.WriteLine($" firstOp: ({string.Join(", ", firstOp)})"); + Console.WriteLine($" result: ({string.Join(", ", result)})"); + Console.WriteLine(); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/ConvertToVector512UInt64.Int32.cs b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/ConvertToVector512UInt64.Int32.cs new file mode 100644 index 0000000000000..746bcc7d91572 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/ConvertToVector512UInt64.Int32.cs @@ -0,0 +1,308 @@ +// 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\X86\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.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Runtime.Intrinsics; +using System.Runtime.Intrinsics.X86; +using Xunit; + +namespace JIT.HardwareIntrinsics.X86._Avx512F.handwritten +{ + public static partial class Program + { + [Fact] + public static void ConvertToVector512UInt64Int32() + { + var test = new SimpleUnaryOpTest__ConvertToVector512UInt64Int32(); + + if (test.IsSupported) + { + // Validates basic functionality works, using Unsafe.Read + test.RunBasicScenario_UnsafeRead(); + + if (Avx.IsSupported) + { + // Validates basic functionality works, using Load + test.RunBasicScenario_Load(); + + // Validates basic functionality works, using LoadAligned + test.RunBasicScenario_LoadAligned(); + } + + // Validates calling via reflection works, using Unsafe.Read + test.RunReflectionScenario_UnsafeRead(); + + if (Avx.IsSupported) + { + // Validates calling via reflection works, using Load + test.RunReflectionScenario_Load(); + + // Validates calling via reflection works, using LoadAligned + test.RunReflectionScenario_LoadAligned(); + } + + // Validates passing a static member works + test.RunClsVarScenario(); + + // Validates passing a local works, using Unsafe.Read + test.RunLclVarScenario_UnsafeRead(); + + if (Avx.IsSupported) + { + // Validates passing a local works, using Load + test.RunLclVarScenario_Load(); + + // Validates passing a local works, using LoadAligned + test.RunLclVarScenario_LoadAligned(); + } + + // Validates passing the field of a local works + test.RunLclFldScenario(); + + // Validates passing an instance member works + test.RunFldScenario(); + } + 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 SimpleUnaryOpTest__ConvertToVector512UInt64Int32 + { + private const int VectorSize = 64; + + private const int Op1ElementCount = 32 / sizeof(Int32); + private const int RetElementCount = VectorSize / sizeof(UInt64); + + private static Int32[] _data = new Int32[Op1ElementCount]; + + private static Vector256 _clsVar; + + private Vector256 _fld; + + private SimpleUnaryOpTest__DataTable _dataTable; + + static SimpleUnaryOpTest__ConvertToVector512UInt64Int32() + { + var random = new Random(); + + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), 16); + } + + public SimpleUnaryOpTest__ConvertToVector512UInt64Int32() + { + Succeeded = true; + + var random = new Random(); + + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), 16); + + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int64[RetElementCount], VectorSize); + } + + public bool IsSupported => Avx512F.IsSupported; + + public bool Succeeded { get; set; } + + public void RunBasicScenario_UnsafeRead() + { + var result = Avx512F.ConvertToVector512UInt64( + Unsafe.Read>(_dataTable.inArrayPtr) + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunBasicScenario_Load() + { + var result = Avx512F.ConvertToVector512UInt64( + Avx.LoadVector256((Int32*)(_dataTable.inArrayPtr)) + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunBasicScenario_LoadAligned() + { + var result = Avx512F.ConvertToVector512UInt64( + Avx.LoadAlignedVector256((Int32*)(_dataTable.inArrayPtr)) + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunReflectionScenario_UnsafeRead() + { + var result = typeof(Avx512F).GetMethod(nameof(Avx512F.ConvertToVector512UInt64), new Type[] { typeof(Vector256) }) + .Invoke(null, new object[] { + Unsafe.Read>(_dataTable.inArrayPtr) + }); + + Unsafe.Write(_dataTable.outArrayPtr, (Vector512)(result)); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunReflectionScenario_Load() + { + var result = typeof(Avx512F).GetMethod(nameof(Avx512F.ConvertToVector512UInt64), new Type[] { typeof(Vector256) }) + .Invoke(null, new object[] { + Avx.LoadVector256((Int32*)(_dataTable.inArrayPtr)) + }); + + Unsafe.Write(_dataTable.outArrayPtr, (Vector512)(result)); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunReflectionScenario_LoadAligned() + { + var result = typeof(Avx512F).GetMethod(nameof(Avx512F.ConvertToVector512UInt64), new Type[] { typeof(Vector256) }) + .Invoke(null, new object[] { + Avx.LoadAlignedVector256((Int32*)(_dataTable.inArrayPtr)) + }); + + Unsafe.Write(_dataTable.outArrayPtr, (Vector512)(result)); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunClsVarScenario() + { + var result = Avx512F.ConvertToVector512UInt64( + _clsVar + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_clsVar, _dataTable.outArrayPtr); + } + + public void RunLclVarScenario_UnsafeRead() + { + var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); + var result = Avx512F.ConvertToVector512UInt64(firstOp); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(firstOp, _dataTable.outArrayPtr); + } + + public void RunLclVarScenario_Load() + { + var firstOp = Avx.LoadVector256((Int32*)(_dataTable.inArrayPtr)); + var result = Avx512F.ConvertToVector512UInt64(firstOp); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(firstOp, _dataTable.outArrayPtr); + } + + public void RunLclVarScenario_LoadAligned() + { + var firstOp = Avx.LoadAlignedVector256((Int32*)(_dataTable.inArrayPtr)); + var result = Avx512F.ConvertToVector512UInt64(firstOp); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(firstOp, _dataTable.outArrayPtr); + } + + public void RunLclFldScenario() + { + var test = new SimpleUnaryOpTest__ConvertToVector512UInt64Int32(); + var result = Avx512F.ConvertToVector512UInt64(test._fld); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(test._fld, _dataTable.outArrayPtr); + } + + public void RunFldScenario() + { + var result = Avx512F.ConvertToVector512UInt64(_fld); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_fld, _dataTable.outArrayPtr); + } + + public void RunUnsupportedScenario() + { + Succeeded = false; + + try + { + RunBasicScenario_UnsafeRead(); + } + catch (PlatformNotSupportedException) + { + Succeeded = true; + } + } + + private void ValidateResult(Vector256 firstOp, void* result, [CallerMemberName] string method = "") + { + Int32[] inArray = new Int32[Op1ElementCount]; + Int64[] outArray = new Int64[RetElementCount]; + + Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); + Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), VectorSize); + + ValidateResult(inArray, outArray, method); + } + + private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") + { + Int32[] inArray = new Int32[Op1ElementCount]; + Int64[] outArray = new Int64[RetElementCount]; + + Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), 16); + Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), VectorSize); + + ValidateResult(inArray, outArray, method); + } + + private void ValidateResult(Int32[] firstOp, Int64[] result, [CallerMemberName] string method = "") + { + if (result[0] != firstOp[0]) + { + Succeeded = false; + } + else + { + for (var i = 1; i < RetElementCount; i++) + { + if (result[i] != firstOp[i]) + { + Succeeded = false; + break; + } + } + } + + if (!Succeeded) + { + Console.WriteLine($"{nameof(Avx512F)}.{nameof(Avx512F.ConvertToVector512UInt64)}(Vector256): {method} failed:"); + Console.WriteLine($" firstOp: ({string.Join(", ", firstOp)})"); + Console.WriteLine($" result: ({string.Join(", ", result)})"); + Console.WriteLine(); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/ConvertToVector512UInt64.SByte.cs b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/ConvertToVector512UInt64.SByte.cs new file mode 100644 index 0000000000000..21231d3cd14f6 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/ConvertToVector512UInt64.SByte.cs @@ -0,0 +1,308 @@ +// 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\X86\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.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Runtime.Intrinsics; +using System.Runtime.Intrinsics.X86; +using Xunit; + +namespace JIT.HardwareIntrinsics.X86._Avx512F.handwritten +{ + public static partial class Program + { + [Fact] + public static void ConvertToVector512UInt64SByte() + { + var test = new SimpleUnaryOpTest__ConvertToVector512UInt64SByte(); + + if (test.IsSupported) + { + // Validates basic functionality works, using Unsafe.Read + test.RunBasicScenario_UnsafeRead(); + + if (Avx.IsSupported) + { + // Validates basic functionality works, using Load + test.RunBasicScenario_Load(); + + // Validates basic functionality works, using LoadAligned + test.RunBasicScenario_LoadAligned(); + } + + // Validates calling via reflection works, using Unsafe.Read + test.RunReflectionScenario_UnsafeRead(); + + if (Avx.IsSupported) + { + // Validates calling via reflection works, using Load + test.RunReflectionScenario_Load(); + + // Validates calling via reflection works, using LoadAligned + test.RunReflectionScenario_LoadAligned(); + } + + // Validates passing a static member works + test.RunClsVarScenario(); + + // Validates passing a local works, using Unsafe.Read + test.RunLclVarScenario_UnsafeRead(); + + if (Avx.IsSupported) + { + // Validates passing a local works, using Load + test.RunLclVarScenario_Load(); + + // Validates passing a local works, using LoadAligned + test.RunLclVarScenario_LoadAligned(); + } + + // Validates passing the field of a local works + test.RunLclFldScenario(); + + // Validates passing an instance member works + test.RunFldScenario(); + } + 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 SimpleUnaryOpTest__ConvertToVector512UInt64SByte + { + private const int VectorSize = 64; + + private const int Op1ElementCount = 16 / sizeof(SByte); + private const int RetElementCount = VectorSize / sizeof(UInt64); + + private static SByte[] _data = new SByte[Op1ElementCount]; + + private static Vector128 _clsVar; + + private Vector128 _fld; + + private SimpleUnaryOpTest__DataTable _dataTable; + + static SimpleUnaryOpTest__ConvertToVector512UInt64SByte() + { + var random = new Random(); + + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), 16); + } + + public SimpleUnaryOpTest__ConvertToVector512UInt64SByte() + { + Succeeded = true; + + var random = new Random(); + + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), 16); + + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int64[RetElementCount], VectorSize); + } + + public bool IsSupported => Avx512F.IsSupported; + + public bool Succeeded { get; set; } + + public void RunBasicScenario_UnsafeRead() + { + var result = Avx512F.ConvertToVector512UInt64( + Unsafe.Read>(_dataTable.inArrayPtr) + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunBasicScenario_Load() + { + var result = Avx512F.ConvertToVector512UInt64( + Sse2.LoadVector128((SByte*)(_dataTable.inArrayPtr)) + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunBasicScenario_LoadAligned() + { + var result = Avx512F.ConvertToVector512UInt64( + Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArrayPtr)) + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunReflectionScenario_UnsafeRead() + { + var result = typeof(Avx512F).GetMethod(nameof(Avx512F.ConvertToVector512UInt64), new Type[] { typeof(Vector128) }) + .Invoke(null, new object[] { + Unsafe.Read>(_dataTable.inArrayPtr) + }); + + Unsafe.Write(_dataTable.outArrayPtr, (Vector512)(result)); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunReflectionScenario_Load() + { + var result = typeof(Avx512F).GetMethod(nameof(Avx512F.ConvertToVector512UInt64), new Type[] { typeof(Vector128) }) + .Invoke(null, new object[] { + Sse2.LoadVector128((SByte*)(_dataTable.inArrayPtr)) + }); + + Unsafe.Write(_dataTable.outArrayPtr, (Vector512)(result)); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunReflectionScenario_LoadAligned() + { + var result = typeof(Avx512F).GetMethod(nameof(Avx512F.ConvertToVector512UInt64), new Type[] { typeof(Vector128) }) + .Invoke(null, new object[] { + Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArrayPtr)) + }); + + Unsafe.Write(_dataTable.outArrayPtr, (Vector512)(result)); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunClsVarScenario() + { + var result = Avx512F.ConvertToVector512UInt64( + _clsVar + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_clsVar, _dataTable.outArrayPtr); + } + + public void RunLclVarScenario_UnsafeRead() + { + var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); + var result = Avx512F.ConvertToVector512UInt64(firstOp); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(firstOp, _dataTable.outArrayPtr); + } + + public void RunLclVarScenario_Load() + { + var firstOp = Sse2.LoadVector128((SByte*)(_dataTable.inArrayPtr)); + var result = Avx512F.ConvertToVector512UInt64(firstOp); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(firstOp, _dataTable.outArrayPtr); + } + + public void RunLclVarScenario_LoadAligned() + { + var firstOp = Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArrayPtr)); + var result = Avx512F.ConvertToVector512UInt64(firstOp); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(firstOp, _dataTable.outArrayPtr); + } + + public void RunLclFldScenario() + { + var test = new SimpleUnaryOpTest__ConvertToVector512UInt64SByte(); + var result = Avx512F.ConvertToVector512UInt64(test._fld); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(test._fld, _dataTable.outArrayPtr); + } + + public void RunFldScenario() + { + var result = Avx512F.ConvertToVector512UInt64(_fld); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_fld, _dataTable.outArrayPtr); + } + + public void RunUnsupportedScenario() + { + Succeeded = false; + + try + { + RunBasicScenario_UnsafeRead(); + } + catch (PlatformNotSupportedException) + { + Succeeded = true; + } + } + + private void ValidateResult(Vector128 firstOp, void* result, [CallerMemberName] string method = "") + { + SByte[] inArray = new SByte[Op1ElementCount]; + Int64[] outArray = new Int64[RetElementCount]; + + Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); + Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), VectorSize); + + ValidateResult(inArray, outArray, method); + } + + private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") + { + SByte[] inArray = new SByte[Op1ElementCount]; + Int64[] outArray = new Int64[RetElementCount]; + + Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), 16); + Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), VectorSize); + + ValidateResult(inArray, outArray, method); + } + + private void ValidateResult(SByte[] firstOp, Int64[] result, [CallerMemberName] string method = "") + { + if (result[0] != firstOp[0]) + { + Succeeded = false; + } + else + { + for (var i = 1; i < RetElementCount; i++) + { + if (result[i] != firstOp[i]) + { + Succeeded = false; + break; + } + } + } + + if (!Succeeded) + { + Console.WriteLine($"{nameof(Avx512F)}.{nameof(Avx512F.ConvertToVector512UInt64)}(Vector128): {method} failed:"); + Console.WriteLine($" firstOp: ({string.Join(", ", firstOp)})"); + Console.WriteLine($" result: ({string.Join(", ", result)})"); + Console.WriteLine(); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/ConvertToVector512UInt64.UInt16.cs b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/ConvertToVector512UInt64.UInt16.cs new file mode 100644 index 0000000000000..2bf83812bfe1d --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/ConvertToVector512UInt64.UInt16.cs @@ -0,0 +1,308 @@ +// 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\X86\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.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Runtime.Intrinsics; +using System.Runtime.Intrinsics.X86; +using Xunit; + +namespace JIT.HardwareIntrinsics.X86._Avx512F.handwritten +{ + public static partial class Program + { + [Fact] + public static void ConvertToVector512UInt64UInt16() + { + var test = new SimpleUnaryOpTest__ConvertToVector512UInt64UInt16(); + + if (test.IsSupported) + { + // Validates basic functionality works, using Unsafe.Read + test.RunBasicScenario_UnsafeRead(); + + if (Avx.IsSupported) + { + // Validates basic functionality works, using Load + test.RunBasicScenario_Load(); + + // Validates basic functionality works, using LoadAligned + test.RunBasicScenario_LoadAligned(); + } + + // Validates calling via reflection works, using Unsafe.Read + test.RunReflectionScenario_UnsafeRead(); + + if (Avx.IsSupported) + { + // Validates calling via reflection works, using Load + test.RunReflectionScenario_Load(); + + // Validates calling via reflection works, using LoadAligned + test.RunReflectionScenario_LoadAligned(); + } + + // Validates passing a static member works + test.RunClsVarScenario(); + + // Validates passing a local works, using Unsafe.Read + test.RunLclVarScenario_UnsafeRead(); + + if (Avx.IsSupported) + { + // Validates passing a local works, using Load + test.RunLclVarScenario_Load(); + + // Validates passing a local works, using LoadAligned + test.RunLclVarScenario_LoadAligned(); + } + + // Validates passing the field of a local works + test.RunLclFldScenario(); + + // Validates passing an instance member works + test.RunFldScenario(); + } + 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 SimpleUnaryOpTest__ConvertToVector512UInt64UInt16 + { + private const int VectorSize = 64; + + private const int Op1ElementCount = 16 / sizeof(UInt16); + private const int RetElementCount = VectorSize / sizeof(UInt64); + + private static UInt16[] _data = new UInt16[Op1ElementCount]; + + private static Vector128 _clsVar; + + private Vector128 _fld; + + private SimpleUnaryOpTest__DataTable _dataTable; + + static SimpleUnaryOpTest__ConvertToVector512UInt64UInt16() + { + var random = new Random(); + + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), 16); + } + + public SimpleUnaryOpTest__ConvertToVector512UInt64UInt16() + { + Succeeded = true; + + var random = new Random(); + + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), 16); + + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt64[RetElementCount], VectorSize); + } + + public bool IsSupported => Avx512F.IsSupported; + + public bool Succeeded { get; set; } + + public void RunBasicScenario_UnsafeRead() + { + var result = Avx512F.ConvertToVector512UInt64( + Unsafe.Read>(_dataTable.inArrayPtr) + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunBasicScenario_Load() + { + var result = Avx512F.ConvertToVector512UInt64( + Sse2.LoadVector128((UInt16*)(_dataTable.inArrayPtr)) + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunBasicScenario_LoadAligned() + { + var result = Avx512F.ConvertToVector512UInt64( + Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArrayPtr)) + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunReflectionScenario_UnsafeRead() + { + var result = typeof(Avx512F).GetMethod(nameof(Avx512F.ConvertToVector512UInt64), new Type[] { typeof(Vector128) }) + .Invoke(null, new object[] { + Unsafe.Read>(_dataTable.inArrayPtr) + }); + + Unsafe.Write(_dataTable.outArrayPtr, (Vector512)(result)); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunReflectionScenario_Load() + { + var result = typeof(Avx512F).GetMethod(nameof(Avx512F.ConvertToVector512UInt64), new Type[] { typeof(Vector128) }) + .Invoke(null, new object[] { + Sse2.LoadVector128((UInt16*)(_dataTable.inArrayPtr)) + }); + + Unsafe.Write(_dataTable.outArrayPtr, (Vector512)(result)); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunReflectionScenario_LoadAligned() + { + var result = typeof(Avx512F).GetMethod(nameof(Avx512F.ConvertToVector512UInt64), new Type[] { typeof(Vector128) }) + .Invoke(null, new object[] { + Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArrayPtr)) + }); + + Unsafe.Write(_dataTable.outArrayPtr, (Vector512)(result)); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunClsVarScenario() + { + var result = Avx512F.ConvertToVector512UInt64( + _clsVar + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_clsVar, _dataTable.outArrayPtr); + } + + public void RunLclVarScenario_UnsafeRead() + { + var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); + var result = Avx512F.ConvertToVector512UInt64(firstOp); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(firstOp, _dataTable.outArrayPtr); + } + + public void RunLclVarScenario_Load() + { + var firstOp = Sse2.LoadVector128((UInt16*)(_dataTable.inArrayPtr)); + var result = Avx512F.ConvertToVector512UInt64(firstOp); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(firstOp, _dataTable.outArrayPtr); + } + + public void RunLclVarScenario_LoadAligned() + { + var firstOp = Sse2.LoadAlignedVector128((UInt16*)(_dataTable.inArrayPtr)); + var result = Avx512F.ConvertToVector512UInt64(firstOp); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(firstOp, _dataTable.outArrayPtr); + } + + public void RunLclFldScenario() + { + var test = new SimpleUnaryOpTest__ConvertToVector512UInt64UInt16(); + var result = Avx512F.ConvertToVector512UInt64(test._fld); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(test._fld, _dataTable.outArrayPtr); + } + + public void RunFldScenario() + { + var result = Avx512F.ConvertToVector512UInt64(_fld); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_fld, _dataTable.outArrayPtr); + } + + public void RunUnsupportedScenario() + { + Succeeded = false; + + try + { + RunBasicScenario_UnsafeRead(); + } + catch (PlatformNotSupportedException) + { + Succeeded = true; + } + } + + private void ValidateResult(Vector128 firstOp, void* result, [CallerMemberName] string method = "") + { + UInt16[] inArray = new UInt16[Op1ElementCount]; + UInt64[] outArray = new UInt64[RetElementCount]; + + Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); + Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), VectorSize); + + ValidateResult(inArray, outArray, method); + } + + private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") + { + UInt16[] inArray = new UInt16[Op1ElementCount]; + UInt64[] outArray = new UInt64[RetElementCount]; + + Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), 16); + Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), VectorSize); + + ValidateResult(inArray, outArray, method); + } + + private void ValidateResult(UInt16[] firstOp, UInt64[] result, [CallerMemberName] string method = "") + { + if (result[0] != firstOp[0]) + { + Succeeded = false; + } + else + { + for (var i = 1; i < RetElementCount; i++) + { + if (result[i] != firstOp[i]) + { + Succeeded = false; + break; + } + } + } + + if (!Succeeded) + { + Console.WriteLine($"{nameof(Avx512F)}.{nameof(Avx512F.ConvertToVector512UInt64)}(Vector128): {method} failed:"); + Console.WriteLine($" firstOp: ({string.Join(", ", firstOp)})"); + Console.WriteLine($" result: ({string.Join(", ", result)})"); + Console.WriteLine(); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/ConvertToVector512UInt64.UInt32.cs b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/ConvertToVector512UInt64.UInt32.cs new file mode 100644 index 0000000000000..9f8ea7c5bc41f --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/ConvertToVector512UInt64.UInt32.cs @@ -0,0 +1,308 @@ +// 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\X86\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.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Runtime.Intrinsics; +using System.Runtime.Intrinsics.X86; +using Xunit; + +namespace JIT.HardwareIntrinsics.X86._Avx512F.handwritten +{ + public static partial class Program + { + [Fact] + public static void ConvertToVector512UInt64UInt32() + { + var test = new SimpleUnaryOpTest__ConvertToVector512UInt64UInt32(); + + if (test.IsSupported) + { + // Validates basic functionality works, using Unsafe.Read + test.RunBasicScenario_UnsafeRead(); + + if (Avx.IsSupported) + { + // Validates basic functionality works, using Load + test.RunBasicScenario_Load(); + + // Validates basic functionality works, using LoadAligned + test.RunBasicScenario_LoadAligned(); + } + + // Validates calling via reflection works, using Unsafe.Read + test.RunReflectionScenario_UnsafeRead(); + + if (Avx.IsSupported) + { + // Validates calling via reflection works, using Load + test.RunReflectionScenario_Load(); + + // Validates calling via reflection works, using LoadAligned + test.RunReflectionScenario_LoadAligned(); + } + + // Validates passing a static member works + test.RunClsVarScenario(); + + // Validates passing a local works, using Unsafe.Read + test.RunLclVarScenario_UnsafeRead(); + + if (Avx.IsSupported) + { + // Validates passing a local works, using Load + test.RunLclVarScenario_Load(); + + // Validates passing a local works, using LoadAligned + test.RunLclVarScenario_LoadAligned(); + } + + // Validates passing the field of a local works + test.RunLclFldScenario(); + + // Validates passing an instance member works + test.RunFldScenario(); + } + 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 SimpleUnaryOpTest__ConvertToVector512UInt64UInt32 + { + private const int VectorSize = 64; + + private const int Op1ElementCount = 32 / sizeof(UInt32); + private const int RetElementCount = VectorSize / sizeof(UInt64); + + private static UInt32[] _data = new UInt32[Op1ElementCount]; + + private static Vector256 _clsVar; + + private Vector256 _fld; + + private SimpleUnaryOpTest__DataTable _dataTable; + + static SimpleUnaryOpTest__ConvertToVector512UInt64UInt32() + { + var random = new Random(); + + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), 16); + } + + public SimpleUnaryOpTest__ConvertToVector512UInt64UInt32() + { + Succeeded = true; + + var random = new Random(); + + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), 16); + + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt64[RetElementCount], VectorSize); + } + + public bool IsSupported => Avx512F.IsSupported; + + public bool Succeeded { get; set; } + + public void RunBasicScenario_UnsafeRead() + { + var result = Avx512F.ConvertToVector512UInt64( + Unsafe.Read>(_dataTable.inArrayPtr) + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunBasicScenario_Load() + { + var result = Avx512F.ConvertToVector512UInt64( + Avx.LoadVector256((UInt32*)(_dataTable.inArrayPtr)) + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunBasicScenario_LoadAligned() + { + var result = Avx512F.ConvertToVector512UInt64( + Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArrayPtr)) + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunReflectionScenario_UnsafeRead() + { + var result = typeof(Avx512F).GetMethod(nameof(Avx512F.ConvertToVector512UInt64), new Type[] { typeof(Vector256) }) + .Invoke(null, new object[] { + Unsafe.Read>(_dataTable.inArrayPtr) + }); + + Unsafe.Write(_dataTable.outArrayPtr, (Vector512)(result)); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunReflectionScenario_Load() + { + var result = typeof(Avx512F).GetMethod(nameof(Avx512F.ConvertToVector512UInt64), new Type[] { typeof(Vector256) }) + .Invoke(null, new object[] { + Avx.LoadVector256((UInt32*)(_dataTable.inArrayPtr)) + }); + + Unsafe.Write(_dataTable.outArrayPtr, (Vector512)(result)); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunReflectionScenario_LoadAligned() + { + var result = typeof(Avx512F).GetMethod(nameof(Avx512F.ConvertToVector512UInt64), new Type[] { typeof(Vector256) }) + .Invoke(null, new object[] { + Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArrayPtr)) + }); + + Unsafe.Write(_dataTable.outArrayPtr, (Vector512)(result)); + ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr); + } + + public void RunClsVarScenario() + { + var result = Avx512F.ConvertToVector512UInt64( + _clsVar + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_clsVar, _dataTable.outArrayPtr); + } + + public void RunLclVarScenario_UnsafeRead() + { + var firstOp = Unsafe.Read>(_dataTable.inArrayPtr); + var result = Avx512F.ConvertToVector512UInt64(firstOp); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(firstOp, _dataTable.outArrayPtr); + } + + public void RunLclVarScenario_Load() + { + var firstOp = Avx.LoadVector256((UInt32*)(_dataTable.inArrayPtr)); + var result = Avx512F.ConvertToVector512UInt64(firstOp); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(firstOp, _dataTable.outArrayPtr); + } + + public void RunLclVarScenario_LoadAligned() + { + var firstOp = Avx.LoadAlignedVector256((UInt32*)(_dataTable.inArrayPtr)); + var result = Avx512F.ConvertToVector512UInt64(firstOp); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(firstOp, _dataTable.outArrayPtr); + } + + public void RunLclFldScenario() + { + var test = new SimpleUnaryOpTest__ConvertToVector512UInt64UInt32(); + var result = Avx512F.ConvertToVector512UInt64(test._fld); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(test._fld, _dataTable.outArrayPtr); + } + + public void RunFldScenario() + { + var result = Avx512F.ConvertToVector512UInt64(_fld); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_fld, _dataTable.outArrayPtr); + } + + public void RunUnsupportedScenario() + { + Succeeded = false; + + try + { + RunBasicScenario_UnsafeRead(); + } + catch (PlatformNotSupportedException) + { + Succeeded = true; + } + } + + private void ValidateResult(Vector256 firstOp, void* result, [CallerMemberName] string method = "") + { + UInt32[] inArray = new UInt32[Op1ElementCount]; + UInt64[] outArray = new UInt64[RetElementCount]; + + Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray[0]), firstOp); + Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), VectorSize); + + ValidateResult(inArray, outArray, method); + } + + private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "") + { + UInt32[] inArray = new UInt32[Op1ElementCount]; + UInt64[] outArray = new UInt64[RetElementCount]; + + Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray[0]), ref Unsafe.AsRef(firstOp), 16); + Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), VectorSize); + + ValidateResult(inArray, outArray, method); + } + + private void ValidateResult(UInt32[] firstOp, UInt64[] result, [CallerMemberName] string method = "") + { + if (result[0] != firstOp[0]) + { + Succeeded = false; + } + else + { + for (var i = 1; i < RetElementCount; i++) + { + if (result[i] != firstOp[i]) + { + Succeeded = false; + break; + } + } + } + + if (!Succeeded) + { + Console.WriteLine($"{nameof(Avx512F)}.{nameof(Avx512F.ConvertToVector512UInt64)}(Vector256): {method} failed:"); + Console.WriteLine($" firstOp: ({string.Join(", ", firstOp)})"); + Console.WriteLine($" result: ({string.Join(", ", result)})"); + Console.WriteLine(); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/HandwrittenProgram.cs b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/HandwrittenProgram.cs index da191c1c431f7..697138a72ebf7 100644 --- a/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/HandwrittenProgram.cs +++ b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/HandwrittenProgram.cs @@ -66,6 +66,49 @@ public void Dispose() } } + public unsafe struct TestTable : IDisposable where T1 : struct where T2 : struct where T3 : struct + { + public T1[] inArray1; + public T2[] inArray2; + public T3[] outArray; + + public void* inArray1Ptr => inHandle1.AddrOfPinnedObject().ToPointer(); + public void* inArray2Ptr => inHandle2.AddrOfPinnedObject().ToPointer(); + public void* outArrayPtr => outHandle.AddrOfPinnedObject().ToPointer(); + + GCHandle inHandle1; + GCHandle inHandle2; + GCHandle outHandle; + public TestTable(T1[] a, T2[] b, T3[] c) + { + this.inArray1 = a; + this.inArray2 = b; + this.outArray = c; + + inHandle1 = GCHandle.Alloc(inArray1, GCHandleType.Pinned); + inHandle2 = GCHandle.Alloc(inArray2, GCHandleType.Pinned); + outHandle = GCHandle.Alloc(outArray, GCHandleType.Pinned); + } + public bool CheckResult(Func check) + { + for (int i = 0; i < inArray1.Length; i++) + { + if (!check(inArray1[i], inArray2[i], outArray[i])) + { + return false; + } + } + return true; + } + + public void Dispose() + { + inHandle1.Free(); + inHandle2.Free(); + outHandle.Free(); + } + } + public unsafe struct AlignedTestTable : IDisposable where T : struct { private byte[] inArray; diff --git a/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/LoadAlignedVector512NonTemporal.cs b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/LoadAlignedVector512NonTemporal.cs new file mode 100644 index 0000000000000..babd49602f7c9 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/LoadAlignedVector512NonTemporal.cs @@ -0,0 +1,219 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Runtime.Intrinsics.X86; +using System.Runtime.Intrinsics; +using Xunit; + +namespace IntelHardwareIntrinsicTest._Avx512F +{ + public partial class Program + { + [Fact] + public static unsafe void LoadAlignedVector512NonTemporal() + { + int testResult = Pass; + + if (Avx512F.IsSupported) + { + { + byte* inBuffer = stackalloc byte[128]; + int* inArray = (int*)Align(inBuffer, 64); + int* outArray = stackalloc int[16]; + var vf = Avx512F.LoadAlignedVector512NonTemporal(inArray); + Unsafe.Write(outArray, vf); + + for (var i = 0; i < 16; i++) + { + if (inArray[i] != outArray[i]) + { + Console.WriteLine("Avx512F LoadAlignedVector512NonTemporal failed on int:"); + for (var n = 0; n < 16; n++) + { + Console.Write(outArray[n] + ", "); + } + Console.WriteLine(); + + testResult = Fail; + break; + } + } + } + + { + byte* inBuffer = stackalloc byte[128]; + long* inArray = (long*)Align(inBuffer, 64); + long* outArray = stackalloc long[8]; + var vf = Avx512F.LoadAlignedVector512NonTemporal(inArray); + Unsafe.Write(outArray, vf); + + for (var i = 0; i < 8; i++) + { + if (inArray[i] != outArray[i]) + { + Console.WriteLine("Avx512F LoadAlignedVector512NonTemporal failed on long:"); + for (var n = 0; n < 8; n++) + { + Console.Write(outArray[n] + ", "); + } + Console.WriteLine(); + + testResult = Fail; + break; + } + } + } + + { + byte* inBuffer = stackalloc byte[128]; + uint* inArray = (uint*)Align(inBuffer, 64); + uint* outArray = stackalloc uint[16]; + var vf = Avx512F.LoadAlignedVector512NonTemporal(inArray); + Unsafe.Write(outArray, vf); + + for (var i = 0; i < 16; i++) + { + if (inArray[i] != outArray[i]) + { + Console.WriteLine("Avx512F LoadAlignedVector512NonTemporal failed on uint:"); + for (var n = 0; n < 16; n++) + { + Console.Write(outArray[n] + ", "); + } + Console.WriteLine(); + + testResult = Fail; + break; + } + } + } + + { + byte* inBuffer = stackalloc byte[128]; + ulong* inArray = (ulong*)Align(inBuffer, 64); + ulong* outArray = stackalloc ulong[8]; + var vf = Avx512F.LoadAlignedVector512NonTemporal(inArray); + Unsafe.Write(outArray, vf); + + for (var i = 0; i < 8; i++) + { + if (inArray[i] != outArray[i]) + { + Console.WriteLine("Avx512F LoadAlignedVector512NonTemporal failed on ulong:"); + for (var n = 0; n < 8; n++) + { + Console.Write(outArray[n] + ", "); + } + Console.WriteLine(); + + testResult = Fail; + break; + } + } + } + + { + byte* inBuffer = stackalloc byte[128]; + short* inArray = (short*)Align(inBuffer, 64); + short* outArray = stackalloc short[32]; + var vf = Avx512F.LoadAlignedVector512NonTemporal(inArray); + Unsafe.Write(outArray, vf); + + for (var i = 0; i < 32; i++) + { + if (inArray[i] != outArray[i]) + { + Console.WriteLine("Avx512F LoadAlignedVector512NonTemporal failed on short:"); + for (var n = 0; n < 32; n++) + { + Console.Write(outArray[n] + ", "); + } + Console.WriteLine(); + + testResult = Fail; + break; + } + } + } + + { + byte* inBuffer = stackalloc byte[128]; + ushort* inArray = (ushort*)Align(inBuffer, 64); + ushort* outArray = stackalloc ushort[32]; + var vf = Avx512F.LoadAlignedVector512NonTemporal(inArray); + Unsafe.Write(outArray, vf); + + for (var i = 0; i < 32; i++) + { + if (inArray[i] != outArray[i]) + { + Console.WriteLine("Avx512F LoadAlignedVector512NonTemporal failed on ushort:"); + for (var n = 0; n < 32; n++) + { + Console.Write(outArray[n] + ", "); + } + Console.WriteLine(); + + testResult = Fail; + break; + } + } + } + + { + byte* inBuffer = stackalloc byte[128]; + sbyte* inArray = (sbyte*)Align(inBuffer, 64); + sbyte* outArray = stackalloc sbyte[64]; + var vf = Avx512F.LoadAlignedVector512NonTemporal(inArray); + Unsafe.Write(outArray, vf); + + for (var i = 0; i < 64; i++) + { + if (inArray[i] != outArray[i]) + { + Console.WriteLine("Avx512F LoadAlignedVector512NonTemporal failed on sbyte:"); + for (var n = 0; n < 64; n++) + { + Console.Write(outArray[n] + ", "); + } + Console.WriteLine(); + + testResult = Fail; + break; + } + } + } + + { + byte* inBuffer = stackalloc byte[128]; + byte* inArray = (byte*)Align(inBuffer, 64); + byte* outArray = stackalloc byte[64]; + var vf = Avx512F.LoadAlignedVector512NonTemporal(inArray); + Unsafe.Write(outArray, vf); + + for (var i = 0; i < 64; i++) + { + if (inArray[i] != outArray[i]) + { + Console.WriteLine("Avx512F LoadAlignedVector512NonTemporal failed on byte:"); + for (var n = 0; n < 64; n++) + { + Console.Write(outArray[n] + ", "); + } + Console.WriteLine(); + + testResult = Fail; + break; + } + } + } + } + + Assert.Equal(Pass, testResult); + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/Sqrt.cs b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/Sqrt.cs new file mode 100644 index 0000000000000..bee44accf21f4 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/Sqrt.cs @@ -0,0 +1,70 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Runtime.Intrinsics.X86; +using System.Runtime.Intrinsics; +using Xunit; + +namespace IntelHardwareIntrinsicTest._Avx512F +{ + public partial class Program + { + [Fact] + public static unsafe void Sqrt () + { + int testResult = Pass; + + if (Avx512F.IsSupported) + { + using (TestTable floatTable = new TestTable(new float[16] { 1, -5, 100, 0, 1, -5, 100, 0, 1, -5, 100, 0, 1, -5, 100, 0}, new float[16])) + using (TestTable doubleTable = new TestTable(new double[8] { 1, -5, 100, 0, 1, -5, 100, 0 }, new double[8])) + { + + var vf1 = Unsafe.Read>(floatTable.inArrayPtr); + var vf2 = Avx512F.Sqrt(vf1); + Unsafe.Write(floatTable.outArrayPtr, vf2); + + var vd1 = Unsafe.Read>(doubleTable.inArrayPtr); + var vd2 = Avx512F.Sqrt(vd1); + Unsafe.Write(doubleTable.outArrayPtr, vd2); + + if (!floatTable.CheckResult((x, y) => { + var expected = MathF.Sqrt(x); + return (expected == y) + || (float.IsNaN(expected) && float.IsNaN(y)); + })) + { + Console.WriteLine("Avx512F Sqrt failed on float:"); + foreach (var item in floatTable.outArray) + { + Console.Write(item + ", "); + } + Console.WriteLine(); + testResult = Fail; + } + + if (!doubleTable.CheckResult((x, y) => { + var expected = Math.Sqrt(x); + return (expected == y) + || (double.IsNaN(expected) && double.IsNaN(y)); + })) + { + Console.WriteLine("Avx512F Sqrt failed on double:"); + foreach (var item in doubleTable.outArray) + { + Console.Write(item + ", "); + } + Console.WriteLine(); + testResult = Fail; + } + } + } + + Assert.Equal(Pass, testResult); + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/UnpackHigh.cs b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/UnpackHigh.cs new file mode 100644 index 0000000000000..51959d7dc10d4 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/UnpackHigh.cs @@ -0,0 +1,165 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Runtime.Intrinsics.X86; +using System.Runtime.Intrinsics; +using Xunit; + +namespace IntelHardwareIntrinsicTest._Avx512F +{ + public partial class Program + { + [Fact] + public static unsafe void UnpackHigh() + { + int testResult = Pass; + + if (Avx512F.IsSupported) + { + using (TestTable_2Input floatTable = new TestTable_2Input(new float[16] { 22, -1, -50, 0, 22, -1, -50, 0, 22, -1, -50, 0, 22, -1, -50, 0 }, new float[16] { 22, -1, -50, 0, 22, -1, -50, 0, 22, -1, -50, 0, 22, -1, -50, 0 }, new float[16])) + using (TestTable_2Input doubleTable = new TestTable_2Input(new double[8] { 1, -5, 100, 0, 1, -5, 100, 0 }, new double[8] { 22, -1, -50, 0, 22, -1, -50, 0 }, new double[8])) + { + var vf1 = Unsafe.Read>(floatTable.inArray1Ptr); + var vf2 = Unsafe.Read>(floatTable.inArray2Ptr); + var vf3 = Avx512F.UnpackHigh(vf1, vf2); + Unsafe.Write(floatTable.outArrayPtr, vf3); + + if (!floatTable.CheckResult((left, right, result) => + (left[2] == result[0]) && (right[2] == result[1]) && + (left[3] == result[2]) && (right[3] == result[3]) && + (left[6] == result[4]) && (right[6] == result[5]) && + (left[7] == result[6]) && (right[7] == result[7]) && + (left[10] == result[8]) && (right[10] == result[9]) && + (left[11] == result[10]) && (right[11] == result[11]) && + (left[14] == result[12]) && (right[14] == result[13]) && + (left[15] == result[14]) && (right[15] == result[15]))) + { + Console.WriteLine("Avx512F UnpackHigh failed on float:"); + foreach (var item in floatTable.outArray) + { + Console.Write(item + ", "); + } + Console.WriteLine(); + testResult = Fail; + } + + var vd1 = Unsafe.Read>(doubleTable.inArray1Ptr); + var vd2 = Unsafe.Read>(doubleTable.inArray2Ptr); + var vd3 = Avx512F.UnpackHigh(vd1, vd2); + Unsafe.Write(doubleTable.outArrayPtr, vd3); + + if (!doubleTable.CheckResult((left, right, result) => + (left[1] == result[0]) && (right[1] == result[1]) && + (left[3] == result[2]) && (right[3] == result[3]) && + (left[5] == result[4]) && (right[5] == result[5]) && + (left[7] == result[6]) && (right[7] == result[7]))) + { + Console.WriteLine("Avx512F UnpackHigh failed on double:"); + foreach (var item in doubleTable.outArray) + { + Console.Write(item + ", "); + } + Console.WriteLine(); + testResult = Fail; + } + } + + using (TestTable intTable = new TestTable(new int[16] { 1, 5, 100, 0, 1, 5, 100, 0, 1, 5, 100, 0, 1, 5, 100, 0 }, new int[16] { 22, 1, 50, 0, 22, 1, 50, 0, 22, 1, 50, 0, 22, 1, 50, 0 }, new int[16])) + using (TestTable uintTable = new TestTable(new uint[16] { 1, 5, 100, 0, 1, 5, 100, 0, 1, 5, 100, 0, 1, 5, 100, 0 }, new uint[16] { 22, 1, 50, 0, 22, 1, 50, 0, 22, 1, 50, 0, 22, 1, 50, 0 }, new uint[16])) + using (TestTable longTable = new TestTable(new long[8] { 1, -5, 100, 0, 1, -5, 100, 0 }, new long[8] { 22, -1, -50, 0, 22, -1, -50, 0 }, new long[8])) + using (TestTable ulongTable = new TestTable(new ulong[8] { 1, 5, 100, 0, 1, 5, 100, 0 }, new ulong[8] { 22, 1, 50, 0, 22, 1, 50, 0 }, new ulong[8])) + { + var vi1 = Unsafe.Read>(intTable.inArray1Ptr); + var vi2 = Unsafe.Read>(intTable.inArray2Ptr); + var vi3 = Avx512F.UnpackHigh(vi1, vi2); + Unsafe.Write(intTable.outArrayPtr, vi3); + + var vui1 = Unsafe.Read>(uintTable.inArray1Ptr); + var vui2 = Unsafe.Read>(uintTable.inArray2Ptr); + var vui3 = Avx512F.UnpackHigh(vui1, vui2); + Unsafe.Write(uintTable.outArrayPtr, vui3); + + var vl1 = Unsafe.Read>(longTable.inArray1Ptr); + var vl2 = Unsafe.Read>(longTable.inArray2Ptr); + var vl3 = Avx512F.UnpackHigh(vl1, vl2); + Unsafe.Write(longTable.outArrayPtr, vl3); + + var vul1 = Unsafe.Read>(ulongTable.inArray1Ptr); + var vul2 = Unsafe.Read>(ulongTable.inArray2Ptr); + var vul3 = Avx512F.UnpackHigh(vul1, vul2); + Unsafe.Write(ulongTable.outArrayPtr, vul3); + + if ((intTable.inArray1[2] != intTable.outArray[0]) || (intTable.inArray2[2] != intTable.outArray[1]) || + (intTable.inArray1[3] != intTable.outArray[2]) || (intTable.inArray2[3] != intTable.outArray[3]) || + (intTable.inArray1[6] != intTable.outArray[4]) || (intTable.inArray2[6] != intTable.outArray[5]) || + (intTable.inArray1[7] != intTable.outArray[6]) || (intTable.inArray2[7] != intTable.outArray[7]) || + (intTable.inArray1[10] != intTable.outArray[8]) || (intTable.inArray2[10] != intTable.outArray[9]) || + (intTable.inArray1[11] != intTable.outArray[10]) || (intTable.inArray2[11] != intTable.outArray[11]) || + (intTable.inArray1[14] != intTable.outArray[12]) || (intTable.inArray2[14] != intTable.outArray[13]) || + (intTable.inArray1[15] != intTable.outArray[14]) || (intTable.inArray2[15] != intTable.outArray[15])) + { + Console.WriteLine("Avx512F UnpackHigh failed on int:"); + Console.WriteLine($" left: ({string.Join(", ", intTable.inArray1)})"); + Console.WriteLine($" right: ({string.Join(", ", intTable.inArray2)})"); + Console.WriteLine($" result: ({string.Join(", ", intTable.outArray)})"); + Console.WriteLine(); + + testResult = Fail; + } + + if ((uintTable.inArray1[2] != uintTable.outArray[0]) || (uintTable.inArray2[2] != uintTable.outArray[1]) || + (uintTable.inArray1[3] != uintTable.outArray[2]) || (uintTable.inArray2[3] != uintTable.outArray[3]) || + (uintTable.inArray1[6] != uintTable.outArray[4]) || (uintTable.inArray2[6] != uintTable.outArray[5]) || + (uintTable.inArray1[7] != uintTable.outArray[6]) || (uintTable.inArray2[7] != uintTable.outArray[7]) || + (uintTable.inArray1[10] != uintTable.outArray[8]) || (uintTable.inArray2[10] != uintTable.outArray[9]) || + (uintTable.inArray1[11] != uintTable.outArray[10]) || (uintTable.inArray2[11] != uintTable.outArray[11]) || + (uintTable.inArray1[14] != uintTable.outArray[12]) || (uintTable.inArray2[14] != uintTable.outArray[13]) || + (uintTable.inArray1[15] != uintTable.outArray[14]) || (uintTable.inArray2[15] != uintTable.outArray[15])) + { + Console.WriteLine("Avx512F UnpackHigh failed on uint:"); + Console.WriteLine($" left: ({string.Join(", ", uintTable.inArray1)})"); + Console.WriteLine($" right: ({string.Join(", ", uintTable.inArray2)})"); + Console.WriteLine($" result: ({string.Join(", ", uintTable.outArray)})"); + Console.WriteLine(); + + testResult = Fail; + } + + if ((longTable.inArray1[1] != longTable.outArray[0]) || (longTable.inArray2[1] != longTable.outArray[1]) || + (longTable.inArray1[3] != longTable.outArray[2]) || (longTable.inArray2[3] != longTable.outArray[3]) || + (longTable.inArray1[5] != longTable.outArray[4]) || (longTable.inArray2[5] != longTable.outArray[5]) || + (longTable.inArray1[7] != longTable.outArray[6]) || (longTable.inArray2[7] != longTable.outArray[7])) + { + Console.WriteLine("Avx512F UnpackHigh failed on long:"); + Console.WriteLine($" left: ({string.Join(", ", longTable.inArray1)})"); + Console.WriteLine($" right: ({string.Join(", ", longTable.inArray2)})"); + Console.WriteLine($" result: ({string.Join(", ", longTable.outArray)})"); + Console.WriteLine(); + + testResult = Fail; + } + + if ((ulongTable.inArray1[1] != ulongTable.outArray[0]) || (ulongTable.inArray2[1] != ulongTable.outArray[1]) || + (ulongTable.inArray1[3] != ulongTable.outArray[2]) || (ulongTable.inArray2[3] != ulongTable.outArray[3]) || + (ulongTable.inArray1[5] != ulongTable.outArray[4]) || (ulongTable.inArray2[5] != ulongTable.outArray[5]) || + (ulongTable.inArray1[7] != ulongTable.outArray[6]) || (ulongTable.inArray2[7] != ulongTable.outArray[7])) + { + Console.WriteLine("Avx512F UnpackHigh failed on ulong:"); + Console.WriteLine($" left: ({string.Join(", ", ulongTable.inArray1)})"); + Console.WriteLine($" right: ({string.Join(", ", ulongTable.inArray2)})"); + Console.WriteLine($" result: ({string.Join(", ", ulongTable.outArray)})"); + Console.WriteLine(); + + testResult = Fail; + } + } + } + + Assert.Equal(Pass, testResult); + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/UnpackLow.cs b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/UnpackLow.cs new file mode 100644 index 0000000000000..a1081b2745517 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F/UnpackLow.cs @@ -0,0 +1,166 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Runtime.Intrinsics.X86; +using System.Runtime.Intrinsics; +using Xunit; + +namespace IntelHardwareIntrinsicTest._Avx512F +{ + public partial class Program + { + [Fact] + public static unsafe void UnpackLow() + { + int testResult = Pass; + + if (Avx512F.IsSupported) + { + using (TestTable_2Input floatTable = new TestTable_2Input(new float[16] { 1, 5, 100, 0, 1, 5, 100, 0, 1, 5, 100, 0, 1, 5, 100, 0 }, new float[16] { 22, -1, -50, 0, 22, -1, -50, 0, 22, -1, -50, 0, 22, -1, -50, 0 }, new float[16])) + using (TestTable_2Input doubleTable = new TestTable_2Input(new double[8] { 1, -5, 100, 0, 1, -5, 100, 0 }, new double[8] { 22, -1, -50, 0, 22, -1, -50, 0 }, new double[8])) + { + + var vf1 = Unsafe.Read>(floatTable.inArray1Ptr); + var vf2 = Unsafe.Read>(floatTable.inArray2Ptr); + var vf3 = Avx512F.UnpackLow(vf1, vf2); + Unsafe.Write(floatTable.outArrayPtr, vf3); + + if (!floatTable.CheckResult((left, right, result) => + (left[0] == result[0]) && (right[0] == result[1]) && + (left[1] == result[2]) && (right[1] == result[3]) && + (left[4] == result[4]) && (right[4] == result[5]) && + (left[5] == result[6]) && (right[5] == result[7]) && + (left[8] == result[8]) && (right[8] == result[9]) && + (left[9] == result[10]) && (right[9] == result[11]) && + (left[12] == result[12]) && (right[12] == result[13]) && + (left[13] == result[14]) && (right[13] == result[15]))) + { + Console.WriteLine("Avx512F UnpackLow failed on float:"); + foreach (var item in floatTable.outArray) + { + Console.Write(item + ", "); + } + Console.WriteLine(); + testResult = Fail; + } + + var vd1 = Unsafe.Read>(doubleTable.inArray1Ptr); + var vd2 = Unsafe.Read>(doubleTable.inArray2Ptr); + var vd3 = Avx512F.UnpackLow(vd1, vd2); + Unsafe.Write(doubleTable.outArrayPtr, vd3); + + if (!doubleTable.CheckResult((left, right, result) => + (left[0] == result[0]) && (right[0] == result[1]) && + (left[2] == result[2]) && (right[2] == result[3]) && + (left[4] == result[4]) && (right[4] == result[5]) && + (left[6] == result[6]) && (right[6] == result[7]))) + { + Console.WriteLine("Avx512F UnpackLow failed on double:"); + foreach (var item in doubleTable.outArray) + { + Console.Write(item + ", "); + } + Console.WriteLine(); + testResult = Fail; + } + } + + using (TestTable intTable = new TestTable(new int[16] { 1, 5, 100, 0, 1, 5, 100, 0, 1, 5, 100, 0, 1, 5, 100, 0}, new int[16] { 22, 1, 50, 0, 22, 1, 50, 0, 22, 1, 50, 0, 22, 1, 50, 0 }, new int[16])) + using (TestTable uintTable = new TestTable(new uint[16] { 1, 5, 100, 0, 1, 5, 100, 0, 1, 5, 100, 0, 1, 5, 100, 0 }, new uint[16] { 22, 1, 50, 0, 22, 1, 50, 0, 22, 1, 50, 0, 22, 1, 50, 0 }, new uint[16])) + using (TestTable longTable = new TestTable(new long[8] { 1, -5, 100, 0, 1, -5, 100, 0 }, new long[8] { 22, -1, -50, 0, 22, -1, -50, 0 }, new long[8])) + using (TestTable ulongTable = new TestTable(new ulong[8] { 1, 5, 100, 0, 1, 5, 100, 0 }, new ulong[8] { 22, 1, 50, 0, 22, 1, 50, 0 }, new ulong[8])) + { + var vi1 = Unsafe.Read>(intTable.inArray1Ptr); + var vi2 = Unsafe.Read>(intTable.inArray2Ptr); + var vi3 = Avx512F.UnpackLow(vi1, vi2); + Unsafe.Write(intTable.outArrayPtr, vi3); + + var vui1 = Unsafe.Read>(uintTable.inArray1Ptr); + var vui2 = Unsafe.Read>(uintTable.inArray2Ptr); + var vui3 = Avx512F.UnpackLow(vui1, vui2); + Unsafe.Write(uintTable.outArrayPtr, vui3); + + var vl1 = Unsafe.Read>(longTable.inArray1Ptr); + var vl2 = Unsafe.Read>(longTable.inArray2Ptr); + var vl3 = Avx512F.UnpackLow(vl1, vl2); + Unsafe.Write(longTable.outArrayPtr, vl3); + + var vul1 = Unsafe.Read>(ulongTable.inArray1Ptr); + var vul2 = Unsafe.Read>(ulongTable.inArray2Ptr); + var vul3 = Avx512F.UnpackLow(vul1, vul2); + Unsafe.Write(ulongTable.outArrayPtr, vul3); + + if ((intTable.inArray1[0] != intTable.outArray[0]) || (intTable.inArray2[0] != intTable.outArray[1]) || + (intTable.inArray1[1] != intTable.outArray[2]) || (intTable.inArray2[1] != intTable.outArray[3]) || + (intTable.inArray1[4] != intTable.outArray[4]) || (intTable.inArray2[4] != intTable.outArray[5]) || + (intTable.inArray1[5] != intTable.outArray[6]) || (intTable.inArray2[5] != intTable.outArray[7]) || + (intTable.inArray1[8] != intTable.outArray[8]) || (intTable.inArray2[8] != intTable.outArray[9]) || + (intTable.inArray1[9] != intTable.outArray[10]) || (intTable.inArray2[9] != intTable.outArray[11]) || + (intTable.inArray1[12] != intTable.outArray[12]) || (intTable.inArray2[12] != intTable.outArray[13]) || + (intTable.inArray1[13] != intTable.outArray[14]) || (intTable.inArray2[13] != intTable.outArray[15])) + { + Console.WriteLine("Avx512F UnpackLow failed on int:"); + Console.WriteLine($" left: ({string.Join(", ", intTable.inArray1)})"); + Console.WriteLine($" right: ({string.Join(", ", intTable.inArray2)})"); + Console.WriteLine($" result: ({string.Join(", ", intTable.outArray)})"); + Console.WriteLine(); + + testResult = Fail; + } + + if ((uintTable.inArray1[0] != uintTable.outArray[0]) || (uintTable.inArray2[0] != uintTable.outArray[1]) || + (uintTable.inArray1[1] != uintTable.outArray[2]) || (uintTable.inArray2[1] != uintTable.outArray[3]) || + (uintTable.inArray1[4] != uintTable.outArray[4]) || (uintTable.inArray2[4] != uintTable.outArray[5]) || + (uintTable.inArray1[5] != uintTable.outArray[6]) || (uintTable.inArray2[5] != uintTable.outArray[7]) || + (uintTable.inArray1[8] != uintTable.outArray[8]) || (uintTable.inArray2[8] != uintTable.outArray[9]) || + (uintTable.inArray1[9] != uintTable.outArray[10]) || (uintTable.inArray2[9] != uintTable.outArray[11]) || + (uintTable.inArray1[12] != uintTable.outArray[12]) || (uintTable.inArray2[12] != uintTable.outArray[13]) || + (uintTable.inArray1[13] != uintTable.outArray[14]) || (uintTable.inArray2[13] != uintTable.outArray[15])) + { + Console.WriteLine("Avx512F UnpackLow failed on uint:"); + Console.WriteLine($" left: ({string.Join(", ", uintTable.inArray1)})"); + Console.WriteLine($" right: ({string.Join(", ", uintTable.inArray2)})"); + Console.WriteLine($" result: ({string.Join(", ", uintTable.outArray)})"); + Console.WriteLine(); + + testResult = Fail; + } + + if ((longTable.inArray1[0] != longTable.outArray[0]) || (longTable.inArray2[0] != longTable.outArray[1]) || + (longTable.inArray1[2] != longTable.outArray[2]) || (longTable.inArray2[2] != longTable.outArray[3]) || + (longTable.inArray1[4] != longTable.outArray[4]) || (longTable.inArray2[4] != longTable.outArray[5]) || + (longTable.inArray1[6] != longTable.outArray[6]) || (longTable.inArray2[6] != longTable.outArray[7])) + { + Console.WriteLine("Avx512F UnpackLow failed on long:"); + Console.WriteLine($" left: ({string.Join(", ", longTable.inArray1)})"); + Console.WriteLine($" right: ({string.Join(", ", longTable.inArray2)})"); + Console.WriteLine($" result: ({string.Join(", ", longTable.outArray)})"); + Console.WriteLine(); + + testResult = Fail; + } + + if ((ulongTable.inArray1[0] != ulongTable.outArray[0]) || (ulongTable.inArray2[0] != ulongTable.outArray[1]) || + (ulongTable.inArray1[2] != ulongTable.outArray[2]) || (ulongTable.inArray2[2] != ulongTable.outArray[3]) || + (ulongTable.inArray1[4] != ulongTable.outArray[4]) || (ulongTable.inArray2[4] != ulongTable.outArray[5]) || + (ulongTable.inArray1[6] != ulongTable.outArray[6]) || (ulongTable.inArray2[6] != ulongTable.outArray[7])) + { + Console.WriteLine("Avx512F UnpackLow failed on ulong:"); + Console.WriteLine($" left: ({string.Join(", ", ulongTable.inArray1)})"); + Console.WriteLine($" right: ({string.Join(", ", ulongTable.inArray2)})"); + Console.WriteLine($" result: ({string.Join(", ", ulongTable.outArray)})"); + Console.WriteLine(); + + testResult = Fail; + } + } + } + + Assert.Equal(Pass, testResult); + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F_VL_Vector128/Avx512F_VL_Vector128_r.csproj b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F_VL_Vector128/Avx512F_VL_Vector128_r.csproj new file mode 100644 index 0000000000000..62abb4742dfcc --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F_VL_Vector128/Avx512F_VL_Vector128_r.csproj @@ -0,0 +1,14 @@ + + + X86_Avx512F_VL_Vector128_r + true + + + Embedded + + + + + + + diff --git a/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F_VL_Vector128/Avx512F_VL_Vector128_ro.csproj b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F_VL_Vector128/Avx512F_VL_Vector128_ro.csproj new file mode 100644 index 0000000000000..ccd06f2145688 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F_VL_Vector128/Avx512F_VL_Vector128_ro.csproj @@ -0,0 +1,14 @@ + + + X86_Avx512F_VL_Vector128_ro + true + + + Embedded + True + + + + + + diff --git a/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F_VL_Vector128/Program.Avx512F_VL_Vector128.cs b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F_VL_Vector128/Program.Avx512F_VL_Vector128.cs new file mode 100644 index 0000000000000..cf87146d1a67f --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F_VL_Vector128/Program.Avx512F_VL_Vector128.cs @@ -0,0 +1,16 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System; +using System.Collections.Generic; + +namespace JIT.HardwareIntrinsics.X86._Avx512F_VL_Vector128 +{ + public static partial class Program + { + static Program() + { + + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F_VL_Vector256/Avx512F_VL_Vector256_r.csproj b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F_VL_Vector256/Avx512F_VL_Vector256_r.csproj new file mode 100644 index 0000000000000..dbaa00f2ea61b --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F_VL_Vector256/Avx512F_VL_Vector256_r.csproj @@ -0,0 +1,14 @@ + + + X86_Avx512F_VL_Vector256_r + true + + + Embedded + + + + + + + diff --git a/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F_VL_Vector256/Avx512F_VL_Vector256_ro.csproj b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F_VL_Vector256/Avx512F_VL_Vector256_ro.csproj new file mode 100644 index 0000000000000..c68ca639fbcaf --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F_VL_Vector256/Avx512F_VL_Vector256_ro.csproj @@ -0,0 +1,14 @@ + + + X86_Avx512F_VL_Vector256_ro + true + + + Embedded + True + + + + + + diff --git a/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F_VL_Vector256/Program.Avx512F_VL_Vector256.cs b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F_VL_Vector256/Program.Avx512F_VL_Vector256.cs new file mode 100644 index 0000000000000..f620101573ba1 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512F_VL_Vector256/Program.Avx512F_VL_Vector256.cs @@ -0,0 +1,16 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System; +using System.Collections.Generic; + +namespace JIT.HardwareIntrinsics.X86._Avx512F_VL_Vector256 +{ + public static partial class Program + { + static Program() + { + + } + } +}