From d0c805c3e16ec52da961c18bafcd70a49fdec326 Mon Sep 17 00:00:00 2001 From: Ruihan-Yin Date: Mon, 12 Feb 2024 19:39:37 -0800 Subject: [PATCH] 1.Resolve comments: 2. Added FMA intrinsics with embedded rounding and unit tests. --- src/coreclr/jit/codegen.h | 8 +- src/coreclr/jit/emitxarch.cpp | 11 +- src/coreclr/jit/emitxarch.h | 2 +- src/coreclr/jit/gentree.cpp | 15 +- src/coreclr/jit/hwintrinsiccodegenxarch.cpp | 84 ++-- src/coreclr/jit/hwintrinsiclistxarch.h | 18 +- src/coreclr/jit/lsraxarch.cpp | 11 +- .../X86/Avx512F.PlatformNotSupported.cs | 112 ++++- .../System/Runtime/Intrinsics/X86/Avx512F.cs | 110 +++++ .../ref/System.Runtime.Intrinsics.cs | 22 + .../GenerateHWIntrinsicTests_X86.cs | 66 +++ .../Shared/SimpleBinOpEmbRounding.template | 2 +- .../Shared/SimpleTernOpEmbRounding.template | 392 ++++++++++++++++++ 13 files changed, 804 insertions(+), 49 deletions(-) create mode 100644 src/tests/JIT/HardwareIntrinsics/X86/Shared/SimpleTernOpEmbRounding.template diff --git a/src/coreclr/jit/codegen.h b/src/coreclr/jit/codegen.h index dbf294c00c7c7..662dead5326e6 100644 --- a/src/coreclr/jit/codegen.h +++ b/src/coreclr/jit/codegen.h @@ -976,15 +976,13 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX #ifdef FEATURE_HW_INTRINSICS void genHWIntrinsic(GenTreeHWIntrinsic* node); #if defined(TARGET_XARCH) - void genHWIntrinsic_R_RM( - GenTreeHWIntrinsic* node, instruction ins, emitAttr attr, regNumber reg, GenTree* rmOp, insOpts instOptions); - void genHWIntrinsic_R_RM(GenTreeHWIntrinsic* node, instruction ins, emitAttr attr, regNumber reg, GenTree* rmOp); + void genHWIntrinsic_R_RM(GenTreeHWIntrinsic* node, instruction ins, emitAttr attr, regNumber reg, GenTree* rmOp, insOpts instOptions = INS_OPTS_NONE); void genHWIntrinsic_R_RM_I(GenTreeHWIntrinsic* node, instruction ins, emitAttr attr, int8_t ival); void genHWIntrinsic_R_R_RM(GenTreeHWIntrinsic* node, instruction ins, emitAttr attr, insOpts instOptions); void genHWIntrinsic_R_R_RM_I(GenTreeHWIntrinsic* node, instruction ins, emitAttr attr, int8_t ival); void genHWIntrinsic_R_R_RM_R(GenTreeHWIntrinsic* node, instruction ins, emitAttr attr); void genHWIntrinsic_R_R_R_RM( - instruction ins, emitAttr attr, regNumber targetReg, regNumber op1Reg, regNumber op2Reg, GenTree* op3); + instruction ins, emitAttr attr, regNumber targetReg, regNumber op1Reg, regNumber op2Reg, GenTree* op3, insOpts instOptions = INS_OPTS_NONE); void genHWIntrinsic_R_R_R_RM_I(GenTreeHWIntrinsic* node, instruction ins, emitAttr attr, int8_t ival); void genBaseIntrinsic(GenTreeHWIntrinsic* node); @@ -996,7 +994,7 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX void genAvxFamilyIntrinsic(GenTreeHWIntrinsic* node, insOpts instOptions); void genAESIntrinsic(GenTreeHWIntrinsic* node); void genBMI1OrBMI2Intrinsic(GenTreeHWIntrinsic* node, insOpts instOptions); - void genFMAIntrinsic(GenTreeHWIntrinsic* node); + void genFMAIntrinsic(GenTreeHWIntrinsic* node, insOpts instOptions); void genPermuteVar2x(GenTreeHWIntrinsic* node); void genLZCNTIntrinsic(GenTreeHWIntrinsic* node); void genPCLMULQDQIntrinsic(GenTreeHWIntrinsic* node); diff --git a/src/coreclr/jit/emitxarch.cpp b/src/coreclr/jit/emitxarch.cpp index 242f49569fb22..d8a080029bb01 100644 --- a/src/coreclr/jit/emitxarch.cpp +++ b/src/coreclr/jit/emitxarch.cpp @@ -8552,20 +8552,27 @@ void emitter::emitIns_SIMD_R_R_R_C(instruction ins, // op1Reg -- The register of the first operand // op2Reg -- The register of the second operand // op3Reg -- The register of the second operand +// instOptions - The options that modify how the instruction is generated // void emitter::emitIns_SIMD_R_R_R_R( - instruction ins, emitAttr attr, regNumber targetReg, regNumber op1Reg, regNumber op2Reg, regNumber op3Reg) + instruction ins, emitAttr attr, regNumber targetReg, regNumber op1Reg, regNumber op2Reg, regNumber op3Reg, insOpts instOptions) { if (IsFMAInstruction(ins) || IsPermuteVar2xInstruction(ins) || IsAVXVNNIInstruction(ins)) { assert(UseSimdEncoding()); + if(instOptions != INS_OPTS_NONE) + { + // insOpts is currently available only in EVEX encoding. + assert(UseEvexEncoding()); + } + // Ensure we aren't overwriting op2 or op3 assert((op2Reg != targetReg) || (op1Reg == targetReg)); assert((op3Reg != targetReg) || (op1Reg == targetReg)); emitIns_Mov(INS_movaps, attr, targetReg, op1Reg, /* canSkip */ true); - emitIns_R_R_R(ins, attr, targetReg, op2Reg, op3Reg); + emitIns_R_R_R(ins, attr, targetReg, op2Reg, op3Reg, instOptions); } else if (UseSimdEncoding()) { diff --git a/src/coreclr/jit/emitxarch.h b/src/coreclr/jit/emitxarch.h index d0ec2cfb59686..41ebb3aa0e14e 100644 --- a/src/coreclr/jit/emitxarch.h +++ b/src/coreclr/jit/emitxarch.h @@ -840,7 +840,7 @@ void emitIns_SIMD_R_R_R_C(instruction ins, CORINFO_FIELD_HANDLE fldHnd, int offs); void emitIns_SIMD_R_R_R_R( - instruction ins, emitAttr attr, regNumber targetReg, regNumber op1Reg, regNumber op2Reg, regNumber op3Reg); + instruction ins, emitAttr attr, regNumber targetReg, regNumber op1Reg, regNumber op2Reg, regNumber op3Reg, insOpts instOptions = INS_OPTS_NONE); void emitIns_SIMD_R_R_R_S( instruction ins, emitAttr attr, regNumber targetReg, regNumber op1Reg, regNumber op2Reg, int varx, int offs); diff --git a/src/coreclr/jit/gentree.cpp b/src/coreclr/jit/gentree.cpp index 1ee5847444ddd..e4ccfc9b0f915 100644 --- a/src/coreclr/jit/gentree.cpp +++ b/src/coreclr/jit/gentree.cpp @@ -26478,6 +26478,20 @@ bool GenTreeHWIntrinsic::OperIsEmbRoundingEnabled() const return true; } + case NI_AVX512F_FusedMultiplyAdd: + case NI_AVX512F_FusedMultiplyAddScalar: + case NI_AVX512F_FusedMultiplyAddNegated: + case NI_AVX512F_FusedMultiplyAddNegatedScalar: + case NI_AVX512F_FusedMultiplyAddSubtract: + case NI_AVX512F_FusedMultiplySubtract: + case NI_AVX512F_FusedMultiplySubtractAdd: + case NI_AVX512F_FusedMultiplySubtractNegated: + case NI_AVX512F_FusedMultiplySubtractNegatedScalar: + case NI_AVX512F_FusedMultiplySubtractScalar: + { + return numArgs == 4; + } + case NI_AVX512F_Add: case NI_AVX512F_Divide: case NI_AVX512F_Multiply: @@ -26485,7 +26499,6 @@ bool GenTreeHWIntrinsic::OperIsEmbRoundingEnabled() const case NI_AVX512F_Scale: - case NI_AVX512F_ConvertScalarToVector128Double: case NI_AVX512F_ConvertScalarToVector128Single: #if defined(TARGET_AMD64) case NI_AVX512F_X64_ConvertScalarToVector128Double: diff --git a/src/coreclr/jit/hwintrinsiccodegenxarch.cpp b/src/coreclr/jit/hwintrinsiccodegenxarch.cpp index 4ef4cec1421a1..e2dca87d466f2 100644 --- a/src/coreclr/jit/hwintrinsiccodegenxarch.cpp +++ b/src/coreclr/jit/hwintrinsiccodegenxarch.cpp @@ -278,6 +278,13 @@ void CodeGen::genHWIntrinsic(GenTreeHWIntrinsic* node) break; } + case 4: + { + numArgs = 3; + node->ResetHWIntrinsicId(intrinsicId, compiler, node->Op(1), node->Op(2), node->Op(3)); + break; + } + default: { unreached(); @@ -738,7 +745,7 @@ void CodeGen::genHWIntrinsic(GenTreeHWIntrinsic* node) genBMI1OrBMI2Intrinsic(node, instOptions); break; case InstructionSet_FMA: - genFMAIntrinsic(node); + genFMAIntrinsic(node, instOptions); break; case InstructionSet_LZCNT: case InstructionSet_LZCNT_X64: @@ -779,12 +786,9 @@ void CodeGen::genHWIntrinsic_R_RM( emitter* emit = GetEmitter(); OperandDesc rmOpDesc = genOperandDesc(rmOp); - assert(reg != REG_NA); - - if ((instOptions & INS_OPTS_EVEX_b_MASK) != 0) + if (((instOptions & INS_OPTS_EVEX_b_MASK) != 0) && (rmOpDesc.GetKind() == OperandKind::Reg)) { // As embedded rounding only appies in R_R case, we can skip other checks for different paths. - assert(rmOpDesc.GetKind() == OperandKind::Reg); regNumber op1Reg = rmOp->GetRegNum(); assert(op1Reg != REG_NA); @@ -792,26 +796,6 @@ void CodeGen::genHWIntrinsic_R_RM( return; } - genHWIntrinsic_R_RM(node, ins, attr, reg, rmOp); -} - -//------------------------------------------------------------------------ -// genHWIntrinsic_R_RM: Generates code for a hardware intrinsic node that takes a -// register operand and a register/memory operand. -// -// Arguments: -// node - The hardware intrinsic node -// ins - The instruction being generated -// attr - The emit attribute for the instruction being generated -// reg - The register -// rmOp - The register/memory operand node -// -void CodeGen::genHWIntrinsic_R_RM( - GenTreeHWIntrinsic* node, instruction ins, emitAttr attr, regNumber reg, GenTree* rmOp) -{ - emitter* emit = GetEmitter(); - OperandDesc rmOpDesc = genOperandDesc(rmOp); - if (rmOpDesc.IsContained()) { assert(HWIntrinsicInfo::SupportsContainment(node->GetHWIntrinsicId())); @@ -1137,9 +1121,10 @@ void CodeGen::genHWIntrinsic_R_R_RM_R(GenTreeHWIntrinsic* node, instruction ins, // op1Reg - The register of the first operand // op2Reg - The register of the second operand // op3 - The third operand +// instOptions - The options that modify how the instruction is generated // void CodeGen::genHWIntrinsic_R_R_R_RM( - instruction ins, emitAttr attr, regNumber targetReg, regNumber op1Reg, regNumber op2Reg, GenTree* op3) + instruction ins, emitAttr attr, regNumber targetReg, regNumber op1Reg, regNumber op2Reg, GenTree* op3, insOpts instOptions) { assert(targetReg != REG_NA); assert(op1Reg != REG_NA); @@ -1148,6 +1133,16 @@ void CodeGen::genHWIntrinsic_R_R_R_RM( emitter* emit = GetEmitter(); OperandDesc op3Desc = genOperandDesc(op3); + if(((instOptions & INS_OPTS_EVEX_b_MASK) != 0 ) && (op3Desc.GetKind() == OperandKind::Reg)) + { + // As embedded rounding only appies in R_R case, we can skip other checks for different paths. + regNumber op3Reg = op3->GetRegNum(); + assert(op3Reg != REG_NA); + + emit->emitIns_SIMD_R_R_R_R(ins, attr, targetReg, op1Reg, op2Reg, op3Desc.GetReg(), instOptions); + return; + } + switch (op3Desc.GetKind()) { case OperandKind::ClsVar: @@ -1409,6 +1404,37 @@ void CodeGen::genNonTableDrivenHWIntrinsicsJumpTableFallback(GenTreeHWIntrinsic* genHWIntrinsicJumpTableFallback(intrinsicId, lastOp->GetRegNum(), baseReg, offsReg, emitSwCase); break; } + + case NI_AVX512F_FusedMultiplyAdd: + case NI_AVX512F_FusedMultiplyAddScalar: + case NI_AVX512F_FusedMultiplyAddNegated: + case NI_AVX512F_FusedMultiplyAddNegatedScalar: + case NI_AVX512F_FusedMultiplyAddSubtract: + case NI_AVX512F_FusedMultiplySubtract: + case NI_AVX512F_FusedMultiplySubtractAdd: + case NI_AVX512F_FusedMultiplySubtractNegated: + case NI_AVX512F_FusedMultiplySubtractNegatedScalar: + case NI_AVX512F_FusedMultiplySubtractScalar: + { + // For FMA intrinsics, since it is not possible to get any contained operand in this case: embedded rounding is limited in register-to-register form, and the control byte is dynamic, we don't need to do any swap. + assert(HWIntrinsicInfo::IsFmaIntrinsic(intrinsicId)); + + GenTree* op1 = node->Op(1); + GenTree* op2 = node->Op(2); + GenTree* op3 = node->Op(3); + + regNumber op1Reg = op1->GetRegNum(); + regNumber op2Reg = op2->GetRegNum(); + + auto emitSwCase = [&](int8_t i) { + insOpts newInstOptions = AddEmbRoundingMode(instOptions, i); + genHWIntrinsic_R_R_R_RM(ins, attr, targetReg, op1Reg, op2Reg, op3, newInstOptions); + }; + regNumber baseReg = node->ExtractTempReg(); + regNumber offsReg = node->GetSingleTempReg(); + genHWIntrinsicJumpTableFallback(intrinsicId, lastOp->GetRegNum(), baseReg, offsReg, emitSwCase); + break; + } default: unreached(); @@ -2119,7 +2145,7 @@ void CodeGen::genAvxFamilyIntrinsic(GenTreeHWIntrinsic* node, insOpts instOption if (HWIntrinsicInfo::IsFmaIntrinsic(intrinsicId)) { - genFMAIntrinsic(node); + genFMAIntrinsic(node, instOptions); return; } @@ -2906,7 +2932,7 @@ void CodeGen::genBMI1OrBMI2Intrinsic(GenTreeHWIntrinsic* node, insOpts instOptio // Arguments: // node - The hardware intrinsic node // -void CodeGen::genFMAIntrinsic(GenTreeHWIntrinsic* node) +void CodeGen::genFMAIntrinsic(GenTreeHWIntrinsic* node, insOpts instOptions) { NamedIntrinsic intrinsicId = node->GetHWIntrinsicId(); assert(HWIntrinsicInfo::IsFmaIntrinsic(intrinsicId)); @@ -3013,7 +3039,7 @@ void CodeGen::genFMAIntrinsic(GenTreeHWIntrinsic* node) } assert(ins != INS_invalid); - genHWIntrinsic_R_R_R_RM(ins, attr, targetReg, emitOp1->GetRegNum(), emitOp2->GetRegNum(), emitOp3); + genHWIntrinsic_R_R_R_RM(ins, attr, targetReg, emitOp1->GetRegNum(), emitOp2->GetRegNum(), emitOp3, instOptions); genProduceReg(node); } diff --git a/src/coreclr/jit/hwintrinsiclistxarch.h b/src/coreclr/jit/hwintrinsiclistxarch.h index 309c741a69d46..ac28f09aae6c2 100644 --- a/src/coreclr/jit/hwintrinsiclistxarch.h +++ b/src/coreclr/jit/hwintrinsiclistxarch.h @@ -857,7 +857,7 @@ HARDWARE_INTRINSIC(AVX512F, CompareNotLessThan, HARDWARE_INTRINSIC(AVX512F, CompareNotLessThanOrEqual, 64, 2, true, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_vcmpps, INS_vcmppd}, HW_Category_SimpleSIMD, HW_Flag_ReturnsPerElementMask|HW_Flag_SpecialImport|HW_Flag_NoCodeGen) HARDWARE_INTRINSIC(AVX512F, CompareOrdered, 64, 2, true, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_vcmpps, INS_vcmppd}, HW_Category_SimpleSIMD, HW_Flag_ReturnsPerElementMask|HW_Flag_SpecialImport|HW_Flag_NoCodeGen) HARDWARE_INTRINSIC(AVX512F, CompareUnordered, 64, 2, true, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_vcmpps, INS_vcmppd}, HW_Category_SimpleSIMD, HW_Flag_ReturnsPerElementMask|HW_Flag_SpecialImport|HW_Flag_NoCodeGen) -HARDWARE_INTRINSIC(AVX512F, ConvertScalarToVector128Double, 16, -1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_cvtsi2sd32, INS_vcvtusi2sd32, INS_invalid, INS_invalid, INS_cvtss2sd, INS_invalid}, HW_Category_SIMDScalar, HW_Flag_BaseTypeFromSecondArg|HW_Flag_CopyUpperBits|HW_Flag_EmbRoundingCompatible) +HARDWARE_INTRINSIC(AVX512F, ConvertScalarToVector128Double, 16, -1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_cvtsi2sd32, INS_vcvtusi2sd32, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMDScalar, HW_Flag_BaseTypeFromSecondArg|HW_Flag_CopyUpperBits) HARDWARE_INTRINSIC(AVX512F, ConvertScalarToVector128Single, 16, -1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_cvtsi2ss32, INS_vcvtusi2ss32, INS_invalid, INS_invalid, INS_invalid, INS_cvtsd2ss}, HW_Category_SIMDScalar, HW_Flag_BaseTypeFromSecondArg|HW_Flag_CopyUpperBits|HW_Flag_EmbRoundingCompatible) HARDWARE_INTRINSIC(AVX512F, ConvertToInt32, 16, -1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_cvtss2si, INS_cvtsd2si}, HW_Category_SIMDScalar, HW_Flag_BaseTypeFromFirstArg|HW_Flag_SpecialCodeGen|HW_Flag_EmbRoundingCompatible) HARDWARE_INTRINSIC(AVX512F, ConvertToUInt32, 16, -1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_vcvtss2usi, INS_vcvtsd2usi}, HW_Category_SIMDScalar, HW_Flag_BaseTypeFromFirstArg|HW_Flag_SpecialCodeGen|HW_Flag_EmbRoundingCompatible) @@ -897,12 +897,16 @@ HARDWARE_INTRINSIC(AVX512F, ExtractVector128, HARDWARE_INTRINSIC(AVX512F, ExtractVector256, 64, 2, true, {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, Fixup, 64, 4, true, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_vfixupimmps, INS_vfixupimmpd}, HW_Category_IMM, HW_Flag_SpecialImport|HW_Flag_FullRangeIMM) HARDWARE_INTRINSIC(AVX512F, FixupScalar, 16, 4, true, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_vfixupimmss, INS_vfixupimmsd}, HW_Category_IMM, HW_Flag_SpecialImport|HW_Flag_FullRangeIMM|HW_Flag_CopyUpperBits) -HARDWARE_INTRINSIC(AVX512F, FusedMultiplyAdd, 64, 3, true, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_vfmadd213ps, INS_vfmadd213pd}, HW_Category_SimpleSIMD, HW_Flag_SpecialCodeGen|HW_Flag_FmaIntrinsic|HW_Flag_RmwIntrinsic) -HARDWARE_INTRINSIC(AVX512F, FusedMultiplyAddNegated, 64, 3, true, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_vfnmadd213ps, INS_vfnmadd213pd}, HW_Category_SimpleSIMD, HW_Flag_SpecialCodeGen|HW_Flag_FmaIntrinsic|HW_Flag_RmwIntrinsic) -HARDWARE_INTRINSIC(AVX512F, FusedMultiplyAddSubtract, 64, 3, true, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_vfmaddsub213ps, INS_vfmaddsub213pd}, HW_Category_SimpleSIMD, HW_Flag_SpecialCodeGen|HW_Flag_FmaIntrinsic|HW_Flag_RmwIntrinsic) -HARDWARE_INTRINSIC(AVX512F, FusedMultiplySubtract, 64, 3, true, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_vfmsub213ps, INS_vfmsub213pd}, HW_Category_SimpleSIMD, HW_Flag_SpecialCodeGen|HW_Flag_FmaIntrinsic|HW_Flag_RmwIntrinsic) -HARDWARE_INTRINSIC(AVX512F, FusedMultiplySubtractAdd, 64, 3, true, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_vfmsubadd213ps, INS_vfmsubadd213pd}, HW_Category_SimpleSIMD, HW_Flag_SpecialCodeGen|HW_Flag_FmaIntrinsic|HW_Flag_RmwIntrinsic) -HARDWARE_INTRINSIC(AVX512F, FusedMultiplySubtractNegated, 64, 3, true, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_vfnmsub213ps, INS_vfnmsub213pd}, HW_Category_SimpleSIMD, HW_Flag_SpecialCodeGen|HW_Flag_FmaIntrinsic|HW_Flag_RmwIntrinsic) +HARDWARE_INTRINSIC(AVX512F, FusedMultiplyAdd, 64, -1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_vfmadd213ps, INS_vfmadd213pd}, HW_Category_SimpleSIMD, HW_Flag_SpecialCodeGen|HW_Flag_FmaIntrinsic|HW_Flag_RmwIntrinsic|HW_Flag_EmbRoundingCompatible) +HARDWARE_INTRINSIC(AVX512F, FusedMultiplyAddScalar, 16, -1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_vfmadd213ss, INS_vfmadd213sd}, HW_Category_SIMDScalar, HW_Flag_SpecialCodeGen|HW_Flag_FmaIntrinsic|HW_Flag_RmwIntrinsic|HW_Flag_CopyUpperBits|HW_Flag_EmbRoundingCompatible) +HARDWARE_INTRINSIC(AVX512F, FusedMultiplyAddNegated, 64, -1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_vfnmadd213ps, INS_vfnmadd213pd}, HW_Category_SimpleSIMD, HW_Flag_SpecialCodeGen|HW_Flag_FmaIntrinsic|HW_Flag_RmwIntrinsic|HW_Flag_EmbRoundingCompatible) +HARDWARE_INTRINSIC(AVX512F, FusedMultiplyAddNegatedScalar, 16, -1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_vfnmadd213ss, INS_vfnmadd213sd}, HW_Category_SIMDScalar, HW_Flag_SpecialCodeGen|HW_Flag_FmaIntrinsic|HW_Flag_RmwIntrinsic|HW_Flag_CopyUpperBits|HW_Flag_EmbRoundingCompatible) +HARDWARE_INTRINSIC(AVX512F, FusedMultiplyAddSubtract, 64, -1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_vfmaddsub213ps, INS_vfmaddsub213pd}, HW_Category_SimpleSIMD, HW_Flag_SpecialCodeGen|HW_Flag_FmaIntrinsic|HW_Flag_RmwIntrinsic|HW_Flag_EmbRoundingCompatible) +HARDWARE_INTRINSIC(AVX512F, FusedMultiplySubtract, 64, -1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_vfmsub213ps, INS_vfmsub213pd}, HW_Category_SimpleSIMD, HW_Flag_SpecialCodeGen|HW_Flag_FmaIntrinsic|HW_Flag_RmwIntrinsic|HW_Flag_EmbRoundingCompatible) +HARDWARE_INTRINSIC(AVX512F, FusedMultiplySubtractScalar, 16, -1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_vfmsub213ss, INS_vfmsub213sd}, HW_Category_SIMDScalar, HW_Flag_SpecialCodeGen|HW_Flag_FmaIntrinsic|HW_Flag_RmwIntrinsic|HW_Flag_CopyUpperBits|HW_Flag_EmbRoundingCompatible) +HARDWARE_INTRINSIC(AVX512F, FusedMultiplySubtractAdd, 64, -1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_vfmsubadd213ps, INS_vfmsubadd213pd}, HW_Category_SimpleSIMD, HW_Flag_SpecialCodeGen|HW_Flag_FmaIntrinsic|HW_Flag_RmwIntrinsic|HW_Flag_EmbRoundingCompatible) +HARDWARE_INTRINSIC(AVX512F, FusedMultiplySubtractNegated, 64, -1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_vfnmsub213ps, INS_vfnmsub213pd}, HW_Category_SimpleSIMD, HW_Flag_SpecialCodeGen|HW_Flag_FmaIntrinsic|HW_Flag_RmwIntrinsic|HW_Flag_EmbRoundingCompatible) +HARDWARE_INTRINSIC(AVX512F, FusedMultiplySubtractNegatedScalar, 16, -1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_vfnmsub213ss, INS_vfnmsub213sd}, HW_Category_SIMDScalar, HW_Flag_SpecialCodeGen|HW_Flag_FmaIntrinsic|HW_Flag_RmwIntrinsic|HW_Flag_CopyUpperBits|HW_Flag_EmbRoundingCompatible) HARDWARE_INTRINSIC(AVX512F, GetExponent, 64, 1, true, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_vgetexpps, INS_vgetexppd}, HW_Category_SimpleSIMD, HW_Flag_NoFlag) HARDWARE_INTRINSIC(AVX512F, GetExponentScalar, 16, -1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_vgetexpss, INS_vgetexpsd}, HW_Category_SIMDScalar, HW_Flag_CopyUpperBits) HARDWARE_INTRINSIC(AVX512F, GetMantissa, 64, 2, true, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_vgetmantps, INS_vgetmantpd}, HW_Category_IMM, HW_Flag_NoFlag) diff --git a/src/coreclr/jit/lsraxarch.cpp b/src/coreclr/jit/lsraxarch.cpp index 2a0647ab67fd8..1ca25c54df10f 100644 --- a/src/coreclr/jit/lsraxarch.cpp +++ b/src/coreclr/jit/lsraxarch.cpp @@ -2401,13 +2401,17 @@ int LinearScan::BuildHWIntrinsic(GenTreeHWIntrinsic* intrinsicTree, int* pDstCou case NI_FMA_MultiplySubtractNegatedScalar: case NI_FMA_MultiplySubtractScalar: case NI_AVX512F_FusedMultiplyAdd: + case NI_AVX512F_FusedMultiplyAddScalar: case NI_AVX512F_FusedMultiplyAddNegated: + case NI_AVX512F_FusedMultiplyAddNegatedScalar: case NI_AVX512F_FusedMultiplyAddSubtract: case NI_AVX512F_FusedMultiplySubtract: + case NI_AVX512F_FusedMultiplySubtractScalar: case NI_AVX512F_FusedMultiplySubtractAdd: case NI_AVX512F_FusedMultiplySubtractNegated: + case NI_AVX512F_FusedMultiplySubtractNegatedScalar: { - assert(numArgs == 3); + assert((numArgs == 3) || (intrinsicTree->OperIsEmbRoundingEnabled())); assert(isRMW); assert(HWIntrinsicInfo::IsFmaIntrinsic(intrinsicId)); @@ -2505,6 +2509,11 @@ int LinearScan::BuildHWIntrinsic(GenTreeHWIntrinsic* intrinsicTree, int* pDstCou srcCount += BuildDelayFreeUses(emitOp2, emitOp1); srcCount += emitOp3->isContained() ? BuildOperandUses(emitOp3) : BuildDelayFreeUses(emitOp3, emitOp1); + if(intrinsicTree->OperIsEmbRoundingEnabled() && !intrinsicTree->Op(4)->IsCnsIntOrI()) + { + srcCount += BuildDelayFreeUses(intrinsicTree->Op(4), emitOp1); + } + buildUses = false; break; } 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 e14aa8fbb35be..42be371075507 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 @@ -1894,6 +1894,11 @@ internal X64() { } public static Vector128 ConvertScalarToVector128Single(Vector128 upper, uint value) { throw new PlatformNotSupportedException(); } /// /// __m128 _mm_cvt_roundi32_ss (__m128 a, int b, int rounding) + /// VCVTUSI2SS xmm1, xmm2, r32 {er} + /// + public static Vector128 ConvertScalarToVector128Single(Vector128 upper, uint value, [ConstantExpected(Max = FloatRoundingMode.ToZero)] FloatRoundingMode mode) => ConvertScalarToVector128Single(upper, value, mode); + /// + /// __m128 _mm_cvt_roundi32_ss (__m128 a, int b, int rounding) /// VCVTSI2SS xmm1, xmm2, r32 {er} /// public static Vector128 ConvertScalarToVector128Single(Vector128 upper, int value, [ConstantExpected(Max = FloatRoundingMode.ToZero)] FloatRoundingMode mode) { throw new PlatformNotSupportedException(); } @@ -2173,6 +2178,11 @@ internal X64() { } /// public static Vector512 ConvertToVector512Single(Vector512 value, [ConstantExpected(Max = FloatRoundingMode.ToZero)] FloatRoundingMode mode) { throw new PlatformNotSupportedException(); } /// + /// __m512 _mm512_cvt_roundepi32_ps (__m512i a, int rounding) + /// VCVTUDQ2PS zmm1, zmm2 {er} + /// + public static Vector512 ConvertToVector512Single(Vector512 value, [ConstantExpected(Max = FloatRoundingMode.ToZero)] FloatRoundingMode mode) { throw new PlatformNotSupportedException(); } + /// /// __m512i _mm512_cvtepu8_epi32 (__m128i a) /// VPMOVZXBD zmm1 {k1}{z}, xmm2/m128 /// @@ -2483,11 +2493,31 @@ internal X64() { } /// VFMADDPS zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst /// public static Vector512 FusedMultiplyAdd(Vector512 a, Vector512 b, Vector512 c) { throw new PlatformNotSupportedException(); } + /// + /// __m512 _mm512_fmadd_round_ps (__m512 a, __m512 b, __m512 c, int r) + /// VFMADDPS zmm1, zmm2, zmm3 {er} + /// + public static Vector512 FusedMultiplyAdd(Vector512 a, Vector512 b, Vector512 c, [ConstantExpected(Max = FloatRoundingMode.ToZero)] FloatRoundingMode mode) { throw new PlatformNotSupportedException(); } /// /// __m512d _mm512_fmadd_pd (__m512d a, __m512d b, __m512d c) /// VFMADDPD zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst /// public static Vector512 FusedMultiplyAdd(Vector512 a, Vector512 b, Vector512 c) { throw new PlatformNotSupportedException(); } + /// + /// __m512d _mm512_fmadd_round_pd (__m512d a, __m512d b, __m512d c, int r) + /// VFMADDPS zmm1, zmm2, zmm3 {er} + /// + public static Vector512 FusedMultiplyAdd(Vector512 a, Vector512 b, Vector512 c, [ConstantExpected(Max = FloatRoundingMode.ToZero)] FloatRoundingMode mode) { throw new PlatformNotSupportedException(); } + /// + /// __m128 _mm_fmadd_round_ss (__m128 a, __m128 b, __m128 c, int r) + /// VFMADDSS xmm1, xmm2, xmm3 {er} + /// + public static Vector128 FusedMultiplyAddScalar(Vector128 a, Vector128 b, Vector128 c, [ConstantExpected(Max = FloatRoundingMode.ToZero)] FloatRoundingMode mode) { throw new PlatformNotSupportedException(); } + /// + /// __m128d _mm_fmadd_round_sd (__m128d a, __m128d b, __m128d c, int r) + /// VFMADDSD xmm1, xmm2, xmm3 {er} + /// + public static Vector128 FusedMultiplyAddScalar(Vector128 a, Vector128 b, Vector128 c, [ConstantExpected(Max = FloatRoundingMode.ToZero)] FloatRoundingMode mode) { throw new PlatformNotSupportedException(); } /// /// __m512 _mm512_fmaddsub_ps (__m512 a, __m512 b, __m512 c) @@ -2495,10 +2525,20 @@ internal X64() { } /// public static Vector512 FusedMultiplyAddSubtract(Vector512 a, Vector512 b, Vector512 c) { throw new PlatformNotSupportedException(); } /// + /// __m512 _mm512_fmaddsub_ps (__m512 a, __m512 b, __m512 c, int c) + /// VFMADDSUBPS zmm1, zmm2, zmm3 {er} + /// + public static Vector512 FusedMultiplyAddSubtract(Vector512 a, Vector512 b, Vector512 c, [ConstantExpected(Max = FloatRoundingMode.ToZero)] FloatRoundingMode mode) { throw new PlatformNotSupportedException(); } + /// /// __m512d _mm512_fmaddsub_pd (__m512d a, __m512d b, __m512d c) /// VFMADDSUBPD zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst /// public static Vector512 FusedMultiplyAddSubtract(Vector512 a, Vector512 b, Vector512 c) { throw new PlatformNotSupportedException(); } + /// + /// __m512d _mm512_fmaddsub_pd (__m512d a, __m512d b, __m512d c, int c) + /// VFMADDSUBPS zmm1, zmm2, zmm3 {er} + /// + public static Vector512 FusedMultiplyAddSubtract(Vector512 a, Vector512 b, Vector512 c, [ConstantExpected(Max = FloatRoundingMode.ToZero)] FloatRoundingMode mode) { throw new PlatformNotSupportedException(); } /// /// __m512 _mm512_fmsub_ps (__m512 a, __m512 b, __m512 c) @@ -2506,21 +2546,50 @@ internal X64() { } /// public static Vector512 FusedMultiplySubtract(Vector512 a, Vector512 b, Vector512 c) { throw new PlatformNotSupportedException(); } /// + /// __m512 _mm512_fmsub_round_ps (__m512 a, __m512 b, __m512 c, int r) + /// VFMSUBPS zmm1, zmm2, zmm3 {er} + /// + public static Vector512 FusedMultiplySubtract(Vector512 a, Vector512 b, Vector512 c, [ConstantExpected(Max = FloatRoundingMode.ToZero)] FloatRoundingMode mode) { throw new PlatformNotSupportedException(); } + /// /// __m512d _mm512_fmsub_pd (__m512d a, __m512d b, __m512d c) /// VFMSUBPD zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst /// public static Vector512 FusedMultiplySubtract(Vector512 a, Vector512 b, Vector512 c) { throw new PlatformNotSupportedException(); } - + /// + /// __m512d _mm512_fmsub_round_pd (__m512d a, __m512d b, __m512d c, int r) + /// VFMSUBPD zmm1, zmm2, zmm3 {er} + /// + public static Vector512 FusedMultiplySubtract(Vector512 a, Vector512 b, Vector512 c, [ConstantExpected(Max = FloatRoundingMode.ToZero)] FloatRoundingMode mode) { throw new PlatformNotSupportedException(); } + /// + /// __m128 _mm_fmsub_round_ss (__m128 a, __m128 b, __m128 c, int r) + /// VFMSUBSS xmm1, xmm2, xmm3 {er} + /// + public static Vector128 FusedMultiplySubtractScalar(Vector128 a, Vector128 b, Vector128 c, [ConstantExpected(Max = FloatRoundingMode.ToZero)] FloatRoundingMode mode) { throw new PlatformNotSupportedException(); } + /// + /// __m128d _mm_fmsub_round_sd (__m128d a, __m128d b, __m128d c, int r) + /// VFMSUBSS xmm1, xmm2, xmm3 {er} + /// + public static Vector128 FusedMultiplySubtractScalar(Vector128 a, Vector128 b, Vector128 c, [ConstantExpected(Max = FloatRoundingMode.ToZero)] FloatRoundingMode mode) { throw new PlatformNotSupportedException(); } /// /// __m512 _mm512_fmsubadd_ps (__m512 a, __m512 b, __m512 c) /// VFMSUBADDPS zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst /// public static Vector512 FusedMultiplySubtractAdd(Vector512 a, Vector512 b, Vector512 c) { throw new PlatformNotSupportedException(); } /// + /// __m512 _mm512_fmsubadd_round_ps (__m512 a, __m512 b, __m512 c) + /// VFMSUBADDPS zmm1, zmm2, zmm3 {er} + /// + public static Vector512 FusedMultiplySubtractAdd(Vector512 a, Vector512 b, Vector512 c, [ConstantExpected(Max = FloatRoundingMode.ToZero)] FloatRoundingMode mode) { throw new PlatformNotSupportedException(); } + /// /// __m512d _mm512_fmsubadd_pd (__m512d a, __m512d b, __m512d c) /// VFMSUBADDPD zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst /// public static Vector512 FusedMultiplySubtractAdd(Vector512 a, Vector512 b, Vector512 c) { throw new PlatformNotSupportedException(); } + /// + /// __m512d _mm512_fmsubadd_round_ps (__m512d a, __m512d b, __m512d c) + /// VFMSUBADDPD zmm1, zmm2, zmm3 {er} + /// + public static Vector512 FusedMultiplySubtractAdd(Vector512 a, Vector512 b, Vector512 c, [ConstantExpected(Max = FloatRoundingMode.ToZero)] FloatRoundingMode mode) { throw new PlatformNotSupportedException(); } /// /// __m512 _mm512_fnmadd_ps (__m512 a, __m512 b, __m512 c) @@ -2528,21 +2597,60 @@ internal X64() { } /// public static Vector512 FusedMultiplyAddNegated(Vector512 a, Vector512 b, Vector512 c) { throw new PlatformNotSupportedException(); } /// + /// __m512 _mm512_fnmadd_round_ps (__m512 a, __m512 b, __m512 c, int r) + /// VFNMADDPS zmm1, zmm2, zmm3 {er} + /// + public static Vector512 FusedMultiplyAddNegated(Vector512 a, Vector512 b, Vector512 c, [ConstantExpected(Max = FloatRoundingMode.ToZero)] FloatRoundingMode mode) { throw new PlatformNotSupportedException(); } + /// /// __m512d _mm512_fnmadd_pd (__m512d a, __m512d b, __m512d c) /// VFNMADDPD zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst /// public static Vector512 FusedMultiplyAddNegated(Vector512 a, Vector512 b, Vector512 c) { throw new PlatformNotSupportedException(); } - + /// + /// __m512d _mm512_fnmadd_round_pdd (__m512d a, __m512d b, __m512d c, int r) + /// VFNMADDPS zmm1, zmm2, zmm3 {er} + /// + public static Vector512 FusedMultiplyAddNegated(Vector512 a, Vector512 b, Vector512 c, [ConstantExpected(Max = FloatRoundingMode.ToZero)] FloatRoundingMode mode) { throw new PlatformNotSupportedException(); } + /// + /// __m128 _mm_fnmadd_round_ss (__m128 a, __m128 b, __m128 c, int r) + /// VFNMADDSS xmm1, xmm2, xmm3 {er} + /// + public static Vector128 FusedMultiplyAddNegatedScalar(Vector128 a, Vector128 b, Vector128 c, [ConstantExpected(Max = FloatRoundingMode.ToZero)] FloatRoundingMode mode) { throw new PlatformNotSupportedException(); } + /// + /// __m128d _mm_fnmadd_round_sd (__m128d a, __m128d b, __m128d c, int r) + /// VFNMADDSD xmm1, xmm2, xmm3 {er} + /// + public static Vector128 FusedMultiplyAddNegatedScalar(Vector128 a, Vector128 b, Vector128 c, [ConstantExpected(Max = FloatRoundingMode.ToZero)] FloatRoundingMode mode) { throw new PlatformNotSupportedException(); } /// /// __m512 _mm512_fnmsub_ps (__m512 a, __m512 b, __m512 c) /// VFNMSUBPS zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst /// public static Vector512 FusedMultiplySubtractNegated(Vector512 a, Vector512 b, Vector512 c) { throw new PlatformNotSupportedException(); } /// + /// __m512 _mm512_fnmsub_round_ps (__m512 a, __m512 b, __m512 c, int r) + /// VFNMSUBPS zmm1, zmm2, zmm3 {er} + /// + public static Vector512 FusedMultiplySubtractNegated(Vector512 a, Vector512 b, Vector512 c, [ConstantExpected(Max = FloatRoundingMode.ToZero)] FloatRoundingMode mode) { throw new PlatformNotSupportedException(); } + /// /// __m512d _mm512_fnmsub_pd (__m512d a, __m512d b, __m512d c) /// VFNMSUBPD zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst /// public static Vector512 FusedMultiplySubtractNegated(Vector512 a, Vector512 b, Vector512 c) { throw new PlatformNotSupportedException(); } +/// + /// __m512d _mm512_fnmsub_round_pd (__m512d a, __m512d b, __m512d c, int r) + /// VFNMSUBPS zmm1, zmm2, zmm3 {er} + /// + public static Vector512 FusedMultiplySubtractNegated(Vector512 a, Vector512 b, Vector512 c, [ConstantExpected(Max = FloatRoundingMode.ToZero)] FloatRoundingMode mode) { throw new PlatformNotSupportedException(); } + /// + /// __m128 _mm_fnmsub_round_ss (__m128 a, __m128 b, __m128 c, int r) + /// VFNMSUBSS xmm1, xmm2, xmm3 {er} + /// + public static Vector128 FusedMultiplySubtractNegatedScalar(Vector128 a, Vector128 b, Vector128 c, [ConstantExpected(Max = FloatRoundingMode.ToZero)] FloatRoundingMode mode) { throw new PlatformNotSupportedException(); } + /// + /// __m128d _mm_fnmsub_round_sd (__m128d a, __m128d b, __m128d c, int r) + /// VFNMSUBSS xmm1, xmm2, xmm3 {er} + /// + public static Vector128 FusedMultiplySubtractNegatedScalar(Vector128 a, Vector128 b, Vector128 c, [ConstantExpected(Max = FloatRoundingMode.ToZero)] FloatRoundingMode mode) { throw new PlatformNotSupportedException(); } /// /// __m512 _mm512_getexp_ps (__m512 a) 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 d20215e053ec4..b0f48348c1ff9 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 @@ -1896,6 +1896,11 @@ internal X64() { } public static Vector128 ConvertScalarToVector128Single(Vector128 upper, uint value) => ConvertScalarToVector128Single(upper, value); /// /// __m128 _mm_cvt_roundi32_ss (__m128 a, int b, int rounding) + /// VCVTUSI2SS xmm1, xmm2, r32 {er} + /// + public static Vector128 ConvertScalarToVector128Single(Vector128 upper, uint value, [ConstantExpected(Max = FloatRoundingMode.ToZero)] FloatRoundingMode mode) => ConvertScalarToVector128Single(upper, value, mode); + /// + /// __m128 _mm_cvt_roundi32_ss (__m128 a, int b, int rounding) /// VCVTSI2SS xmm1, xmm2, r32 {er} /// public static Vector128 ConvertScalarToVector128Single(Vector128 upper, int value, [ConstantExpected(Max = FloatRoundingMode.ToZero)] FloatRoundingMode mode) => ConvertScalarToVector128Single(upper, value, mode); @@ -2247,6 +2252,11 @@ internal X64() { } /// public static Vector512 ConvertToVector512Single(Vector512 value) => ConvertToVector512Single(value); /// + /// __m512 _mm512_cvt_roundepi32_ps (__m512i a, int rounding) + /// VCVTUDQ2PS zmm1, zmm2 {er} + /// + public static Vector512 ConvertToVector512Single(Vector512 value, [ConstantExpected(Max = FloatRoundingMode.ToZero)] FloatRoundingMode mode) => ConvertToVector512Single(value, mode); + /// /// __m512i _mm512_cvtepi8_epi32 (__m128i a) /// VPMOVSXBD zmm1 {k1}{z}, xmm2/m128 /// @@ -2488,10 +2498,30 @@ internal X64() { } /// public static Vector512 FusedMultiplyAdd(Vector512 a, Vector512 b, Vector512 c) => FusedMultiplyAdd(a, b, c); /// + /// __m512 _mm512_fmadd_round_ps (__m512 a, __m512 b, __m512 c, int r) + /// VFMADDPS zmm1, zmm2, zmm3 {er} + /// + public static Vector512 FusedMultiplyAdd(Vector512 a, Vector512 b, Vector512 c, [ConstantExpected(Max = FloatRoundingMode.ToZero)] FloatRoundingMode mode) => FusedMultiplyAdd(a, b, c, mode); + /// /// __m512d _mm512_fmadd_pd (__m512d a, __m512d b, __m512d c) /// VFMADDPD zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst /// public static Vector512 FusedMultiplyAdd(Vector512 a, Vector512 b, Vector512 c) => FusedMultiplyAdd(a, b, c); + /// + /// __m512d _mm512_fmadd_round_pd (__m512d a, __m512d b, __m512d c, int r) + /// VFMADDPS zmm1, zmm2, zmm3 {er} + /// + public static Vector512 FusedMultiplyAdd(Vector512 a, Vector512 b, Vector512 c, [ConstantExpected(Max = FloatRoundingMode.ToZero)] FloatRoundingMode mode) => FusedMultiplyAdd(a, b, c, mode); + /// + /// __m128 _mm_fmadd_round_ss (__m128 a, __m128 b, __m128 c, int r) + /// VFMADDSS xmm1, xmm2, xmm3 {er} + /// + public static Vector128 FusedMultiplyAddScalar(Vector128 a, Vector128 b, Vector128 c, [ConstantExpected(Max = FloatRoundingMode.ToZero)] FloatRoundingMode mode) => FusedMultiplyAddScalar(a, b, c, mode); + /// + /// __m128d _mm_fmadd_round_sd (__m128d a, __m128d b, __m128d c, int r) + /// VFMADDSD xmm1, xmm2, xmm3 {er} + /// + public static Vector128 FusedMultiplyAddScalar(Vector128 a, Vector128 b, Vector128 c, [ConstantExpected(Max = FloatRoundingMode.ToZero)] FloatRoundingMode mode) => FusedMultiplyAddScalar(a, b, c, mode); /// /// __m512 _mm512_fmaddsub_ps (__m512 a, __m512 b, __m512 c) @@ -2499,10 +2529,20 @@ internal X64() { } /// public static Vector512 FusedMultiplyAddSubtract(Vector512 a, Vector512 b, Vector512 c) => FusedMultiplyAddSubtract(a, b, c); /// + /// __m512 _mm512_fmaddsub_ps (__m512 a, __m512 b, __m512 c, int c) + /// VFMADDSUBPS zmm1, zmm2, zmm3 {er} + /// + public static Vector512 FusedMultiplyAddSubtract(Vector512 a, Vector512 b, Vector512 c, [ConstantExpected(Max = FloatRoundingMode.ToZero)] FloatRoundingMode mode) => FusedMultiplyAddSubtract(a, b, c, mode); + /// /// __m512d _mm512_fmaddsub_pd (__m512d a, __m512d b, __m512d c) /// VFMADDSUBPD zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst /// public static Vector512 FusedMultiplyAddSubtract(Vector512 a, Vector512 b, Vector512 c) => FusedMultiplyAddSubtract(a, b, c); + /// + /// __m512d _mm512_fmaddsub_pd (__m512d a, __m512d b, __m512d c, int c) + /// VFMADDSUBPS zmm1, zmm2, zmm3 {er} + /// + public static Vector512 FusedMultiplyAddSubtract(Vector512 a, Vector512 b, Vector512 c, [ConstantExpected(Max = FloatRoundingMode.ToZero)] FloatRoundingMode mode) => FusedMultiplyAddSubtract(a, b, c, mode); /// /// __m512 _mm512_fmsub_ps (__m512 a, __m512 b, __m512 c) @@ -2510,10 +2550,30 @@ internal X64() { } /// public static Vector512 FusedMultiplySubtract(Vector512 a, Vector512 b, Vector512 c) => FusedMultiplySubtract(a, b, c); /// + /// __m512 _mm512_fmsub_round_ps (__m512 a, __m512 b, __m512 c, int r) + /// VFMSUBPS zmm1, zmm2, zmm3 {er} + /// + public static Vector512 FusedMultiplySubtract(Vector512 a, Vector512 b, Vector512 c, [ConstantExpected(Max = FloatRoundingMode.ToZero)] FloatRoundingMode mode) => FusedMultiplySubtract(a, b, c, mode); + /// /// __m512d _mm512_fmsub_pd (__m512d a, __m512d b, __m512d c) /// VFMSUBPD zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst /// public static Vector512 FusedMultiplySubtract(Vector512 a, Vector512 b, Vector512 c) => FusedMultiplySubtract(a, b, c); + /// + /// __m512d _mm512_fmsub_round_pd (__m512d a, __m512d b, __m512d c, int r) + /// VFMSUBPD zmm1, zmm2, zmm3 {er} + /// + public static Vector512 FusedMultiplySubtract(Vector512 a, Vector512 b, Vector512 c, [ConstantExpected(Max = FloatRoundingMode.ToZero)] FloatRoundingMode mode) => FusedMultiplySubtract(a, b, c, mode); + /// + /// __m128 _mm_fmsub_round_ss (__m128 a, __m128 b, __m128 c, int r) + /// VFMSUBSS xmm1, xmm2, xmm3 {er} + /// + public static Vector128 FusedMultiplySubtractScalar(Vector128 a, Vector128 b, Vector128 c, [ConstantExpected(Max = FloatRoundingMode.ToZero)] FloatRoundingMode mode) => FusedMultiplySubtractScalar(a, b, c, mode); + /// + /// __m128d _mm_fmsub_round_sd (__m128d a, __m128d b, __m128d c, int r) + /// VFMSUBSS xmm1, xmm2, xmm3 {er} + /// + public static Vector128 FusedMultiplySubtractScalar(Vector128 a, Vector128 b, Vector128 c, [ConstantExpected(Max = FloatRoundingMode.ToZero)] FloatRoundingMode mode) => FusedMultiplySubtractScalar(a, b, c, mode); /// /// __m512 _mm512_fmsubadd_ps (__m512 a, __m512 b, __m512 c) @@ -2521,10 +2581,20 @@ internal X64() { } /// public static Vector512 FusedMultiplySubtractAdd(Vector512 a, Vector512 b, Vector512 c) => FusedMultiplySubtractAdd(a, b, c); /// + /// __m512 _mm512_fmsubadd_round_ps (__m512 a, __m512 b, __m512 c) + /// VFMSUBADDPS zmm1, zmm2, zmm3 {er} + /// + public static Vector512 FusedMultiplySubtractAdd(Vector512 a, Vector512 b, Vector512 c, [ConstantExpected(Max = FloatRoundingMode.ToZero)] FloatRoundingMode mode) => FusedMultiplySubtractAdd(a, b, c, mode); + /// /// __m512d _mm512_fmsubadd_pd (__m512d a, __m512d b, __m512d c) /// VFMSUBADDPD zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst /// public static Vector512 FusedMultiplySubtractAdd(Vector512 a, Vector512 b, Vector512 c) => FusedMultiplySubtractAdd(a, b, c); + /// + /// __m512d _mm512_fmsubadd_round_ps (__m512d a, __m512d b, __m512d c) + /// VFMSUBADDPD zmm1, zmm2, zmm3 {er} + /// + public static Vector512 FusedMultiplySubtractAdd(Vector512 a, Vector512 b, Vector512 c, [ConstantExpected(Max = FloatRoundingMode.ToZero)] FloatRoundingMode mode) => FusedMultiplySubtractAdd(a, b, c, mode); /// /// __m512 _mm512_fnmadd_ps (__m512 a, __m512 b, __m512 c) @@ -2532,10 +2602,30 @@ internal X64() { } /// public static Vector512 FusedMultiplyAddNegated(Vector512 a, Vector512 b, Vector512 c) => FusedMultiplyAddNegated(a, b, c); /// + /// __m512 _mm512_fnmadd_round_ps (__m512 a, __m512 b, __m512 c, int r) + /// VFNMADDPS zmm1, zmm2, zmm3 {er} + /// + public static Vector512 FusedMultiplyAddNegated(Vector512 a, Vector512 b, Vector512 c, [ConstantExpected(Max = FloatRoundingMode.ToZero)] FloatRoundingMode mode) => FusedMultiplyAddNegated(a, b, c, mode); + /// /// __m512d _mm512_fnmadd_pd (__m512d a, __m512d b, __m512d c) /// VFNMADDPD zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst /// public static Vector512 FusedMultiplyAddNegated(Vector512 a, Vector512 b, Vector512 c) => FusedMultiplyAddNegated(a, b, c); + /// + /// __m512d _mm512_fnmadd_round_pdd (__m512d a, __m512d b, __m512d c, int r) + /// VFNMADDPS zmm1, zmm2, zmm3 {er} + /// + public static Vector512 FusedMultiplyAddNegated(Vector512 a, Vector512 b, Vector512 c, [ConstantExpected(Max = FloatRoundingMode.ToZero)] FloatRoundingMode mode) => FusedMultiplyAddNegated(a, b, c, mode); + /// + /// __m128 _mm_fnmadd_round_ss (__m128 a, __m128 b, __m128 c, int r) + /// VFNMADDSS xmm1, xmm2, xmm3 {er} + /// + public static Vector128 FusedMultiplyAddNegatedScalar(Vector128 a, Vector128 b, Vector128 c, [ConstantExpected(Max = FloatRoundingMode.ToZero)] FloatRoundingMode mode) => FusedMultiplyAddNegatedScalar(a, b, c, mode); + /// + /// __m128d _mm_fnmadd_round_sd (__m128d a, __m128d b, __m128d c, int r) + /// VFNMADDSD xmm1, xmm2, xmm3 {er} + /// + public static Vector128 FusedMultiplyAddNegatedScalar(Vector128 a, Vector128 b, Vector128 c, [ConstantExpected(Max = FloatRoundingMode.ToZero)] FloatRoundingMode mode) => FusedMultiplyAddNegatedScalar(a, b, c, mode); /// /// __m512 _mm512_fnmsub_ps (__m512 a, __m512 b, __m512 c) @@ -2543,10 +2633,30 @@ internal X64() { } /// public static Vector512 FusedMultiplySubtractNegated(Vector512 a, Vector512 b, Vector512 c) => FusedMultiplySubtractNegated(a, b, c); /// + /// __m512 _mm512_fnmsub_round_ps (__m512 a, __m512 b, __m512 c, int r) + /// VFNMSUBPS zmm1, zmm2, zmm3 {er} + /// + public static Vector512 FusedMultiplySubtractNegated(Vector512 a, Vector512 b, Vector512 c, [ConstantExpected(Max = FloatRoundingMode.ToZero)] FloatRoundingMode mode) => FusedMultiplySubtractNegated(a, b, c, mode); + /// /// __m512d _mm512_fnmsub_pd (__m512d a, __m512d b, __m512d c) /// VFNMSUBPD zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst /// public static Vector512 FusedMultiplySubtractNegated(Vector512 a, Vector512 b, Vector512 c) => FusedMultiplySubtractNegated(a, b, c); + /// + /// __m512d _mm512_fnmsub_round_pd (__m512d a, __m512d b, __m512d c, int r) + /// VFNMSUBPS zmm1, zmm2, zmm3 {er} + /// + public static Vector512 FusedMultiplySubtractNegated(Vector512 a, Vector512 b, Vector512 c, [ConstantExpected(Max = FloatRoundingMode.ToZero)] FloatRoundingMode mode) => FusedMultiplySubtractNegated(a, b, c, mode); + /// + /// __m128 _mm_fnmsub_round_ss (__m128 a, __m128 b, __m128 c, int r) + /// VFNMSUBSS xmm1, xmm2, xmm3 {er} + /// + public static Vector128 FusedMultiplySubtractNegatedScalar(Vector128 a, Vector128 b, Vector128 c, [ConstantExpected(Max = FloatRoundingMode.ToZero)] FloatRoundingMode mode) => FusedMultiplySubtractNegatedScalar(a, b, c, mode); + /// + /// __m128d _mm_fnmsub_round_sd (__m128d a, __m128d b, __m128d c, int r) + /// VFNMSUBSS xmm1, xmm2, xmm3 {er} + /// + public static Vector128 FusedMultiplySubtractNegatedScalar(Vector128 a, Vector128 b, Vector128 c, [ConstantExpected(Max = FloatRoundingMode.ToZero)] FloatRoundingMode mode) => FusedMultiplySubtractNegatedScalar(a, b, c, mode); /// /// __m512 _mm512_getexp_ps (__m512 a) 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 8b588e18c7905..8ccfb16b5dd95 100644 --- a/src/libraries/System.Runtime.Intrinsics/ref/System.Runtime.Intrinsics.cs +++ b/src/libraries/System.Runtime.Intrinsics/ref/System.Runtime.Intrinsics.cs @@ -5301,6 +5301,7 @@ internal Avx512F() { } public static System.Runtime.Intrinsics.Vector128 ConvertScalarToVector128Double(System.Runtime.Intrinsics.Vector128 upper, uint value) { throw null; } public static System.Runtime.Intrinsics.Vector128 ConvertScalarToVector128Single(System.Runtime.Intrinsics.Vector128 upper, uint value) { throw null; } public static System.Runtime.Intrinsics.Vector128 ConvertScalarToVector128Single(System.Runtime.Intrinsics.Vector128 upper, int value, [System.Diagnostics.CodeAnalysis.ConstantExpected(Max = System.Runtime.Intrinsics.X86.FloatRoundingMode.ToZero)] System.Runtime.Intrinsics.X86.FloatRoundingMode mode) { throw null; } + public static System.Runtime.Intrinsics.Vector128 ConvertScalarToVector128Single(System.Runtime.Intrinsics.Vector128 upper, uint value, [System.Diagnostics.CodeAnalysis.ConstantExpected(Max = System.Runtime.Intrinsics.X86.FloatRoundingMode.ToZero)] System.Runtime.Intrinsics.X86.FloatRoundingMode mode) { throw null; } public static System.Runtime.Intrinsics.Vector128 ConvertScalarToVector128Single(System.Runtime.Intrinsics.Vector128 upper, System.Runtime.Intrinsics.Vector128 value, [System.Diagnostics.CodeAnalysis.ConstantExpected(Max = System.Runtime.Intrinsics.X86.FloatRoundingMode.ToZero)] System.Runtime.Intrinsics.X86.FloatRoundingMode mode) { throw null; } public static int ConvertToInt32(System.Runtime.Intrinsics.Vector128 value, [System.Diagnostics.CodeAnalysis.ConstantExpected(Max = System.Runtime.Intrinsics.X86.FloatRoundingMode.ToZero)] System.Runtime.Intrinsics.X86.FloatRoundingMode mode) { throw null; } public static int ConvertToInt32(System.Runtime.Intrinsics.Vector128 value, [System.Diagnostics.CodeAnalysis.ConstantExpected(Max = System.Runtime.Intrinsics.X86.FloatRoundingMode.ToZero)] System.Runtime.Intrinsics.X86.FloatRoundingMode mode) { throw null; } @@ -5367,6 +5368,7 @@ internal Avx512F() { } public static System.Runtime.Intrinsics.Vector512 ConvertToVector512Single(System.Runtime.Intrinsics.Vector512 value) { throw null; } public static System.Runtime.Intrinsics.Vector512 ConvertToVector512Single(System.Runtime.Intrinsics.Vector512 value, [System.Diagnostics.CodeAnalysis.ConstantExpected(Max = System.Runtime.Intrinsics.X86.FloatRoundingMode.ToZero)] System.Runtime.Intrinsics.X86.FloatRoundingMode mode) { throw null; } public static System.Runtime.Intrinsics.Vector512 ConvertToVector512Single(System.Runtime.Intrinsics.Vector512 value) { throw null; } + public static System.Runtime.Intrinsics.Vector512 ConvertToVector512Single(System.Runtime.Intrinsics.Vector512 value, [System.Diagnostics.CodeAnalysis.ConstantExpected(Max = System.Runtime.Intrinsics.X86.FloatRoundingMode.ToZero)] System.Runtime.Intrinsics.X86.FloatRoundingMode mode) { 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; } @@ -5414,17 +5416,37 @@ internal Avx512F() { } public static System.Runtime.Intrinsics.Vector128 FixupScalar(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Runtime.Intrinsics.Vector128 table, [System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] byte control) { throw null; } public static System.Runtime.Intrinsics.Vector128 FixupScalar(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Runtime.Intrinsics.Vector128 table, [System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] byte control) { throw null; } public static System.Runtime.Intrinsics.Vector512 FusedMultiplyAdd(System.Runtime.Intrinsics.Vector512 a, System.Runtime.Intrinsics.Vector512 b, System.Runtime.Intrinsics.Vector512 c) { throw null; } + public static System.Runtime.Intrinsics.Vector512 FusedMultiplyAdd(System.Runtime.Intrinsics.Vector512 a, System.Runtime.Intrinsics.Vector512 b, System.Runtime.Intrinsics.Vector512 c, [System.Diagnostics.CodeAnalysis.ConstantExpected(Max = System.Runtime.Intrinsics.X86.FloatRoundingMode.ToZero)] System.Runtime.Intrinsics.X86.FloatRoundingMode mode) { throw null; } public static System.Runtime.Intrinsics.Vector512 FusedMultiplyAdd(System.Runtime.Intrinsics.Vector512 a, System.Runtime.Intrinsics.Vector512 b, System.Runtime.Intrinsics.Vector512 c) { throw null; } + public static System.Runtime.Intrinsics.Vector512 FusedMultiplyAdd(System.Runtime.Intrinsics.Vector512 a, System.Runtime.Intrinsics.Vector512 b, System.Runtime.Intrinsics.Vector512 c, [System.Diagnostics.CodeAnalysis.ConstantExpected(Max = System.Runtime.Intrinsics.X86.FloatRoundingMode.ToZero)] System.Runtime.Intrinsics.X86.FloatRoundingMode mode) { throw null; } + public static System.Runtime.Intrinsics.Vector128 FusedMultiplyAddScalar(System.Runtime.Intrinsics.Vector128 a, System.Runtime.Intrinsics.Vector128 b, System.Runtime.Intrinsics.Vector128 c, [System.Diagnostics.CodeAnalysis.ConstantExpected(Max = System.Runtime.Intrinsics.X86.FloatRoundingMode.ToZero)] System.Runtime.Intrinsics.X86.FloatRoundingMode mode) { throw null; } + public static System.Runtime.Intrinsics.Vector128 FusedMultiplyAddScalar(System.Runtime.Intrinsics.Vector128 a, System.Runtime.Intrinsics.Vector128 b, System.Runtime.Intrinsics.Vector128 c, [System.Diagnostics.CodeAnalysis.ConstantExpected(Max = System.Runtime.Intrinsics.X86.FloatRoundingMode.ToZero)] System.Runtime.Intrinsics.X86.FloatRoundingMode mode) { throw null; } public static System.Runtime.Intrinsics.Vector512 FusedMultiplyAddNegated(System.Runtime.Intrinsics.Vector512 a, System.Runtime.Intrinsics.Vector512 b, System.Runtime.Intrinsics.Vector512 c) { throw null; } + public static System.Runtime.Intrinsics.Vector512 FusedMultiplyAddNegated(System.Runtime.Intrinsics.Vector512 a, System.Runtime.Intrinsics.Vector512 b, System.Runtime.Intrinsics.Vector512 c, [System.Diagnostics.CodeAnalysis.ConstantExpected(Max = System.Runtime.Intrinsics.X86.FloatRoundingMode.ToZero)] System.Runtime.Intrinsics.X86.FloatRoundingMode mode) { throw null; } public static System.Runtime.Intrinsics.Vector512 FusedMultiplyAddNegated(System.Runtime.Intrinsics.Vector512 a, System.Runtime.Intrinsics.Vector512 b, System.Runtime.Intrinsics.Vector512 c) { throw null; } + public static System.Runtime.Intrinsics.Vector512 FusedMultiplyAddNegated(System.Runtime.Intrinsics.Vector512 a, System.Runtime.Intrinsics.Vector512 b, System.Runtime.Intrinsics.Vector512 c, [System.Diagnostics.CodeAnalysis.ConstantExpected(Max = System.Runtime.Intrinsics.X86.FloatRoundingMode.ToZero)] System.Runtime.Intrinsics.X86.FloatRoundingMode mode) { throw null; } + public static System.Runtime.Intrinsics.Vector128 FusedMultiplyAddNegatedScalar(System.Runtime.Intrinsics.Vector128 a, System.Runtime.Intrinsics.Vector128 b, System.Runtime.Intrinsics.Vector128 c, [System.Diagnostics.CodeAnalysis.ConstantExpected(Max = System.Runtime.Intrinsics.X86.FloatRoundingMode.ToZero)] System.Runtime.Intrinsics.X86.FloatRoundingMode mode) { throw null; } + public static System.Runtime.Intrinsics.Vector128 FusedMultiplyAddNegatedScalar(System.Runtime.Intrinsics.Vector128 a, System.Runtime.Intrinsics.Vector128 b, System.Runtime.Intrinsics.Vector128 c, [System.Diagnostics.CodeAnalysis.ConstantExpected(Max = System.Runtime.Intrinsics.X86.FloatRoundingMode.ToZero)] System.Runtime.Intrinsics.X86.FloatRoundingMode mode) { throw null; } public static System.Runtime.Intrinsics.Vector512 FusedMultiplyAddSubtract(System.Runtime.Intrinsics.Vector512 a, System.Runtime.Intrinsics.Vector512 b, System.Runtime.Intrinsics.Vector512 c) { throw null; } + public static System.Runtime.Intrinsics.Vector512 FusedMultiplyAddSubtract(System.Runtime.Intrinsics.Vector512 a, System.Runtime.Intrinsics.Vector512 b, System.Runtime.Intrinsics.Vector512 c, [System.Diagnostics.CodeAnalysis.ConstantExpected(Max = System.Runtime.Intrinsics.X86.FloatRoundingMode.ToZero)] System.Runtime.Intrinsics.X86.FloatRoundingMode mode) { throw null; } public static System.Runtime.Intrinsics.Vector512 FusedMultiplyAddSubtract(System.Runtime.Intrinsics.Vector512 a, System.Runtime.Intrinsics.Vector512 b, System.Runtime.Intrinsics.Vector512 c) { throw null; } + public static System.Runtime.Intrinsics.Vector512 FusedMultiplyAddSubtract(System.Runtime.Intrinsics.Vector512 a, System.Runtime.Intrinsics.Vector512 b, System.Runtime.Intrinsics.Vector512 c, [System.Diagnostics.CodeAnalysis.ConstantExpected(Max = System.Runtime.Intrinsics.X86.FloatRoundingMode.ToZero)] System.Runtime.Intrinsics.X86.FloatRoundingMode mode) { throw null; } public static System.Runtime.Intrinsics.Vector512 FusedMultiplySubtract(System.Runtime.Intrinsics.Vector512 a, System.Runtime.Intrinsics.Vector512 b, System.Runtime.Intrinsics.Vector512 c) { throw null; } + public static System.Runtime.Intrinsics.Vector512 FusedMultiplySubtract(System.Runtime.Intrinsics.Vector512 a, System.Runtime.Intrinsics.Vector512 b, System.Runtime.Intrinsics.Vector512 c, [System.Diagnostics.CodeAnalysis.ConstantExpected(Max = System.Runtime.Intrinsics.X86.FloatRoundingMode.ToZero)] System.Runtime.Intrinsics.X86.FloatRoundingMode mode) { throw null; } public static System.Runtime.Intrinsics.Vector512 FusedMultiplySubtract(System.Runtime.Intrinsics.Vector512 a, System.Runtime.Intrinsics.Vector512 b, System.Runtime.Intrinsics.Vector512 c) { throw null; } + public static System.Runtime.Intrinsics.Vector512 FusedMultiplySubtract(System.Runtime.Intrinsics.Vector512 a, System.Runtime.Intrinsics.Vector512 b, System.Runtime.Intrinsics.Vector512 c, [System.Diagnostics.CodeAnalysis.ConstantExpected(Max = System.Runtime.Intrinsics.X86.FloatRoundingMode.ToZero)] System.Runtime.Intrinsics.X86.FloatRoundingMode mode) { throw null; } + public static System.Runtime.Intrinsics.Vector128 FusedMultiplySubtractScalar(System.Runtime.Intrinsics.Vector128 a, System.Runtime.Intrinsics.Vector128 b, System.Runtime.Intrinsics.Vector128 c, [System.Diagnostics.CodeAnalysis.ConstantExpected(Max = System.Runtime.Intrinsics.X86.FloatRoundingMode.ToZero)] System.Runtime.Intrinsics.X86.FloatRoundingMode mode) { throw null; } + public static System.Runtime.Intrinsics.Vector128 FusedMultiplySubtractScalar(System.Runtime.Intrinsics.Vector128 a, System.Runtime.Intrinsics.Vector128 b, System.Runtime.Intrinsics.Vector128 c, [System.Diagnostics.CodeAnalysis.ConstantExpected(Max = System.Runtime.Intrinsics.X86.FloatRoundingMode.ToZero)] System.Runtime.Intrinsics.X86.FloatRoundingMode mode) { throw null; } public static System.Runtime.Intrinsics.Vector512 FusedMultiplySubtractAdd(System.Runtime.Intrinsics.Vector512 a, System.Runtime.Intrinsics.Vector512 b, System.Runtime.Intrinsics.Vector512 c) { throw null; } + public static System.Runtime.Intrinsics.Vector512 FusedMultiplySubtractAdd(System.Runtime.Intrinsics.Vector512 a, System.Runtime.Intrinsics.Vector512 b, System.Runtime.Intrinsics.Vector512 c, [System.Diagnostics.CodeAnalysis.ConstantExpected(Max = System.Runtime.Intrinsics.X86.FloatRoundingMode.ToZero)] System.Runtime.Intrinsics.X86.FloatRoundingMode mode) { throw null; } public static System.Runtime.Intrinsics.Vector512 FusedMultiplySubtractAdd(System.Runtime.Intrinsics.Vector512 a, System.Runtime.Intrinsics.Vector512 b, System.Runtime.Intrinsics.Vector512 c) { throw null; } + public static System.Runtime.Intrinsics.Vector512 FusedMultiplySubtractAdd(System.Runtime.Intrinsics.Vector512 a, System.Runtime.Intrinsics.Vector512 b, System.Runtime.Intrinsics.Vector512 c, [System.Diagnostics.CodeAnalysis.ConstantExpected(Max = System.Runtime.Intrinsics.X86.FloatRoundingMode.ToZero)] System.Runtime.Intrinsics.X86.FloatRoundingMode mode) { throw null; } public static System.Runtime.Intrinsics.Vector512 FusedMultiplySubtractNegated(System.Runtime.Intrinsics.Vector512 a, System.Runtime.Intrinsics.Vector512 b, System.Runtime.Intrinsics.Vector512 c) { throw null; } + public static System.Runtime.Intrinsics.Vector512 FusedMultiplySubtractNegated(System.Runtime.Intrinsics.Vector512 a, System.Runtime.Intrinsics.Vector512 b, System.Runtime.Intrinsics.Vector512 c, [System.Diagnostics.CodeAnalysis.ConstantExpected(Max = System.Runtime.Intrinsics.X86.FloatRoundingMode.ToZero)] System.Runtime.Intrinsics.X86.FloatRoundingMode mode) { throw null; } public static System.Runtime.Intrinsics.Vector512 FusedMultiplySubtractNegated(System.Runtime.Intrinsics.Vector512 a, System.Runtime.Intrinsics.Vector512 b, System.Runtime.Intrinsics.Vector512 c) { throw null; } + public static System.Runtime.Intrinsics.Vector512 FusedMultiplySubtractNegated(System.Runtime.Intrinsics.Vector512 a, System.Runtime.Intrinsics.Vector512 b, System.Runtime.Intrinsics.Vector512 c, [System.Diagnostics.CodeAnalysis.ConstantExpected(Max = System.Runtime.Intrinsics.X86.FloatRoundingMode.ToZero)] System.Runtime.Intrinsics.X86.FloatRoundingMode mode) { throw null; } + public static System.Runtime.Intrinsics.Vector128 FusedMultiplySubtractNegatedScalar(System.Runtime.Intrinsics.Vector128 a, System.Runtime.Intrinsics.Vector128 b, System.Runtime.Intrinsics.Vector128 c, [System.Diagnostics.CodeAnalysis.ConstantExpected(Max = System.Runtime.Intrinsics.X86.FloatRoundingMode.ToZero)] System.Runtime.Intrinsics.X86.FloatRoundingMode mode) { throw null; } + public static System.Runtime.Intrinsics.Vector128 FusedMultiplySubtractNegatedScalar(System.Runtime.Intrinsics.Vector128 a, System.Runtime.Intrinsics.Vector128 b, System.Runtime.Intrinsics.Vector128 c, [System.Diagnostics.CodeAnalysis.ConstantExpected(Max = System.Runtime.Intrinsics.X86.FloatRoundingMode.ToZero)] System.Runtime.Intrinsics.X86.FloatRoundingMode mode) { throw null; } public static System.Runtime.Intrinsics.Vector512 GetExponent(System.Runtime.Intrinsics.Vector512 value) { throw null; } public static System.Runtime.Intrinsics.Vector512 GetExponent(System.Runtime.Intrinsics.Vector512 value) { throw null; } public static System.Runtime.Intrinsics.Vector128 GetExponentScalar(System.Runtime.Intrinsics.Vector128 value) { throw null; } diff --git a/src/tests/Common/GenerateHWIntrinsicTests/GenerateHWIntrinsicTests_X86.cs b/src/tests/Common/GenerateHWIntrinsicTests/GenerateHWIntrinsicTests_X86.cs index 217b897be27e4..71f27d5293b9d 100644 --- a/src/tests/Common/GenerateHWIntrinsicTests/GenerateHWIntrinsicTests_X86.cs +++ b/src/tests/Common/GenerateHWIntrinsicTests/GenerateHWIntrinsicTests_X86.cs @@ -1567,6 +1567,42 @@ ("SimpleUnaryOpEmbRounding.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "ConvertToVector256UInt32", ["RoundingMode"] = "ToNegativeInfinity", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "64", ["CastingMethod"] = "(ulong)", ["FixedInput"] = "29.37"}), ("SimpleUnaryOpEmbRounding.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "ConvertToVector256UInt32", ["RoundingMode"] = "ToPositiveInfinity", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "64", ["CastingMethod"] = "(ulong)", ["FixedInput"] = "29.37"}), ("SimpleUnaryOpEmbRounding.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "ConvertToVector256UInt32", ["RoundingMode"] = "ToZero", ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "64", ["CastingMethod"] = "(ulong)", ["FixedInput"] = "29.37"}), + ("SimpleTernOpEmbRounding.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "FusedMultiplyAdd", ["RoundingMode"] = "ToNegativeInfinity", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Double", ["Op3VectorType"] = "Vector512", ["Op3BaseType"] = "Double", ["LargestVectorSize"] = "64", ["CastingMethod"] = "DoubleToUInt64Bits", ["FixedInput1"] = "0.05", ["FixedInput2"] = "0.45", ["FixedInput3"] = "0.75"}), + ("SimpleTernOpEmbRounding.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "FusedMultiplyAdd", ["RoundingMode"] = "ToPositiveInfinity", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Double", ["Op3VectorType"] = "Vector512", ["Op3BaseType"] = "Double", ["LargestVectorSize"] = "64", ["CastingMethod"] = "DoubleToUInt64Bits", ["FixedInput1"] = "0.05", ["FixedInput2"] = "0.45", ["FixedInput3"] = "0.75"}), + ("SimpleTernOpEmbRounding.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "FusedMultiplyAdd", ["RoundingMode"] = "ToZero", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Double", ["Op3VectorType"] = "Vector512", ["Op3BaseType"] = "Double", ["LargestVectorSize"] = "64", ["CastingMethod"] = "DoubleToUInt64Bits", ["FixedInput1"] = "0.05", ["FixedInput2"] = "0.45", ["FixedInput3"] = "0.75"}), + ("SimpleTernOpEmbRounding.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "FusedMultiplyAdd", ["RoundingMode"] = "ToNegativeInfinity", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Single", ["Op3VectorType"] = "Vector512", ["Op3BaseType"] = "Single", ["LargestVectorSize"] = "64", ["CastingMethod"] = "SingleToUInt32Bits", ["FixedInput1"] = "0.05", ["FixedInput2"] = "0.45", ["FixedInput3"] = "0.75"}), + ("SimpleTernOpEmbRounding.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "FusedMultiplyAdd", ["RoundingMode"] = "ToPositiveInfinity", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Single", ["Op3VectorType"] = "Vector512", ["Op3BaseType"] = "Single", ["LargestVectorSize"] = "64", ["CastingMethod"] = "SingleToUInt32Bits", ["FixedInput1"] = "0.05", ["FixedInput2"] = "0.45", ["FixedInput3"] = "0.75"}), + ("SimpleTernOpEmbRounding.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "FusedMultiplyAdd", ["RoundingMode"] = "ToZero", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Single", ["Op3VectorType"] = "Vector512", ["Op3BaseType"] = "Single", ["LargestVectorSize"] = "64", ["CastingMethod"] = "SingleToUInt32Bits", ["FixedInput1"] = "0.05", ["FixedInput2"] = "0.45", ["FixedInput3"] = "0.75"}), + ("SimpleTernOpEmbRounding.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "FusedMultiplyAddNegated", ["RoundingMode"] = "ToNegativeInfinity", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Double", ["Op3VectorType"] = "Vector512", ["Op3BaseType"] = "Double", ["LargestVectorSize"] = "64", ["CastingMethod"] = "DoubleToUInt64Bits", ["FixedInput1"] = "0.05", ["FixedInput2"] = "0.45", ["FixedInput3"] = "0.75"}), + ("SimpleTernOpEmbRounding.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "FusedMultiplyAddNegated", ["RoundingMode"] = "ToPositiveInfinity", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Double", ["Op3VectorType"] = "Vector512", ["Op3BaseType"] = "Double", ["LargestVectorSize"] = "64", ["CastingMethod"] = "DoubleToUInt64Bits", ["FixedInput1"] = "0.05", ["FixedInput2"] = "0.45", ["FixedInput3"] = "0.75"}), + ("SimpleTernOpEmbRounding.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "FusedMultiplyAddNegated", ["RoundingMode"] = "ToZero", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Double", ["Op3VectorType"] = "Vector512", ["Op3BaseType"] = "Double", ["LargestVectorSize"] = "64", ["CastingMethod"] = "DoubleToUInt64Bits", ["FixedInput1"] = "0.05", ["FixedInput2"] = "0.45", ["FixedInput3"] = "0.75"}), + ("SimpleTernOpEmbRounding.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "FusedMultiplyAddNegated", ["RoundingMode"] = "ToNegativeInfinity", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Single", ["Op3VectorType"] = "Vector512", ["Op3BaseType"] = "Single", ["LargestVectorSize"] = "64", ["CastingMethod"] = "SingleToUInt32Bits", ["FixedInput1"] = "0.05", ["FixedInput2"] = "0.45", ["FixedInput3"] = "0.75"}), + ("SimpleTernOpEmbRounding.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "FusedMultiplyAddNegated", ["RoundingMode"] = "ToPositiveInfinity", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Single", ["Op3VectorType"] = "Vector512", ["Op3BaseType"] = "Single", ["LargestVectorSize"] = "64", ["CastingMethod"] = "SingleToUInt32Bits", ["FixedInput1"] = "0.05", ["FixedInput2"] = "0.45", ["FixedInput3"] = "0.75"}), + ("SimpleTernOpEmbRounding.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "FusedMultiplyAddNegated", ["RoundingMode"] = "ToZero", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Single", ["Op3VectorType"] = "Vector512", ["Op3BaseType"] = "Single", ["LargestVectorSize"] = "64", ["CastingMethod"] = "SingleToUInt32Bits", ["FixedInput1"] = "0.05", ["FixedInput2"] = "0.45", ["FixedInput3"] = "0.75"}), + ("SimpleTernOpEmbRounding.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "FusedMultiplyAddSubtract", ["RoundingMode"] = "ToNegativeInfinity", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Double", ["Op3VectorType"] = "Vector512", ["Op3BaseType"] = "Double", ["LargestVectorSize"] = "64", ["CastingMethod"] = "DoubleToUInt64Bits", ["FixedInput1"] = "0.05", ["FixedInput2"] = "0.45", ["FixedInput3"] = "0.75"}), + ("SimpleTernOpEmbRounding.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "FusedMultiplyAddSubtract", ["RoundingMode"] = "ToPositiveInfinity", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Double", ["Op3VectorType"] = "Vector512", ["Op3BaseType"] = "Double", ["LargestVectorSize"] = "64", ["CastingMethod"] = "DoubleToUInt64Bits", ["FixedInput1"] = "0.05", ["FixedInput2"] = "0.45", ["FixedInput3"] = "0.75"}), + ("SimpleTernOpEmbRounding.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "FusedMultiplyAddSubtract", ["RoundingMode"] = "ToZero", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Double", ["Op3VectorType"] = "Vector512", ["Op3BaseType"] = "Double", ["LargestVectorSize"] = "64", ["CastingMethod"] = "DoubleToUInt64Bits", ["FixedInput1"] = "0.05", ["FixedInput2"] = "0.45", ["FixedInput3"] = "0.75"}), + ("SimpleTernOpEmbRounding.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "FusedMultiplyAddSubtract", ["RoundingMode"] = "ToNegativeInfinity", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Single", ["Op3VectorType"] = "Vector512", ["Op3BaseType"] = "Single", ["LargestVectorSize"] = "64", ["CastingMethod"] = "SingleToUInt32Bits", ["FixedInput1"] = "0.05", ["FixedInput2"] = "0.45", ["FixedInput3"] = "0.75"}), + ("SimpleTernOpEmbRounding.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "FusedMultiplyAddSubtract", ["RoundingMode"] = "ToPositiveInfinity", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Single", ["Op3VectorType"] = "Vector512", ["Op3BaseType"] = "Single", ["LargestVectorSize"] = "64", ["CastingMethod"] = "SingleToUInt32Bits", ["FixedInput1"] = "0.05", ["FixedInput2"] = "0.45", ["FixedInput3"] = "0.75"}), + ("SimpleTernOpEmbRounding.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "FusedMultiplyAddSubtract", ["RoundingMode"] = "ToZero", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Single", ["Op3VectorType"] = "Vector512", ["Op3BaseType"] = "Single", ["LargestVectorSize"] = "64", ["CastingMethod"] = "SingleToUInt32Bits", ["FixedInput1"] = "0.05", ["FixedInput2"] = "0.45", ["FixedInput3"] = "0.75"}), + ("SimpleTernOpEmbRounding.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "FusedMultiplySubtract", ["RoundingMode"] = "ToNegativeInfinity", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Double", ["Op3VectorType"] = "Vector512", ["Op3BaseType"] = "Double", ["LargestVectorSize"] = "64", ["CastingMethod"] = "DoubleToUInt64Bits", ["FixedInput1"] = "0.05", ["FixedInput2"] = "0.45", ["FixedInput3"] = "0.75"}), + ("SimpleTernOpEmbRounding.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "FusedMultiplySubtract", ["RoundingMode"] = "ToPositiveInfinity", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Double", ["Op3VectorType"] = "Vector512", ["Op3BaseType"] = "Double", ["LargestVectorSize"] = "64", ["CastingMethod"] = "DoubleToUInt64Bits", ["FixedInput1"] = "0.05", ["FixedInput2"] = "0.45", ["FixedInput3"] = "0.75"}), + ("SimpleTernOpEmbRounding.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "FusedMultiplySubtract", ["RoundingMode"] = "ToZero", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Double", ["Op3VectorType"] = "Vector512", ["Op3BaseType"] = "Double", ["LargestVectorSize"] = "64", ["CastingMethod"] = "DoubleToUInt64Bits", ["FixedInput1"] = "0.05", ["FixedInput2"] = "0.45", ["FixedInput3"] = "0.75"}), + ("SimpleTernOpEmbRounding.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "FusedMultiplySubtract", ["RoundingMode"] = "ToNegativeInfinity", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Single", ["Op3VectorType"] = "Vector512", ["Op3BaseType"] = "Single", ["LargestVectorSize"] = "64", ["CastingMethod"] = "SingleToUInt32Bits", ["FixedInput1"] = "0.05", ["FixedInput2"] = "0.45", ["FixedInput3"] = "0.75"}), + ("SimpleTernOpEmbRounding.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "FusedMultiplySubtract", ["RoundingMode"] = "ToPositiveInfinity", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Single", ["Op3VectorType"] = "Vector512", ["Op3BaseType"] = "Single", ["LargestVectorSize"] = "64", ["CastingMethod"] = "SingleToUInt32Bits", ["FixedInput1"] = "0.05", ["FixedInput2"] = "0.45", ["FixedInput3"] = "0.75"}), + ("SimpleTernOpEmbRounding.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "FusedMultiplySubtract", ["RoundingMode"] = "ToZero", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Single", ["Op3VectorType"] = "Vector512", ["Op3BaseType"] = "Single", ["LargestVectorSize"] = "64", ["CastingMethod"] = "SingleToUInt32Bits", ["FixedInput1"] = "0.05", ["FixedInput2"] = "0.45", ["FixedInput3"] = "0.75"}), + ("SimpleTernOpEmbRounding.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "FusedMultiplySubtractAdd", ["RoundingMode"] = "ToNegativeInfinity", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Double", ["Op3VectorType"] = "Vector512", ["Op3BaseType"] = "Double", ["LargestVectorSize"] = "64", ["CastingMethod"] = "DoubleToUInt64Bits", ["FixedInput1"] = "0.05", ["FixedInput2"] = "0.45", ["FixedInput3"] = "0.75"}), + ("SimpleTernOpEmbRounding.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "FusedMultiplySubtractAdd", ["RoundingMode"] = "ToPositiveInfinity", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Double", ["Op3VectorType"] = "Vector512", ["Op3BaseType"] = "Double", ["LargestVectorSize"] = "64", ["CastingMethod"] = "DoubleToUInt64Bits", ["FixedInput1"] = "0.05", ["FixedInput2"] = "0.45", ["FixedInput3"] = "0.75"}), + ("SimpleTernOpEmbRounding.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "FusedMultiplySubtractAdd", ["RoundingMode"] = "ToZero", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Double", ["Op3VectorType"] = "Vector512", ["Op3BaseType"] = "Double", ["LargestVectorSize"] = "64", ["CastingMethod"] = "DoubleToUInt64Bits", ["FixedInput1"] = "0.05", ["FixedInput2"] = "0.45", ["FixedInput3"] = "0.75"}), + ("SimpleTernOpEmbRounding.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "FusedMultiplySubtractAdd", ["RoundingMode"] = "ToNegativeInfinity", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Single", ["Op3VectorType"] = "Vector512", ["Op3BaseType"] = "Single", ["LargestVectorSize"] = "64", ["CastingMethod"] = "SingleToUInt32Bits", ["FixedInput1"] = "0.05", ["FixedInput2"] = "0.45", ["FixedInput3"] = "0.75"}), + ("SimpleTernOpEmbRounding.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "FusedMultiplySubtractAdd", ["RoundingMode"] = "ToPositiveInfinity", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Single", ["Op3VectorType"] = "Vector512", ["Op3BaseType"] = "Single", ["LargestVectorSize"] = "64", ["CastingMethod"] = "SingleToUInt32Bits", ["FixedInput1"] = "0.05", ["FixedInput2"] = "0.45", ["FixedInput3"] = "0.75"}), + ("SimpleTernOpEmbRounding.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "FusedMultiplySubtractAdd", ["RoundingMode"] = "ToZero", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Single", ["Op3VectorType"] = "Vector512", ["Op3BaseType"] = "Single", ["LargestVectorSize"] = "64", ["CastingMethod"] = "SingleToUInt32Bits", ["FixedInput1"] = "0.05", ["FixedInput2"] = "0.45", ["FixedInput3"] = "0.75"}), + ("SimpleTernOpEmbRounding.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "FusedMultiplySubtractNegated", ["RoundingMode"] = "ToNegativeInfinity", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Double", ["Op3VectorType"] = "Vector512", ["Op3BaseType"] = "Double", ["LargestVectorSize"] = "64", ["CastingMethod"] = "DoubleToUInt64Bits", ["FixedInput1"] = "0.05", ["FixedInput2"] = "0.45", ["FixedInput3"] = "0.75"}), + ("SimpleTernOpEmbRounding.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "FusedMultiplySubtractNegated", ["RoundingMode"] = "ToPositiveInfinity", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Double", ["Op3VectorType"] = "Vector512", ["Op3BaseType"] = "Double", ["LargestVectorSize"] = "64", ["CastingMethod"] = "DoubleToUInt64Bits", ["FixedInput1"] = "0.05", ["FixedInput2"] = "0.45", ["FixedInput3"] = "0.75"}), + ("SimpleTernOpEmbRounding.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "FusedMultiplySubtractNegated", ["RoundingMode"] = "ToZero", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Double", ["Op3VectorType"] = "Vector512", ["Op3BaseType"] = "Double", ["LargestVectorSize"] = "64", ["CastingMethod"] = "DoubleToUInt64Bits", ["FixedInput1"] = "0.05", ["FixedInput2"] = "0.45", ["FixedInput3"] = "0.75"}), + ("SimpleTernOpEmbRounding.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "FusedMultiplySubtractNegated", ["RoundingMode"] = "ToNegativeInfinity", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Single", ["Op3VectorType"] = "Vector512", ["Op3BaseType"] = "Single", ["LargestVectorSize"] = "64", ["CastingMethod"] = "SingleToUInt32Bits", ["FixedInput1"] = "0.05", ["FixedInput2"] = "0.45", ["FixedInput3"] = "0.75"}), + ("SimpleTernOpEmbRounding.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "FusedMultiplySubtractNegated", ["RoundingMode"] = "ToPositiveInfinity", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Single", ["Op3VectorType"] = "Vector512", ["Op3BaseType"] = "Single", ["LargestVectorSize"] = "64", ["CastingMethod"] = "SingleToUInt32Bits", ["FixedInput1"] = "0.05", ["FixedInput2"] = "0.45", ["FixedInput3"] = "0.75"}), + ("SimpleTernOpEmbRounding.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "FusedMultiplySubtractNegated", ["RoundingMode"] = "ToZero", ["RetVectorType"] = "Vector512", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector512", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector512", ["Op2BaseType"] = "Single", ["Op3VectorType"] = "Vector512", ["Op3BaseType"] = "Single", ["LargestVectorSize"] = "64", ["CastingMethod"] = "SingleToUInt32Bits", ["FixedInput1"] = "0.05", ["FixedInput2"] = "0.45", ["FixedInput3"] = "0.75"}), }; (string templateFileName, Dictionary templateData)[] Avx512F_ScalarUpperInputs = new [] @@ -1622,6 +1658,30 @@ ("SimpleBinOpEmbRounding.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "ConvertScalarToVector128Single", ["RoundingMode"] = "ToNegativeInfinity", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["CastingMethod"] = "SingleToUInt32Bits", ["FixedInput1"] = "1.0", ["FixedInput2"] = "15.0"}), ("SimpleBinOpEmbRounding.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "ConvertScalarToVector128Single", ["RoundingMode"] = "ToPositiveInfinity", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["CastingMethod"] = "SingleToUInt32Bits", ["FixedInput1"] = "1.0", ["FixedInput2"] = "15.0"}), ("SimpleBinOpEmbRounding.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "ConvertScalarToVector128Single", ["RoundingMode"] = "ToZero", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["CastingMethod"] = "SingleToUInt32Bits", ["FixedInput1"] = "1.0", ["FixedInput2"] = "15.0"}), + ("SimpleTernOpEmbRounding.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "FusedMultiplyAddScalar", ["RoundingMode"] = "ToNegativeInfinity", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Double", ["LargestVectorSize"] = "16", ["CastingMethod"] = "DoubleToUInt64Bits", ["FixedInput1"] = "0.05", ["FixedInput2"] = "0.45", ["FixedInput3"] = "0.75"}), + ("SimpleTernOpEmbRounding.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "FusedMultiplyAddScalar", ["RoundingMode"] = "ToPositiveInfinity", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Double", ["LargestVectorSize"] = "16", ["CastingMethod"] = "DoubleToUInt64Bits", ["FixedInput1"] = "0.05", ["FixedInput2"] = "0.45", ["FixedInput3"] = "0.75"}), + ("SimpleTernOpEmbRounding.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "FusedMultiplyAddScalar", ["RoundingMode"] = "ToZero", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Double", ["LargestVectorSize"] = "16", ["CastingMethod"] = "DoubleToUInt64Bits", ["FixedInput1"] = "0.05", ["FixedInput2"] = "0.45", ["FixedInput3"] = "0.75"}), + ("SimpleTernOpEmbRounding.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "FusedMultiplyAddScalar", ["RoundingMode"] = "ToNegativeInfinity", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Single", ["LargestVectorSize"] = "16", ["CastingMethod"] = "SingleToUInt32Bits", ["FixedInput1"] = "0.05", ["FixedInput2"] = "0.45", ["FixedInput3"] = "0.75"}), + ("SimpleTernOpEmbRounding.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "FusedMultiplyAddScalar", ["RoundingMode"] = "ToPositiveInfinity", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Single", ["LargestVectorSize"] = "16", ["CastingMethod"] = "SingleToUInt32Bits", ["FixedInput1"] = "0.05", ["FixedInput2"] = "0.45", ["FixedInput3"] = "0.75"}), + ("SimpleTernOpEmbRounding.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "FusedMultiplyAddScalar", ["RoundingMode"] = "ToZero", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Single", ["LargestVectorSize"] = "16", ["CastingMethod"] = "SingleToUInt32Bits", ["FixedInput1"] = "0.05", ["FixedInput2"] = "0.45", ["FixedInput3"] = "0.75"}), + ("SimpleTernOpEmbRounding.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "FusedMultiplyAddNegatedScalar", ["RoundingMode"] = "ToNegativeInfinity", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Double", ["LargestVectorSize"] = "16", ["CastingMethod"] = "DoubleToUInt64Bits", ["FixedInput1"] = "0.05", ["FixedInput2"] = "0.45", ["FixedInput3"] = "0.75"}), + ("SimpleTernOpEmbRounding.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "FusedMultiplyAddNegatedScalar", ["RoundingMode"] = "ToPositiveInfinity", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Double", ["LargestVectorSize"] = "16", ["CastingMethod"] = "DoubleToUInt64Bits", ["FixedInput1"] = "0.05", ["FixedInput2"] = "0.45", ["FixedInput3"] = "0.75"}), + ("SimpleTernOpEmbRounding.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "FusedMultiplyAddNegatedScalar", ["RoundingMode"] = "ToZero", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Double", ["LargestVectorSize"] = "16", ["CastingMethod"] = "DoubleToUInt64Bits", ["FixedInput1"] = "0.05", ["FixedInput2"] = "0.45", ["FixedInput3"] = "0.75"}), + ("SimpleTernOpEmbRounding.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "FusedMultiplyAddNegatedScalar", ["RoundingMode"] = "ToNegativeInfinity", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Single", ["LargestVectorSize"] = "16", ["CastingMethod"] = "SingleToUInt32Bits", ["FixedInput1"] = "0.05", ["FixedInput2"] = "0.45", ["FixedInput3"] = "0.75"}), + ("SimpleTernOpEmbRounding.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "FusedMultiplyAddNegatedScalar", ["RoundingMode"] = "ToPositiveInfinity", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Single", ["LargestVectorSize"] = "16", ["CastingMethod"] = "SingleToUInt32Bits", ["FixedInput1"] = "0.05", ["FixedInput2"] = "0.45", ["FixedInput3"] = "0.75"}), + ("SimpleTernOpEmbRounding.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "FusedMultiplyAddNegatedScalar", ["RoundingMode"] = "ToZero", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Single", ["LargestVectorSize"] = "16", ["CastingMethod"] = "SingleToUInt32Bits", ["FixedInput1"] = "0.05", ["FixedInput2"] = "0.45", ["FixedInput3"] = "0.75"}), + ("SimpleTernOpEmbRounding.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "FusedMultiplySubtractScalar", ["RoundingMode"] = "ToNegativeInfinity", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Double", ["LargestVectorSize"] = "16", ["CastingMethod"] = "DoubleToUInt64Bits", ["FixedInput1"] = "0.05", ["FixedInput2"] = "0.45", ["FixedInput3"] = "0.75"}), + ("SimpleTernOpEmbRounding.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "FusedMultiplySubtractScalar", ["RoundingMode"] = "ToPositiveInfinity", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Double", ["LargestVectorSize"] = "16", ["CastingMethod"] = "DoubleToUInt64Bits", ["FixedInput1"] = "0.05", ["FixedInput2"] = "0.45", ["FixedInput3"] = "0.75"}), + ("SimpleTernOpEmbRounding.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "FusedMultiplySubtractScalar", ["RoundingMode"] = "ToZero", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Double", ["LargestVectorSize"] = "16", ["CastingMethod"] = "DoubleToUInt64Bits", ["FixedInput1"] = "0.05", ["FixedInput2"] = "0.45", ["FixedInput3"] = "0.75"}), + ("SimpleTernOpEmbRounding.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "FusedMultiplySubtractScalar", ["RoundingMode"] = "ToNegativeInfinity", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Single", ["LargestVectorSize"] = "16", ["CastingMethod"] = "SingleToUInt32Bits", ["FixedInput1"] = "0.05", ["FixedInput2"] = "0.45", ["FixedInput3"] = "0.75"}), + ("SimpleTernOpEmbRounding.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "FusedMultiplySubtractScalar", ["RoundingMode"] = "ToPositiveInfinity", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Single", ["LargestVectorSize"] = "16", ["CastingMethod"] = "SingleToUInt32Bits", ["FixedInput1"] = "0.05", ["FixedInput2"] = "0.45", ["FixedInput3"] = "0.75"}), + ("SimpleTernOpEmbRounding.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "FusedMultiplySubtractScalar", ["RoundingMode"] = "ToZero", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Single", ["LargestVectorSize"] = "16", ["CastingMethod"] = "SingleToUInt32Bits", ["FixedInput1"] = "0.05", ["FixedInput2"] = "0.45", ["FixedInput3"] = "0.75"}), + ("SimpleTernOpEmbRounding.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "FusedMultiplySubtractNegatedScalar", ["RoundingMode"] = "ToNegativeInfinity", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Double", ["LargestVectorSize"] = "16", ["CastingMethod"] = "DoubleToUInt64Bits", ["FixedInput1"] = "0.05", ["FixedInput2"] = "0.45", ["FixedInput3"] = "0.75"}), + ("SimpleTernOpEmbRounding.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "FusedMultiplySubtractNegatedScalar", ["RoundingMode"] = "ToPositiveInfinity", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Double", ["LargestVectorSize"] = "16", ["CastingMethod"] = "DoubleToUInt64Bits", ["FixedInput1"] = "0.05", ["FixedInput2"] = "0.45", ["FixedInput3"] = "0.75"}), + ("SimpleTernOpEmbRounding.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "FusedMultiplySubtractNegatedScalar", ["RoundingMode"] = "ToZero", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Double", ["LargestVectorSize"] = "16", ["CastingMethod"] = "DoubleToUInt64Bits", ["FixedInput1"] = "0.05", ["FixedInput2"] = "0.45", ["FixedInput3"] = "0.75"}), + ("SimpleTernOpEmbRounding.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "FusedMultiplySubtractNegatedScalar", ["RoundingMode"] = "ToNegativeInfinity", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Single", ["LargestVectorSize"] = "16", ["CastingMethod"] = "SingleToUInt32Bits", ["FixedInput1"] = "0.05", ["FixedInput2"] = "0.45", ["FixedInput3"] = "0.75"}), + ("SimpleTernOpEmbRounding.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "FusedMultiplySubtractNegatedScalar", ["RoundingMode"] = "ToPositiveInfinity", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Single", ["LargestVectorSize"] = "16", ["CastingMethod"] = "SingleToUInt32Bits", ["FixedInput1"] = "0.05", ["FixedInput2"] = "0.45", ["FixedInput3"] = "0.75"}), + ("SimpleTernOpEmbRounding.template", new Dictionary { ["Isa"] = "Avx512F", ["LoadIsa"] = "Avx512F", ["Method"] = "FusedMultiplySubtractNegatedScalar", ["RoundingMode"] = "ToZero", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["Op3VectorType"] = "Vector128", ["Op3BaseType"] = "Single", ["LargestVectorSize"] = "16", ["CastingMethod"] = "SingleToUInt32Bits", ["FixedInput1"] = "0.05", ["FixedInput2"] = "0.45", ["FixedInput3"] = "0.75"}), }; (string templateFileName, Dictionary templateData)[] Avx512F_VL_Vector128Inputs = new [] @@ -2712,6 +2772,12 @@ void ProcessInput(StreamWriter testListFile, string groupName, (string templateF testName += ".Tuple3Op"; suffix += "Tuple3Op"; } + else if (input.templateFileName == "SimpleTernOpEmbRounding.template") + { + testName += ".EmbeddedRounding"; + testName += $".{input.templateData["RoundingMode"]}"; + suffix += "EmbeddedRounding"; + } else if (input.templateFileName == "SimpleBinOpEmbRounding.template") { testName += ".EmbeddedRounding"; diff --git a/src/tests/JIT/HardwareIntrinsics/X86/Shared/SimpleBinOpEmbRounding.template b/src/tests/JIT/HardwareIntrinsics/X86/Shared/SimpleBinOpEmbRounding.template index 4569257abc228..8ac6ba0586f14 100644 --- a/src/tests/JIT/HardwareIntrinsics/X86/Shared/SimpleBinOpEmbRounding.template +++ b/src/tests/JIT/HardwareIntrinsics/X86/Shared/SimpleBinOpEmbRounding.template @@ -173,7 +173,7 @@ namespace JIT.HardwareIntrinsics.X86 { TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - var result = typeof({Isa}).GetMethod(nameof({Isa}.{Method}), new Type[] { typeof({Op1VectorType}<{Op1BaseType}>), typeof({Op2VectorType}<{Op2BaseType}>) , typeof(FloatRoundingMode)}) + var result = typeof({Isa}).GetMethod(nameof({Isa}.{Method}), new Type[] { typeof({Op1VectorType}<{Op1BaseType}>), typeof({Op2VectorType}<{Op2BaseType}>), typeof(FloatRoundingMode)}) .Invoke(null, new object[] { Unsafe.Read<{Op1VectorType}<{Op1BaseType}>>(_dataTable.inArray1Ptr), Unsafe.Read<{Op2VectorType}<{Op2BaseType}>>(_dataTable.inArray2Ptr), diff --git a/src/tests/JIT/HardwareIntrinsics/X86/Shared/SimpleTernOpEmbRounding.template b/src/tests/JIT/HardwareIntrinsics/X86/Shared/SimpleTernOpEmbRounding.template new file mode 100644 index 0000000000000..b302aa267a820 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/X86/Shared/SimpleTernOpEmbRounding.template @@ -0,0 +1,392 @@ +// 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.Collections.Generic; +using System.Runtime.Intrinsics.X86; +using Xunit; + + +namespace JIT.HardwareIntrinsics.X86 +{ + public static partial class Program + { + [Fact] + public static void {Method}{RetBaseType}{RoundingMode}() + { + var test = new TernaryOpTest__{Method}{RetBaseType}{RoundingMode}(); + + if (test.IsSupported) + { + // Validates basic functionality works, using Unsafe.Read + test.RunBasicScenario_UnsafeRead(); + + if ({LoadIsa}.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(); + + // Validates passing a local works, using Unsafe.Read + test.RunLclVarScenario_UnsafeRead(); + + // Validates passing an instance member of a class works + test.RunClassFldScenario(); + + // Validates passing the field of a local struct works + test.RunStructLclFldScenario(); + + // Validates passing an instance member of a struct works + test.RunStructFldScenario(); + } + else + { + // Validates we throw on unsupported hardware + test.RunUnsupportedScenario(); + } + + if (!test.Succeeded) + { + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } + + public sealed unsafe class TernaryOpTest__{Method}{RetBaseType}{RoundingMode} + { + private struct TestStruct + { + public {Op1VectorType}<{Op1BaseType}> _fld1; + public {Op2VectorType}<{Op2BaseType}> _fld2; + public {Op2VectorType}<{Op3BaseType}> _fld3; + + public static TestStruct Create() + { + var testStruct = new TestStruct(); + + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = ({Op1BaseType}){FixedInput1}; } + Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op1VectorType}<{Op1BaseType}>, byte>(ref testStruct._fld1), ref Unsafe.As<{Op1BaseType}, byte>(ref _data1[0]), (uint)Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>()); + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = ({Op1BaseType}){FixedInput2}; } + Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op2VectorType}<{Op2BaseType}>, byte>(ref testStruct._fld2), ref Unsafe.As<{Op2BaseType}, byte>(ref _data2[0]), (uint)Unsafe.SizeOf<{Op2VectorType}<{Op2BaseType}>>()); + for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = ({Op1BaseType}){FixedInput3}; } + Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op3VectorType}<{Op3BaseType}>, byte>(ref testStruct._fld3), ref Unsafe.As<{Op3BaseType}, byte>(ref _data3[0]), (uint)Unsafe.SizeOf<{Op3VectorType}<{Op3BaseType}>>()); + + return testStruct; + } + + public void RunStructFldScenario(TernaryOpTest__{Method}{RetBaseType}{RoundingMode} testClass) + { + var result = {Isa}.{Method}(_fld1, _fld2, _fld3, FloatRoundingMode.{RoundingMode}); + + Unsafe.Write(testClass._dataTable.outArrayPtr, result); + testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr); + } + } + + private static readonly int LargestVectorSize = {LargestVectorSize}; + + private static readonly int Op1ElementCount = Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>() / sizeof({Op1BaseType}); + private static readonly int Op2ElementCount = Unsafe.SizeOf<{Op2VectorType}<{Op2BaseType}>>() / sizeof({Op2BaseType}); + private static readonly int Op3ElementCount = Unsafe.SizeOf<{Op3VectorType}<{Op3BaseType}>>() / sizeof({Op3BaseType}); + private static readonly int RetElementCount = Unsafe.SizeOf<{RetVectorType}<{RetBaseType}>>() / sizeof({RetBaseType}); + + private static {Op1BaseType}[] _data1 = new {Op1BaseType}[Op1ElementCount]; + private static {Op2BaseType}[] _data2 = new {Op2BaseType}[Op2ElementCount]; + private static {Op3BaseType}[] _data3 = new {Op3BaseType}[Op3ElementCount]; + + private {Op1VectorType}<{Op1BaseType}> _fld1; + private {Op2VectorType}<{Op2BaseType}> _fld2; + private {Op3VectorType}<{Op3BaseType}> _fld3; + + private SimpleTernaryOpTest__DataTable<{RetBaseType}, {Op1BaseType}, {Op2BaseType}, {Op3BaseType}> _dataTable; + + public TernaryOpTest__{Method}{RetBaseType}{RoundingMode}() + { + Succeeded = true; + + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = ({Op1BaseType}){FixedInput1}; } + Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op1VectorType}<{Op1BaseType}>, byte>(ref _fld1), ref Unsafe.As<{Op1BaseType}, byte>(ref _data1[0]), (uint)Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>()); + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = ({Op1BaseType}){FixedInput2}; } + Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op2VectorType}<{Op2BaseType}>, byte>(ref _fld2), ref Unsafe.As<{Op2BaseType}, byte>(ref _data2[0]), (uint)Unsafe.SizeOf<{Op2VectorType}<{Op2BaseType}>>()); + for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = ({Op1BaseType}){FixedInput3}; } + Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op3VectorType}<{Op3BaseType}>, byte>(ref _fld3), ref Unsafe.As<{Op3BaseType}, byte>(ref _data3[0]), (uint)Unsafe.SizeOf<{Op3VectorType}<{Op3BaseType}>>()); + + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = ({Op1BaseType}){FixedInput1}; } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = ({Op1BaseType}){FixedInput2}; } + for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = ({Op1BaseType}){FixedInput3}; } + _dataTable = new SimpleTernaryOpTest__DataTable<{RetBaseType}, {Op1BaseType}, {Op2BaseType}, {Op3BaseType}>(_data1, _data2, _data3, new {RetBaseType}[RetElementCount], LargestVectorSize); + } + + public bool IsSupported => {Isa}.IsSupported; + + public bool Succeeded { get; set; } + + public void RunBasicScenario_UnsafeRead() + { + TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); + + var result = {Isa}.{Method}( + Unsafe.Read<{Op1VectorType}<{Op1BaseType}>>(_dataTable.inArray1Ptr), + Unsafe.Read<{Op2VectorType}<{Op2BaseType}>>(_dataTable.inArray2Ptr), + Unsafe.Read<{Op3VectorType}<{Op3BaseType}>>(_dataTable.inArray3Ptr), + FloatRoundingMode.{RoundingMode} + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); + } + + public void RunBasicScenario_Load() + { + TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); + + var result = {Isa}.{Method}( + {LoadIsa}.Load{Op1VectorType}(({Op1BaseType}*)(_dataTable.inArray1Ptr)), + {LoadIsa}.Load{Op2VectorType}(({Op2BaseType}*)(_dataTable.inArray2Ptr)), + {LoadIsa}.Load{Op3VectorType}(({Op3BaseType}*)(_dataTable.inArray3Ptr)), + FloatRoundingMode.{RoundingMode} + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); + } + + public void RunBasicScenario_LoadAligned() + { + TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned)); + + var result = {Isa}.{Method}( + {LoadIsa}.LoadAligned{Op1VectorType}(({Op1BaseType}*)(_dataTable.inArray1Ptr)), + {LoadIsa}.LoadAligned{Op2VectorType}(({Op2BaseType}*)(_dataTable.inArray2Ptr)), + {LoadIsa}.LoadAligned{Op3VectorType}(({Op3BaseType}*)(_dataTable.inArray3Ptr)), + FloatRoundingMode.{RoundingMode} + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); + } + + public void RunReflectionScenario_UnsafeRead() + { + TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); + + var result = typeof({Isa}).GetMethod(nameof({Isa}.{Method}), new Type[] { typeof({Op1VectorType}<{Op1BaseType}>), typeof({Op2VectorType}<{Op2BaseType}>), typeof({Op3VectorType}<{Op3BaseType}>), typeof(FloatRoundingMode) }) + .Invoke(null, new object[] { + Unsafe.Read<{Op1VectorType}<{Op1BaseType}>>(_dataTable.inArray1Ptr), + Unsafe.Read<{Op2VectorType}<{Op2BaseType}>>(_dataTable.inArray2Ptr), + Unsafe.Read<{Op3VectorType}<{Op3BaseType}>>(_dataTable.inArray3Ptr), + FloatRoundingMode.{RoundingMode} + }); + + Unsafe.Write(_dataTable.outArrayPtr, ({RetVectorType}<{RetBaseType}>)(result)); + ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr); + } + + public void RunLclVarScenario_UnsafeRead() + { + TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); + + var op1 = Unsafe.Read<{Op1VectorType}<{Op1BaseType}>>(_dataTable.inArray1Ptr); + var op2 = Unsafe.Read<{Op2VectorType}<{Op2BaseType}>>(_dataTable.inArray2Ptr); + var op3 = Unsafe.Read<{Op3VectorType}<{Op3BaseType}>>(_dataTable.inArray3Ptr); + var result = {Isa}.{Method}(op1, op2, op3, FloatRoundingMode.{RoundingMode}); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(op1, op2, op3, _dataTable.outArrayPtr); + } + + public void RunClassFldScenario() + { + TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); + + var result = {Isa}.{Method}(_fld1, _fld2, _fld3, FloatRoundingMode.{RoundingMode}); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr); + } + + public void RunStructLclFldScenario() + { + TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); + + var test = TestStruct.Create(); + var result = {Isa}.{Method}(test._fld1, test._fld2, test._fld3, FloatRoundingMode.{RoundingMode}); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr); + } + + public void RunStructFldScenario() + { + TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); + + var test = TestStruct.Create(); + test.RunStructFldScenario(this); + } + + public void RunUnsupportedScenario() + { + TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); + + bool succeeded = false; + + try + { + RunBasicScenario_UnsafeRead(); + } + catch (PlatformNotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + Succeeded = false; + } + } + + private void ValidateResult({Op1VectorType}<{Op1BaseType}> op1, {Op2VectorType}<{Op2BaseType}> op2, {Op3VectorType}<{Op3BaseType}> op3, void* result, [CallerMemberName] string method = "") + { + {Op1BaseType}[] inArray1 = new {Op1BaseType}[Op1ElementCount]; + {Op2BaseType}[] inArray2 = new {Op2BaseType}[Op2ElementCount]; + {Op3BaseType}[] inArray3 = new {Op3BaseType}[Op3ElementCount]; + {RetBaseType}[] outArray = new {RetBaseType}[RetElementCount]; + + Unsafe.WriteUnaligned(ref Unsafe.As<{Op1BaseType}, byte>(ref inArray1[0]), op1); + Unsafe.WriteUnaligned(ref Unsafe.As<{Op2BaseType}, byte>(ref inArray2[0]), op2); + Unsafe.WriteUnaligned(ref Unsafe.As<{Op3BaseType}, byte>(ref inArray3[0]), op3); + Unsafe.CopyBlockUnaligned(ref Unsafe.As<{RetBaseType}, byte>(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf<{RetVectorType}<{RetBaseType}>>()); + + ValidateResult(inArray1, inArray2, inArray3, outArray, method); + } + + private void ValidateResult(void* op1, void* op2, void* op3, void* result, [CallerMemberName] string method = "") + { + {Op1BaseType}[] inArray1 = new {Op1BaseType}[Op1ElementCount]; + {Op2BaseType}[] inArray2 = new {Op2BaseType}[Op2ElementCount]; + {Op3BaseType}[] inArray3 = new {Op3BaseType}[Op3ElementCount]; + {RetBaseType}[] outArray = new {RetBaseType}[RetElementCount]; + + Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op1BaseType}, byte>(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>()); + Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op2BaseType}, byte>(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf<{Op2VectorType}<{Op2BaseType}>>()); + Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op3BaseType}, byte>(ref inArray3[0]), ref Unsafe.AsRef(op3), (uint)Unsafe.SizeOf<{Op3VectorType}<{Op3BaseType}>>()); + Unsafe.CopyBlockUnaligned(ref Unsafe.As<{RetBaseType}, byte>(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf<{RetVectorType}<{RetBaseType}>>()); + + ValidateResult(inArray1, inArray2, inArray3, outArray, method); + } + + private void ValidateResult({Op1BaseType}[] firstOp, {Op2BaseType}[] secondOp, {Op3BaseType}[] thirdOp, {RetBaseType}[] result, [CallerMemberName] string method = "") + { + bool succeeded = true; + + for (int i = 0; i < result.Length; i++) + { + ulong[] answerTable = TernaryEmbRoundingAnswerTable[("{RetBaseType}", "{Method}", "{RoundingMode}")]; + + if (BitConverter.{CastingMethod}(result[i]) != answerTable[i]) + { + succeeded = false; + Console.WriteLine("Avx512 {Method} Embedded rounding failed on {RetBaseType} with {RoundingMode}:"); + foreach (var item in result) + { + Console.Write(item + ", "); + } + Console.WriteLine(); + Assert.Fail(""); + } + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"{nameof({Isa})}.{nameof({Isa}.{Method})}<{RetBaseType}>({Op1VectorType}<{Op1BaseType}>, {Op2VectorType}<{Op2BaseType}>, {Op3VectorType}<{Op3BaseType}>): {method} failed:"); + TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); + TestLibrary.TestFramework.LogInformation($"secondOp: ({string.Join(", ", secondOp)})"); + TestLibrary.TestFramework.LogInformation($" thirdOp: ({string.Join(", ", thirdOp)})"); + TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); + TestLibrary.TestFramework.LogInformation(string.Empty); + + Succeeded = false; + } + } + + private static Dictionary<(string, string, string), ulong[]> TernaryEmbRoundingAnswerTable = new Dictionary<(string, string, string), ulong[]> + { + {("Double", "FusedMultiplyAdd", "ToNegativeInfinity"), new ulong[] {0x3fe8b851eb851eb8, 0x3fe8b851eb851eb8, 0x3fe8b851eb851eb8, 0x3fe8b851eb851eb8, 0x3fe8b851eb851eb8, 0x3fe8b851eb851eb8, 0x3fe8b851eb851eb8, 0x3fe8b851eb851eb8}}, + {("Single", "FusedMultiplyAdd", "ToNegativeInfinity"), new ulong[] {0x3f45c28f, 0x3f45c28f, 0x3f45c28f, 0x3f45c28f, 0x3f45c28f, 0x3f45c28f, 0x3f45c28f, 0x3f45c28f, 0x3f45c28f, 0x3f45c28f, 0x3f45c28f, 0x3f45c28f, 0x3f45c28f, 0x3f45c28f, 0x3f45c28f, 0x3f45c28f}}, + {("Double", "FusedMultiplyAdd", "ToPositiveInfinity"), new ulong[] {0x3fe8b851eb851eb9, 0x3fe8b851eb851eb9, 0x3fe8b851eb851eb9, 0x3fe8b851eb851eb9, 0x3fe8b851eb851eb9, 0x3fe8b851eb851eb9, 0x3fe8b851eb851eb9, 0x3fe8b851eb851eb9}}, + {("Single", "FusedMultiplyAdd", "ToPositiveInfinity"), new ulong[] {0x3f45c290, 0x3f45c290, 0x3f45c290, 0x3f45c290, 0x3f45c290, 0x3f45c290, 0x3f45c290, 0x3f45c290, 0x3f45c290, 0x3f45c290, 0x3f45c290, 0x3f45c290, 0x3f45c290, 0x3f45c290, 0x3f45c290, 0x3f45c290}}, + {("Double", "FusedMultiplyAdd", "ToZero"), new ulong[] {0x3fe8b851eb851eb8, 0x3fe8b851eb851eb8, 0x3fe8b851eb851eb8, 0x3fe8b851eb851eb8, 0x3fe8b851eb851eb8, 0x3fe8b851eb851eb8, 0x3fe8b851eb851eb8, 0x3fe8b851eb851eb8}}, + {("Single", "FusedMultiplyAdd", "ToZero"), new ulong[] {0x3f45c28f, 0x3f45c28f, 0x3f45c28f, 0x3f45c28f, 0x3f45c28f, 0x3f45c28f, 0x3f45c28f, 0x3f45c28f, 0x3f45c28f, 0x3f45c28f, 0x3f45c28f, 0x3f45c28f, 0x3f45c28f, 0x3f45c28f, 0x3f45c28f, 0x3f45c28f}}, + {("Double", "FusedMultiplyAddNegated", "ToNegativeInfinity"), new ulong[] {0x3fe747ae147ae147, 0x3fe747ae147ae147, 0x3fe747ae147ae147, 0x3fe747ae147ae147, 0x3fe747ae147ae147, 0x3fe747ae147ae147, 0x3fe747ae147ae147, 0x3fe747ae147ae147}}, + {("Single", "FusedMultiplyAddNegated", "ToNegativeInfinity"), new ulong[] {0x3f3a3d70, 0x3f3a3d70, 0x3f3a3d70, 0x3f3a3d70, 0x3f3a3d70, 0x3f3a3d70, 0x3f3a3d70, 0x3f3a3d70, 0x3f3a3d70, 0x3f3a3d70, 0x3f3a3d70, 0x3f3a3d70, 0x3f3a3d70, 0x3f3a3d70, 0x3f3a3d70, 0x3f3a3d70}}, + {("Double", "FusedMultiplyAddNegated", "ToPositiveInfinity"), new ulong[] {0x3fe747ae147ae148, 0x3fe747ae147ae148, 0x3fe747ae147ae148, 0x3fe747ae147ae148, 0x3fe747ae147ae148, 0x3fe747ae147ae148, 0x3fe747ae147ae148, 0x3fe747ae147ae148}}, + {("Single", "FusedMultiplyAddNegated", "ToPositiveInfinity"), new ulong[] {0x3f3a3d71, 0x3f3a3d71, 0x3f3a3d71, 0x3f3a3d71, 0x3f3a3d71, 0x3f3a3d71, 0x3f3a3d71, 0x3f3a3d71, 0x3f3a3d71, 0x3f3a3d71, 0x3f3a3d71, 0x3f3a3d71, 0x3f3a3d71, 0x3f3a3d71, 0x3f3a3d71, 0x3f3a3d71}}, + {("Double", "FusedMultiplyAddNegated", "ToZero"), new ulong[] {0x3fe747ae147ae147, 0x3fe747ae147ae147, 0x3fe747ae147ae147, 0x3fe747ae147ae147, 0x3fe747ae147ae147, 0x3fe747ae147ae147, 0x3fe747ae147ae147, 0x3fe747ae147ae147}}, + {("Single", "FusedMultiplyAddNegated", "ToZero"), new ulong[] {0x3f3a3d70, 0x3f3a3d70, 0x3f3a3d70, 0x3f3a3d70, 0x3f3a3d70, 0x3f3a3d70, 0x3f3a3d70, 0x3f3a3d70, 0x3f3a3d70, 0x3f3a3d70, 0x3f3a3d70, 0x3f3a3d70, 0x3f3a3d70, 0x3f3a3d70, 0x3f3a3d70, 0x3f3a3d70}}, + {("Double", "FusedMultiplyAddSubtract", "ToNegativeInfinity"), new ulong[] {0xbfe747ae147ae148, 0x3fe8b851eb851eb8, 0xbfe747ae147ae148, 0x3fe8b851eb851eb8, 0xbfe747ae147ae148, 0x3fe8b851eb851eb8, 0xbfe747ae147ae148, 0x3fe8b851eb851eb8}}, + {("Single", "FusedMultiplyAddSubtract", "ToNegativeInfinity"), new ulong[] {0xbf3a3d71, 0x3f45c28f, 0xbf3a3d71, 0x3f45c28f, 0xbf3a3d71, 0x3f45c28f, 0xbf3a3d71, 0x3f45c28f, 0xbf3a3d71, 0x3f45c28f, 0xbf3a3d71, 0x3f45c28f, 0xbf3a3d71, 0x3f45c28f, 0xbf3a3d71, 0x3f45c28f}}, + {("Double", "FusedMultiplyAddSubtract", "ToPositiveInfinity"), new ulong[] {0xbfe747ae147ae147, 0x3fe8b851eb851eb9, 0xbfe747ae147ae147, 0x3fe8b851eb851eb9, 0xbfe747ae147ae147, 0x3fe8b851eb851eb9, 0xbfe747ae147ae147, 0x3fe8b851eb851eb9}}, + {("Single", "FusedMultiplyAddSubtract", "ToPositiveInfinity"), new ulong[] {0xbf3a3d70, 0x3f45c290, 0xbf3a3d70, 0x3f45c290, 0xbf3a3d70, 0x3f45c290, 0xbf3a3d70, 0x3f45c290, 0xbf3a3d70, 0x3f45c290, 0xbf3a3d70, 0x3f45c290, 0xbf3a3d70, 0x3f45c290, 0xbf3a3d70, 0x3f45c290}}, + {("Double", "FusedMultiplyAddSubtract", "ToZero"), new ulong[] {0xbfe747ae147ae147, 0x3fe8b851eb851eb8, 0xbfe747ae147ae147, 0x3fe8b851eb851eb8, 0xbfe747ae147ae147, 0x3fe8b851eb851eb8, 0xbfe747ae147ae147, 0x3fe8b851eb851eb8}}, + {("Single", "FusedMultiplyAddSubtract", "ToZero"), new ulong[] {0xbf3a3d70, 0x3f45c28f, 0xbf3a3d70, 0x3f45c28f, 0xbf3a3d70, 0x3f45c28f, 0xbf3a3d70, 0x3f45c28f, 0xbf3a3d70, 0x3f45c28f, 0xbf3a3d70, 0x3f45c28f, 0xbf3a3d70, 0x3f45c28f, 0xbf3a3d70, 0x3f45c28f}}, + {("Double", "FusedMultiplySubtract", "ToNegativeInfinity"), new ulong[] {0xbfe747ae147ae148, 0xbfe747ae147ae148, 0xbfe747ae147ae148, 0xbfe747ae147ae148, 0xbfe747ae147ae148, 0xbfe747ae147ae148, 0xbfe747ae147ae148, 0xbfe747ae147ae148}}, + {("Single", "FusedMultiplySubtract", "ToNegativeInfinity"), new ulong[] {0xbf3a3d71, 0xbf3a3d71, 0xbf3a3d71, 0xbf3a3d71, 0xbf3a3d71, 0xbf3a3d71, 0xbf3a3d71, 0xbf3a3d71, 0xbf3a3d71, 0xbf3a3d71, 0xbf3a3d71, 0xbf3a3d71, 0xbf3a3d71, 0xbf3a3d71, 0xbf3a3d71, 0xbf3a3d71}}, + {("Double", "FusedMultiplySubtract", "ToPositiveInfinity"), new ulong[] {0xbfe747ae147ae147, 0xbfe747ae147ae147, 0xbfe747ae147ae147, 0xbfe747ae147ae147, 0xbfe747ae147ae147, 0xbfe747ae147ae147, 0xbfe747ae147ae147, 0xbfe747ae147ae147}}, + {("Single", "FusedMultiplySubtract", "ToPositiveInfinity"), new ulong[] {0xbf3a3d70, 0xbf3a3d70, 0xbf3a3d70, 0xbf3a3d70, 0xbf3a3d70, 0xbf3a3d70, 0xbf3a3d70, 0xbf3a3d70, 0xbf3a3d70, 0xbf3a3d70, 0xbf3a3d70, 0xbf3a3d70, 0xbf3a3d70, 0xbf3a3d70, 0xbf3a3d70, 0xbf3a3d70}}, + {("Double", "FusedMultiplySubtract", "ToZero"), new ulong[] {0xbfe747ae147ae147, 0xbfe747ae147ae147, 0xbfe747ae147ae147, 0xbfe747ae147ae147, 0xbfe747ae147ae147, 0xbfe747ae147ae147, 0xbfe747ae147ae147, 0xbfe747ae147ae147}}, + {("Single", "FusedMultiplySubtract", "ToZero"), new ulong[] {0xbf3a3d70, 0xbf3a3d70, 0xbf3a3d70, 0xbf3a3d70, 0xbf3a3d70, 0xbf3a3d70, 0xbf3a3d70, 0xbf3a3d70, 0xbf3a3d70, 0xbf3a3d70, 0xbf3a3d70, 0xbf3a3d70, 0xbf3a3d70, 0xbf3a3d70, 0xbf3a3d70, 0xbf3a3d70}}, + {("Double", "FusedMultiplySubtractAdd", "ToNegativeInfinity"), new ulong[] {0x3fe8b851eb851eb8, 0xbfe747ae147ae148, 0x3fe8b851eb851eb8, 0xbfe747ae147ae148, 0x3fe8b851eb851eb8, 0xbfe747ae147ae148, 0x3fe8b851eb851eb8, 0xbfe747ae147ae148}}, + {("Single", "FusedMultiplySubtractAdd", "ToNegativeInfinity"), new ulong[] {0x3f45c28f, 0xbf3a3d71, 0x3f45c28f, 0xbf3a3d71, 0x3f45c28f, 0xbf3a3d71, 0x3f45c28f, 0xbf3a3d71, 0x3f45c28f, 0xbf3a3d71, 0x3f45c28f, 0xbf3a3d71, 0x3f45c28f, 0xbf3a3d71, 0x3f45c28f, 0xbf3a3d71}}, + {("Double", "FusedMultiplySubtractAdd", "ToPositiveInfinity"), new ulong[] {0x3fe8b851eb851eb9, 0xbfe747ae147ae147, 0x3fe8b851eb851eb9, 0xbfe747ae147ae147, 0x3fe8b851eb851eb9, 0xbfe747ae147ae147, 0x3fe8b851eb851eb9, 0xbfe747ae147ae147}}, + {("Single", "FusedMultiplySubtractAdd", "ToPositiveInfinity"), new ulong[] {0x3f45c290, 0xbf3a3d70, 0x3f45c290, 0xbf3a3d70, 0x3f45c290, 0xbf3a3d70, 0x3f45c290, 0xbf3a3d70, 0x3f45c290, 0xbf3a3d70, 0x3f45c290, 0xbf3a3d70, 0x3f45c290, 0xbf3a3d70, 0x3f45c290, 0xbf3a3d70}}, + {("Double", "FusedMultiplySubtractAdd", "ToZero"), new ulong[] {0x3fe8b851eb851eb8, 0xbfe747ae147ae147, 0x3fe8b851eb851eb8, 0xbfe747ae147ae147, 0x3fe8b851eb851eb8, 0xbfe747ae147ae147, 0x3fe8b851eb851eb8, 0xbfe747ae147ae147}}, + {("Single", "FusedMultiplySubtractAdd", "ToZero"), new ulong[] {0x3f45c28f, 0xbf3a3d70, 0x3f45c28f, 0xbf3a3d70, 0x3f45c28f, 0xbf3a3d70, 0x3f45c28f, 0xbf3a3d70, 0x3f45c28f, 0xbf3a3d70, 0x3f45c28f, 0xbf3a3d70, 0x3f45c28f, 0xbf3a3d70, 0x3f45c28f, 0xbf3a3d70}}, + {("Double", "FusedMultiplySubtractNegated", "ToNegativeInfinity"), new ulong[] {0xbfe8b851eb851eb9, 0xbfe8b851eb851eb9, 0xbfe8b851eb851eb9, 0xbfe8b851eb851eb9, 0xbfe8b851eb851eb9, 0xbfe8b851eb851eb9, 0xbfe8b851eb851eb9, 0xbfe8b851eb851eb9}}, + {("Single", "FusedMultiplySubtractNegated", "ToNegativeInfinity"), new ulong[] {0xbf45c290, 0xbf45c290, 0xbf45c290, 0xbf45c290, 0xbf45c290, 0xbf45c290, 0xbf45c290, 0xbf45c290, 0xbf45c290, 0xbf45c290, 0xbf45c290, 0xbf45c290, 0xbf45c290, 0xbf45c290, 0xbf45c290, 0xbf45c290}}, + {("Double", "FusedMultiplySubtractNegated", "ToPositiveInfinity"), new ulong[] {0xbfe8b851eb851eb8, 0xbfe8b851eb851eb8, 0xbfe8b851eb851eb8, 0xbfe8b851eb851eb8, 0xbfe8b851eb851eb8, 0xbfe8b851eb851eb8, 0xbfe8b851eb851eb8, 0xbfe8b851eb851eb8}}, + {("Single", "FusedMultiplySubtractNegated", "ToPositiveInfinity"), new ulong[] {0xbf45c28f, 0xbf45c28f, 0xbf45c28f, 0xbf45c28f, 0xbf45c28f, 0xbf45c28f, 0xbf45c28f, 0xbf45c28f, 0xbf45c28f, 0xbf45c28f, 0xbf45c28f, 0xbf45c28f, 0xbf45c28f, 0xbf45c28f, 0xbf45c28f, 0xbf45c28f}}, + {("Double", "FusedMultiplySubtractNegated", "ToZero"), new ulong[] {0xbfe8b851eb851eb8, 0xbfe8b851eb851eb8, 0xbfe8b851eb851eb8, 0xbfe8b851eb851eb8, 0xbfe8b851eb851eb8, 0xbfe8b851eb851eb8, 0xbfe8b851eb851eb8, 0xbfe8b851eb851eb8}}, + {("Single", "FusedMultiplySubtractNegated", "ToZero"), new ulong[] {0xbf45c28f, 0xbf45c28f, 0xbf45c28f, 0xbf45c28f, 0xbf45c28f, 0xbf45c28f, 0xbf45c28f, 0xbf45c28f, 0xbf45c28f, 0xbf45c28f, 0xbf45c28f, 0xbf45c28f, 0xbf45c28f, 0xbf45c28f, 0xbf45c28f, 0xbf45c28f}}, + {("Double", "FusedMultiplyAddScalar", "ToNegativeInfinity"), new ulong[] {0x3fe8b851eb851eb8, 0x3fa999999999999a}}, + {("Single", "FusedMultiplyAddScalar", "ToNegativeInfinity"), new ulong[] {0x3f45c28f, 0x3d4ccccd, 0x3d4ccccd, 0x3d4ccccd}}, + {("Double", "FusedMultiplyAddScalar", "ToPositiveInfinity"), new ulong[] {0x3fe8b851eb851eb9, 0x3fa999999999999a}}, + {("Single", "FusedMultiplyAddScalar", "ToPositiveInfinity"), new ulong[] {0x3f45c290, 0x3d4ccccd, 0x3d4ccccd, 0x3d4ccccd}}, + {("Double", "FusedMultiplyAddScalar", "ToZero"), new ulong[] {0x3fe8b851eb851eb8, 0x3fa999999999999a}}, + {("Single", "FusedMultiplyAddScalar", "ToZero"), new ulong[] {0x3f45c28f, 0x3d4ccccd, 0x3d4ccccd, 0x3d4ccccd}}, + {("Double", "FusedMultiplyAddNegatedScalar", "ToNegativeInfinity"), new ulong[] {0x3fe747ae147ae147, 0x3fa999999999999a}}, + {("Single", "FusedMultiplyAddNegatedScalar", "ToNegativeInfinity"), new ulong[] {0x3f3a3d70, 0x3d4ccccd, 0x3d4ccccd, 0x3d4ccccd}}, + {("Double", "FusedMultiplyAddNegatedScalar", "ToPositiveInfinity"), new ulong[] {0x3fe747ae147ae148, 0x3fa999999999999a}}, + {("Single", "FusedMultiplyAddNegatedScalar", "ToPositiveInfinity"), new ulong[] {0x3f3a3d71, 0x3d4ccccd, 0x3d4ccccd, 0x3d4ccccd}}, + {("Double", "FusedMultiplyAddNegatedScalar", "ToZero"), new ulong[] {0x3fe747ae147ae147, 0x3fa999999999999a}}, + {("Single", "FusedMultiplyAddNegatedScalar", "ToZero"), new ulong[] {0x3f3a3d70, 0x3d4ccccd, 0x3d4ccccd, 0x3d4ccccd}}, + {("Double", "FusedMultiplySubtractNegatedScalar", "ToNegativeInfinity"), new ulong[] {0xbfe8b851eb851eb9, 0x3fa999999999999a}}, + {("Single", "FusedMultiplySubtractNegatedScalar", "ToNegativeInfinity"), new ulong[] {0xbf45c290, 0x3d4ccccd, 0x3d4ccccd, 0x3d4ccccd}}, + {("Double", "FusedMultiplySubtractNegatedScalar", "ToPositiveInfinity"), new ulong[] {0xbfe8b851eb851eb8, 0x3fa999999999999a}}, + {("Single", "FusedMultiplySubtractNegatedScalar", "ToPositiveInfinity"), new ulong[] {0xbf45c28f, 0x3d4ccccd, 0x3d4ccccd, 0x3d4ccccd}}, + {("Double", "FusedMultiplySubtractNegatedScalar", "ToZero"), new ulong[] {0xbfe8b851eb851eb8, 0x3fa999999999999a}}, + {("Single", "FusedMultiplySubtractNegatedScalar", "ToZero"), new ulong[] {0xbf45c28f, 0x3d4ccccd, 0x3d4ccccd, 0x3d4ccccd}}, + {("Double", "FusedMultiplySubtractScalar", "ToNegativeInfinity"), new ulong[] {0xbfe747ae147ae148, 0x3fa999999999999a}}, + {("Single", "FusedMultiplySubtractScalar", "ToNegativeInfinity"), new ulong[] {0xbf3a3d71, 0x3d4ccccd, 0x3d4ccccd, 0x3d4ccccd}}, + {("Double", "FusedMultiplySubtractScalar", "ToPositiveInfinity"), new ulong[] {0xbfe747ae147ae147, 0x3fa999999999999a}}, + {("Single", "FusedMultiplySubtractScalar", "ToPositiveInfinity"), new ulong[] {0xbf3a3d70, 0x3d4ccccd, 0x3d4ccccd, 0x3d4ccccd}}, + {("Double", "FusedMultiplySubtractScalar", "ToZero"), new ulong[] {0xbfe747ae147ae147, 0x3fa999999999999a}}, + {("Single", "FusedMultiplySubtractScalar", "ToZero"), new ulong[] {0xbf3a3d70, 0x3d4ccccd, 0x3d4ccccd, 0x3d4ccccd}}, + }; + } +}