diff --git a/docs/design/features/hw-intrinsics.md b/docs/design/features/hw-intrinsics.md index 57b379ec18ff84..3a651b22795fbc 100644 --- a/docs/design/features/hw-intrinsics.md +++ b/docs/design/features/hw-intrinsics.md @@ -83,8 +83,8 @@ Note that the x86/x64 implementation is shared, while currently the Arm64 intrin The hardware intrinsics nodes are generally imported as `GenTreeHWIntrinsic` nodes, with the `GT_HWINTRINSIC` operator. On these nodes: * The `gtHWIntrinsicId` field contains the intrinsic ID, as declared in the hardware intrinsics table -* The `gtSIMDBaseType` field indicates the "base type" (generic type argument). -* The `gtSIMDSize` field indicates the full byte width of the vector (e.g. 16 bytes for `Vector128`). +* The `GetSimdBaseType` method indicates the "base type" (generic type argument). +* The `GetSimdSize` method indicates the full byte width of the vector (e.g. 16 bytes for `Vector128`). ### Lowering diff --git a/src/coreclr/jit/assertionprop.cpp b/src/coreclr/jit/assertionprop.cpp index 56366cfd6d7707..8db49752c10643 100644 --- a/src/coreclr/jit/assertionprop.cpp +++ b/src/coreclr/jit/assertionprop.cpp @@ -2733,8 +2733,8 @@ GenTree* Compiler::optConstantAssertionProp(AssertionDsc* curAssertion, LclVarDsc* varDsc = lvaGetDesc(lclNum); var_types simdType = tree->TypeGet(); assert(varDsc->TypeGet() == simdType); - var_types baseType = varDsc->lvBaseType; - newTree = gtGetSIMDZero(simdType, baseType, varDsc->GetStructHnd()); + CorInfoType simdBaseJitType = varDsc->GetSimdBaseJitType(); + newTree = gtGetSIMDZero(simdType, simdBaseJitType, varDsc->GetStructHnd()); if (newTree == nullptr) { return nullptr; diff --git a/src/coreclr/jit/codegenarm64.cpp b/src/coreclr/jit/codegenarm64.cpp index 737db8dc424a65..6e68254ccd6a27 100644 --- a/src/coreclr/jit/codegenarm64.cpp +++ b/src/coreclr/jit/codegenarm64.cpp @@ -3847,11 +3847,11 @@ void CodeGen::genEmitHelperCall(unsigned helper, int argSize, emitAttr retSize, void CodeGen::genSIMDIntrinsic(GenTreeSIMD* simdNode) { // NYI for unsupported base types - if (simdNode->gtSIMDBaseType != TYP_INT && simdNode->gtSIMDBaseType != TYP_LONG && - simdNode->gtSIMDBaseType != TYP_FLOAT && simdNode->gtSIMDBaseType != TYP_DOUBLE && - simdNode->gtSIMDBaseType != TYP_USHORT && simdNode->gtSIMDBaseType != TYP_UBYTE && - simdNode->gtSIMDBaseType != TYP_SHORT && simdNode->gtSIMDBaseType != TYP_BYTE && - simdNode->gtSIMDBaseType != TYP_UINT && simdNode->gtSIMDBaseType != TYP_ULONG) + if (simdNode->GetSimdBaseType() != TYP_INT && simdNode->GetSimdBaseType() != TYP_LONG && + simdNode->GetSimdBaseType() != TYP_FLOAT && simdNode->GetSimdBaseType() != TYP_DOUBLE && + simdNode->GetSimdBaseType() != TYP_USHORT && simdNode->GetSimdBaseType() != TYP_UBYTE && + simdNode->GetSimdBaseType() != TYP_SHORT && simdNode->GetSimdBaseType() != TYP_BYTE && + simdNode->GetSimdBaseType() != TYP_UINT && simdNode->GetSimdBaseType() != TYP_ULONG) { // We don't need a base type for the Upper Save & Restore intrinsics, and we may find // these implemented over lclVars created by CSE without full handle information (and @@ -4068,7 +4068,7 @@ void CodeGen::genSIMDIntrinsicInit(GenTreeSIMD* simdNode) assert(simdNode->gtSIMDIntrinsicID == SIMDIntrinsicInit); GenTree* op1 = simdNode->gtGetOp1(); - var_types baseType = simdNode->gtSIMDBaseType; + var_types baseType = simdNode->GetSimdBaseType(); regNumber targetReg = simdNode->GetRegNum(); assert(targetReg != REG_NA); var_types targetType = simdNode->TypeGet(); @@ -4085,7 +4085,7 @@ void CodeGen::genSIMDIntrinsicInit(GenTreeSIMD* simdNode) assert(genIsValidFloatReg(targetReg)); assert(genIsValidIntReg(op1Reg) || genIsValidFloatReg(op1Reg)); - emitAttr attr = (simdNode->gtSIMDSize > 8) ? EA_16BYTE : EA_8BYTE; + emitAttr attr = (simdNode->GetSimdSize() > 8) ? EA_16BYTE : EA_8BYTE; insOpts opt = genGetSimdInsOpt(attr, baseType); if (opt == INS_OPTS_1D) @@ -4123,7 +4123,7 @@ void CodeGen::genSIMDIntrinsicInitN(GenTreeSIMD* simdNode) var_types targetType = simdNode->TypeGet(); - var_types baseType = simdNode->gtSIMDBaseType; + var_types baseType = simdNode->GetSimdBaseType(); regNumber vectorReg = targetReg; @@ -4151,7 +4151,7 @@ void CodeGen::genSIMDIntrinsicInitN(GenTreeSIMD* simdNode) initCount++; } - assert((initCount * baseTypeSize) <= simdNode->gtSIMDSize); + assert((initCount * baseTypeSize) <= simdNode->GetSimdSize()); if (initCount * baseTypeSize < EA_16BYTE) { @@ -4200,7 +4200,7 @@ void CodeGen::genSIMDIntrinsicUnOp(GenTreeSIMD* simdNode) simdNode->gtSIMDIntrinsicID == SIMDIntrinsicConvertToInt64); GenTree* op1 = simdNode->gtGetOp1(); - var_types baseType = simdNode->gtSIMDBaseType; + var_types baseType = simdNode->GetSimdBaseType(); regNumber targetReg = simdNode->GetRegNum(); assert(targetReg != REG_NA); var_types targetType = simdNode->TypeGet(); @@ -4212,7 +4212,7 @@ void CodeGen::genSIMDIntrinsicUnOp(GenTreeSIMD* simdNode) assert(genIsValidFloatReg(targetReg)); instruction ins = getOpForSIMDIntrinsic(simdNode->gtSIMDIntrinsicID, baseType); - emitAttr attr = (simdNode->gtSIMDSize > 8) ? EA_16BYTE : EA_8BYTE; + emitAttr attr = (simdNode->GetSimdSize() > 8) ? EA_16BYTE : EA_8BYTE; insOpts opt = (ins == INS_mov) ? INS_OPTS_NONE : genGetSimdInsOpt(attr, baseType); GetEmitter()->emitIns_R_R(ins, attr, targetReg, op1Reg, opt); @@ -4235,7 +4235,7 @@ void CodeGen::genSIMDIntrinsicWiden(GenTreeSIMD* simdNode) (simdNode->gtSIMDIntrinsicID == SIMDIntrinsicWidenHi)); GenTree* op1 = simdNode->gtGetOp1(); - var_types baseType = simdNode->gtSIMDBaseType; + var_types baseType = simdNode->GetSimdBaseType(); regNumber targetReg = simdNode->GetRegNum(); assert(targetReg != REG_NA); var_types simdType = simdNode->TypeGet(); @@ -4271,7 +4271,7 @@ void CodeGen::genSIMDIntrinsicNarrow(GenTreeSIMD* simdNode) GenTree* op1 = simdNode->gtGetOp1(); GenTree* op2 = simdNode->gtGetOp2(); - var_types baseType = simdNode->gtSIMDBaseType; + var_types baseType = simdNode->GetSimdBaseType(); regNumber targetReg = simdNode->GetRegNum(); assert(targetReg != REG_NA); var_types simdType = simdNode->TypeGet(); @@ -4285,7 +4285,7 @@ void CodeGen::genSIMDIntrinsicNarrow(GenTreeSIMD* simdNode) assert(genIsValidFloatReg(op2Reg)); assert(genIsValidFloatReg(targetReg)); assert(op2Reg != targetReg); - assert(simdNode->gtSIMDSize == 16); + assert(simdNode->GetSimdSize() == 16); instruction ins = getOpForSIMDIntrinsic(simdNode->gtSIMDIntrinsicID, baseType); assert((ins == INS_fcvtn) || (ins == INS_xtn)); @@ -4344,7 +4344,7 @@ void CodeGen::genSIMDIntrinsicBinOp(GenTreeSIMD* simdNode) GenTree* op1 = simdNode->gtGetOp1(); GenTree* op2 = simdNode->gtGetOp2(); - var_types baseType = simdNode->gtSIMDBaseType; + var_types baseType = simdNode->GetSimdBaseType(); regNumber targetReg = simdNode->GetRegNum(); assert(targetReg != REG_NA); var_types targetType = simdNode->TypeGet(); @@ -4360,7 +4360,7 @@ void CodeGen::genSIMDIntrinsicBinOp(GenTreeSIMD* simdNode) // TODO-ARM64-CQ Contain integer constants where posible instruction ins = getOpForSIMDIntrinsic(simdNode->gtSIMDIntrinsicID, baseType); - emitAttr attr = (simdNode->gtSIMDSize > 8) ? EA_16BYTE : EA_8BYTE; + emitAttr attr = (simdNode->GetSimdSize() > 8) ? EA_16BYTE : EA_8BYTE; insOpts opt = genGetSimdInsOpt(attr, baseType); GetEmitter()->emitIns_R_R_R(ins, attr, targetReg, op1Reg, op2Reg, opt); @@ -4392,7 +4392,7 @@ void CodeGen::genSIMDIntrinsicGetItem(GenTreeSIMD* simdNode) simdType = TYP_SIMD16; } - var_types baseType = simdNode->gtSIMDBaseType; + var_types baseType = simdNode->GetSimdBaseType(); regNumber targetReg = simdNode->GetRegNum(); assert(targetReg != REG_NA); var_types targetType = simdNode->TypeGet(); @@ -4569,14 +4569,14 @@ void CodeGen::genSIMDIntrinsicSetItem(GenTreeSIMD* simdNode) GenTree* op1 = simdNode->gtGetOp1(); GenTree* op2 = simdNode->gtGetOp2(); - var_types baseType = simdNode->gtSIMDBaseType; + var_types baseType = simdNode->GetSimdBaseType(); regNumber targetReg = simdNode->GetRegNum(); assert(targetReg != REG_NA); var_types targetType = simdNode->TypeGet(); assert(varTypeIsSIMD(targetType)); assert(op2->TypeGet() == baseType); - assert(simdNode->gtSIMDSize >= ((index + 1) * genTypeSize(baseType))); + assert(simdNode->GetSimdSize() >= ((index + 1) * genTypeSize(baseType))); genConsumeOperands(simdNode); regNumber op1Reg = op1->GetRegNum(); diff --git a/src/coreclr/jit/compiler.h b/src/coreclr/jit/compiler.h index 584e3568f7f51a..04a36c497f2795 100644 --- a/src/coreclr/jit/compiler.h +++ b/src/coreclr/jit/compiler.h @@ -505,9 +505,22 @@ class LclVarDsc // type of an arg node is TYP_BYREF and a local node is TYP_SIMD*. unsigned char lvSIMDType : 1; // This is a SIMD struct unsigned char lvUsedInSIMDIntrinsic : 1; // This tells lclvar is used for simd intrinsic - var_types lvBaseType : 5; // Note: this only packs because var_types is a typedef of unsigned char -#endif // FEATURE_SIMD - unsigned char lvRegStruct : 1; // This is a reg-sized non-field-addressed struct. + unsigned char lvSimdBaseJitType : 5; // Note: this only packs because CorInfoType has less than 32 entries + + CorInfoType GetSimdBaseJitType() const + { + return (CorInfoType)lvSimdBaseJitType; + } + + void SetSimdBaseJitType(CorInfoType simdBaseJitType) + { + assert(simdBaseJitType < (1 << 5)); + lvSimdBaseJitType = (unsigned char)simdBaseJitType; + } + + var_types GetSimdBaseType() const; +#endif // FEATURE_SIMD + unsigned char lvRegStruct : 1; // This is a reg-sized non-field-addressed struct. unsigned char lvClassIsExact : 1; // lvClassHandle is the exact type @@ -2755,7 +2768,7 @@ class Compiler GenTreeLclVar* gtNewStoreLclVar(unsigned dstLclNum, GenTree* src); #ifdef FEATURE_SIMD - GenTree* gtNewSIMDVectorZero(var_types simdType, var_types baseType, unsigned size); + GenTree* gtNewSIMDVectorZero(var_types simdType, CorInfoType simdBaseJitType, unsigned simdSize); #endif GenTree* gtNewBlkOpNode(GenTree* dst, GenTree* srcOrFillVal, bool isVolatile, bool isCopyBlock); @@ -2812,62 +2825,74 @@ class Compiler #ifdef FEATURE_SIMD GenTreeSIMD* gtNewSIMDNode( - var_types type, GenTree* op1, SIMDIntrinsicID simdIntrinsicID, var_types baseType, unsigned size); - GenTreeSIMD* gtNewSIMDNode( - var_types type, GenTree* op1, GenTree* op2, SIMDIntrinsicID simdIntrinsicID, var_types baseType, unsigned size); + var_types type, GenTree* op1, SIMDIntrinsicID simdIntrinsicID, CorInfoType simdBaseJitType, unsigned simdSize); + GenTreeSIMD* gtNewSIMDNode(var_types type, + GenTree* op1, + GenTree* op2, + SIMDIntrinsicID simdIntrinsicID, + CorInfoType simdBaseJitType, + unsigned simdSize); void SetOpLclRelatedToSIMDIntrinsic(GenTree* op); #endif #ifdef FEATURE_HW_INTRINSICS GenTreeHWIntrinsic* gtNewSimdHWIntrinsicNode(var_types type, NamedIntrinsic hwIntrinsicID, - var_types baseType, - unsigned size); - GenTreeHWIntrinsic* gtNewSimdHWIntrinsicNode( - var_types type, GenTree* op1, NamedIntrinsic hwIntrinsicID, var_types baseType, unsigned size); + CorInfoType simdBaseJitType, + unsigned simdSize); GenTreeHWIntrinsic* gtNewSimdHWIntrinsicNode( - var_types type, GenTree* op1, GenTree* op2, NamedIntrinsic hwIntrinsicID, var_types baseType, unsigned size); + var_types type, GenTree* op1, NamedIntrinsic hwIntrinsicID, CorInfoType simdBaseJitType, unsigned simdSize); + GenTreeHWIntrinsic* gtNewSimdHWIntrinsicNode(var_types type, + GenTree* op1, + GenTree* op2, + NamedIntrinsic hwIntrinsicID, + CorInfoType simdBaseJitType, + unsigned simdSize); GenTreeHWIntrinsic* gtNewSimdHWIntrinsicNode(var_types type, GenTree* op1, GenTree* op2, GenTree* op3, NamedIntrinsic hwIntrinsicID, - var_types baseType, - unsigned size); + CorInfoType simdBaseJitType, + unsigned simdSize); GenTreeHWIntrinsic* gtNewSimdHWIntrinsicNode(var_types type, GenTree* op1, GenTree* op2, GenTree* op3, GenTree* op4, NamedIntrinsic hwIntrinsicID, - var_types baseType, - unsigned size); + CorInfoType simdBaseJitType, + unsigned simdSize); GenTreeHWIntrinsic* gtNewSimdCreateBroadcastNode( - var_types type, GenTree* op1, var_types baseType, unsigned size, bool isSimdAsHWIntrinsic); + var_types type, GenTree* op1, CorInfoType simdBaseJitType, unsigned simdSize, bool isSimdAsHWIntrinsic); GenTreeHWIntrinsic* gtNewSimdAsHWIntrinsicNode(var_types type, NamedIntrinsic hwIntrinsicID, - var_types baseType, - unsigned size) + CorInfoType simdBaseJitType, + unsigned simdSize) { - GenTreeHWIntrinsic* node = gtNewSimdHWIntrinsicNode(type, hwIntrinsicID, baseType, size); + GenTreeHWIntrinsic* node = gtNewSimdHWIntrinsicNode(type, hwIntrinsicID, simdBaseJitType, simdSize); node->gtFlags |= GTF_SIMDASHW_OP; return node; } GenTreeHWIntrinsic* gtNewSimdAsHWIntrinsicNode( - var_types type, GenTree* op1, NamedIntrinsic hwIntrinsicID, var_types baseType, unsigned size) + var_types type, GenTree* op1, NamedIntrinsic hwIntrinsicID, CorInfoType simdBaseJitType, unsigned simdSize) { - GenTreeHWIntrinsic* node = gtNewSimdHWIntrinsicNode(type, op1, hwIntrinsicID, baseType, size); + GenTreeHWIntrinsic* node = gtNewSimdHWIntrinsicNode(type, op1, hwIntrinsicID, simdBaseJitType, simdSize); node->gtFlags |= GTF_SIMDASHW_OP; return node; } - GenTreeHWIntrinsic* gtNewSimdAsHWIntrinsicNode( - var_types type, GenTree* op1, GenTree* op2, NamedIntrinsic hwIntrinsicID, var_types baseType, unsigned size) + GenTreeHWIntrinsic* gtNewSimdAsHWIntrinsicNode(var_types type, + GenTree* op1, + GenTree* op2, + NamedIntrinsic hwIntrinsicID, + CorInfoType simdBaseJitType, + unsigned simdSize) { - GenTreeHWIntrinsic* node = gtNewSimdHWIntrinsicNode(type, op1, op2, hwIntrinsicID, baseType, size); + GenTreeHWIntrinsic* node = gtNewSimdHWIntrinsicNode(type, op1, op2, hwIntrinsicID, simdBaseJitType, simdSize); node->gtFlags |= GTF_SIMDASHW_OP; return node; } @@ -2877,10 +2902,11 @@ class Compiler GenTree* op2, GenTree* op3, NamedIntrinsic hwIntrinsicID, - var_types baseType, - unsigned size) + CorInfoType simdBaseJitType, + unsigned simdSize) { - GenTreeHWIntrinsic* node = gtNewSimdHWIntrinsicNode(type, op1, op2, op3, hwIntrinsicID, baseType, size); + GenTreeHWIntrinsic* node = + gtNewSimdHWIntrinsicNode(type, op1, op2, op3, hwIntrinsicID, simdBaseJitType, simdSize); node->gtFlags |= GTF_SIMDASHW_OP; return node; } @@ -2892,11 +2918,11 @@ class Compiler NamedIntrinsic hwIntrinsicID); GenTreeHWIntrinsic* gtNewScalarHWIntrinsicNode( var_types type, GenTree* op1, GenTree* op2, GenTree* op3, NamedIntrinsic hwIntrinsicID); - CORINFO_CLASS_HANDLE gtGetStructHandleForHWSIMD(var_types simdType, var_types simdBaseType); - var_types getBaseTypeFromArgIfNeeded(NamedIntrinsic intrinsic, - CORINFO_CLASS_HANDLE clsHnd, - CORINFO_SIG_INFO* sig, - var_types baseType); + CORINFO_CLASS_HANDLE gtGetStructHandleForHWSIMD(var_types simdType, CorInfoType simdBaseJitType); + CorInfoType getBaseJitTypeFromArgIfNeeded(NamedIntrinsic intrinsic, + CORINFO_CLASS_HANDLE clsHnd, + CORINFO_SIG_INFO* sig, + CorInfoType simdBaseJitType); #endif // FEATURE_HW_INTRINSICS GenTree* gtNewMustThrowException(unsigned helper, var_types type, CORINFO_CLASS_HANDLE clsHnd); @@ -4021,13 +4047,13 @@ class Compiler CORINFO_CLASS_HANDLE clsHnd, CORINFO_SIG_INFO* sig, var_types retType, - var_types baseType, + CorInfoType simdBaseJitType, unsigned simdSize, GenTree* newobjThis); GenTree* impSimdAsHWIntrinsicCndSel(CORINFO_CLASS_HANDLE clsHnd, var_types retType, - var_types baseType, + CorInfoType simdBaseJitType, unsigned simdSize, GenTree* op1, GenTree* op2, @@ -4037,7 +4063,7 @@ class Compiler CORINFO_CLASS_HANDLE clsHnd, CORINFO_METHOD_HANDLE method, CORINFO_SIG_INFO* sig, - var_types baseType, + CorInfoType simdBaseJitType, var_types retType, unsigned simdSize); @@ -4045,7 +4071,7 @@ class Compiler CORINFO_CLASS_HANDLE argClass, bool expectAddr = false, GenTree* newobjThis = nullptr); - GenTree* impNonConstFallback(NamedIntrinsic intrinsic, var_types simdType, var_types baseType); + GenTree* impNonConstFallback(NamedIntrinsic intrinsic, var_types simdType, CorInfoType simdBaseJitType); GenTree* addRangeCheckIfNeeded( NamedIntrinsic intrinsic, GenTree* immOp, bool mustExpand, int immLowerBound, int immUpperBound); @@ -4054,7 +4080,7 @@ class Compiler CORINFO_CLASS_HANDLE clsHnd, CORINFO_METHOD_HANDLE method, CORINFO_SIG_INFO* sig, - var_types baseType, + CorInfoType simdBaseJitType, var_types retType, unsigned simdSize); GenTree* impSSEIntrinsic(NamedIntrinsic intrinsic, CORINFO_METHOD_HANDLE method, CORINFO_SIG_INFO* sig); @@ -4065,7 +4091,7 @@ class Compiler GenTree* impSimdAsHWIntrinsicRelOp(NamedIntrinsic intrinsic, CORINFO_CLASS_HANDLE clsHnd, var_types retType, - var_types baseType, + CorInfoType simdBaseJitType, unsigned simdSize, GenTree* op1, GenTree* op2); @@ -4142,7 +4168,7 @@ class Compiler GenTree* impGetStructAddr(GenTree* structVal, CORINFO_CLASS_HANDLE structHnd, unsigned curLevel, bool willDeref); - var_types impNormStructType(CORINFO_CLASS_HANDLE structHnd, var_types* simdBaseType = nullptr); + var_types impNormStructType(CORINFO_CLASS_HANDLE structHnd, CorInfoType* simdBaseJitType = nullptr); GenTree* impNormStructVal(GenTree* structVal, CORINFO_CLASS_HANDLE structHnd, @@ -5821,11 +5847,11 @@ class Compiler static MorphAddrContext s_CopyBlockMAC; #ifdef FEATURE_SIMD - GenTree* getSIMDStructFromField(GenTree* tree, - var_types* baseTypeOut, - unsigned* indexOut, - unsigned* simdSizeOut, - bool ignoreUsedInSIMDIntrinsic = false); + GenTree* getSIMDStructFromField(GenTree* tree, + CorInfoType* simdBaseJitTypeOut, + unsigned* indexOut, + unsigned* simdSizeOut, + bool ignoreUsedInSIMDIntrinsic = false); GenTree* fgMorphFieldAssignToSIMDIntrinsicSet(GenTree* tree); GenTree* fgMorphFieldToSIMDIntrinsicGet(GenTree* tree); bool fgMorphCombineSIMDFieldAssignments(BasicBlock* block, Statement* stmt); @@ -8250,6 +8276,9 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX CORINFO_CLASS_HANDLE SIMDLongHandle; CORINFO_CLASS_HANDLE SIMDUIntHandle; CORINFO_CLASS_HANDLE SIMDULongHandle; + CORINFO_CLASS_HANDLE SIMDNIntHandle; + CORINFO_CLASS_HANDLE SIMDNUIntHandle; + CORINFO_CLASS_HANDLE SIMDVector2Handle; CORINFO_CLASS_HANDLE SIMDVector3Handle; CORINFO_CLASS_HANDLE SIMDVector4Handle; @@ -8301,19 +8330,19 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX SIMDHandlesCache* m_simdHandleCache; // Get an appropriate "zero" for the given type and class handle. - GenTree* gtGetSIMDZero(var_types simdType, var_types baseType, CORINFO_CLASS_HANDLE simdHandle); + GenTree* gtGetSIMDZero(var_types simdType, CorInfoType simdBaseJitType, CORINFO_CLASS_HANDLE simdHandle); // Get the handle for a SIMD type. - CORINFO_CLASS_HANDLE gtGetStructHandleForSIMD(var_types simdType, var_types simdBaseType) + CORINFO_CLASS_HANDLE gtGetStructHandleForSIMD(var_types simdType, CorInfoType simdBaseJitType) { if (m_simdHandleCache == nullptr) { // This may happen if the JIT generates SIMD node on its own, without importing them. - // Otherwise getBaseTypeAndSizeOfSIMDType should have created the cache. + // Otherwise getBaseJitTypeAndSizeOfSIMDType should have created the cache. return NO_CLASS_HANDLE; } - if (simdBaseType == TYP_FLOAT) + if (simdBaseJitType == CORINFO_TYPE_FLOAT) { switch (simdType) { @@ -8335,28 +8364,32 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX } } assert(emitTypeSize(simdType) <= largestEnregisterableStructSize()); - switch (simdBaseType) + switch (simdBaseJitType) { - case TYP_FLOAT: + case CORINFO_TYPE_FLOAT: return m_simdHandleCache->SIMDFloatHandle; - case TYP_DOUBLE: + case CORINFO_TYPE_DOUBLE: return m_simdHandleCache->SIMDDoubleHandle; - case TYP_INT: + case CORINFO_TYPE_INT: return m_simdHandleCache->SIMDIntHandle; - case TYP_USHORT: + case CORINFO_TYPE_USHORT: return m_simdHandleCache->SIMDUShortHandle; - case TYP_UBYTE: + case CORINFO_TYPE_UBYTE: return m_simdHandleCache->SIMDUByteHandle; - case TYP_SHORT: + case CORINFO_TYPE_SHORT: return m_simdHandleCache->SIMDShortHandle; - case TYP_BYTE: + case CORINFO_TYPE_BYTE: return m_simdHandleCache->SIMDByteHandle; - case TYP_LONG: + case CORINFO_TYPE_LONG: return m_simdHandleCache->SIMDLongHandle; - case TYP_UINT: + case CORINFO_TYPE_UINT: return m_simdHandleCache->SIMDUIntHandle; - case TYP_ULONG: + case CORINFO_TYPE_ULONG: return m_simdHandleCache->SIMDULongHandle; + case CORINFO_TYPE_NATIVEINT: + return m_simdHandleCache->SIMDNIntHandle; + case CORINFO_TYPE_NATIVEUINT: + return m_simdHandleCache->SIMDNUIntHandle; default: assert(!"Didn't find a class handle for simdType"); } @@ -8397,16 +8430,16 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX return (intrinsicId == SIMDIntrinsicEqual); } - // Returns base type of a TYP_SIMD local. - // Returns TYP_UNKNOWN if the local is not TYP_SIMD. - var_types getBaseTypeOfSIMDLocal(GenTree* tree) + // Returns base JIT type of a TYP_SIMD local. + // Returns CORINFO_TYPE_UNDEF if the local is not TYP_SIMD. + CorInfoType getBaseJitTypeOfSIMDLocal(GenTree* tree) { if (isSIMDTypeLocal(tree)) { - return lvaTable[tree->AsLclVarCommon()->GetLclNum()].lvBaseType; + return lvaTable[tree->AsLclVarCommon()->GetLclNum()].GetSimdBaseJitType(); } - return TYP_UNKNOWN; + return CORINFO_TYPE_UNDEF; } bool isSIMDClass(CORINFO_CLASS_HANDLE clsHnd) @@ -8457,13 +8490,13 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX return isSIMDClass(pTypeInfo) || isHWSIMDClass(pTypeInfo); } - // Get the base (element) type and size in bytes for a SIMD type. Returns TYP_UNKNOWN - // if it is not a SIMD type or is an unsupported base type. - var_types getBaseTypeAndSizeOfSIMDType(CORINFO_CLASS_HANDLE typeHnd, unsigned* sizeBytes = nullptr); + // Get the base (element) type and size in bytes for a SIMD type. Returns CORINFO_TYPE_UNDEF + // if it is not a SIMD type or is an unsupported base JIT type. + CorInfoType getBaseJitTypeAndSizeOfSIMDType(CORINFO_CLASS_HANDLE typeHnd, unsigned* sizeBytes = nullptr); - var_types getBaseTypeOfSIMDType(CORINFO_CLASS_HANDLE typeHnd) + CorInfoType getBaseJitTypeOfSIMDType(CORINFO_CLASS_HANDLE typeHnd) { - return getBaseTypeAndSizeOfSIMDType(typeHnd, nullptr); + return getBaseJitTypeAndSizeOfSIMDType(typeHnd, nullptr); } // Get SIMD Intrinsic info given the method handle. @@ -8473,7 +8506,7 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX CORINFO_SIG_INFO* sig, bool isNewObj, unsigned* argCount, - var_types* baseType, + CorInfoType* simdBaseJitType, unsigned* sizeBytes); // Pops and returns GenTree node from importers type stack. @@ -8481,14 +8514,14 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX GenTree* impSIMDPopStack(var_types type, bool expectAddr = false, CORINFO_CLASS_HANDLE structType = nullptr); // Create a GT_SIMD tree for a Get property of SIMD vector with a fixed index. - GenTreeSIMD* impSIMDGetFixed(var_types simdType, var_types baseType, unsigned simdSize, int index); + GenTreeSIMD* impSIMDGetFixed(var_types simdType, CorInfoType simdBaseJitType, unsigned simdSize, int index); // Transforms operands and returns the SIMD intrinsic to be applied on // transformed operands to obtain given relop result. SIMDIntrinsicID impSIMDRelOp(SIMDIntrinsicID relOpIntrinsicId, CORINFO_CLASS_HANDLE typeHnd, unsigned simdVectorSize, - var_types* baseType, + CorInfoType* inOutBaseJitType, GenTree** op1, GenTree** op2); @@ -8544,7 +8577,7 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX #else vectorRegisterByteLength = getSIMDVectorRegisterByteLength(); #endif - return (simdNode->gtSIMDSize < vectorRegisterByteLength); + return (simdNode->GetSimdSize() < vectorRegisterByteLength); } // Get the type for the hardware SIMD vector. @@ -8575,14 +8608,14 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX int getSIMDTypeSizeInBytes(CORINFO_CLASS_HANDLE typeHnd) { unsigned sizeBytes = 0; - (void)getBaseTypeAndSizeOfSIMDType(typeHnd, &sizeBytes); + (void)getBaseJitTypeAndSizeOfSIMDType(typeHnd, &sizeBytes); return sizeBytes; } - // Get the the number of elements of basetype of SIMD vector given by its size and baseType + // Get the the number of elements of baseType of SIMD vector given by its size and baseType static int getSIMDVectorLength(unsigned simdSize, var_types baseType); - // Get the the number of elements of basetype of SIMD vector given by its type handle + // Get the the number of elements of baseType of SIMD vector given by its type handle int getSIMDVectorLength(CORINFO_CLASS_HANDLE typeHnd); // Get preferred alignment of SIMD type. diff --git a/src/coreclr/jit/decomposelongs.cpp b/src/coreclr/jit/decomposelongs.cpp index 092e6b54fc654c..882168e0224c75 100644 --- a/src/coreclr/jit/decomposelongs.cpp +++ b/src/coreclr/jit/decomposelongs.cpp @@ -1687,8 +1687,8 @@ GenTree* DecomposeLongs::DecomposeSimdGetItem(LIR::Use& use) assert(oper == GT_SIMD); GenTreeSIMD* simdTree = tree->AsSIMD(); - var_types baseType = simdTree->gtSIMDBaseType; - unsigned simdSize = simdTree->gtSIMDSize; + var_types baseType = simdTree->GetSimdBaseType(); + unsigned simdSize = simdTree->GetSimdSize(); assert(simdTree->gtSIMDIntrinsicID == SIMDIntrinsicGetItem); assert(varTypeIsLong(baseType)); @@ -1743,8 +1743,8 @@ GenTree* DecomposeLongs::DecomposeSimdGetItem(LIR::Use& use) Range().InsertBefore(simdTree, simdTmpVar1, indexTmpVar1, two1, indexTimesTwo1); } - GenTree* loResult = - m_compiler->gtNewSIMDNode(TYP_INT, simdTmpVar1, indexTimesTwo1, SIMDIntrinsicGetItem, TYP_INT, simdSize); + GenTree* loResult = m_compiler->gtNewSIMDNode(TYP_INT, simdTmpVar1, indexTimesTwo1, SIMDIntrinsicGetItem, + CORINFO_TYPE_INT, simdSize); Range().InsertBefore(simdTree, loResult); // Create: @@ -1769,8 +1769,8 @@ GenTree* DecomposeLongs::DecomposeSimdGetItem(LIR::Use& use) Range().InsertBefore(simdTree, one, indexTimesTwoPlusOne); } - GenTree* hiResult = - m_compiler->gtNewSIMDNode(TYP_INT, simdTmpVar2, indexTimesTwoPlusOne, SIMDIntrinsicGetItem, TYP_INT, simdSize); + GenTree* hiResult = m_compiler->gtNewSIMDNode(TYP_INT, simdTmpVar2, indexTimesTwoPlusOne, SIMDIntrinsicGetItem, + CORINFO_TYPE_INT, simdSize); Range().InsertBefore(simdTree, hiResult); // Done with the original tree; remove it. diff --git a/src/coreclr/jit/ee_il_dll.hpp b/src/coreclr/jit/ee_il_dll.hpp index b0626489f6a97d..47b5b7a00a767c 100644 --- a/src/coreclr/jit/ee_il_dll.hpp +++ b/src/coreclr/jit/ee_il_dll.hpp @@ -209,6 +209,67 @@ inline var_types JITtype2varType(CorInfoType type) return ((var_types)varTypeMap[type]); }; +// Convert the type returned from the VM to a precise var_type +inline var_types JitType2PreciseVarType(CorInfoType type) +{ + + static const unsigned char preciseVarTypeMap[CORINFO_TYPE_COUNT] = { + // see the definition of enum CorInfoType in file inc/corinfo.h + TYP_UNDEF, // CORINFO_TYPE_UNDEF = 0x0, + TYP_VOID, // CORINFO_TYPE_VOID = 0x1, + TYP_BOOL, // CORINFO_TYPE_BOOL = 0x2, + TYP_USHORT, // CORINFO_TYPE_CHAR = 0x3, + TYP_BYTE, // CORINFO_TYPE_BYTE = 0x4, + TYP_UBYTE, // CORINFO_TYPE_UBYTE = 0x5, + TYP_SHORT, // CORINFO_TYPE_SHORT = 0x6, + TYP_USHORT, // CORINFO_TYPE_USHORT = 0x7, + TYP_INT, // CORINFO_TYPE_INT = 0x8, + TYP_UINT, // CORINFO_TYPE_UINT = 0x9, + TYP_LONG, // CORINFO_TYPE_LONG = 0xa, + TYP_ULONG, // CORINFO_TYPE_ULONG = 0xb, + TYP_I_IMPL, // CORINFO_TYPE_NATIVEINT = 0xc, + TYP_U_IMPL, // CORINFO_TYPE_NATIVEUINT = 0xd, + TYP_FLOAT, // CORINFO_TYPE_FLOAT = 0xe, + TYP_DOUBLE, // CORINFO_TYPE_DOUBLE = 0xf, + TYP_REF, // CORINFO_TYPE_STRING = 0x10, // Not used, should remove + TYP_U_IMPL, // CORINFO_TYPE_PTR = 0x11, + TYP_BYREF, // CORINFO_TYPE_BYREF = 0x12, + TYP_STRUCT, // CORINFO_TYPE_VALUECLASS = 0x13, + TYP_REF, // CORINFO_TYPE_CLASS = 0x14, + TYP_STRUCT, // CORINFO_TYPE_REFANY = 0x15, + + // Generic type variables only appear when we're doing + // verification of generic code, in which case we're running + // in "import only" mode. Annoyingly the "import only" + // mode of the JIT actually does a fair bit of compilation, + // so we have to trick the compiler into thinking it's compiling + // a real instantiation. We do that by just pretending we're + // compiling the "object" instantiation of the code, i.e. by + // turing all generic type variables refs, except for a few + // choice places to do with verification, where we use + // verification types and CLASS_HANDLEs to track the difference. + + TYP_REF, // CORINFO_TYPE_VAR = 0x16, + }; + + // spot check to make certain enumerations have not changed + + assert(preciseVarTypeMap[CORINFO_TYPE_CLASS] == TYP_REF); + assert(preciseVarTypeMap[CORINFO_TYPE_BYREF] == TYP_BYREF); + assert(preciseVarTypeMap[CORINFO_TYPE_PTR] == TYP_U_IMPL); + assert(preciseVarTypeMap[CORINFO_TYPE_INT] == TYP_INT); + assert(preciseVarTypeMap[CORINFO_TYPE_UINT] == TYP_UINT); + assert(preciseVarTypeMap[CORINFO_TYPE_DOUBLE] == TYP_DOUBLE); + assert(preciseVarTypeMap[CORINFO_TYPE_VOID] == TYP_VOID); + assert(preciseVarTypeMap[CORINFO_TYPE_VALUECLASS] == TYP_STRUCT); + assert(preciseVarTypeMap[CORINFO_TYPE_REFANY] == TYP_STRUCT); + + assert(type < CORINFO_TYPE_COUNT); + assert(preciseVarTypeMap[type] != TYP_UNDEF); + + return ((var_types)preciseVarTypeMap[type]); +}; + inline CORINFO_CALLINFO_FLAGS combine(CORINFO_CALLINFO_FLAGS flag1, CORINFO_CALLINFO_FLAGS flag2) { return (CORINFO_CALLINFO_FLAGS)(flag1 | flag2); diff --git a/src/coreclr/jit/gentree.cpp b/src/coreclr/jit/gentree.cpp index d4c1a188570b28..c2f53c00f80d85 100644 --- a/src/coreclr/jit/gentree.cpp +++ b/src/coreclr/jit/gentree.cpp @@ -1479,8 +1479,8 @@ bool GenTree::Compare(GenTree* op1, GenTree* op2, bool swapOK) #ifdef FEATURE_SIMD case GT_SIMD: if ((op1->AsSIMD()->gtSIMDIntrinsicID != op2->AsSIMD()->gtSIMDIntrinsicID) || - (op1->AsSIMD()->gtSIMDBaseType != op2->AsSIMD()->gtSIMDBaseType) || - (op1->AsSIMD()->gtSIMDSize != op2->AsSIMD()->gtSIMDSize)) + (op1->AsSIMD()->GetSimdBaseType() != op2->AsSIMD()->GetSimdBaseType()) || + (op1->AsSIMD()->GetSimdSize() != op2->AsSIMD()->GetSimdSize())) { return false; } @@ -1490,8 +1490,8 @@ bool GenTree::Compare(GenTree* op1, GenTree* op2, bool swapOK) #ifdef FEATURE_HW_INTRINSICS case GT_HWINTRINSIC: if ((op1->AsHWIntrinsic()->gtHWIntrinsicId != op2->AsHWIntrinsic()->gtHWIntrinsicId) || - (op1->AsHWIntrinsic()->gtSIMDBaseType != op2->AsHWIntrinsic()->gtSIMDBaseType) || - (op1->AsHWIntrinsic()->gtSIMDSize != op2->AsHWIntrinsic()->gtSIMDSize) || + (op1->AsHWIntrinsic()->GetSimdBaseType() != op2->AsHWIntrinsic()->GetSimdBaseType()) || + (op1->AsHWIntrinsic()->GetSimdSize() != op2->AsHWIntrinsic()->GetSimdSize()) || (op1->AsHWIntrinsic()->GetAuxiliaryType() != op2->AsHWIntrinsic()->GetAuxiliaryType())) { return false; @@ -2152,16 +2152,16 @@ unsigned Compiler::gtHashValue(GenTree* tree) #ifdef FEATURE_SIMD case GT_SIMD: hash += tree->AsSIMD()->gtSIMDIntrinsicID; - hash += tree->AsSIMD()->gtSIMDBaseType; - hash += tree->AsSIMD()->gtSIMDSize; + hash += tree->AsSIMD()->GetSimdBaseType(); + hash += tree->AsSIMD()->GetSimdSize(); break; #endif // FEATURE_SIMD #ifdef FEATURE_HW_INTRINSICS case GT_HWINTRINSIC: hash += tree->AsHWIntrinsic()->gtHWIntrinsicId; - hash += tree->AsHWIntrinsic()->gtSIMDBaseType; - hash += tree->AsHWIntrinsic()->gtSIMDSize; + hash += tree->AsHWIntrinsic()->GetSimdBaseType(); + hash += tree->AsHWIntrinsic()->GetSimdSize(); hash += tree->AsHWIntrinsic()->GetAuxiliaryType(); break; #endif // FEATURE_HW_INTRINSICS @@ -6353,15 +6353,15 @@ GenTreeLclVar* Compiler::gtNewStoreLclVar(unsigned dstLclNum, GenTree* src) // gtNewSIMDVectorZero: create a GT_SIMD node for Vector.Zero // // Arguments: -// simdType - simd vector type -// baseType - element type of vector -// size - size of vector in bytes -GenTree* Compiler::gtNewSIMDVectorZero(var_types simdType, var_types baseType, unsigned size) +// simdType - simd vector type +// simdBaseJitType - element type of vector +// simdSize - size of vector in bytes +GenTree* Compiler::gtNewSIMDVectorZero(var_types simdType, CorInfoType simdBaseJitType, unsigned simdSize) { - baseType = genActualType(baseType); - GenTree* initVal = gtNewZeroConNode(baseType); - initVal->gtType = baseType; - return gtNewSIMDNode(simdType, initVal, nullptr, SIMDIntrinsicInit, baseType, size); + var_types simdBaseType = genActualType(JitType2PreciseVarType(simdBaseJitType)); + GenTree* initVal = gtNewZeroConNode(simdBaseType); + initVal->gtType = simdBaseType; + return gtNewSIMDNode(simdType, initVal, nullptr, SIMDIntrinsicInit, simdBaseJitType, simdSize); } #endif // FEATURE_SIMD @@ -7907,7 +7907,7 @@ GenTree* Compiler::gtCloneExpr( { GenTreeSIMD* simdOp = tree->AsSIMD(); copy = gtNewSIMDNode(simdOp->TypeGet(), simdOp->gtGetOp1(), simdOp->gtGetOp2IfPresent(), - simdOp->gtSIMDIntrinsicID, simdOp->gtSIMDBaseType, simdOp->gtSIMDSize); + simdOp->gtSIMDIntrinsicID, simdOp->GetSimdBaseJitType(), simdOp->GetSimdSize()); } break; #endif @@ -7919,8 +7919,8 @@ GenTree* Compiler::gtCloneExpr( copy = new (this, GT_HWINTRINSIC) GenTreeHWIntrinsic(hwintrinsicOp->TypeGet(), hwintrinsicOp->gtGetOp1(), hwintrinsicOp->gtGetOp2IfPresent(), hwintrinsicOp->gtHWIntrinsicId, - hwintrinsicOp->gtSIMDBaseType, hwintrinsicOp->gtSIMDSize); - copy->AsHWIntrinsic()->SetAuxiliaryType(hwintrinsicOp->GetAuxiliaryType()); + hwintrinsicOp->GetSimdBaseJitType(), hwintrinsicOp->GetSimdSize()); + copy->AsHWIntrinsic()->SetAuxiliaryJitType(hwintrinsicOp->GetAuxiliaryJitType()); } break; #endif @@ -11832,7 +11832,7 @@ void Compiler::gtDispTree(GenTree* tree, #ifdef FEATURE_SIMD if (tree->gtOper == GT_SIMD) { - printf(" %s %s", varTypeName(tree->AsSIMD()->gtSIMDBaseType), + printf(" %s %s", varTypeName(tree->AsSIMD()->GetSimdBaseType()), simdIntrinsicNames[tree->AsSIMD()->gtSIMDIntrinsicID]); } #endif // FEATURE_SIMD @@ -11840,9 +11840,9 @@ void Compiler::gtDispTree(GenTree* tree, #ifdef FEATURE_HW_INTRINSICS if (tree->gtOper == GT_HWINTRINSIC) { - printf(" %s %s", tree->AsHWIntrinsic()->gtSIMDBaseType == TYP_UNKNOWN + printf(" %s %s", tree->AsHWIntrinsic()->GetSimdBaseType() == TYP_UNKNOWN ? "" - : varTypeName(tree->AsHWIntrinsic()->gtSIMDBaseType), + : varTypeName(tree->AsHWIntrinsic()->GetSimdBaseType()), HWIntrinsicInfo::lookupName(tree->AsHWIntrinsic()->gtHWIntrinsicId)); } #endif // FEATURE_HW_INTRINSICS @@ -17428,16 +17428,16 @@ bool Compiler::gtIsStaticFieldPtrToBoxedStruct(var_types fieldNodeType, CORINFO_ // gtGetSIMDZero: Get a zero value of the appropriate SIMD type. // // Arguments: -// var_types - The simdType -// baseType - The base type we need -// simdHandle - The handle for the SIMD type +// var_types - The simdType +// simdBaseJitType - The SIMD base JIT type we need +// simdHandle - The handle for the SIMD type // // Return Value: // A node generating the appropriate Zero, if we are able to discern it, // otherwise null (note that this shouldn't happen, but callers should // be tolerant of this case). -GenTree* Compiler::gtGetSIMDZero(var_types simdType, var_types baseType, CORINFO_CLASS_HANDLE simdHandle) +GenTree* Compiler::gtGetSIMDZero(var_types simdType, CorInfoType simdBaseJitType, CORINFO_CLASS_HANDLE simdHandle) { bool found = false; bool isHWSIMD = true; @@ -17446,38 +17446,44 @@ GenTree* Compiler::gtGetSIMDZero(var_types simdType, var_types baseType, CORINFO // First, determine whether this is Vector. if (simdType == getSIMDVectorType()) { - switch (baseType) + switch (simdBaseJitType) { - case TYP_FLOAT: + case CORINFO_TYPE_FLOAT: found = (simdHandle == m_simdHandleCache->SIMDFloatHandle); break; - case TYP_DOUBLE: + case CORINFO_TYPE_DOUBLE: found = (simdHandle == m_simdHandleCache->SIMDDoubleHandle); break; - case TYP_INT: + case CORINFO_TYPE_INT: found = (simdHandle == m_simdHandleCache->SIMDIntHandle); break; - case TYP_USHORT: + case CORINFO_TYPE_USHORT: found = (simdHandle == m_simdHandleCache->SIMDUShortHandle); break; - case TYP_UBYTE: + case CORINFO_TYPE_UBYTE: found = (simdHandle == m_simdHandleCache->SIMDUByteHandle); break; - case TYP_SHORT: + case CORINFO_TYPE_SHORT: found = (simdHandle == m_simdHandleCache->SIMDShortHandle); break; - case TYP_BYTE: + case CORINFO_TYPE_BYTE: found = (simdHandle == m_simdHandleCache->SIMDByteHandle); break; - case TYP_LONG: + case CORINFO_TYPE_LONG: found = (simdHandle == m_simdHandleCache->SIMDLongHandle); break; - case TYP_UINT: + case CORINFO_TYPE_UINT: found = (simdHandle == m_simdHandleCache->SIMDUIntHandle); break; - case TYP_ULONG: + case CORINFO_TYPE_ULONG: found = (simdHandle == m_simdHandleCache->SIMDULongHandle); break; + case CORINFO_TYPE_NATIVEINT: + found = (simdHandle == m_simdHandleCache->SIMDNIntHandle); + break; + case CORINFO_TYPE_NATIVEUINT: + found = (simdHandle == m_simdHandleCache->SIMDNUIntHandle); + break; default: break; } @@ -17493,9 +17499,9 @@ GenTree* Compiler::gtGetSIMDZero(var_types simdType, var_types baseType, CORINFO switch (simdType) { case TYP_SIMD8: - switch (baseType) + switch (simdBaseJitType) { - case TYP_FLOAT: + case CORINFO_TYPE_FLOAT: if (simdHandle == m_simdHandleCache->SIMDVector2Handle) { isHWSIMD = false; @@ -17506,22 +17512,22 @@ GenTree* Compiler::gtGetSIMDZero(var_types simdType, var_types baseType, CORINFO assert(simdHandle == m_simdHandleCache->Vector64FloatHandle); } break; - case TYP_INT: + case CORINFO_TYPE_INT: assert(simdHandle == m_simdHandleCache->Vector64IntHandle); break; - case TYP_USHORT: + case CORINFO_TYPE_USHORT: assert(simdHandle == m_simdHandleCache->Vector64UShortHandle); break; - case TYP_UBYTE: + case CORINFO_TYPE_UBYTE: assert(simdHandle == m_simdHandleCache->Vector64UByteHandle); break; - case TYP_SHORT: + case CORINFO_TYPE_SHORT: assert(simdHandle == m_simdHandleCache->Vector64ShortHandle); break; - case TYP_BYTE: + case CORINFO_TYPE_BYTE: assert(simdHandle == m_simdHandleCache->Vector64ByteHandle); break; - case TYP_UINT: + case CORINFO_TYPE_UINT: assert(simdHandle == m_simdHandleCache->Vector64UIntHandle); #endif // defined(TARGET_ARM64) && defined(FEATURE_HW_INTRINSICS) break; @@ -17531,14 +17537,14 @@ GenTree* Compiler::gtGetSIMDZero(var_types simdType, var_types baseType, CORINFO break; case TYP_SIMD12: - assert((baseType == TYP_FLOAT) && (simdHandle == m_simdHandleCache->SIMDVector3Handle)); + assert((simdBaseJitType == CORINFO_TYPE_FLOAT) && (simdHandle == m_simdHandleCache->SIMDVector3Handle)); isHWSIMD = false; break; case TYP_SIMD16: - switch (baseType) + switch (simdBaseJitType) { - case TYP_FLOAT: + case CORINFO_TYPE_FLOAT: if (simdHandle == m_simdHandleCache->SIMDVector4Handle) { isHWSIMD = false; @@ -17549,31 +17555,31 @@ GenTree* Compiler::gtGetSIMDZero(var_types simdType, var_types baseType, CORINFO assert(simdHandle == m_simdHandleCache->Vector128FloatHandle); } break; - case TYP_DOUBLE: + case CORINFO_TYPE_DOUBLE: assert(simdHandle == m_simdHandleCache->Vector128DoubleHandle); break; - case TYP_INT: + case CORINFO_TYPE_INT: assert(simdHandle == m_simdHandleCache->Vector128IntHandle); break; - case TYP_USHORT: + case CORINFO_TYPE_USHORT: assert(simdHandle == m_simdHandleCache->Vector128UShortHandle); break; - case TYP_UBYTE: + case CORINFO_TYPE_UBYTE: assert(simdHandle == m_simdHandleCache->Vector128UByteHandle); break; - case TYP_SHORT: + case CORINFO_TYPE_SHORT: assert(simdHandle == m_simdHandleCache->Vector128ShortHandle); break; - case TYP_BYTE: + case CORINFO_TYPE_BYTE: assert(simdHandle == m_simdHandleCache->Vector128ByteHandle); break; - case TYP_LONG: + case CORINFO_TYPE_LONG: assert(simdHandle == m_simdHandleCache->Vector128LongHandle); break; - case TYP_UINT: + case CORINFO_TYPE_UINT: assert(simdHandle == m_simdHandleCache->Vector128UIntHandle); break; - case TYP_ULONG: + case CORINFO_TYPE_ULONG: assert(simdHandle == m_simdHandleCache->Vector128ULongHandle); break; #endif // defined(FEATURE_HW_INTRINSICS) @@ -17585,36 +17591,36 @@ GenTree* Compiler::gtGetSIMDZero(var_types simdType, var_types baseType, CORINFO #if defined(TARGET_XARCH) && defined(FEATURE_HW_INTRINSICS) case TYP_SIMD32: - switch (baseType) + switch (simdBaseJitType) { - case TYP_FLOAT: + case CORINFO_TYPE_FLOAT: assert(simdHandle == m_simdHandleCache->Vector256FloatHandle); break; - case TYP_DOUBLE: + case CORINFO_TYPE_DOUBLE: assert(simdHandle == m_simdHandleCache->Vector256DoubleHandle); break; - case TYP_INT: + case CORINFO_TYPE_INT: assert(simdHandle == m_simdHandleCache->Vector256IntHandle); break; - case TYP_USHORT: + case CORINFO_TYPE_USHORT: assert(simdHandle == m_simdHandleCache->Vector256UShortHandle); break; - case TYP_UBYTE: + case CORINFO_TYPE_UBYTE: assert(simdHandle == m_simdHandleCache->Vector256UByteHandle); break; - case TYP_SHORT: + case CORINFO_TYPE_SHORT: assert(simdHandle == m_simdHandleCache->Vector256ShortHandle); break; - case TYP_BYTE: + case CORINFO_TYPE_BYTE: assert(simdHandle == m_simdHandleCache->Vector256ByteHandle); break; - case TYP_LONG: + case CORINFO_TYPE_LONG: assert(simdHandle == m_simdHandleCache->Vector256LongHandle); break; - case TYP_UINT: + case CORINFO_TYPE_UINT: assert(simdHandle == m_simdHandleCache->Vector256UIntHandle); break; - case TYP_ULONG: + case CORINFO_TYPE_ULONG: assert(simdHandle == m_simdHandleCache->Vector256ULongHandle); break; default: @@ -17639,7 +17645,7 @@ GenTree* Compiler::gtGetSIMDZero(var_types simdType, var_types baseType, CORINFO // We only return the HWIntrinsicNode if SSE is supported, since it is possible for // the user to disable the SSE HWIntrinsic support via the COMPlus configuration knobs // even though the hardware vector types are still available. - return gtNewSimdHWIntrinsicNode(simdType, NI_Vector128_get_Zero, baseType, size); + return gtNewSimdHWIntrinsicNode(simdType, NI_Vector128_get_Zero, simdBaseJitType, size); } return nullptr; case TYP_SIMD32: @@ -17648,7 +17654,7 @@ GenTree* Compiler::gtGetSIMDZero(var_types simdType, var_types baseType, CORINFO // We only return the HWIntrinsicNode if AVX is supported, since it is possible for // the user to disable the AVX HWIntrinsic support via the COMPlus configuration knobs // even though the hardware vector types are still available. - return gtNewSimdHWIntrinsicNode(simdType, NI_Vector256_get_Zero, baseType, size); + return gtNewSimdHWIntrinsicNode(simdType, NI_Vector256_get_Zero, simdBaseJitType, size); } return nullptr; default: @@ -17656,11 +17662,11 @@ GenTree* Compiler::gtGetSIMDZero(var_types simdType, var_types baseType, CORINFO } #endif // TARGET_XARCH && FEATURE_HW_INTRINSICS JITDUMP("Coudn't find the matching SIMD type for %s<%s> in gtGetSIMDZero\n", varTypeName(simdType), - varTypeName(baseType)); + varTypeName(JitType2PreciseVarType(simdBaseJitType))); } else { - return gtNewSIMDVectorZero(simdType, baseType, size); + return gtNewSIMDVectorZero(simdType, simdBaseJitType, size); } return nullptr; } @@ -17707,11 +17713,11 @@ CORINFO_CLASS_HANDLE Compiler::gtGetStructHandleIfPresent(GenTree* tree) #ifdef FEATURE_SIMD if (varTypeIsSIMD(tree)) { - structHnd = gtGetStructHandleForSIMD(tree->gtType, TYP_FLOAT); + structHnd = gtGetStructHandleForSIMD(tree->gtType, CORINFO_TYPE_FLOAT); #ifdef FEATURE_HW_INTRINSICS if (structHnd == NO_CLASS_HANDLE) { - structHnd = gtGetStructHandleForHWSIMD(tree->gtType, TYP_FLOAT); + structHnd = gtGetStructHandleForHWSIMD(tree->gtType, CORINFO_TYPE_FLOAT); } #endif } @@ -17730,11 +17736,11 @@ CORINFO_CLASS_HANDLE Compiler::gtGetStructHandleIfPresent(GenTree* tree) #ifdef FEATURE_SIMD if (varTypeIsSIMD(tree)) { - structHnd = gtGetStructHandleForSIMD(tree->gtType, TYP_FLOAT); + structHnd = gtGetStructHandleForSIMD(tree->gtType, CORINFO_TYPE_FLOAT); #ifdef FEATURE_HW_INTRINSICS if (structHnd == NO_CLASS_HANDLE) { - structHnd = gtGetStructHandleForHWSIMD(tree->gtType, TYP_FLOAT); + structHnd = gtGetStructHandleForHWSIMD(tree->gtType, CORINFO_TYPE_FLOAT); } #endif } @@ -17780,18 +17786,18 @@ CORINFO_CLASS_HANDLE Compiler::gtGetStructHandleIfPresent(GenTree* tree) break; #ifdef FEATURE_SIMD case GT_SIMD: - structHnd = gtGetStructHandleForSIMD(tree->gtType, tree->AsSIMD()->gtSIMDBaseType); + structHnd = gtGetStructHandleForSIMD(tree->gtType, tree->AsSIMD()->GetSimdBaseJitType()); break; #endif // FEATURE_SIMD #ifdef FEATURE_HW_INTRINSICS case GT_HWINTRINSIC: if ((tree->gtFlags & GTF_SIMDASHW_OP) != 0) { - structHnd = gtGetStructHandleForSIMD(tree->gtType, tree->AsHWIntrinsic()->gtSIMDBaseType); + structHnd = gtGetStructHandleForSIMD(tree->gtType, tree->AsHWIntrinsic()->GetSimdBaseJitType()); } else { - structHnd = gtGetStructHandleForHWSIMD(tree->gtType, tree->AsHWIntrinsic()->gtSIMDBaseType); + structHnd = gtGetStructHandleForHWSIMD(tree->gtType, tree->AsHWIntrinsic()->GetSimdBaseJitType()); } break; #endif @@ -18896,23 +18902,27 @@ bool FieldSeqNode::IsPseudoField() const #ifdef FEATURE_SIMD GenTreeSIMD* Compiler::gtNewSIMDNode( - var_types type, GenTree* op1, SIMDIntrinsicID simdIntrinsicID, var_types baseType, unsigned size) + var_types type, GenTree* op1, SIMDIntrinsicID simdIntrinsicID, CorInfoType simdBaseJitType, unsigned simdSize) { assert(op1 != nullptr); SetOpLclRelatedToSIMDIntrinsic(op1); - GenTreeSIMD* simdNode = new (this, GT_SIMD) GenTreeSIMD(type, op1, simdIntrinsicID, baseType, size); + GenTreeSIMD* simdNode = new (this, GT_SIMD) GenTreeSIMD(type, op1, simdIntrinsicID, simdBaseJitType, simdSize); return simdNode; } -GenTreeSIMD* Compiler::gtNewSIMDNode( - var_types type, GenTree* op1, GenTree* op2, SIMDIntrinsicID simdIntrinsicID, var_types baseType, unsigned size) +GenTreeSIMD* Compiler::gtNewSIMDNode(var_types type, + GenTree* op1, + GenTree* op2, + SIMDIntrinsicID simdIntrinsicID, + CorInfoType simdBaseJitType, + unsigned simdSize) { assert(op1 != nullptr); SetOpLclRelatedToSIMDIntrinsic(op1); SetOpLclRelatedToSIMDIntrinsic(op2); - GenTreeSIMD* simdNode = new (this, GT_SIMD) GenTreeSIMD(type, op1, op2, simdIntrinsicID, baseType, size); + GenTreeSIMD* simdNode = new (this, GT_SIMD) GenTreeSIMD(type, op1, op2, simdIntrinsicID, simdBaseJitType, simdSize); return simdNode; } @@ -18953,6 +18963,28 @@ bool GenTree::isCommutativeSIMDIntrinsic() } } +var_types GenTreeJitIntrinsic::GetAuxiliaryType() const +{ + CorInfoType auxiliaryJitType = GetAuxiliaryJitType(); + + if (auxiliaryJitType == CORINFO_TYPE_UNDEF) + { + return TYP_UNKNOWN; + } + return JitType2PreciseVarType(auxiliaryJitType); +} + +var_types GenTreeJitIntrinsic::GetSimdBaseType() const +{ + CorInfoType simdBaseJitType = GetSimdBaseJitType(); + + if (simdBaseJitType == CORINFO_TYPE_UNDEF) + { + return TYP_UNKNOWN; + } + return JitType2PreciseVarType(simdBaseJitType); +} + // Returns true for the SIMD Intrinsic instructions that have MemoryLoad semantics, false otherwise bool GenTreeSIMD::OperIsMemoryLoad() const { @@ -19052,27 +19084,31 @@ bool GenTree::isRMWHWIntrinsic(Compiler* comp) GenTreeHWIntrinsic* Compiler::gtNewSimdHWIntrinsicNode(var_types type, NamedIntrinsic hwIntrinsicID, - var_types baseType, - unsigned size) + CorInfoType simdBaseJitType, + unsigned simdSize) { - return new (this, GT_HWINTRINSIC) GenTreeHWIntrinsic(type, hwIntrinsicID, baseType, size); + return new (this, GT_HWINTRINSIC) GenTreeHWIntrinsic(type, hwIntrinsicID, simdBaseJitType, simdSize); } GenTreeHWIntrinsic* Compiler::gtNewSimdHWIntrinsicNode( - var_types type, GenTree* op1, NamedIntrinsic hwIntrinsicID, var_types baseType, unsigned simdSize) + var_types type, GenTree* op1, NamedIntrinsic hwIntrinsicID, CorInfoType simdBaseJitType, unsigned simdSize) { SetOpLclRelatedToSIMDIntrinsic(op1); - return new (this, GT_HWINTRINSIC) GenTreeHWIntrinsic(type, op1, hwIntrinsicID, baseType, simdSize); + return new (this, GT_HWINTRINSIC) GenTreeHWIntrinsic(type, op1, hwIntrinsicID, simdBaseJitType, simdSize); } -GenTreeHWIntrinsic* Compiler::gtNewSimdHWIntrinsicNode( - var_types type, GenTree* op1, GenTree* op2, NamedIntrinsic hwIntrinsicID, var_types baseType, unsigned simdSize) +GenTreeHWIntrinsic* Compiler::gtNewSimdHWIntrinsicNode(var_types type, + GenTree* op1, + GenTree* op2, + NamedIntrinsic hwIntrinsicID, + CorInfoType simdBaseJitType, + unsigned simdSize) { SetOpLclRelatedToSIMDIntrinsic(op1); SetOpLclRelatedToSIMDIntrinsic(op2); - return new (this, GT_HWINTRINSIC) GenTreeHWIntrinsic(type, op1, op2, hwIntrinsicID, baseType, simdSize); + return new (this, GT_HWINTRINSIC) GenTreeHWIntrinsic(type, op1, op2, hwIntrinsicID, simdBaseJitType, simdSize); } GenTreeHWIntrinsic* Compiler::gtNewSimdHWIntrinsicNode(var_types type, @@ -19080,15 +19116,15 @@ GenTreeHWIntrinsic* Compiler::gtNewSimdHWIntrinsicNode(var_types type, GenTree* op2, GenTree* op3, NamedIntrinsic hwIntrinsicID, - var_types baseType, - unsigned size) + CorInfoType simdBaseJitType, + unsigned simdSize) { SetOpLclRelatedToSIMDIntrinsic(op1); SetOpLclRelatedToSIMDIntrinsic(op2); SetOpLclRelatedToSIMDIntrinsic(op3); return new (this, GT_HWINTRINSIC) - GenTreeHWIntrinsic(type, gtNewArgList(op1, op2, op3), hwIntrinsicID, baseType, size); + GenTreeHWIntrinsic(type, gtNewArgList(op1, op2, op3), hwIntrinsicID, simdBaseJitType, simdSize); } GenTreeHWIntrinsic* Compiler::gtNewSimdHWIntrinsicNode(var_types type, @@ -19097,8 +19133,8 @@ GenTreeHWIntrinsic* Compiler::gtNewSimdHWIntrinsicNode(var_types type, GenTree* op3, GenTree* op4, NamedIntrinsic hwIntrinsicID, - var_types baseType, - unsigned size) + CorInfoType simdBaseJitType, + unsigned simdSize) { SetOpLclRelatedToSIMDIntrinsic(op1); SetOpLclRelatedToSIMDIntrinsic(op2); @@ -19106,17 +19142,18 @@ GenTreeHWIntrinsic* Compiler::gtNewSimdHWIntrinsicNode(var_types type, SetOpLclRelatedToSIMDIntrinsic(op4); return new (this, GT_HWINTRINSIC) - GenTreeHWIntrinsic(type, gtNewArgList(op1, op2, op3, op4), hwIntrinsicID, baseType, size); + GenTreeHWIntrinsic(type, gtNewArgList(op1, op2, op3, op4), hwIntrinsicID, simdBaseJitType, simdSize); } GenTreeHWIntrinsic* Compiler::gtNewSimdCreateBroadcastNode( - var_types type, GenTree* op1, var_types baseType, unsigned size, bool isSimdAsHWIntrinsic) + var_types type, GenTree* op1, CorInfoType simdBaseJitType, unsigned simdSize, bool isSimdAsHWIntrinsic) { NamedIntrinsic hwIntrinsicID = NI_Vector128_Create; + var_types simdBaseType = JitType2PreciseVarType(simdBaseJitType); #if defined(TARGET_XARCH) #if defined(TARGET_X86) - if (varTypeIsLong(baseType) && !op1->IsIntegralConst()) + if (varTypeIsLong(simdBaseType) && !op1->IsIntegralConst()) { // TODO-XARCH-CQ: It may be beneficial to emit the movq // instruction, which takes a 64-bit memory address and @@ -19125,12 +19162,12 @@ GenTreeHWIntrinsic* Compiler::gtNewSimdCreateBroadcastNode( } #endif // TARGET_X86 - if (size == 32) + if (simdSize == 32) { hwIntrinsicID = NI_Vector256_Create; } #elif defined(TARGET_ARM64) - if (size == 8) + if (simdSize == 8) { hwIntrinsicID = NI_Vector64_Create; } @@ -19140,17 +19177,17 @@ GenTreeHWIntrinsic* Compiler::gtNewSimdCreateBroadcastNode( if (isSimdAsHWIntrinsic) { - return gtNewSimdAsHWIntrinsicNode(type, op1, hwIntrinsicID, baseType, size); + return gtNewSimdAsHWIntrinsicNode(type, op1, hwIntrinsicID, simdBaseJitType, simdSize); } - return gtNewSimdHWIntrinsicNode(type, op1, hwIntrinsicID, baseType, size); + return gtNewSimdHWIntrinsicNode(type, op1, hwIntrinsicID, simdBaseJitType, simdSize); } GenTreeHWIntrinsic* Compiler::gtNewScalarHWIntrinsicNode(var_types type, GenTree* op1, NamedIntrinsic hwIntrinsicID) { SetOpLclRelatedToSIMDIntrinsic(op1); - return new (this, GT_HWINTRINSIC) GenTreeHWIntrinsic(type, op1, hwIntrinsicID, TYP_UNKNOWN, 0); + return new (this, GT_HWINTRINSIC) GenTreeHWIntrinsic(type, op1, hwIntrinsicID, CORINFO_TYPE_UNDEF, 0); } GenTreeHWIntrinsic* Compiler::gtNewScalarHWIntrinsicNode(var_types type, @@ -19161,7 +19198,7 @@ GenTreeHWIntrinsic* Compiler::gtNewScalarHWIntrinsicNode(var_types type, SetOpLclRelatedToSIMDIntrinsic(op1); SetOpLclRelatedToSIMDIntrinsic(op2); - return new (this, GT_HWINTRINSIC) GenTreeHWIntrinsic(type, op1, op2, hwIntrinsicID, TYP_UNKNOWN, 0); + return new (this, GT_HWINTRINSIC) GenTreeHWIntrinsic(type, op1, op2, hwIntrinsicID, CORINFO_TYPE_UNDEF, 0); } GenTreeHWIntrinsic* Compiler::gtNewScalarHWIntrinsicNode( @@ -19172,7 +19209,7 @@ GenTreeHWIntrinsic* Compiler::gtNewScalarHWIntrinsicNode( SetOpLclRelatedToSIMDIntrinsic(op3); return new (this, GT_HWINTRINSIC) - GenTreeHWIntrinsic(type, gtNewArgList(op1, op2, op3), hwIntrinsicID, TYP_UNKNOWN, 0); + GenTreeHWIntrinsic(type, gtNewArgList(op1, op2, op3), hwIntrinsicID, CORINFO_TYPE_UNDEF, 0); } // Returns true for the HW Intrinsic instructions that have MemoryLoad semantics, false otherwise diff --git a/src/coreclr/jit/gentree.h b/src/coreclr/jit/gentree.h index c9ddd2cc4817f6..22f692d6c745c3 100644 --- a/src/coreclr/jit/gentree.h +++ b/src/coreclr/jit/gentree.h @@ -4850,14 +4850,15 @@ struct GenTreeJitIntrinsic : public GenTreeOp ClassLayout* m_layout; union { - var_types gtAuxiliaryType; // For intrinsics than need another type (e.g. Avx2.Gather* or SIMD (by element)) - regNumberSmall gtOtherReg; // For intrinsics that return 2 registers + unsigned char gtAuxiliaryJitType; // For intrinsics than need another type (e.g. Avx2.Gather* or SIMD (by + // element)) + regNumberSmall gtOtherReg; // For intrinsics that return 2 registers }; -public: - var_types gtSIMDBaseType; // SIMD vector base type - unsigned char gtSIMDSize; // SIMD vector size in bytes, use 0 for scalar intrinsics + unsigned char gtSimdBaseJitType; // SIMD vector base JIT type + unsigned char gtSimdSize; // SIMD vector size in bytes, use 0 for scalar intrinsics +public: #if defined(FEATURE_SIMD) union { SIMDIntrinsicID gtSIMDIntrinsicID; // operation Id @@ -4882,34 +4883,64 @@ struct GenTreeJitIntrinsic : public GenTreeOp { return (regNumber)gtOtherReg; } + void SetOtherReg(regNumber reg) { gtOtherReg = (regNumberSmall)reg; assert(gtOtherReg == reg); } - var_types GetAuxiliaryType() const + CorInfoType GetAuxiliaryJitType() const { - return gtAuxiliaryType; + return (CorInfoType)gtAuxiliaryJitType; } - void SetAuxiliaryType(var_types type) + void SetAuxiliaryJitType(CorInfoType auxiliaryJitType) { - gtAuxiliaryType = type; + gtAuxiliaryJitType = (unsigned char)auxiliaryJitType; + assert(gtAuxiliaryJitType == auxiliaryJitType); } - GenTreeJitIntrinsic(genTreeOps oper, var_types type, GenTree* op1, GenTree* op2, var_types baseType, unsigned size) + var_types GetAuxiliaryType() const; + + CorInfoType GetSimdBaseJitType() const + { + return (CorInfoType)gtSimdBaseJitType; + } + + void SetSimdBaseJitType(CorInfoType simdBaseJitType) + { + gtSimdBaseJitType = (unsigned char)simdBaseJitType; + assert(gtSimdBaseJitType == simdBaseJitType); + } + + var_types GetSimdBaseType() const; + + unsigned char GetSimdSize() const + { + return gtSimdSize; + } + + void SetSimdSize(unsigned simdSize) + { + gtSimdSize = (unsigned char)simdSize; + assert(gtSimdSize == simdSize); + } + + GenTreeJitIntrinsic( + genTreeOps oper, var_types type, GenTree* op1, GenTree* op2, CorInfoType simdBaseJitType, unsigned simdSize) : GenTreeOp(oper, type, op1, op2) - , gtSIMDBaseType(baseType) - , gtSIMDSize((unsigned char)size) + , gtSimdBaseJitType((unsigned char)simdBaseJitType) + , gtSimdSize((unsigned char)simdSize) , gtHWIntrinsicId(NI_Illegal) { - assert(gtSIMDSize == size); + assert(gtSimdBaseJitType == simdBaseJitType); + assert(gtSimdSize == simdSize); } bool isSIMD() const { - return gtSIMDSize != 0; + return gtSimdSize != 0; } #if DEBUGGABLE_GENTREE @@ -4925,15 +4956,20 @@ struct GenTreeJitIntrinsic : public GenTreeOp struct GenTreeSIMD : public GenTreeJitIntrinsic { - GenTreeSIMD(var_types type, GenTree* op1, SIMDIntrinsicID simdIntrinsicID, var_types baseType, unsigned size) - : GenTreeJitIntrinsic(GT_SIMD, type, op1, nullptr, baseType, size) + GenTreeSIMD( + var_types type, GenTree* op1, SIMDIntrinsicID simdIntrinsicID, CorInfoType simdBaseJitType, unsigned simdSize) + : GenTreeJitIntrinsic(GT_SIMD, type, op1, nullptr, simdBaseJitType, simdSize) { gtSIMDIntrinsicID = simdIntrinsicID; } - GenTreeSIMD( - var_types type, GenTree* op1, GenTree* op2, SIMDIntrinsicID simdIntrinsicID, var_types baseType, unsigned size) - : GenTreeJitIntrinsic(GT_SIMD, type, op1, op2, baseType, size) + GenTreeSIMD(var_types type, + GenTree* op1, + GenTree* op2, + SIMDIntrinsicID simdIntrinsicID, + CorInfoType simdBaseJitType, + unsigned simdSize) + : GenTreeJitIntrinsic(GT_SIMD, type, op1, op2, simdBaseJitType, simdSize) { gtSIMDIntrinsicID = simdIntrinsicID; } @@ -4952,14 +4988,15 @@ struct GenTreeSIMD : public GenTreeJitIntrinsic #ifdef FEATURE_HW_INTRINSICS struct GenTreeHWIntrinsic : public GenTreeJitIntrinsic { - GenTreeHWIntrinsic(var_types type, NamedIntrinsic hwIntrinsicID, var_types baseType, unsigned size) - : GenTreeJitIntrinsic(GT_HWINTRINSIC, type, nullptr, nullptr, baseType, size) + GenTreeHWIntrinsic(var_types type, NamedIntrinsic hwIntrinsicID, CorInfoType simdBaseJitType, unsigned simdSize) + : GenTreeJitIntrinsic(GT_HWINTRINSIC, type, nullptr, nullptr, simdBaseJitType, simdSize) { gtHWIntrinsicId = hwIntrinsicID; } - GenTreeHWIntrinsic(var_types type, GenTree* op1, NamedIntrinsic hwIntrinsicID, var_types baseType, unsigned size) - : GenTreeJitIntrinsic(GT_HWINTRINSIC, type, op1, nullptr, baseType, size) + GenTreeHWIntrinsic( + var_types type, GenTree* op1, NamedIntrinsic hwIntrinsicID, CorInfoType simdBaseJitType, unsigned simdSize) + : GenTreeJitIntrinsic(GT_HWINTRINSIC, type, op1, nullptr, simdBaseJitType, simdSize) { gtHWIntrinsicId = hwIntrinsicID; if (OperIsMemoryStore()) @@ -4968,9 +5005,13 @@ struct GenTreeHWIntrinsic : public GenTreeJitIntrinsic } } - GenTreeHWIntrinsic( - var_types type, GenTree* op1, GenTree* op2, NamedIntrinsic hwIntrinsicID, var_types baseType, unsigned size) - : GenTreeJitIntrinsic(GT_HWINTRINSIC, type, op1, op2, baseType, size) + GenTreeHWIntrinsic(var_types type, + GenTree* op1, + GenTree* op2, + NamedIntrinsic hwIntrinsicID, + CorInfoType simdBaseJitType, + unsigned simdSize) + : GenTreeJitIntrinsic(GT_HWINTRINSIC, type, op1, op2, simdBaseJitType, simdSize) { gtHWIntrinsicId = hwIntrinsicID; if (OperIsMemoryStore()) @@ -6960,7 +7001,7 @@ inline bool GenTree::IsIntegralConstVector(ssize_t constVal) if ((gtOper == GT_SIMD) && (AsSIMD()->gtSIMDIntrinsicID == SIMDIntrinsicInit) && gtGetOp1()->IsIntegralConst(constVal)) { - assert(varTypeIsIntegral(AsSIMD()->gtSIMDBaseType)); + assert(varTypeIsIntegral(AsSIMD()->GetSimdBaseType())); assert(gtGetOp2IfPresent() == nullptr); return true; } @@ -6971,7 +7012,7 @@ inline bool GenTree::IsIntegralConstVector(ssize_t constVal) { GenTreeHWIntrinsic* node = AsHWIntrinsic(); - if (!varTypeIsIntegral(node->gtSIMDBaseType)) + if (!varTypeIsIntegral(node->GetSimdBaseType())) { // Can't be an integral constant return false; diff --git a/src/coreclr/jit/gschecks.cpp b/src/coreclr/jit/gschecks.cpp index 9d841c571af397..9bf4207eb0bb8f 100644 --- a/src/coreclr/jit/gschecks.cpp +++ b/src/coreclr/jit/gschecks.cpp @@ -396,7 +396,8 @@ void Compiler::gsParamsToShadows() shadowVarDsc->lvUsedInSIMDIntrinsic = varDsc->lvUsedInSIMDIntrinsic; if (varDsc->lvSIMDType) { - shadowVarDsc->lvBaseType = varDsc->lvBaseType; + CorInfoType simdBaseJitType = varDsc->GetSimdBaseJitType(); + shadowVarDsc->SetSimdBaseJitType(simdBaseJitType); } #endif shadowVarDsc->lvRegStruct = varDsc->lvRegStruct; diff --git a/src/coreclr/jit/hwintrinsic.cpp b/src/coreclr/jit/hwintrinsic.cpp index dee63b2c99d69b..c3c9889c199bf0 100644 --- a/src/coreclr/jit/hwintrinsic.cpp +++ b/src/coreclr/jit/hwintrinsic.cpp @@ -41,22 +41,22 @@ const HWIntrinsicInfo& HWIntrinsicInfo::lookup(NamedIntrinsic id) } //------------------------------------------------------------------------ -// getBaseTypeFromArgIfNeeded: Get baseType of intrinsic from 1st or 2nd argument depending on the flag +// getBaseJitTypeFromArgIfNeeded: Get simdBaseJitType of intrinsic from 1st or 2nd argument depending on the flag // // Arguments: -// intrinsic -- id of the intrinsic function. -// clsHnd -- class handle containing the intrinsic function. -// method -- method handle of the intrinsic function. -// sig -- signature of the intrinsic call. -// baseType -- Predetermined baseType, could be TYP_UNKNOWN +// intrinsic -- id of the intrinsic function. +// clsHnd -- class handle containing the intrinsic function. +// method -- method handle of the intrinsic function. +// sig -- signature of the intrinsic call. +// simdBaseJitType -- Predetermined simdBaseJitType, could be CORINFO_TYPE_UNDEF // // Return Value: // The basetype of intrinsic of it can be fetched from 1st or 2nd argument, else return baseType unmodified. // -var_types Compiler::getBaseTypeFromArgIfNeeded(NamedIntrinsic intrinsic, - CORINFO_CLASS_HANDLE clsHnd, - CORINFO_SIG_INFO* sig, - var_types baseType) +CorInfoType Compiler::getBaseJitTypeFromArgIfNeeded(NamedIntrinsic intrinsic, + CORINFO_CLASS_HANDLE clsHnd, + CORINFO_SIG_INFO* sig, + CorInfoType simdBaseJitType) { if (HWIntrinsicInfo::BaseTypeFromSecondArg(intrinsic) || HWIntrinsicInfo::BaseTypeFromFirstArg(intrinsic)) { @@ -68,27 +68,25 @@ var_types Compiler::getBaseTypeFromArgIfNeeded(NamedIntrinsic intrinsic, } CORINFO_CLASS_HANDLE argClass = info.compCompHnd->getArgClass(sig, arg); - baseType = getBaseTypeAndSizeOfSIMDType(argClass); + simdBaseJitType = getBaseJitTypeAndSizeOfSIMDType(argClass); - if (baseType == TYP_UNKNOWN) // the argument is not a vector + if (simdBaseJitType == CORINFO_TYPE_UNDEF) // the argument is not a vector { CORINFO_CLASS_HANDLE tmpClass; - CorInfoType corInfoType = strip(info.compCompHnd->getArgType(sig, arg, &tmpClass)); + simdBaseJitType = strip(info.compCompHnd->getArgType(sig, arg, &tmpClass)); - if (corInfoType == CORINFO_TYPE_PTR) + if (simdBaseJitType == CORINFO_TYPE_PTR) { - corInfoType = info.compCompHnd->getChildType(argClass, &tmpClass); + simdBaseJitType = info.compCompHnd->getChildType(argClass, &tmpClass); } - - baseType = JITtype2varType(corInfoType); } - assert(baseType != TYP_UNKNOWN); + assert(simdBaseJitType != CORINFO_TYPE_UNDEF); } - return baseType; + return simdBaseJitType; } -CORINFO_CLASS_HANDLE Compiler::gtGetStructHandleForHWSIMD(var_types simdType, var_types simdBaseType) +CORINFO_CLASS_HANDLE Compiler::gtGetStructHandleForHWSIMD(var_types simdType, CorInfoType simdBaseJitType) { if (m_simdHandleCache == nullptr) { @@ -96,28 +94,32 @@ CORINFO_CLASS_HANDLE Compiler::gtGetStructHandleForHWSIMD(var_types simdType, va } if (simdType == TYP_SIMD16) { - switch (simdBaseType) + switch (simdBaseJitType) { - case TYP_FLOAT: + case CORINFO_TYPE_FLOAT: return m_simdHandleCache->Vector128FloatHandle; - case TYP_DOUBLE: + case CORINFO_TYPE_DOUBLE: return m_simdHandleCache->Vector128DoubleHandle; - case TYP_INT: + case CORINFO_TYPE_INT: return m_simdHandleCache->Vector128IntHandle; - case TYP_USHORT: + case CORINFO_TYPE_USHORT: return m_simdHandleCache->Vector128UShortHandle; - case TYP_UBYTE: + case CORINFO_TYPE_UBYTE: return m_simdHandleCache->Vector128UByteHandle; - case TYP_SHORT: + case CORINFO_TYPE_SHORT: return m_simdHandleCache->Vector128ShortHandle; - case TYP_BYTE: + case CORINFO_TYPE_BYTE: return m_simdHandleCache->Vector128ByteHandle; - case TYP_LONG: + case CORINFO_TYPE_LONG: return m_simdHandleCache->Vector128LongHandle; - case TYP_UINT: + case CORINFO_TYPE_UINT: return m_simdHandleCache->Vector128UIntHandle; - case TYP_ULONG: + case CORINFO_TYPE_ULONG: return m_simdHandleCache->Vector128ULongHandle; + case CORINFO_TYPE_NATIVEINT: + break; + case CORINFO_TYPE_NATIVEUINT: + break; default: assert(!"Didn't find a class handle for simdType"); } @@ -125,28 +127,32 @@ CORINFO_CLASS_HANDLE Compiler::gtGetStructHandleForHWSIMD(var_types simdType, va #ifdef TARGET_XARCH else if (simdType == TYP_SIMD32) { - switch (simdBaseType) + switch (simdBaseJitType) { - case TYP_FLOAT: + case CORINFO_TYPE_FLOAT: return m_simdHandleCache->Vector256FloatHandle; - case TYP_DOUBLE: + case CORINFO_TYPE_DOUBLE: return m_simdHandleCache->Vector256DoubleHandle; - case TYP_INT: + case CORINFO_TYPE_INT: return m_simdHandleCache->Vector256IntHandle; - case TYP_USHORT: + case CORINFO_TYPE_USHORT: return m_simdHandleCache->Vector256UShortHandle; - case TYP_UBYTE: + case CORINFO_TYPE_UBYTE: return m_simdHandleCache->Vector256UByteHandle; - case TYP_SHORT: + case CORINFO_TYPE_SHORT: return m_simdHandleCache->Vector256ShortHandle; - case TYP_BYTE: + case CORINFO_TYPE_BYTE: return m_simdHandleCache->Vector256ByteHandle; - case TYP_LONG: + case CORINFO_TYPE_LONG: return m_simdHandleCache->Vector256LongHandle; - case TYP_UINT: + case CORINFO_TYPE_UINT: return m_simdHandleCache->Vector256UIntHandle; - case TYP_ULONG: + case CORINFO_TYPE_ULONG: return m_simdHandleCache->Vector256ULongHandle; + case CORINFO_TYPE_NATIVEINT: + break; + case CORINFO_TYPE_NATIVEUINT: + break; default: assert(!"Didn't find a class handle for simdType"); } @@ -155,28 +161,32 @@ CORINFO_CLASS_HANDLE Compiler::gtGetStructHandleForHWSIMD(var_types simdType, va #ifdef TARGET_ARM64 else if (simdType == TYP_SIMD8) { - switch (simdBaseType) + switch (simdBaseJitType) { - case TYP_FLOAT: + case CORINFO_TYPE_FLOAT: return m_simdHandleCache->Vector64FloatHandle; - case TYP_DOUBLE: + case CORINFO_TYPE_DOUBLE: return m_simdHandleCache->Vector64DoubleHandle; - case TYP_INT: + case CORINFO_TYPE_INT: return m_simdHandleCache->Vector64IntHandle; - case TYP_USHORT: + case CORINFO_TYPE_USHORT: return m_simdHandleCache->Vector64UShortHandle; - case TYP_UBYTE: + case CORINFO_TYPE_UBYTE: return m_simdHandleCache->Vector64UByteHandle; - case TYP_SHORT: + case CORINFO_TYPE_SHORT: return m_simdHandleCache->Vector64ShortHandle; - case TYP_BYTE: + case CORINFO_TYPE_BYTE: return m_simdHandleCache->Vector64ByteHandle; - case TYP_UINT: + case CORINFO_TYPE_UINT: return m_simdHandleCache->Vector64UIntHandle; - case TYP_LONG: + case CORINFO_TYPE_LONG: return m_simdHandleCache->Vector64LongHandle; - case TYP_ULONG: + case CORINFO_TYPE_ULONG: return m_simdHandleCache->Vector64ULongHandle; + case CORINFO_TYPE_NATIVEINT: + break; + case CORINFO_TYPE_NATIVEUINT: + break; default: assert(!"Didn't find a class handle for simdType"); } @@ -351,8 +361,8 @@ unsigned HWIntrinsicInfo::lookupSimdSize(Compiler* comp, NamedIntrinsic id, CORI typeHnd = sig->retTypeSigClass; } - var_types baseType = comp->getBaseTypeAndSizeOfSIMDType(typeHnd, &simdSize); - assert((simdSize > 0) && (baseType != TYP_UNKNOWN)); + CorInfoType simdBaseJitType = comp->getBaseJitTypeAndSizeOfSIMDType(typeHnd, &simdSize); + assert((simdSize > 0) && (simdBaseJitType != CORINFO_TYPE_UNDEF)); return simdSize; } @@ -504,8 +514,8 @@ GenTree* Compiler::getArgForHWIntrinsic(var_types argType, if (!varTypeIsSIMD(argType)) { unsigned int argSizeBytes; - var_types base = getBaseTypeAndSizeOfSIMDType(argClass, &argSizeBytes); - argType = getSIMDTypeForSize(argSizeBytes); + (void)getBaseJitTypeAndSizeOfSIMDType(argClass, &argSizeBytes); + argType = getSIMDTypeForSize(argSizeBytes); } assert(varTypeIsSIMD(argType)); @@ -644,16 +654,24 @@ static bool impIsTableDrivenHWIntrinsic(NamedIntrinsic intrinsicId, HWIntrinsicC // // Arguments: // intrinsicId - HW intrinsic id -// baseType - Base type of the intrinsic. +// baseJitType - Base JIT type of the intrinsic. // // Return Value: // returns true if the baseType is supported for given intrinsic. // -static bool isSupportedBaseType(NamedIntrinsic intrinsic, var_types baseType) +static bool isSupportedBaseType(NamedIntrinsic intrinsic, CorInfoType baseJitType) { + if (baseJitType == CORINFO_TYPE_UNDEF) + { + return false; + } + + var_types baseType = JitType2PreciseVarType(baseJitType); + // We don't actually check the intrinsic outside of the false case as we expect // the exposed managed signatures are either generic and support all types // or they are explicit and support the type indicated. + if (varTypeIsArithmetic(baseType)) { return true; @@ -722,28 +740,24 @@ struct HWIntrinsicSignatureReader final if (sig->numArgs > 0) { - CorInfoType op1Type = strip(compHnd->getArgType(sig, args, &op1ClsHnd)); - op1VarType = JITtype2varType(op1Type); + op1JitType = strip(compHnd->getArgType(sig, args, &op1ClsHnd)); if (sig->numArgs > 1) { - args = compHnd->getArgNext(args); - CorInfoType op2Type = strip(compHnd->getArgType(sig, args, &op2ClsHnd)); - op2VarType = JITtype2varType(op2Type); + args = compHnd->getArgNext(args); + op2JitType = strip(compHnd->getArgType(sig, args, &op2ClsHnd)); } if (sig->numArgs > 2) { - args = compHnd->getArgNext(args); - CorInfoType op3Type = strip(compHnd->getArgType(sig, args, &op3ClsHnd)); - op3VarType = JITtype2varType(op3Type); + args = compHnd->getArgNext(args); + op3JitType = strip(compHnd->getArgType(sig, args, &op3ClsHnd)); } if (sig->numArgs > 3) { - args = compHnd->getArgNext(args); - CorInfoType op4Type = strip(compHnd->getArgType(sig, args, &op4ClsHnd)); - op4VarType = JITtype2varType(op4Type); + args = compHnd->getArgNext(args); + op4JitType = strip(compHnd->getArgType(sig, args, &op4ClsHnd)); } } } @@ -752,10 +766,30 @@ struct HWIntrinsicSignatureReader final CORINFO_CLASS_HANDLE op2ClsHnd; CORINFO_CLASS_HANDLE op3ClsHnd; CORINFO_CLASS_HANDLE op4ClsHnd; - var_types op1VarType; - var_types op2VarType; - var_types op3VarType; - var_types op4VarType; + CorInfoType op1JitType; + CorInfoType op2JitType; + CorInfoType op3JitType; + CorInfoType op4JitType; + + var_types GetOp1Type() const + { + return JITtype2varType(op1JitType); + } + + var_types GetOp2Type() const + { + return JITtype2varType(op2JitType); + } + + var_types GetOp3Type() const + { + return JITtype2varType(op3JitType); + } + + var_types GetOp4Type() const + { + return JITtype2varType(op4JitType); + } }; //------------------------------------------------------------------------ @@ -777,50 +811,56 @@ GenTree* Compiler::impHWIntrinsic(NamedIntrinsic intrinsic, CORINFO_SIG_INFO* sig, bool mustExpand) { - HWIntrinsicCategory category = HWIntrinsicInfo::lookupCategory(intrinsic); - int numArgs = sig->numArgs; - var_types retType = JITtype2varType(sig->retType); - var_types baseType = TYP_UNKNOWN; + HWIntrinsicCategory category = HWIntrinsicInfo::lookupCategory(intrinsic); + int numArgs = sig->numArgs; + var_types retType = JITtype2varType(sig->retType); + CorInfoType simdBaseJitType = CORINFO_TYPE_UNDEF; if ((retType == TYP_STRUCT) && featureSIMD) { unsigned int sizeBytes; - baseType = getBaseTypeAndSizeOfSIMDType(sig->retTypeSigClass, &sizeBytes); - retType = getSIMDTypeForSize(sizeBytes); + simdBaseJitType = getBaseJitTypeAndSizeOfSIMDType(sig->retTypeSigClass, &sizeBytes); + retType = getSIMDTypeForSize(sizeBytes); assert(sizeBytes != 0); // We want to return early here for cases where retType was TYP_STRUCT as per method signature and - // rather than deferring the decision after getting the baseType of arg. - if (!isSupportedBaseType(intrinsic, baseType)) + // rather than deferring the decision after getting the simdBaseJitType of arg. + if (!isSupportedBaseType(intrinsic, simdBaseJitType)) { return nullptr; } } - baseType = getBaseTypeFromArgIfNeeded(intrinsic, clsHnd, sig, baseType); + simdBaseJitType = getBaseJitTypeFromArgIfNeeded(intrinsic, clsHnd, sig, simdBaseJitType); - if (baseType == TYP_UNKNOWN) + if (simdBaseJitType == CORINFO_TYPE_UNDEF) { if (category != HW_Category_Scalar) { unsigned int sizeBytes; - baseType = getBaseTypeAndSizeOfSIMDType(clsHnd, &sizeBytes); + simdBaseJitType = getBaseJitTypeAndSizeOfSIMDType(clsHnd, &sizeBytes); assert((category == HW_Category_Special) || (sizeBytes != 0)); } else { - baseType = retType; + simdBaseJitType = sig->retType; } } // Immediately return if the category is other than scalar/special and this is not a supported base type. if ((category != HW_Category_Special) && (category != HW_Category_Scalar) && - !isSupportedBaseType(intrinsic, baseType)) + !isSupportedBaseType(intrinsic, simdBaseJitType)) { return nullptr; } - GenTree* immOp = nullptr; + var_types simdBaseType = TYP_UNKNOWN; + GenTree* immOp = nullptr; + + if (simdBaseJitType != CORINFO_TYPE_UNDEF) + { + simdBaseType = JitType2PreciseVarType(simdBaseJitType); + } HWIntrinsicSignatureReader sigReader; sigReader.Read(info.compCompHnd, sig); @@ -858,13 +898,14 @@ GenTree* Compiler::impHWIntrinsic(NamedIntrinsic intrinsic, if (!immOp2->IsCnsIntOrI()) { assert(HWIntrinsicInfo::NoJmpTableImm(intrinsic)); - return impNonConstFallback(intrinsic, retType, baseType); + return impNonConstFallback(intrinsic, retType, simdBaseJitType); } - unsigned int otherSimdSize = 0; - var_types otherBaseType = getBaseTypeAndSizeOfSIMDType(sigReader.op3ClsHnd, &otherSimdSize); + unsigned int otherSimdSize = 0; + CorInfoType otherBaseJitType = getBaseJitTypeAndSizeOfSIMDType(sigReader.op3ClsHnd, &otherSimdSize); + var_types otherBaseType = JitType2PreciseVarType(otherBaseJitType); - assert(otherBaseType == baseType); + assert(otherBaseJitType == simdBaseJitType); int immLowerBound2 = 0; int immUpperBound2 = 0; @@ -902,34 +943,40 @@ GenTree* Compiler::impHWIntrinsic(NamedIntrinsic intrinsic, #elif defined(TARGET_ARM64) if (category == HW_Category_SIMDByIndexedElement) { + CorInfoType indexedElementBaseJitType; var_types indexedElementBaseType; unsigned int indexedElementSimdSize = 0; if (numArgs == 3) { - indexedElementBaseType = getBaseTypeAndSizeOfSIMDType(sigReader.op2ClsHnd, &indexedElementSimdSize); + indexedElementBaseJitType = + getBaseJitTypeAndSizeOfSIMDType(sigReader.op2ClsHnd, &indexedElementSimdSize); + indexedElementBaseType = JitType2PreciseVarType(indexedElementBaseJitType); } else { assert(numArgs == 4); - indexedElementBaseType = getBaseTypeAndSizeOfSIMDType(sigReader.op3ClsHnd, &indexedElementSimdSize); + indexedElementBaseJitType = + getBaseJitTypeAndSizeOfSIMDType(sigReader.op3ClsHnd, &indexedElementSimdSize); + indexedElementBaseType = JitType2PreciseVarType(indexedElementBaseJitType); if (intrinsic == NI_Dp_DotProductBySelectedQuadruplet) { - assert(((baseType == TYP_INT) && (indexedElementBaseType == TYP_BYTE)) || - ((baseType == TYP_UINT) && (indexedElementBaseType == TYP_UBYTE))); + assert(((simdBaseType == TYP_INT) && (indexedElementBaseType == TYP_BYTE)) || + ((simdBaseType == TYP_UINT) && (indexedElementBaseType == TYP_UBYTE))); // The second source operand of sdot, udot instructions is an indexed 32-bit element. - indexedElementBaseType = baseType; + indexedElementBaseJitType = simdBaseJitType; + indexedElementBaseType = simdBaseType; } } - assert(indexedElementBaseType == baseType); - HWIntrinsicInfo::lookupImmBounds(intrinsic, indexedElementSimdSize, baseType, &immLowerBound, + assert(indexedElementBaseType == simdBaseType); + HWIntrinsicInfo::lookupImmBounds(intrinsic, indexedElementSimdSize, simdBaseType, &immLowerBound, &immUpperBound); } else { - HWIntrinsicInfo::lookupImmBounds(intrinsic, simdSize, baseType, &immLowerBound, &immUpperBound); + HWIntrinsicInfo::lookupImmBounds(intrinsic, simdSize, simdBaseType, &immLowerBound, &immUpperBound); } #endif @@ -960,7 +1007,7 @@ GenTree* Compiler::impHWIntrinsic(NamedIntrinsic intrinsic, { if (HWIntrinsicInfo::NoJmpTableImm(intrinsic)) { - return impNonConstFallback(intrinsic, retType, baseType); + return impNonConstFallback(intrinsic, retType, simdBaseJitType); } else if (!mustExpand) { @@ -987,7 +1034,7 @@ GenTree* Compiler::impHWIntrinsic(NamedIntrinsic intrinsic, assert(numArgs >= 0); - if (!isScalar && ((HWIntrinsicInfo::lookupIns(intrinsic, baseType) == INS_invalid) || + if (!isScalar && ((HWIntrinsicInfo::lookupIns(intrinsic, simdBaseType) == INS_invalid) || ((simdSize != 8) && (simdSize != 16) && (simdSize != 32)))) { assert(!"Unexpected HW Intrinsic"); @@ -1004,11 +1051,11 @@ GenTree* Compiler::impHWIntrinsic(NamedIntrinsic intrinsic, { case 0: assert(!isScalar); - retNode = gtNewSimdHWIntrinsicNode(retType, intrinsic, baseType, simdSize); + retNode = gtNewSimdHWIntrinsicNode(retType, intrinsic, simdBaseJitType, simdSize); break; case 1: - op1 = getArgForHWIntrinsic(sigReader.op1VarType, sigReader.op1ClsHnd); + op1 = getArgForHWIntrinsic(sigReader.GetOp1Type(), sigReader.op1ClsHnd); if ((category == HW_Category_MemoryLoad) && op1->OperIs(GT_CAST)) { @@ -1021,23 +1068,23 @@ GenTree* Compiler::impHWIntrinsic(NamedIntrinsic intrinsic, } retNode = isScalar ? gtNewScalarHWIntrinsicNode(retType, op1, intrinsic) - : gtNewSimdHWIntrinsicNode(retType, op1, intrinsic, baseType, simdSize); + : gtNewSimdHWIntrinsicNode(retType, op1, intrinsic, simdBaseJitType, simdSize); break; case 2: - op2 = getArgForHWIntrinsic(sigReader.op2VarType, sigReader.op2ClsHnd); + op2 = getArgForHWIntrinsic(sigReader.GetOp2Type(), sigReader.op2ClsHnd); op2 = addRangeCheckIfNeeded(intrinsic, op2, mustExpand, immLowerBound, immUpperBound); - op1 = getArgForHWIntrinsic(sigReader.op1VarType, sigReader.op1ClsHnd); + op1 = getArgForHWIntrinsic(sigReader.GetOp1Type(), sigReader.op1ClsHnd); retNode = isScalar ? gtNewScalarHWIntrinsicNode(retType, op1, op2, intrinsic) - : gtNewSimdHWIntrinsicNode(retType, op1, op2, intrinsic, baseType, simdSize); + : gtNewSimdHWIntrinsicNode(retType, op1, op2, intrinsic, simdBaseJitType, simdSize); #ifdef TARGET_XARCH if ((intrinsic == NI_SSE42_Crc32) || (intrinsic == NI_SSE42_X64_Crc32)) { - // TODO-XArch-Cleanup: currently we use the BaseType to bring the type of the second argument + // TODO-XArch-Cleanup: currently we use the simdBaseJitType to bring the type of the second argument // to the code generator. May encode the overload info in other way. - retNode->AsHWIntrinsic()->gtSIMDBaseType = sigReader.op2VarType; + retNode->AsHWIntrinsic()->SetSimdBaseJitType(sigReader.op2JitType); } #elif defined(TARGET_ARM64) switch (intrinsic) @@ -1046,29 +1093,29 @@ GenTree* Compiler::impHWIntrinsic(NamedIntrinsic intrinsic, case NI_Crc32_ComputeCrc32C: case NI_Crc32_Arm64_ComputeCrc32: case NI_Crc32_Arm64_ComputeCrc32C: - retNode->AsHWIntrinsic()->gtSIMDBaseType = sigReader.op2VarType; + retNode->AsHWIntrinsic()->SetSimdBaseJitType(sigReader.op2JitType); break; case NI_AdvSimd_AddWideningUpper: case NI_AdvSimd_SubtractWideningUpper: assert(varTypeIsSIMD(op1->TypeGet())); - retNode->AsHWIntrinsic()->SetAuxiliaryType(getBaseTypeOfSIMDType(sigReader.op1ClsHnd)); + retNode->AsHWIntrinsic()->SetAuxiliaryJitType(getBaseJitTypeOfSIMDType(sigReader.op1ClsHnd)); break; case NI_AdvSimd_Arm64_AddSaturateScalar: assert(varTypeIsSIMD(op2->TypeGet())); - retNode->AsHWIntrinsic()->SetAuxiliaryType(getBaseTypeOfSIMDType(sigReader.op2ClsHnd)); + retNode->AsHWIntrinsic()->SetAuxiliaryJitType(getBaseJitTypeOfSIMDType(sigReader.op2ClsHnd)); break; case NI_ArmBase_Arm64_MultiplyHigh: if (sig->retType == CORINFO_TYPE_ULONG) { - retNode->AsHWIntrinsic()->gtSIMDBaseType = TYP_ULONG; + retNode->AsHWIntrinsic()->SetSimdBaseJitType(CORINFO_TYPE_ULONG); } else { assert(sig->retType == CORINFO_TYPE_LONG); - retNode->AsHWIntrinsic()->gtSIMDBaseType = TYP_LONG; + retNode->AsHWIntrinsic()->SetSimdBaseJitType(CORINFO_TYPE_LONG); } break; @@ -1079,9 +1126,9 @@ GenTree* Compiler::impHWIntrinsic(NamedIntrinsic intrinsic, break; case 3: - op3 = getArgForHWIntrinsic(sigReader.op3VarType, sigReader.op3ClsHnd); - op2 = getArgForHWIntrinsic(sigReader.op2VarType, sigReader.op2ClsHnd); - op1 = getArgForHWIntrinsic(sigReader.op1VarType, sigReader.op1ClsHnd); + op3 = getArgForHWIntrinsic(sigReader.GetOp3Type(), sigReader.op3ClsHnd); + op2 = getArgForHWIntrinsic(sigReader.GetOp2Type(), sigReader.op2ClsHnd); + op1 = getArgForHWIntrinsic(sigReader.GetOp1Type(), sigReader.op1ClsHnd); #ifdef TARGET_ARM64 if (intrinsic == NI_AdvSimd_LoadAndInsertScalar) @@ -1108,40 +1155,29 @@ GenTree* Compiler::impHWIntrinsic(NamedIntrinsic intrinsic, op3 = addRangeCheckIfNeeded(intrinsic, op3, mustExpand, immLowerBound, immUpperBound); } - retNode = isScalar ? gtNewScalarHWIntrinsicNode(retType, op1, op2, op3, intrinsic) - : gtNewSimdHWIntrinsicNode(retType, op1, op2, op3, intrinsic, baseType, simdSize); + retNode = isScalar + ? gtNewScalarHWIntrinsicNode(retType, op1, op2, op3, intrinsic) + : gtNewSimdHWIntrinsicNode(retType, op1, op2, op3, intrinsic, simdBaseJitType, simdSize); #ifdef TARGET_XARCH if ((intrinsic == NI_AVX2_GatherVector128) || (intrinsic == NI_AVX2_GatherVector256)) { assert(varTypeIsSIMD(op2->TypeGet())); - retNode->AsHWIntrinsic()->SetAuxiliaryType(getBaseTypeOfSIMDType(sigReader.op2ClsHnd)); - } -#elif defined(TARGET_ARM64) - if (category == HW_Category_SIMDByIndexedElement) - { - assert(varTypeIsSIMD(op2->TypeGet())); - retNode->AsHWIntrinsic()->SetAuxiliaryType(op2->TypeGet()); + retNode->AsHWIntrinsic()->SetAuxiliaryJitType(getBaseJitTypeOfSIMDType(sigReader.op2ClsHnd)); } #endif break; #ifdef TARGET_ARM64 case 4: - op4 = getArgForHWIntrinsic(sigReader.op4VarType, sigReader.op4ClsHnd); + op4 = getArgForHWIntrinsic(sigReader.GetOp4Type(), sigReader.op4ClsHnd); op4 = addRangeCheckIfNeeded(intrinsic, op4, mustExpand, immLowerBound, immUpperBound); - op3 = getArgForHWIntrinsic(sigReader.op3VarType, sigReader.op3ClsHnd); - op2 = getArgForHWIntrinsic(sigReader.op2VarType, sigReader.op2ClsHnd); - op1 = getArgForHWIntrinsic(sigReader.op1VarType, sigReader.op1ClsHnd); + op3 = getArgForHWIntrinsic(sigReader.GetOp3Type(), sigReader.op3ClsHnd); + op2 = getArgForHWIntrinsic(sigReader.GetOp2Type(), sigReader.op2ClsHnd); + op1 = getArgForHWIntrinsic(sigReader.GetOp1Type(), sigReader.op1ClsHnd); assert(!isScalar); - retNode = gtNewSimdHWIntrinsicNode(retType, op1, op2, op3, op4, intrinsic, baseType, simdSize); - - if (category == HW_Category_SIMDByIndexedElement) - { - assert(varTypeIsSIMD(op3->TypeGet())); - retNode->AsHWIntrinsic()->SetAuxiliaryType(op3->TypeGet()); - } + retNode = gtNewSimdHWIntrinsicNode(retType, op1, op2, op3, op4, intrinsic, simdBaseJitType, simdSize); break; #endif @@ -1168,7 +1204,7 @@ GenTree* Compiler::impHWIntrinsic(NamedIntrinsic intrinsic, return retNode; } - return impSpecialIntrinsic(intrinsic, clsHnd, method, sig, baseType, retType, simdSize); + return impSpecialIntrinsic(intrinsic, clsHnd, method, sig, simdBaseJitType, retType, simdSize); } #endif // FEATURE_HW_INTRINSICS diff --git a/src/coreclr/jit/hwintrinsic.h b/src/coreclr/jit/hwintrinsic.h index ca527f14076e45..0b35ca719b6e2f 100644 --- a/src/coreclr/jit/hwintrinsic.h +++ b/src/coreclr/jit/hwintrinsic.h @@ -800,7 +800,7 @@ struct HWIntrinsic final void InitializeBaseType(const GenTreeHWIntrinsic* node) { - baseType = node->gtSIMDBaseType; + baseType = node->GetSimdBaseType(); if (baseType == TYP_UNKNOWN) { diff --git a/src/coreclr/jit/hwintrinsicarm64.cpp b/src/coreclr/jit/hwintrinsicarm64.cpp index 0d0021b0b8c65d..4f57bc38aceb57 100644 --- a/src/coreclr/jit/hwintrinsicarm64.cpp +++ b/src/coreclr/jit/hwintrinsicarm64.cpp @@ -276,14 +276,14 @@ void HWIntrinsicInfo::lookupImmBounds( // impNonConstFallback: generate alternate code when the imm-arg is not a compile-time constant // // Arguments: -// intrinsic -- intrinsic ID -// simdType -- Vector type -// baseType -- base type of the Vector64/128 +// intrinsic -- intrinsic ID +// simdType -- Vector type +// simdBaseJitType -- base JIT type of the Vector64/128 // // Return Value: // return the IR of semantic alternative on non-const imm-arg // -GenTree* Compiler::impNonConstFallback(NamedIntrinsic intrinsic, var_types simdType, var_types baseType) +GenTree* Compiler::impNonConstFallback(NamedIntrinsic intrinsic, var_types simdType, CorInfoType simdBaseJitType) { return nullptr; } @@ -292,12 +292,12 @@ GenTree* Compiler::impNonConstFallback(NamedIntrinsic intrinsic, var_types simdT // impSpecialIntrinsic: Import a hardware intrinsic that requires special handling as a GT_HWINTRINSIC node if possible // // Arguments: -// intrinsic -- id of the intrinsic function. -// clsHnd -- class handle containing the intrinsic function. -// method -- method handle of the intrinsic function. -// sig -- signature of the intrinsic call. -// baseType -- generic argument of the intrinsic. -// retType -- return type of the intrinsic. +// intrinsic -- id of the intrinsic function. +// clsHnd -- class handle containing the intrinsic function. +// method -- method handle of the intrinsic function. +// sig -- signature of the intrinsic call. +// simdBaseJitType -- generic argument of the intrinsic. +// retType -- return type of the intrinsic. // // Return Value: // The GT_HWINTRINSIC node, or nullptr if not a supported intrinsic @@ -306,15 +306,16 @@ GenTree* Compiler::impSpecialIntrinsic(NamedIntrinsic intrinsic, CORINFO_CLASS_HANDLE clsHnd, CORINFO_METHOD_HANDLE method, CORINFO_SIG_INFO* sig, - var_types baseType, + CorInfoType simdBaseJitType, var_types retType, unsigned simdSize) { - HWIntrinsicCategory category = HWIntrinsicInfo::lookupCategory(intrinsic); - int numArgs = sig->numArgs; + HWIntrinsicCategory category = HWIntrinsicInfo::lookupCategory(intrinsic); + int numArgs = sig->numArgs; + var_types simdBaseType = JitType2PreciseVarType(simdBaseJitType); assert(numArgs >= 0); - assert(varTypeIsArithmetic(baseType)); + assert(varTypeIsArithmetic(simdBaseType)); GenTree* retNode = nullptr; GenTree* op1 = nullptr; @@ -380,13 +381,13 @@ GenTree* Compiler::impSpecialIntrinsic(NamedIntrinsic intrinsic, if (sig->numArgs == 1) { op1 = impPopStack().val; - retNode = gtNewSimdHWIntrinsicNode(retType, op1, intrinsic, baseType, simdSize); + retNode = gtNewSimdHWIntrinsicNode(retType, op1, intrinsic, simdBaseJitType, simdSize); } else if (sig->numArgs == 2) { op2 = impPopStack().val; op1 = impPopStack().val; - retNode = gtNewSimdHWIntrinsicNode(retType, op1, op2, intrinsic, baseType, simdSize); + retNode = gtNewSimdHWIntrinsicNode(retType, op1, op2, intrinsic, simdBaseJitType, simdSize); } else { @@ -400,7 +401,7 @@ GenTree* Compiler::impSpecialIntrinsic(NamedIntrinsic intrinsic, } op1 = tmp; - retNode = gtNewSimdHWIntrinsicNode(retType, op1, intrinsic, baseType, simdSize); + retNode = gtNewSimdHWIntrinsicNode(retType, op1, intrinsic, simdBaseJitType, simdSize); } break; } @@ -411,7 +412,7 @@ GenTree* Compiler::impSpecialIntrinsic(NamedIntrinsic intrinsic, assert(!sig->hasThis()); assert(numArgs == 0); - GenTreeIntCon* countNode = gtNewIconNode(getSIMDVectorLength(simdSize, baseType), TYP_INT); + GenTreeIntCon* countNode = gtNewIconNode(getSIMDVectorLength(simdSize, simdBaseType), TYP_INT); countNode->gtFlags |= GTF_ICON_SIMD_COUNT; retNode = countNode; break; @@ -425,7 +426,7 @@ GenTree* Compiler::impSpecialIntrinsic(NamedIntrinsic intrinsic, assert(!sig->hasThis()); assert(numArgs == 0); - retNode = gtNewSimdHWIntrinsicNode(retType, intrinsic, baseType, simdSize); + retNode = gtNewSimdHWIntrinsicNode(retType, intrinsic, simdBaseJitType, simdSize); break; } @@ -441,7 +442,7 @@ GenTree* Compiler::impSpecialIntrinsic(NamedIntrinsic intrinsic, } ssize_t imm8 = indexOp->AsIntCon()->IconValue(); - ssize_t count = simdSize / genTypeSize(baseType); + ssize_t count = simdSize / genTypeSize(simdBaseType); if (imm8 >= count || imm8 < 0) { @@ -453,7 +454,7 @@ GenTree* Compiler::impSpecialIntrinsic(NamedIntrinsic intrinsic, impPopStack(); // pop the indexOp that we already have. GenTree* vectorOp = impSIMDPopStack(getSIMDTypeForSize(simdSize)); - switch (baseType) + switch (simdBaseType) { case TYP_LONG: case TYP_ULONG: @@ -461,11 +462,12 @@ GenTree* Compiler::impSpecialIntrinsic(NamedIntrinsic intrinsic, if (simdSize == 16) { retNode = gtNewSimdHWIntrinsicNode(retType, vectorOp, gtNewIconNode(imm8), valueOp, - NI_AdvSimd_Insert, baseType, simdSize); + NI_AdvSimd_Insert, simdBaseJitType, simdSize); } else { - retNode = gtNewSimdHWIntrinsicNode(retType, valueOp, NI_Vector64_Create, baseType, simdSize); + retNode = + gtNewSimdHWIntrinsicNode(retType, valueOp, NI_Vector64_Create, simdBaseJitType, simdSize); } break; @@ -477,7 +479,7 @@ GenTree* Compiler::impSpecialIntrinsic(NamedIntrinsic intrinsic, case TYP_INT: case TYP_UINT: retNode = gtNewSimdHWIntrinsicNode(retType, vectorOp, gtNewIconNode(imm8), valueOp, - NI_AdvSimd_Insert, baseType, simdSize); + NI_AdvSimd_Insert, simdBaseJitType, simdSize); break; default: @@ -493,12 +495,12 @@ GenTree* Compiler::impSpecialIntrinsic(NamedIntrinsic intrinsic, // AdvSimd.ExtractVector128(vector, Vector128.Zero, 8 / sizeof(T)).GetLower(); assert(numArgs == 1); op1 = impPopStack().val; - GenTree* zero = gtNewSimdHWIntrinsicNode(retType, NI_Vector128_get_Zero, baseType, simdSize); - ssize_t index = 8 / genTypeSize(baseType); + GenTree* zero = gtNewSimdHWIntrinsicNode(retType, NI_Vector128_get_Zero, simdBaseJitType, simdSize); + ssize_t index = 8 / genTypeSize(simdBaseType); retNode = gtNewSimdHWIntrinsicNode(TYP_SIMD16, op1, zero, gtNewIconNode(index), NI_AdvSimd_ExtractVector128, - baseType, simdSize); - retNode = gtNewSimdHWIntrinsicNode(TYP_SIMD8, retNode, NI_Vector128_GetLower, baseType, 8); + simdBaseJitType, simdSize); + retNode = gtNewSimdHWIntrinsicNode(TYP_SIMD8, retNode, NI_Vector128_GetLower, simdBaseJitType, 8); break; } diff --git a/src/coreclr/jit/hwintrinsiccodegenarm64.cpp b/src/coreclr/jit/hwintrinsiccodegenarm64.cpp index 5b2fd24a53912a..ae287737816848 100644 --- a/src/coreclr/jit/hwintrinsiccodegenarm64.cpp +++ b/src/coreclr/jit/hwintrinsiccodegenarm64.cpp @@ -55,14 +55,28 @@ CodeGen::HWIntrinsicImmOpHelper::HWIntrinsicImmOpHelper(CodeGen* codeGen, GenTre if (category == HW_Category_SIMDByIndexedElement) { - assert(varTypeIsSIMD(intrin->GetAuxiliaryType())); - const unsigned int indexedElementSimdSize = genTypeSize(intrin->GetAuxiliaryType()); - HWIntrinsicInfo::lookupImmBounds(intrin->gtHWIntrinsicId, indexedElementSimdSize, intrin->gtSIMDBaseType, + const HWIntrinsic intrinInfo(intrin); + var_types indexedElementOpType; + + if (intrinInfo.numOperands == 3) + { + indexedElementOpType = intrinInfo.op2->TypeGet(); + } + else + { + assert(intrinInfo.numOperands == 4); + indexedElementOpType = intrinInfo.op3->TypeGet(); + } + + assert(varTypeIsSIMD(indexedElementOpType)); + + const unsigned int indexedElementSimdSize = genTypeSize(indexedElementOpType); + HWIntrinsicInfo::lookupImmBounds(intrin->gtHWIntrinsicId, indexedElementSimdSize, intrin->GetSimdBaseType(), &immLowerBound, &immUpperBound); } else { - HWIntrinsicInfo::lookupImmBounds(intrin->gtHWIntrinsicId, intrin->gtSIMDSize, intrin->gtSIMDBaseType, + HWIntrinsicInfo::lookupImmBounds(intrin->gtHWIntrinsicId, intrin->GetSimdSize(), intrin->GetSimdBaseType(), &immLowerBound, &immUpperBound); } @@ -243,7 +257,7 @@ void CodeGen::genHWIntrinsic(GenTreeHWIntrinsic* node) } else { - emitSize = emitActualTypeSize(Compiler::getSIMDTypeForSize(node->gtSIMDSize)); + emitSize = emitActualTypeSize(Compiler::getSIMDTypeForSize(node->GetSimdSize())); opt = genGetSimdInsOpt(emitSize, intrin.baseType); } @@ -395,38 +409,6 @@ void CodeGen::genHWIntrinsic(GenTreeHWIntrinsic* node) instruction ins = INS_invalid; switch (intrin.id) { - case NI_Crc32_ComputeCrc32: - if (intrin.baseType == TYP_INT) - { - ins = INS_crc32w; - } - else - { - ins = HWIntrinsicInfo::lookupIns(intrin.id, intrin.baseType); - } - break; - - case NI_Crc32_ComputeCrc32C: - if (intrin.baseType == TYP_INT) - { - ins = INS_crc32cw; - } - else - { - ins = HWIntrinsicInfo::lookupIns(intrin.id, intrin.baseType); - } - break; - - case NI_Crc32_Arm64_ComputeCrc32: - assert(intrin.baseType == TYP_LONG); - ins = INS_crc32x; - break; - - case NI_Crc32_Arm64_ComputeCrc32C: - assert(intrin.baseType == TYP_LONG); - ins = INS_crc32cx; - break; - case NI_AdvSimd_AddWideningLower: assert(varTypeIsIntegral(intrin.baseType)); if (intrin.op1->TypeGet() == TYP_SIMD8) @@ -546,7 +528,7 @@ void CodeGen::genHWIntrinsic(GenTreeHWIntrinsic* node) { HWIntrinsicImmOpHelper helper(this, intrin.op2, node); - // Prior to codegen, the emitSize is based on node->gtSIMDSize which + // Prior to codegen, the emitSize is based on node->GetSimdSize() which // tracks the size of the first operand and is used to tell if the index // is in range. However, when actually emitting it needs to be the size // of the return and the size of the operand is interpreted based on the diff --git a/src/coreclr/jit/hwintrinsiccodegenxarch.cpp b/src/coreclr/jit/hwintrinsiccodegenxarch.cpp index e5ae7fa13b445e..42711acaed83a6 100644 --- a/src/coreclr/jit/hwintrinsiccodegenxarch.cpp +++ b/src/coreclr/jit/hwintrinsiccodegenxarch.cpp @@ -92,7 +92,7 @@ void CodeGen::genHWIntrinsic(GenTreeHWIntrinsic* node) GenTree* op1 = node->gtGetOp1(); GenTree* op2 = node->gtGetOp2(); regNumber targetReg = node->GetRegNum(); - var_types baseType = node->gtSIMDBaseType; + var_types baseType = node->GetSimdBaseType(); regNumber op1Reg = REG_NA; regNumber op2Reg = REG_NA; @@ -101,7 +101,7 @@ void CodeGen::genHWIntrinsic(GenTreeHWIntrinsic* node) assert(numArgs >= 0); instruction ins = HWIntrinsicInfo::lookupIns(intrinsicId, baseType); assert(ins != INS_invalid); - emitAttr simdSize = emitActualTypeSize(Compiler::getSIMDTypeForSize(node->gtSIMDSize)); + emitAttr simdSize = emitActualTypeSize(Compiler::getSIMDTypeForSize(node->GetSimdSize())); assert(simdSize != 0); switch (numArgs) @@ -162,7 +162,7 @@ void CodeGen::genHWIntrinsic(GenTreeHWIntrinsic* node) regNumber regData = genConsumeReg(extract->gtGetOp1()); - ins = HWIntrinsicInfo::lookupIns(extract->gtHWIntrinsicId, extract->gtSIMDBaseType); + ins = HWIntrinsicInfo::lookupIns(extract->gtHWIntrinsicId, extract->GetSimdBaseType()); ival = static_cast(extract->gtGetOp2()->AsIntCon()->IconValue()); GenTreeIndir indir = indirForm(TYP_SIMD16, op1); @@ -550,7 +550,7 @@ void CodeGen::genHWIntrinsic_R_RM_I(GenTreeHWIntrinsic* node, instruction ins, i { regNumber targetReg = node->GetRegNum(); GenTree* op1 = node->gtGetOp1(); - emitAttr simdSize = emitActualTypeSize(Compiler::getSIMDTypeForSize(node->gtSIMDSize)); + emitAttr simdSize = emitActualTypeSize(Compiler::getSIMDTypeForSize(node->GetSimdSize())); // TODO-XArch-CQ: Commutative operations can have op1 be contained // TODO-XArch-CQ: Non-VEX encoded instructions can have both ops contained @@ -630,7 +630,7 @@ void CodeGen::genHWIntrinsic_R_R_RM_I(GenTreeHWIntrinsic* node, instruction ins, regNumber targetReg = node->GetRegNum(); GenTree* op1 = node->gtGetOp1(); GenTree* op2 = node->gtGetOp2(); - emitAttr simdSize = emitActualTypeSize(Compiler::getSIMDTypeForSize(node->gtSIMDSize)); + emitAttr simdSize = emitActualTypeSize(Compiler::getSIMDTypeForSize(node->GetSimdSize())); emitter* emit = GetEmitter(); // TODO-XArch-CQ: Commutative operations can have op1 be contained @@ -795,7 +795,7 @@ void CodeGen::genHWIntrinsic_R_R_RM_R(GenTreeHWIntrinsic* node, instruction ins) GenTree* op1 = node->gtGetOp1(); GenTree* op2 = node->gtGetOp2(); GenTree* op3 = nullptr; - emitAttr simdSize = emitActualTypeSize(Compiler::getSIMDTypeForSize(node->gtSIMDSize)); + emitAttr simdSize = emitActualTypeSize(Compiler::getSIMDTypeForSize(node->GetSimdSize())); emitter* emit = GetEmitter(); assert(op1->OperIsList()); @@ -1138,7 +1138,7 @@ void CodeGen::genBaseIntrinsic(GenTreeHWIntrinsic* node) { NamedIntrinsic intrinsicId = node->gtHWIntrinsicId; regNumber targetReg = node->GetRegNum(); - var_types baseType = node->gtSIMDBaseType; + var_types baseType = node->GetSimdBaseType(); assert(compiler->compIsaSupportedDebugOnly(InstructionSet_SSE)); assert((baseType >= TYP_BYTE) && (baseType <= TYP_DOUBLE)); @@ -1151,7 +1151,7 @@ void CodeGen::genBaseIntrinsic(GenTreeHWIntrinsic* node) assert(node->gtGetOp2() == nullptr); emitter* emit = GetEmitter(); - emitAttr attr = emitActualTypeSize(Compiler::getSIMDTypeForSize(node->gtSIMDSize)); + emitAttr attr = emitActualTypeSize(Compiler::getSIMDTypeForSize(node->GetSimdSize())); instruction ins = HWIntrinsicInfo::lookupIns(intrinsicId, baseType); switch (intrinsicId) @@ -1328,7 +1328,7 @@ void CodeGen::genSSEIntrinsic(GenTreeHWIntrinsic* node) GenTree* op2 = node->gtGetOp2(); regNumber targetReg = node->GetRegNum(); var_types targetType = node->TypeGet(); - var_types baseType = node->gtSIMDBaseType; + var_types baseType = node->GetSimdBaseType(); regNumber op1Reg = REG_NA; emitter* emit = GetEmitter(); @@ -1368,7 +1368,7 @@ void CodeGen::genSSEIntrinsic(GenTreeHWIntrinsic* node) // These do not support containment. assert(!op1->isContained()); - instruction ins = HWIntrinsicInfo::lookupIns(intrinsicId, node->gtSIMDBaseType); + instruction ins = HWIntrinsicInfo::lookupIns(intrinsicId, node->GetSimdBaseType()); op1Reg = op1->GetRegNum(); emit->emitIns_AR(ins, emitTypeSize(baseType), op1Reg, 0); break; @@ -1404,7 +1404,7 @@ void CodeGen::genSSE2Intrinsic(GenTreeHWIntrinsic* node) GenTree* op2 = node->gtGetOp2(); regNumber targetReg = node->GetRegNum(); var_types targetType = node->TypeGet(); - var_types baseType = node->gtSIMDBaseType; + var_types baseType = node->GetSimdBaseType(); regNumber op1Reg = REG_NA; emitter* emit = GetEmitter(); @@ -1508,7 +1508,7 @@ void CodeGen::genSSE41Intrinsic(GenTreeHWIntrinsic* node) GenTree* op1 = node->gtGetOp1(); GenTree* op2 = node->gtGetOp2(); regNumber targetReg = node->GetRegNum(); - var_types baseType = node->gtSIMDBaseType; + var_types baseType = node->GetSimdBaseType(); emitter* emit = GetEmitter(); @@ -1597,7 +1597,7 @@ void CodeGen::genSSE42Intrinsic(GenTreeHWIntrinsic* node) regNumber targetReg = node->GetRegNum(); GenTree* op1 = node->gtGetOp1(); GenTree* op2 = node->gtGetOp2(); - var_types baseType = node->gtSIMDBaseType; + var_types baseType = node->GetSimdBaseType(); var_types targetType = node->TypeGet(); emitter* emit = GetEmitter(); @@ -1654,8 +1654,8 @@ void CodeGen::genSSE42Intrinsic(GenTreeHWIntrinsic* node) void CodeGen::genAvxOrAvx2Intrinsic(GenTreeHWIntrinsic* node) { NamedIntrinsic intrinsicId = node->gtHWIntrinsicId; - var_types baseType = node->gtSIMDBaseType; - emitAttr attr = emitActualTypeSize(Compiler::getSIMDTypeForSize(node->gtSIMDSize)); + var_types baseType = node->GetSimdBaseType(); + emitAttr attr = emitActualTypeSize(Compiler::getSIMDTypeForSize(node->GetSimdSize())); var_types targetType = node->TypeGet(); instruction ins = HWIntrinsicInfo::lookupIns(intrinsicId, baseType); int numArgs = HWIntrinsicInfo::lookupNumArgs(node); @@ -1967,8 +1967,8 @@ void CodeGen::genBMI1OrBMI2Intrinsic(GenTreeHWIntrinsic* node) void CodeGen::genFMAIntrinsic(GenTreeHWIntrinsic* node) { NamedIntrinsic intrinsicId = node->gtHWIntrinsicId; - var_types baseType = node->gtSIMDBaseType; - emitAttr attr = emitActualTypeSize(Compiler::getSIMDTypeForSize(node->gtSIMDSize)); + var_types baseType = node->GetSimdBaseType(); + emitAttr attr = emitActualTypeSize(Compiler::getSIMDTypeForSize(node->GetSimdSize())); instruction ins = HWIntrinsicInfo::lookupIns(intrinsicId, baseType); GenTree* op1 = node->gtGetOp1(); regNumber targetReg = node->GetRegNum(); diff --git a/src/coreclr/jit/hwintrinsicxarch.cpp b/src/coreclr/jit/hwintrinsicxarch.cpp index 02e0e17548a762..73a43ab0584c79 100644 --- a/src/coreclr/jit/hwintrinsicxarch.cpp +++ b/src/coreclr/jit/hwintrinsicxarch.cpp @@ -426,14 +426,14 @@ bool HWIntrinsicInfo::isScalarIsa(CORINFO_InstructionSet isa) // not a compile-time constant // // Arguments: -// intrinsic -- intrinsic ID -// simdType -- Vector type -// baseType -- base type of the Vector128/256 +// intrinsic -- intrinsic ID +// simdType -- Vector type +// simdBaseJitType -- SIMD base JIT type of the Vector128/256 // // Return Value: // return the IR of semantic alternative on non-const imm-arg // -GenTree* Compiler::impNonConstFallback(NamedIntrinsic intrinsic, var_types simdType, var_types baseType) +GenTree* Compiler::impNonConstFallback(NamedIntrinsic intrinsic, var_types simdType, CorInfoType simdBaseJitType) { assert(HWIntrinsicInfo::NoJmpTableImm(intrinsic)); switch (intrinsic) @@ -448,8 +448,8 @@ GenTree* Compiler::impNonConstFallback(NamedIntrinsic intrinsic, var_types simdT GenTree* op2 = impPopStack().val; GenTree* op1 = impSIMDPopStack(simdType); GenTree* tmpOp = - gtNewSimdHWIntrinsicNode(TYP_SIMD16, op2, NI_SSE2_ConvertScalarToVector128Int32, TYP_INT, 16); - return gtNewSimdHWIntrinsicNode(simdType, op1, tmpOp, intrinsic, baseType, genTypeSize(simdType)); + gtNewSimdHWIntrinsicNode(TYP_SIMD16, op2, NI_SSE2_ConvertScalarToVector128Int32, CORINFO_TYPE_INT, 16); + return gtNewSimdHWIntrinsicNode(simdType, op1, tmpOp, intrinsic, simdBaseJitType, genTypeSize(simdType)); } default: @@ -461,12 +461,12 @@ GenTree* Compiler::impNonConstFallback(NamedIntrinsic intrinsic, var_types simdT // impSpecialIntrinsic: dispatch intrinsics to their own implementation // // Arguments: -// intrinsic -- id of the intrinsic function. -// clsHnd -- class handle containing the intrinsic function. -// method -- method handle of the intrinsic function. -// sig -- signature of the intrinsic call. -// baseType -- generic argument of the intrinsic. -// retType -- return type of the intrinsic. +// intrinsic -- id of the intrinsic function. +// clsHnd -- class handle containing the intrinsic function. +// method -- method handle of the intrinsic function. +// sig -- signature of the intrinsic call. +// simdBaseJitType -- generic argument of the intrinsic. +// retType -- return type of the intrinsic. // Return Value: // the expanded intrinsic. // @@ -474,7 +474,7 @@ GenTree* Compiler::impSpecialIntrinsic(NamedIntrinsic intrinsic, CORINFO_CLASS_HANDLE clsHnd, CORINFO_METHOD_HANDLE method, CORINFO_SIG_INFO* sig, - var_types baseType, + CorInfoType simdBaseJitType, var_types retType, unsigned simdSize) { @@ -483,7 +483,7 @@ GenTree* Compiler::impSpecialIntrinsic(NamedIntrinsic intrinsic, { case InstructionSet_Vector128: case InstructionSet_Vector256: - return impBaseIntrinsic(intrinsic, clsHnd, method, sig, baseType, retType, simdSize); + return impBaseIntrinsic(intrinsic, clsHnd, method, sig, simdBaseJitType, retType, simdSize); case InstructionSet_SSE: return impSSEIntrinsic(intrinsic, method, sig); case InstructionSet_SSE2: @@ -518,7 +518,7 @@ GenTree* Compiler::impBaseIntrinsic(NamedIntrinsic intrinsic, CORINFO_CLASS_HANDLE clsHnd, CORINFO_METHOD_HANDLE method, CORINFO_SIG_INFO* sig, - var_types baseType, + CorInfoType simdBaseJitType, var_types retType, unsigned simdSize) { @@ -531,6 +531,8 @@ GenTree* Compiler::impBaseIntrinsic(NamedIntrinsic intrinsic, return nullptr; } + var_types simdBaseType = JitType2PreciseVarType(simdBaseJitType); + switch (intrinsic) { case NI_Vector256_As: @@ -585,7 +587,8 @@ GenTree* Compiler::impBaseIntrinsic(NamedIntrinsic intrinsic, if (getSIMDVectorRegisterByteLength() == YMM_REGSIZE_BYTES) { // Vector is TYP_SIMD32, so we should treat this as a call to Vector128.ToVector256 - return impBaseIntrinsic(NI_Vector128_ToVector256, clsHnd, method, sig, baseType, retType, simdSize); + return impBaseIntrinsic(NI_Vector128_ToVector256, clsHnd, method, sig, simdBaseJitType, retType, + simdSize); } assert(getSIMDVectorRegisterByteLength() == XMM_REGSIZE_BYTES); @@ -627,10 +630,8 @@ GenTree* Compiler::impBaseIntrinsic(NamedIntrinsic intrinsic, { assert(sig->numArgs == 1); assert(HWIntrinsicInfo::BaseTypeFromFirstArg(intrinsic)); - - var_types baseTypeOfIntrinsic = - getBaseTypeAndSizeOfSIMDType(info.compCompHnd->getArgClass(sig, sig->args), &simdSize); - assert(baseType == baseTypeOfIntrinsic); + assert(simdBaseJitType == + getBaseJitTypeAndSizeOfSIMDType(info.compCompHnd->getArgClass(sig, sig->args), &simdSize)); switch (getSIMDTypeForSize(simdSize)) { @@ -658,7 +659,8 @@ GenTree* Compiler::impBaseIntrinsic(NamedIntrinsic intrinsic, case TYP_SIMD32: { // Vector is TYP_SIMD32, so we should treat this as a call to Vector256.GetLower - return impBaseIntrinsic(NI_Vector256_GetLower, clsHnd, method, sig, baseType, retType, simdSize); + return impBaseIntrinsic(NI_Vector256_GetLower, clsHnd, method, sig, simdBaseJitType, retType, + simdSize); } default: @@ -697,12 +699,14 @@ GenTree* Compiler::impBaseIntrinsic(NamedIntrinsic intrinsic, if (intrinsic == NI_Vector256_AsVector) { - return impBaseIntrinsic(NI_Vector256_GetLower, clsHnd, method, sig, baseType, retType, simdSize); + return impBaseIntrinsic(NI_Vector256_GetLower, clsHnd, method, sig, simdBaseJitType, retType, + simdSize); } else { assert(intrinsic == NI_Vector256_AsVector256); - return impBaseIntrinsic(NI_Vector128_ToVector256, clsHnd, method, sig, baseType, retType, 16); + return impBaseIntrinsic(NI_Vector128_ToVector256, clsHnd, method, sig, simdBaseJitType, retType, + 16); } } @@ -714,7 +718,7 @@ GenTree* Compiler::impBaseIntrinsic(NamedIntrinsic intrinsic, { assert(sig->numArgs == 0); - GenTreeIntCon* countNode = gtNewIconNode(getSIMDVectorLength(simdSize, baseType), TYP_INT); + GenTreeIntCon* countNode = gtNewIconNode(getSIMDVectorLength(simdSize, simdBaseType), TYP_INT); countNode->gtFlags |= GTF_ICON_SIMD_COUNT; retNode = countNode; break; @@ -724,7 +728,7 @@ GenTree* Compiler::impBaseIntrinsic(NamedIntrinsic intrinsic, case NI_Vector256_Create: { #if defined(TARGET_X86) - if (varTypeIsLong(baseType)) + if (varTypeIsLong(simdBaseType)) { // TODO-XARCH-CQ: It may be beneficial to emit the movq // instruction, which takes a 64-bit memory address and @@ -743,7 +747,7 @@ GenTree* Compiler::impBaseIntrinsic(NamedIntrinsic intrinsic, break; } } - else if (baseType == TYP_FLOAT) + else if (simdBaseType == TYP_FLOAT) { if (!compExactlyDependsOn(InstructionSet_SSE)) { @@ -758,13 +762,13 @@ GenTree* Compiler::impBaseIntrinsic(NamedIntrinsic intrinsic, if (sig->numArgs == 1) { op1 = impPopStack().val; - retNode = gtNewSimdHWIntrinsicNode(retType, op1, intrinsic, baseType, simdSize); + retNode = gtNewSimdHWIntrinsicNode(retType, op1, intrinsic, simdBaseJitType, simdSize); } else if (sig->numArgs == 2) { op2 = impPopStack().val; op1 = impPopStack().val; - retNode = gtNewSimdHWIntrinsicNode(retType, op1, op2, intrinsic, baseType, simdSize); + retNode = gtNewSimdHWIntrinsicNode(retType, op1, op2, intrinsic, simdBaseJitType, simdSize); } else { @@ -778,7 +782,7 @@ GenTree* Compiler::impBaseIntrinsic(NamedIntrinsic intrinsic, } op1 = tmp; - retNode = gtNewSimdHWIntrinsicNode(retType, op1, intrinsic, baseType, simdSize); + retNode = gtNewSimdHWIntrinsicNode(retType, op1, intrinsic, simdBaseJitType, simdSize); } break; } @@ -788,7 +792,7 @@ GenTree* Compiler::impBaseIntrinsic(NamedIntrinsic intrinsic, assert(sig->numArgs == 1); #ifdef TARGET_X86 - if (varTypeIsLong(baseType)) + if (varTypeIsLong(simdBaseType)) { // TODO-XARCH-CQ: It may be beneficial to emit the movq // instruction, which takes a 64-bit memory address and @@ -798,10 +802,10 @@ GenTree* Compiler::impBaseIntrinsic(NamedIntrinsic intrinsic, #endif // TARGET_X86 if (compExactlyDependsOn(InstructionSet_SSE2) || - (compExactlyDependsOn(InstructionSet_SSE) && (baseType == TYP_FLOAT))) + (compExactlyDependsOn(InstructionSet_SSE) && (simdBaseType == TYP_FLOAT))) { op1 = impPopStack().val; - retNode = gtNewSimdHWIntrinsicNode(retType, op1, intrinsic, baseType, simdSize); + retNode = gtNewSimdHWIntrinsicNode(retType, op1, intrinsic, simdBaseJitType, simdSize); } break; } @@ -812,7 +816,7 @@ GenTree* Compiler::impBaseIntrinsic(NamedIntrinsic intrinsic, bool isSupported = false; - switch (baseType) + switch (simdBaseType) { case TYP_BYTE: case TYP_UBYTE: @@ -848,7 +852,7 @@ GenTree* Compiler::impBaseIntrinsic(NamedIntrinsic intrinsic, if (isSupported) { op1 = impSIMDPopStack(getSIMDTypeForSize(simdSize)); - retNode = gtNewSimdHWIntrinsicNode(retType, op1, intrinsic, baseType, simdSize); + retNode = gtNewSimdHWIntrinsicNode(retType, op1, intrinsic, simdBaseJitType, simdSize); } break; } @@ -859,7 +863,7 @@ GenTree* Compiler::impBaseIntrinsic(NamedIntrinsic intrinsic, bool isSupported = false; - switch (baseType) + switch (simdBaseType) { case TYP_BYTE: case TYP_UBYTE: @@ -896,7 +900,7 @@ GenTree* Compiler::impBaseIntrinsic(NamedIntrinsic intrinsic, if (isSupported) { op1 = impSIMDPopStack(getSIMDTypeForSize(simdSize)); - retNode = gtNewSimdHWIntrinsicNode(retType, op1, intrinsic, baseType, simdSize); + retNode = gtNewSimdHWIntrinsicNode(retType, op1, intrinsic, simdBaseJitType, simdSize); } break; } @@ -910,7 +914,7 @@ GenTree* Compiler::impBaseIntrinsic(NamedIntrinsic intrinsic, if (compExactlyDependsOn(InstructionSet_AVX)) { op1 = impSIMDPopStack(getSIMDTypeForSize(simdSize)); - retNode = gtNewSimdHWIntrinsicNode(retType, op1, intrinsic, baseType, simdSize); + retNode = gtNewSimdHWIntrinsicNode(retType, op1, intrinsic, simdBaseJitType, simdSize); } break; } @@ -922,7 +926,7 @@ GenTree* Compiler::impBaseIntrinsic(NamedIntrinsic intrinsic, if (compExactlyDependsOn(InstructionSet_SSE)) { - retNode = gtNewSimdHWIntrinsicNode(retType, intrinsic, baseType, simdSize); + retNode = gtNewSimdHWIntrinsicNode(retType, intrinsic, simdBaseJitType, simdSize); } break; } @@ -932,7 +936,7 @@ GenTree* Compiler::impBaseIntrinsic(NamedIntrinsic intrinsic, assert(sig->numArgs == 1); #ifdef TARGET_X86 - if (varTypeIsLong(baseType)) + if (varTypeIsLong(simdBaseType)) { // TODO-XARCH-CQ: It may be beneficial to emit the movq // instruction, which takes a 64-bit memory address and @@ -944,7 +948,7 @@ GenTree* Compiler::impBaseIntrinsic(NamedIntrinsic intrinsic, if (compExactlyDependsOn(InstructionSet_AVX)) { op1 = impPopStack().val; - retNode = gtNewSimdHWIntrinsicNode(retType, op1, intrinsic, baseType, simdSize); + retNode = gtNewSimdHWIntrinsicNode(retType, op1, intrinsic, simdBaseJitType, simdSize); } break; } @@ -956,7 +960,7 @@ GenTree* Compiler::impBaseIntrinsic(NamedIntrinsic intrinsic, if (compExactlyDependsOn(InstructionSet_AVX)) { - retNode = gtNewSimdHWIntrinsicNode(retType, intrinsic, baseType, simdSize); + retNode = gtNewSimdHWIntrinsicNode(retType, intrinsic, simdBaseJitType, simdSize); } break; } @@ -975,18 +979,19 @@ GenTree* Compiler::impBaseIntrinsic(NamedIntrinsic intrinsic, { assert(sig->numArgs == 3); GenTree* indexOp = impStackTop(1).val; - if (!compExactlyDependsOn(InstructionSet_SSE2) || !varTypeIsArithmetic(baseType) || !indexOp->OperIsConst()) + if (!compExactlyDependsOn(InstructionSet_SSE2) || !varTypeIsArithmetic(simdBaseType) || + !indexOp->OperIsConst()) { // Using software fallback if // 1. JIT/hardware don't support SSE2 instructions - // 2. baseType is not a numeric type (throw execptions) + // 2. simdBaseType is not a numeric type (throw execptions) // 3. index is not a constant return nullptr; } - switch (baseType) + switch (simdBaseType) { - // Using software fallback if baseType is not supported by hardware + // Using software fallback if simdBaseType is not supported by hardware case TYP_BYTE: case TYP_UBYTE: case TYP_INT: @@ -1018,7 +1023,7 @@ GenTree* Compiler::impBaseIntrinsic(NamedIntrinsic intrinsic, ssize_t imm8 = indexOp->AsIntCon()->IconValue(); ssize_t cachedImm8 = imm8; - ssize_t count = simdSize / genTypeSize(baseType); + ssize_t count = simdSize / genTypeSize(simdBaseType); if (imm8 >= count || imm8 < 0) { @@ -1045,23 +1050,23 @@ GenTree* Compiler::impBaseIntrinsic(NamedIntrinsic intrinsic, { imm8 -= count / 2; vectorOp = gtNewSimdHWIntrinsicNode(TYP_SIMD16, vectorOp, gtNewIconNode(1), NI_AVX_ExtractVector128, - baseType, simdSize); + simdBaseJitType, simdSize); } else { - vectorOp = - gtNewSimdHWIntrinsicNode(TYP_SIMD16, vectorOp, NI_Vector256_GetLower, baseType, simdSize); + vectorOp = gtNewSimdHWIntrinsicNode(TYP_SIMD16, vectorOp, NI_Vector256_GetLower, simdBaseJitType, + simdSize); } } GenTree* immNode = gtNewIconNode(imm8); - switch (baseType) + switch (simdBaseType) { case TYP_LONG: case TYP_ULONG: retNode = gtNewSimdHWIntrinsicNode(TYP_SIMD16, vectorOp, valueOp, immNode, NI_SSE41_X64_Insert, - baseType, 16); + simdBaseJitType, 16); break; case TYP_FLOAT: @@ -1075,9 +1080,9 @@ GenTree* Compiler::impBaseIntrinsic(NamedIntrinsic intrinsic, // => // movss xmm0, xmm1 (xmm0 = vector, xmm1 = value) valueOp = gtNewSimdHWIntrinsicNode(TYP_SIMD16, valueOp, NI_Vector128_CreateScalarUnsafe, - TYP_FLOAT, 16); + CORINFO_TYPE_FLOAT, 16); retNode = gtNewSimdHWIntrinsicNode(TYP_SIMD16, vectorOp, valueOp, NI_SSE_MoveScalar, - TYP_FLOAT, 16); + CORINFO_TYPE_FLOAT, 16); } else if (imm8 == 1) { @@ -1085,15 +1090,16 @@ GenTree* Compiler::impBaseIntrinsic(NamedIntrinsic intrinsic, // => // shufps xmm1, xmm0, 0 (xmm0 = vector, xmm1 = value) // shufps xmm1, xmm0, 226 - GenTree* tmpOp = gtNewSimdHWIntrinsicNode(TYP_SIMD16, valueOp, - NI_Vector128_CreateScalarUnsafe, TYP_FLOAT, 16); + GenTree* tmpOp = + gtNewSimdHWIntrinsicNode(TYP_SIMD16, valueOp, NI_Vector128_CreateScalarUnsafe, + CORINFO_TYPE_FLOAT, 16); GenTree* dupVectorOp = nullptr; vectorOp = impCloneExpr(vectorOp, &dupVectorOp, NO_CLASS_HANDLE, (unsigned)CHECK_SPILL_ALL, nullptr DEBUGARG("Clone Vector for Vector128.WithElement")); tmpOp = gtNewSimdHWIntrinsicNode(TYP_SIMD16, tmpOp, vectorOp, gtNewIconNode(0), - NI_SSE_Shuffle, TYP_FLOAT, 16); + NI_SSE_Shuffle, CORINFO_TYPE_FLOAT, 16); retNode = gtNewSimdHWIntrinsicNode(TYP_SIMD16, tmpOp, dupVectorOp, gtNewIconNode(226), - NI_SSE_Shuffle, TYP_FLOAT, 16); + NI_SSE_Shuffle, CORINFO_TYPE_FLOAT, 16); } else { @@ -1118,23 +1124,24 @@ GenTree* Compiler::impBaseIntrinsic(NamedIntrinsic intrinsic, // => // shufps xmm1, xmm0, 32 (xmm0 = vector, xmm1 = value) // shufps xmm0, xmm1, 36 - GenTree* tmpOp = gtNewSimdHWIntrinsicNode(TYP_SIMD16, valueOp, - NI_Vector128_CreateScalarUnsafe, TYP_FLOAT, 16); + GenTree* tmpOp = + gtNewSimdHWIntrinsicNode(TYP_SIMD16, valueOp, NI_Vector128_CreateScalarUnsafe, + CORINFO_TYPE_FLOAT, 16); GenTree* dupVectorOp = nullptr; vectorOp = impCloneExpr(vectorOp, &dupVectorOp, NO_CLASS_HANDLE, (unsigned)CHECK_SPILL_ALL, nullptr DEBUGARG("Clone Vector for Vector128.WithElement")); valueOp = gtNewSimdHWIntrinsicNode(TYP_SIMD16, vectorOp, tmpOp, gtNewIconNode(controlBits1), - NI_SSE_Shuffle, TYP_FLOAT, 16); + NI_SSE_Shuffle, CORINFO_TYPE_FLOAT, 16); retNode = gtNewSimdHWIntrinsicNode(TYP_SIMD16, valueOp, dupVectorOp, gtNewIconNode(controlBits2), - NI_SSE_Shuffle, TYP_FLOAT, 16); + NI_SSE_Shuffle, CORINFO_TYPE_FLOAT, 16); } break; } else { valueOp = gtNewSimdHWIntrinsicNode(TYP_SIMD16, valueOp, NI_Vector128_CreateScalarUnsafe, - TYP_FLOAT, 16); + CORINFO_TYPE_FLOAT, 16); immNode->AsIntCon()->SetIconValue(imm8 * 16); FALLTHROUGH; } @@ -1144,14 +1151,14 @@ GenTree* Compiler::impBaseIntrinsic(NamedIntrinsic intrinsic, case TYP_UBYTE: case TYP_INT: case TYP_UINT: - retNode = - gtNewSimdHWIntrinsicNode(TYP_SIMD16, vectorOp, valueOp, immNode, NI_SSE41_Insert, baseType, 16); + retNode = gtNewSimdHWIntrinsicNode(TYP_SIMD16, vectorOp, valueOp, immNode, NI_SSE41_Insert, + simdBaseJitType, 16); break; case TYP_SHORT: case TYP_USHORT: - retNode = - gtNewSimdHWIntrinsicNode(TYP_SIMD16, vectorOp, valueOp, immNode, NI_SSE2_Insert, baseType, 16); + retNode = gtNewSimdHWIntrinsicNode(TYP_SIMD16, vectorOp, valueOp, immNode, NI_SSE2_Insert, + simdBaseJitType, 16); break; case TYP_DOUBLE: @@ -1163,10 +1170,10 @@ GenTree* Compiler::impBaseIntrinsic(NamedIntrinsic intrinsic, // vector.WithElement(1, value) // => // unpcklpd xmm0, xmm1 (xmm0 = vector, xmm1 = value) - valueOp = - gtNewSimdHWIntrinsicNode(TYP_SIMD16, valueOp, NI_Vector128_CreateScalarUnsafe, TYP_DOUBLE, 16); + valueOp = gtNewSimdHWIntrinsicNode(TYP_SIMD16, valueOp, NI_Vector128_CreateScalarUnsafe, + CORINFO_TYPE_DOUBLE, 16); NamedIntrinsic in = (imm8 == 0) ? NI_SSE2_MoveScalar : NI_SSE2_UnpackLow; - retNode = gtNewSimdHWIntrinsicNode(TYP_SIMD16, vectorOp, valueOp, in, TYP_DOUBLE, 16); + retNode = gtNewSimdHWIntrinsicNode(TYP_SIMD16, vectorOp, valueOp, in, CORINFO_TYPE_DOUBLE, 16); break; } @@ -1179,7 +1186,7 @@ GenTree* Compiler::impBaseIntrinsic(NamedIntrinsic intrinsic, assert(clonedVectorOp); int upperOrLower = (cachedImm8 >= count / 2) ? 1 : 0; retNode = gtNewSimdHWIntrinsicNode(retType, clonedVectorOp, retNode, gtNewIconNode(upperOrLower), - NI_AVX_InsertVector128, baseType, simdSize); + NI_AVX_InsertVector128, simdBaseJitType, simdSize); } break; @@ -1199,18 +1206,19 @@ GenTree* Compiler::impBaseIntrinsic(NamedIntrinsic intrinsic, { assert(sig->numArgs == 2); GenTree* indexOp = impStackTop().val; - if (!compExactlyDependsOn(InstructionSet_SSE2) || !varTypeIsArithmetic(baseType) || !indexOp->OperIsConst()) + if (!compExactlyDependsOn(InstructionSet_SSE2) || !varTypeIsArithmetic(simdBaseType) || + !indexOp->OperIsConst()) { // Using software fallback if // 1. JIT/hardware don't support SSE2 instructions - // 2. baseType is not a numeric type (throw execptions) + // 2. simdBaseType is not a numeric type (throw execptions) // 3. index is not a constant return nullptr; } - switch (baseType) + switch (simdBaseType) { - // Using software fallback if baseType is not supported by hardware + // Using software fallback if simdBaseType is not supported by hardware case TYP_BYTE: case TYP_UBYTE: case TYP_INT: @@ -1241,7 +1249,7 @@ GenTree* Compiler::impBaseIntrinsic(NamedIntrinsic intrinsic, } ssize_t imm8 = indexOp->AsIntCon()->IconValue(); - ssize_t count = simdSize / genTypeSize(baseType); + ssize_t count = simdSize / genTypeSize(simdBaseType); if (imm8 >= count || imm8 < 0) { @@ -1261,18 +1269,18 @@ GenTree* Compiler::impBaseIntrinsic(NamedIntrinsic intrinsic, { imm8 -= count / 2; vectorOp = gtNewSimdHWIntrinsicNode(TYP_SIMD16, vectorOp, gtNewIconNode(1), NI_AVX_ExtractVector128, - baseType, simdSize); + simdBaseJitType, simdSize); } else { - vectorOp = - gtNewSimdHWIntrinsicNode(TYP_SIMD16, vectorOp, NI_Vector256_GetLower, baseType, simdSize); + vectorOp = gtNewSimdHWIntrinsicNode(TYP_SIMD16, vectorOp, NI_Vector256_GetLower, simdBaseJitType, + simdSize); } } - if (imm8 == 0 && (genTypeSize(baseType) >= 4)) + if (imm8 == 0 && (genTypeSize(simdBaseType) >= 4)) { - switch (baseType) + switch (simdBaseType) { case TYP_LONG: resIntrinsic = NI_SSE2_X64_ConvertToInt64; @@ -1299,16 +1307,17 @@ GenTree* Compiler::impBaseIntrinsic(NamedIntrinsic intrinsic, return nullptr; } - return gtNewSimdHWIntrinsicNode(retType, vectorOp, resIntrinsic, baseType, 16); + return gtNewSimdHWIntrinsicNode(retType, vectorOp, resIntrinsic, simdBaseJitType, 16); } GenTree* immNode = gtNewIconNode(imm8); - switch (baseType) + switch (simdBaseType) { case TYP_LONG: case TYP_ULONG: - retNode = gtNewSimdHWIntrinsicNode(retType, vectorOp, immNode, NI_SSE41_X64_Extract, baseType, 16); + retNode = + gtNewSimdHWIntrinsicNode(retType, vectorOp, immNode, NI_SSE41_X64_Extract, simdBaseJitType, 16); break; case TYP_FLOAT: @@ -1327,8 +1336,9 @@ GenTree* Compiler::impBaseIntrinsic(NamedIntrinsic intrinsic, vectorOp = impCloneExpr(vectorOp, &clonedVectorOp, NO_CLASS_HANDLE, (unsigned)CHECK_SPILL_ALL, nullptr DEBUGARG("Clone Vector for Vector128.GetElement")); vectorOp = gtNewSimdHWIntrinsicNode(TYP_SIMD16, vectorOp, clonedVectorOp, immNode, - NI_SSE_Shuffle, TYP_FLOAT, 16); - return gtNewSimdHWIntrinsicNode(retType, vectorOp, NI_Vector128_ToScalar, TYP_FLOAT, 16); + NI_SSE_Shuffle, CORINFO_TYPE_FLOAT, 16); + return gtNewSimdHWIntrinsicNode(retType, vectorOp, NI_Vector128_ToScalar, CORINFO_TYPE_FLOAT, + 16); } FALLTHROUGH; } @@ -1336,20 +1346,23 @@ GenTree* Compiler::impBaseIntrinsic(NamedIntrinsic intrinsic, case TYP_UBYTE: case TYP_INT: case TYP_UINT: - retNode = gtNewSimdHWIntrinsicNode(retType, vectorOp, immNode, NI_SSE41_Extract, baseType, 16); + retNode = + gtNewSimdHWIntrinsicNode(retType, vectorOp, immNode, NI_SSE41_Extract, simdBaseJitType, 16); break; case TYP_BYTE: // We do not have SSE41/SSE2 Extract APIs on signed small int, so need a CAST on the result - retNode = gtNewSimdHWIntrinsicNode(TYP_UBYTE, vectorOp, immNode, NI_SSE41_Extract, TYP_UBYTE, 16); + retNode = gtNewSimdHWIntrinsicNode(TYP_UBYTE, vectorOp, immNode, NI_SSE41_Extract, + CORINFO_TYPE_UBYTE, 16); retNode = gtNewCastNode(TYP_INT, retNode, true, TYP_BYTE); break; case TYP_SHORT: case TYP_USHORT: // We do not have SSE41/SSE2 Extract APIs on signed small int, so need a CAST on the result - retNode = gtNewSimdHWIntrinsicNode(TYP_USHORT, vectorOp, immNode, NI_SSE2_Extract, TYP_USHORT, 16); - if (baseType == TYP_SHORT) + retNode = gtNewSimdHWIntrinsicNode(TYP_USHORT, vectorOp, immNode, NI_SSE2_Extract, + CORINFO_TYPE_USHORT, 16); + if (simdBaseType == TYP_SHORT) { retNode = gtNewCastNode(TYP_INT, retNode, true, TYP_SHORT); } @@ -1361,8 +1374,9 @@ GenTree* Compiler::impBaseIntrinsic(NamedIntrinsic intrinsic, // => // pshufd xmm1, xmm0, 0xEE (xmm0 = vector) vectorOp = gtNewSimdHWIntrinsicNode(TYP_SIMD16, vectorOp, gtNewIconNode(0xEE), NI_SSE2_Shuffle, - TYP_INT, 16); - retNode = gtNewSimdHWIntrinsicNode(TYP_DOUBLE, vectorOp, NI_Vector128_ToScalar, TYP_DOUBLE, 16); + CORINFO_TYPE_INT, 16); + retNode = + gtNewSimdHWIntrinsicNode(TYP_DOUBLE, vectorOp, NI_Vector128_ToScalar, CORINFO_TYPE_DOUBLE, 16); break; default: @@ -1383,11 +1397,11 @@ GenTree* Compiler::impBaseIntrinsic(NamedIntrinsic intrinsic, GenTree* Compiler::impSSEIntrinsic(NamedIntrinsic intrinsic, CORINFO_METHOD_HANDLE method, CORINFO_SIG_INFO* sig) { - GenTree* retNode = nullptr; - GenTree* op1 = nullptr; - GenTree* op2 = nullptr; - int simdSize = HWIntrinsicInfo::lookupSimdSize(this, intrinsic, sig); - var_types baseType = TYP_UNKNOWN; + GenTree* retNode = nullptr; + GenTree* op1 = nullptr; + GenTree* op2 = nullptr; + int simdSize = HWIntrinsicInfo::lookupSimdSize(this, intrinsic, sig); + CorInfoType simdBaseJitType = CORINFO_TYPE_UNDEF; // The Prefetch and StoreFence intrinsics don't take any SIMD operands // and have a simdSize of 0 @@ -1401,10 +1415,10 @@ GenTree* Compiler::impSSEIntrinsic(NamedIntrinsic intrinsic, CORINFO_METHOD_HAND case NI_SSE_CompareScalarNotGreaterThanOrEqual: { assert(sig->numArgs == 2); - op2 = impSIMDPopStack(TYP_SIMD16); - op1 = impSIMDPopStack(TYP_SIMD16); - baseType = getBaseTypeOfSIMDType(sig->retTypeSigClass); - assert(baseType == TYP_FLOAT); + op2 = impSIMDPopStack(TYP_SIMD16); + op1 = impSIMDPopStack(TYP_SIMD16); + simdBaseJitType = getBaseJitTypeOfSIMDType(sig->retTypeSigClass); + assert(JitType2PreciseVarType(simdBaseJitType) == TYP_FLOAT); if (compOpportunisticallyDependsOn(InstructionSet_AVX)) { @@ -1414,7 +1428,7 @@ GenTree* Compiler::impSSEIntrinsic(NamedIntrinsic intrinsic, CORINFO_METHOD_HAND FloatComparisonMode comparison = static_cast(HWIntrinsicInfo::lookupIval(intrinsic, true)); retNode = gtNewSimdHWIntrinsicNode(TYP_SIMD16, op1, op2, gtNewIconNode(static_cast(comparison)), - NI_AVX_CompareScalar, baseType, simdSize); + NI_AVX_CompareScalar, simdBaseJitType, simdSize); } else { @@ -1422,9 +1436,9 @@ GenTree* Compiler::impSSEIntrinsic(NamedIntrinsic intrinsic, CORINFO_METHOD_HAND op1 = impCloneExpr(op1, &clonedOp1, NO_CLASS_HANDLE, (unsigned)CHECK_SPILL_ALL, nullptr DEBUGARG("Clone op1 for Sse.CompareScalarGreaterThan")); - retNode = gtNewSimdHWIntrinsicNode(TYP_SIMD16, op2, op1, intrinsic, baseType, simdSize); - retNode = - gtNewSimdHWIntrinsicNode(TYP_SIMD16, clonedOp1, retNode, NI_SSE_MoveScalar, baseType, simdSize); + retNode = gtNewSimdHWIntrinsicNode(TYP_SIMD16, op2, op1, intrinsic, simdBaseJitType, simdSize); + retNode = gtNewSimdHWIntrinsicNode(TYP_SIMD16, clonedOp1, retNode, NI_SSE_MoveScalar, simdBaseJitType, + simdSize); } break; } @@ -1437,14 +1451,14 @@ GenTree* Compiler::impSSEIntrinsic(NamedIntrinsic intrinsic, CORINFO_METHOD_HAND assert(sig->numArgs == 1); assert(JITtype2varType(sig->retType) == TYP_VOID); op1 = impPopStack().val; - retNode = gtNewSimdHWIntrinsicNode(TYP_VOID, op1, intrinsic, TYP_UBYTE, 0); + retNode = gtNewSimdHWIntrinsicNode(TYP_VOID, op1, intrinsic, CORINFO_TYPE_UBYTE, 0); break; } case NI_SSE_StoreFence: assert(sig->numArgs == 0); assert(JITtype2varType(sig->retType) == TYP_VOID); - retNode = gtNewSimdHWIntrinsicNode(TYP_VOID, intrinsic, TYP_VOID, 0); + retNode = gtNewSimdHWIntrinsicNode(TYP_VOID, intrinsic, CORINFO_TYPE_VOID, 0); break; default: @@ -1456,11 +1470,11 @@ GenTree* Compiler::impSSEIntrinsic(NamedIntrinsic intrinsic, CORINFO_METHOD_HAND GenTree* Compiler::impSSE2Intrinsic(NamedIntrinsic intrinsic, CORINFO_METHOD_HANDLE method, CORINFO_SIG_INFO* sig) { - GenTree* retNode = nullptr; - GenTree* op1 = nullptr; - GenTree* op2 = nullptr; - int simdSize = HWIntrinsicInfo::lookupSimdSize(this, intrinsic, sig); - var_types baseType = getBaseTypeOfSIMDType(sig->retTypeSigClass); + GenTree* retNode = nullptr; + GenTree* op1 = nullptr; + GenTree* op2 = nullptr; + int simdSize = HWIntrinsicInfo::lookupSimdSize(this, intrinsic, sig); + CorInfoType simdBaseJitType = getBaseJitTypeOfSIMDType(sig->retTypeSigClass); // The fencing intrinsics don't take any operands and simdSize is 0 assert((simdSize == 16) || (simdSize == 0)); @@ -1475,7 +1489,7 @@ GenTree* Compiler::impSSE2Intrinsic(NamedIntrinsic intrinsic, CORINFO_METHOD_HAN assert(sig->numArgs == 2); op2 = impSIMDPopStack(TYP_SIMD16); op1 = impSIMDPopStack(TYP_SIMD16); - assert(baseType == TYP_DOUBLE); + assert(JitType2PreciseVarType(simdBaseJitType) == TYP_DOUBLE); if (compOpportunisticallyDependsOn(InstructionSet_AVX)) { @@ -1485,7 +1499,7 @@ GenTree* Compiler::impSSE2Intrinsic(NamedIntrinsic intrinsic, CORINFO_METHOD_HAN FloatComparisonMode comparison = static_cast(HWIntrinsicInfo::lookupIval(intrinsic, true)); retNode = gtNewSimdHWIntrinsicNode(TYP_SIMD16, op1, op2, gtNewIconNode(static_cast(comparison)), - NI_AVX_CompareScalar, baseType, simdSize); + NI_AVX_CompareScalar, simdBaseJitType, simdSize); } else { @@ -1493,9 +1507,9 @@ GenTree* Compiler::impSSE2Intrinsic(NamedIntrinsic intrinsic, CORINFO_METHOD_HAN op1 = impCloneExpr(op1, &clonedOp1, NO_CLASS_HANDLE, (unsigned)CHECK_SPILL_ALL, nullptr DEBUGARG("Clone op1 for Sse2.CompareScalarGreaterThan")); - retNode = gtNewSimdHWIntrinsicNode(TYP_SIMD16, op2, op1, intrinsic, baseType, simdSize); - retNode = - gtNewSimdHWIntrinsicNode(TYP_SIMD16, clonedOp1, retNode, NI_SSE2_MoveScalar, baseType, simdSize); + retNode = gtNewSimdHWIntrinsicNode(TYP_SIMD16, op2, op1, intrinsic, simdBaseJitType, simdSize); + retNode = gtNewSimdHWIntrinsicNode(TYP_SIMD16, clonedOp1, retNode, NI_SSE2_MoveScalar, simdBaseJitType, + simdSize); } break; } @@ -1507,7 +1521,7 @@ GenTree* Compiler::impSSE2Intrinsic(NamedIntrinsic intrinsic, CORINFO_METHOD_HAN assert(JITtype2varType(sig->retType) == TYP_VOID); assert(simdSize == 0); - retNode = gtNewSimdHWIntrinsicNode(TYP_VOID, intrinsic, TYP_VOID, simdSize); + retNode = gtNewSimdHWIntrinsicNode(TYP_VOID, intrinsic, CORINFO_TYPE_VOID, simdSize); break; } @@ -1515,9 +1529,14 @@ GenTree* Compiler::impSSE2Intrinsic(NamedIntrinsic intrinsic, CORINFO_METHOD_HAN { assert(sig->numArgs == 2); assert(JITtype2varType(sig->retType) == TYP_VOID); + + CORINFO_ARG_LIST_HANDLE argList = info.compCompHnd->getArgNext(sig->args); + CORINFO_CLASS_HANDLE argClass; + CorInfoType argJitType = strip(info.compCompHnd->getArgType(sig, argList, &argClass)); + op2 = impPopStack().val; op1 = impPopStack().val; - retNode = gtNewSimdHWIntrinsicNode(TYP_VOID, op1, op2, NI_SSE2_StoreNonTemporal, op2->TypeGet(), 0); + retNode = gtNewSimdHWIntrinsicNode(TYP_VOID, op1, op2, NI_SSE2_StoreNonTemporal, argJitType, 0); break; } @@ -1530,22 +1549,22 @@ GenTree* Compiler::impSSE2Intrinsic(NamedIntrinsic intrinsic, CORINFO_METHOD_HAN GenTree* Compiler::impAvxOrAvx2Intrinsic(NamedIntrinsic intrinsic, CORINFO_METHOD_HANDLE method, CORINFO_SIG_INFO* sig) { - GenTree* retNode = nullptr; - GenTree* op1 = nullptr; - GenTree* op2 = nullptr; - var_types baseType = TYP_UNKNOWN; - int simdSize = HWIntrinsicInfo::lookupSimdSize(this, intrinsic, sig); + GenTree* retNode = nullptr; + GenTree* op1 = nullptr; + GenTree* op2 = nullptr; + CorInfoType simdBaseJitType = CORINFO_TYPE_UNDEF; + int simdSize = HWIntrinsicInfo::lookupSimdSize(this, intrinsic, sig); switch (intrinsic) { case NI_AVX2_PermuteVar8x32: { - baseType = getBaseTypeOfSIMDType(sig->retTypeSigClass); + simdBaseJitType = getBaseJitTypeOfSIMDType(sig->retTypeSigClass); // swap the two operands GenTree* indexVector = impSIMDPopStack(TYP_SIMD32); GenTree* sourceVector = impSIMDPopStack(TYP_SIMD32); - retNode = - gtNewSimdHWIntrinsicNode(TYP_SIMD32, indexVector, sourceVector, NI_AVX2_PermuteVar8x32, baseType, 32); + retNode = gtNewSimdHWIntrinsicNode(TYP_SIMD32, indexVector, sourceVector, NI_AVX2_PermuteVar8x32, + simdBaseJitType, 32); break; } @@ -1556,7 +1575,7 @@ GenTree* Compiler::impAvxOrAvx2Intrinsic(NamedIntrinsic intrinsic, CORINFO_METHO CORINFO_CLASS_HANDLE argClass; var_types argType = TYP_UNKNOWN; unsigned int sizeBytes; - baseType = getBaseTypeAndSizeOfSIMDType(sig->retTypeSigClass, &sizeBytes); + simdBaseJitType = getBaseJitTypeAndSizeOfSIMDType(sig->retTypeSigClass, &sizeBytes); var_types retType = getSIMDTypeForSize(sizeBytes); assert(sig->numArgs == 5); @@ -1573,9 +1592,9 @@ GenTree* Compiler::impAvxOrAvx2Intrinsic(NamedIntrinsic intrinsic, CORINFO_METHO GenTree* op4 = getArgForHWIntrinsic(argType, argClass); SetOpLclRelatedToSIMDIntrinsic(op4); - argType = JITtype2varType(strip(info.compCompHnd->getArgType(sig, arg3, &argClass))); - var_types indexbaseType = getBaseTypeOfSIMDType(argClass); - GenTree* op3 = getArgForHWIntrinsic(argType, argClass); + argType = JITtype2varType(strip(info.compCompHnd->getArgType(sig, arg3, &argClass))); + CorInfoType indexBaseJitType = getBaseJitTypeOfSIMDType(argClass); + GenTree* op3 = getArgForHWIntrinsic(argType, argClass); SetOpLclRelatedToSIMDIntrinsic(op3); argType = JITtype2varType(strip(info.compCompHnd->getArgType(sig, arg2, &argClass))); @@ -1587,8 +1606,9 @@ GenTree* Compiler::impAvxOrAvx2Intrinsic(NamedIntrinsic intrinsic, CORINFO_METHO SetOpLclRelatedToSIMDIntrinsic(op1); GenTree* opList = new (this, GT_LIST) GenTreeArgList(op1, gtNewArgList(op2, op3, op4, op5)); - retNode = new (this, GT_HWINTRINSIC) GenTreeHWIntrinsic(retType, opList, intrinsic, baseType, simdSize); - retNode->AsHWIntrinsic()->SetAuxiliaryType(indexbaseType); + retNode = + new (this, GT_HWINTRINSIC) GenTreeHWIntrinsic(retType, opList, intrinsic, simdBaseJitType, simdSize); + retNode->AsHWIntrinsic()->SetAuxiliaryJitType(indexBaseJitType); break; } diff --git a/src/coreclr/jit/importer.cpp b/src/coreclr/jit/importer.cpp index 139d204638b9fb..6372e065fbeeaf 100644 --- a/src/coreclr/jit/importer.cpp +++ b/src/coreclr/jit/importer.cpp @@ -1703,9 +1703,9 @@ GenTree* Compiler::impGetStructAddr(GenTree* structVal, // impNormStructType: Normalize the type of a (known to be) struct class handle. // // Arguments: -// structHnd - The class handle for the struct type of interest. -// pSimdBaseType - (optional, default nullptr) - if non-null, and the struct is a SIMD -// type, set to the SIMD base type +// structHnd - The class handle for the struct type of interest. +// pSimdBaseJitType - (optional, default nullptr) - if non-null, and the struct is a SIMD +// type, set to the SIMD base JIT type // // Return Value: // The JIT type for the struct (e.g. TYP_STRUCT, or TYP_SIMD*). @@ -1717,7 +1717,7 @@ GenTree* Compiler::impGetStructAddr(GenTree* structVal, // for full enregistration, e.g. TYP_SIMD16. If the size of the struct is already known // call structSizeMightRepresentSIMDType to determine if this api needs to be called. -var_types Compiler::impNormStructType(CORINFO_CLASS_HANDLE structHnd, var_types* pSimdBaseType) +var_types Compiler::impNormStructType(CORINFO_CLASS_HANDLE structHnd, CorInfoType* pSimdBaseJitType) { assert(structHnd != NO_CLASS_HANDLE); @@ -1736,14 +1736,14 @@ var_types Compiler::impNormStructType(CORINFO_CLASS_HANDLE structHnd, var_types* if (structSizeMightRepresentSIMDType(originalSize)) { unsigned int sizeBytes; - var_types simdBaseType = getBaseTypeAndSizeOfSIMDType(structHnd, &sizeBytes); - if (simdBaseType != TYP_UNKNOWN) + CorInfoType simdBaseJitType = getBaseJitTypeAndSizeOfSIMDType(structHnd, &sizeBytes); + if (simdBaseJitType != CORINFO_TYPE_UNDEF) { assert(sizeBytes == originalSize); structType = getSIMDTypeForSize(sizeBytes); - if (pSimdBaseType != nullptr) + if (pSimdBaseJitType != nullptr) { - *pSimdBaseType = simdBaseType; + *pSimdBaseJitType = simdBaseJitType; } // Also indicate that we use floating point registers. compFloatingPointUsed = true; @@ -3776,7 +3776,8 @@ GenTree* Compiler::impIntrinsic(GenTree* newobjThis, return retNode; } - var_types callType = JITtype2varType(sig->retType); + CorInfoType callJitType = sig->retType; + var_types callType = JITtype2varType(callJitType); /* First do the intrinsics which are always smaller than a call */ @@ -4364,15 +4365,15 @@ GenTree* Compiler::impIntrinsic(GenTree* newobjThis, // ).ToScalar(); GenTree* op3 = gtNewSimdHWIntrinsicNode(TYP_SIMD16, impPopStack().val, - NI_Vector128_CreateScalarUnsafe, callType, 16); + NI_Vector128_CreateScalarUnsafe, callJitType, 16); GenTree* op2 = gtNewSimdHWIntrinsicNode(TYP_SIMD16, impPopStack().val, - NI_Vector128_CreateScalarUnsafe, callType, 16); + NI_Vector128_CreateScalarUnsafe, callJitType, 16); GenTree* op1 = gtNewSimdHWIntrinsicNode(TYP_SIMD16, impPopStack().val, - NI_Vector128_CreateScalarUnsafe, callType, 16); + NI_Vector128_CreateScalarUnsafe, callJitType, 16); GenTree* res = - gtNewSimdHWIntrinsicNode(TYP_SIMD16, op1, op2, op3, NI_FMA_MultiplyAddScalar, callType, 16); + gtNewSimdHWIntrinsicNode(TYP_SIMD16, op1, op2, op3, NI_FMA_MultiplyAddScalar, callJitType, 16); - retNode = gtNewSimdHWIntrinsicNode(callType, res, NI_Vector128_ToScalar, callType, 16); + retNode = gtNewSimdHWIntrinsicNode(callType, res, NI_Vector128_ToScalar, callJitType, 16); break; } #elif defined(TARGET_ARM64) @@ -4393,18 +4394,18 @@ GenTree* Compiler::impIntrinsic(GenTree* newobjThis, constexpr unsigned int simdSize = 8; GenTree* op3 = - gtNewSimdHWIntrinsicNode(TYP_SIMD8, impPopStack().val, createVector64, callType, simdSize); + gtNewSimdHWIntrinsicNode(TYP_SIMD8, impPopStack().val, createVector64, callJitType, simdSize); GenTree* op2 = - gtNewSimdHWIntrinsicNode(TYP_SIMD8, impPopStack().val, createVector64, callType, simdSize); + gtNewSimdHWIntrinsicNode(TYP_SIMD8, impPopStack().val, createVector64, callJitType, simdSize); GenTree* op1 = - gtNewSimdHWIntrinsicNode(TYP_SIMD8, impPopStack().val, createVector64, callType, simdSize); + gtNewSimdHWIntrinsicNode(TYP_SIMD8, impPopStack().val, createVector64, callJitType, simdSize); // Note that AdvSimd.FusedMultiplyAddScalar(op1,op2,op3) corresponds to op1 + op2 * op3 // while Math{F}.FusedMultiplyAddScalar(op1,op2,op3) corresponds to op1 * op2 + op3 retNode = gtNewSimdHWIntrinsicNode(TYP_SIMD8, op3, op2, op1, NI_AdvSimd_FusedMultiplyAddScalar, - callType, simdSize); + callJitType, simdSize); - retNode = gtNewSimdHWIntrinsicNode(callType, retNode, NI_Vector64_ToScalar, callType, simdSize); + retNode = gtNewSimdHWIntrinsicNode(callType, retNode, NI_Vector64_ToScalar, callJitType, simdSize); break; } #endif diff --git a/src/coreclr/jit/lclvars.cpp b/src/coreclr/jit/lclvars.cpp index 5ed85c89eeaa18..edb7a4b04d136d 100644 --- a/src/coreclr/jit/lclvars.cpp +++ b/src/coreclr/jit/lclvars.cpp @@ -467,13 +467,13 @@ void Compiler::lvaInitThisPtr(InitVarDscInfo* varDscInfo) #ifdef FEATURE_SIMD if (supportSIMDTypes()) { - var_types simdBaseType = TYP_UNKNOWN; - var_types type = impNormStructType(info.compClassHnd, &simdBaseType); - if (simdBaseType != TYP_UNKNOWN) + CorInfoType simdBaseJitType = CORINFO_TYPE_UNDEF; + var_types type = impNormStructType(info.compClassHnd, &simdBaseJitType); + if (simdBaseJitType != CORINFO_TYPE_UNDEF) { assert(varTypeIsSIMD(type)); - varDsc->lvSIMDType = true; - varDsc->lvBaseType = simdBaseType; + varDsc->lvSIMDType = true; + varDsc->SetSimdBaseJitType(simdBaseJitType); varDsc->lvExactSize = genTypeSize(type); } } @@ -578,9 +578,12 @@ void Compiler::lvaInitRetBuffArg(InitVarDscInfo* varDscInfo, bool useFixedRetBuf else if (supportSIMDTypes() && varTypeIsSIMD(info.compRetType)) { varDsc->lvSIMDType = true; - varDsc->lvBaseType = - getBaseTypeAndSizeOfSIMDType(info.compMethodInfo->args.retTypeClass, &varDsc->lvExactSize); - assert(varDsc->lvBaseType != TYP_UNKNOWN); + + CorInfoType simdBaseJitType = + getBaseJitTypeAndSizeOfSIMDType(info.compMethodInfo->args.retTypeClass, &varDsc->lvExactSize); + varDsc->SetSimdBaseJitType(simdBaseJitType); + + assert(varDsc->GetSimdBaseType() != TYP_UNKNOWN); } #endif // FEATURE_SIMD @@ -2171,10 +2174,10 @@ Compiler::lvaStructFieldInfo Compiler::StructPromotionHelper::GetFieldInfo(CORIN // we have encountered any SIMD intrinsics. if (compiler->usesSIMDTypes() && (fieldInfo.fldSize == 0) && compiler->isSIMDorHWSIMDClass(fieldInfo.fldTypeHnd)) { - unsigned simdSize; - var_types simdBaseType = compiler->getBaseTypeAndSizeOfSIMDType(fieldInfo.fldTypeHnd, &simdSize); + unsigned simdSize; + CorInfoType simdBaseJitType = compiler->getBaseJitTypeAndSizeOfSIMDType(fieldInfo.fldTypeHnd, &simdSize); // We will only promote fields of SIMD types that fit into a SIMD register. - if (simdBaseType != TYP_UNKNOWN) + if (simdBaseJitType != CORINFO_TYPE_UNDEF) { if ((simdSize >= compiler->minSIMDStructBytes()) && (simdSize <= compiler->maxSIMDStructBytes())) { @@ -2789,8 +2792,8 @@ void Compiler::lvaSetStruct(unsigned varNum, CORINFO_CLASS_HANDLE typeHnd, bool if (layout->IsValueClass()) { - var_types simdBaseType = TYP_UNKNOWN; - varDsc->lvType = impNormStructType(typeHnd, &simdBaseType); + CorInfoType simdBaseJitType = CORINFO_TYPE_UNDEF; + varDsc->lvType = impNormStructType(typeHnd, &simdBaseJitType); #if defined(TARGET_AMD64) || defined(TARGET_ARM64) // Mark implicit byref struct parameters @@ -2808,11 +2811,11 @@ void Compiler::lvaSetStruct(unsigned varNum, CORINFO_CLASS_HANDLE typeHnd, bool #endif // defined(TARGET_AMD64) || defined(TARGET_ARM64) #if FEATURE_SIMD - if (simdBaseType != TYP_UNKNOWN) + if (simdBaseJitType != CORINFO_TYPE_UNDEF) { assert(varTypeIsSIMD(varDsc)); varDsc->lvSIMDType = true; - varDsc->lvBaseType = simdBaseType; + varDsc->SetSimdBaseJitType(simdBaseJitType); } #endif // FEATURE_SIMD if (GlobalJitOptions::compFeatureHfa) @@ -2840,7 +2843,7 @@ void Compiler::lvaSetStruct(unsigned varNum, CORINFO_CLASS_HANDLE typeHnd, bool else { #if FEATURE_SIMD - assert(!varTypeIsSIMD(varDsc) || (varDsc->lvBaseType != TYP_UNKNOWN)); + assert(!varTypeIsSIMD(varDsc) || (varDsc->GetSimdBaseType() != TYP_UNKNOWN)); #endif // FEATURE_SIMD ClassLayout* layout = typGetObjLayout(typeHnd); assert(ClassLayout::AreCompatible(varDsc->GetLayout(), layout)); @@ -3697,6 +3700,19 @@ void LclVarDsc::lvaDisqualifyVar() } #endif // ASSERTION_PROP +#ifdef FEATURE_SIMD +var_types LclVarDsc::GetSimdBaseType() const +{ + CorInfoType simdBaseJitType = GetSimdBaseJitType(); + + if (simdBaseJitType == CORINFO_TYPE_UNDEF) + { + return TYP_UNKNOWN; + } + return JitType2PreciseVarType(simdBaseJitType); +} +#endif // FEATURE_SIMD + unsigned LclVarDsc::lvSize() const // Size needed for storage representation. Only used for structs or TYP_BLK. { // TODO-Review: Sometimes we get called on ARM with HFA struct variables that have been promoted, diff --git a/src/coreclr/jit/lower.cpp b/src/coreclr/jit/lower.cpp index 1c4aac1af08cac..63d7a7f6f6daf5 100644 --- a/src/coreclr/jit/lower.cpp +++ b/src/coreclr/jit/lower.cpp @@ -1319,13 +1319,13 @@ void Lowering::LowerArg(GenTreeCall* call, GenTree** ppArg) GenTreeJitIntrinsic* jitIntrinsic = reinterpret_cast(arg); // For HWIntrinsic, there are some intrinsics like ExtractVector128 which have - // a gtType of TYP_SIMD16 but a gtSIMDSize of 32, so we need to include that in + // a gtType of TYP_SIMD16 but a SimdSize of 32, so we need to include that in // the assert below. - assert((jitIntrinsic->gtSIMDSize == 12) || (jitIntrinsic->gtSIMDSize == 16) || - (jitIntrinsic->gtSIMDSize == 32)); + assert((jitIntrinsic->GetSimdSize() == 12) || (jitIntrinsic->GetSimdSize() == 16) || + (jitIntrinsic->GetSimdSize() == 32)); - if (jitIntrinsic->gtSIMDSize == 12) + if (jitIntrinsic->GetSimdSize() == 12) { type = TYP_SIMD12; } diff --git a/src/coreclr/jit/lowerarmarch.cpp b/src/coreclr/jit/lowerarmarch.cpp index 0a9c8eb7f86f55..a522f3f57b3f80 100644 --- a/src/coreclr/jit/lowerarmarch.cpp +++ b/src/coreclr/jit/lowerarmarch.cpp @@ -681,7 +681,7 @@ bool Lowering::IsValidConstForMovImm(GenTreeHWIntrinsic* node) GenTree* op1 = node->gtOp1; GenTree* castOp = nullptr; - if (varTypeIsIntegral(node->gtSIMDBaseType) && op1->OperIs(GT_CAST)) + if (varTypeIsIntegral(node->GetSimdBaseType()) && op1->OperIs(GT_CAST)) { // We will sometimes get a cast around a constant value (such as for // certain long constants) which would block the below containment. @@ -696,7 +696,7 @@ bool Lowering::IsValidConstForMovImm(GenTreeHWIntrinsic* node) { const ssize_t dataValue = op1->AsIntCon()->gtIconVal; - if (comp->GetEmitter()->emitIns_valid_imm_for_movi(dataValue, emitActualTypeSize(node->gtSIMDBaseType))) + if (comp->GetEmitter()->emitIns_valid_imm_for_movi(dataValue, emitActualTypeSize(node->GetSimdBaseType()))) { if (castOp != nullptr) { @@ -711,7 +711,7 @@ bool Lowering::IsValidConstForMovImm(GenTreeHWIntrinsic* node) } else if (op1->IsCnsFltOrDbl()) { - assert(varTypeIsFloating(node->gtSIMDBaseType)); + assert(varTypeIsFloating(node->GetSimdBaseType())); assert(castOp == nullptr); const double dataValue = op1->AsDblCon()->gtDconVal; @@ -730,16 +730,17 @@ bool Lowering::IsValidConstForMovImm(GenTreeHWIntrinsic* node) // void Lowering::LowerHWIntrinsicCmpOp(GenTreeHWIntrinsic* node, genTreeOps cmpOp) { - NamedIntrinsic intrinsicId = node->gtHWIntrinsicId; - var_types baseType = node->gtSIMDBaseType; - unsigned simdSize = node->gtSIMDSize; - var_types simdType = Compiler::getSIMDTypeForSize(simdSize); + NamedIntrinsic intrinsicId = node->gtHWIntrinsicId; + CorInfoType simdBaseJitType = node->GetSimdBaseJitType(); + var_types simdBaseType = node->GetSimdBaseType(); + unsigned simdSize = node->GetSimdSize(); + var_types simdType = Compiler::getSIMDTypeForSize(simdSize); assert((intrinsicId == NI_Vector64_op_Equality) || (intrinsicId == NI_Vector64_op_Inequality) || (intrinsicId == NI_Vector128_op_Equality) || (intrinsicId == NI_Vector128_op_Inequality)); assert(varTypeIsSIMD(simdType)); - assert(varTypeIsArithmetic(baseType)); + assert(varTypeIsArithmetic(simdBaseType)); assert(simdSize != 0); assert(node->gtType == TYP_BOOL); assert((cmpOp == GT_EQ) || (cmpOp == GT_NE)); @@ -754,7 +755,7 @@ void Lowering::LowerHWIntrinsicCmpOp(GenTreeHWIntrinsic* node, genTreeOps cmpOp) NamedIntrinsic cmpIntrinsic; - switch (baseType) + switch (simdBaseType) { case TYP_BYTE: case TYP_UBYTE: @@ -782,11 +783,11 @@ void Lowering::LowerHWIntrinsicCmpOp(GenTreeHWIntrinsic* node, genTreeOps cmpOp) } } - GenTree* cmp = comp->gtNewSimdHWIntrinsicNode(simdType, op1, op2, cmpIntrinsic, baseType, simdSize); + GenTree* cmp = comp->gtNewSimdHWIntrinsicNode(simdType, op1, op2, cmpIntrinsic, simdBaseJitType, simdSize); BlockRange().InsertBefore(node, cmp); LowerNode(cmp); - if ((baseType == TYP_FLOAT) && (simdSize == 12)) + if ((simdBaseType == TYP_FLOAT) && (simdSize == 12)) { // For TYP_SIMD12 we don't want the upper bits to participate in the comparison. So, we will insert all ones // into those bits of the result, "as if" the upper bits are equal. Then if all lower bits are equal, we get the @@ -798,22 +799,24 @@ void Lowering::LowerHWIntrinsicCmpOp(GenTreeHWIntrinsic* node, genTreeOps cmpOp) GenTree* insCns = comp->gtNewIconNode(-1, TYP_INT); BlockRange().InsertAfter(idxCns, insCns); - GenTree* tmp = - comp->gtNewSimdAsHWIntrinsicNode(simdType, cmp, idxCns, insCns, NI_AdvSimd_Insert, TYP_INT, simdSize); + GenTree* tmp = comp->gtNewSimdAsHWIntrinsicNode(simdType, cmp, idxCns, insCns, NI_AdvSimd_Insert, + CORINFO_TYPE_INT, simdSize); BlockRange().InsertAfter(insCns, tmp); LowerNode(tmp); cmp = tmp; } - GenTree* msk = comp->gtNewSimdHWIntrinsicNode(simdType, cmp, NI_AdvSimd_Arm64_MinAcross, TYP_UBYTE, simdSize); + GenTree* msk = + comp->gtNewSimdHWIntrinsicNode(simdType, cmp, NI_AdvSimd_Arm64_MinAcross, CORINFO_TYPE_UBYTE, simdSize); BlockRange().InsertAfter(cmp, msk); LowerNode(msk); GenTree* zroCns = comp->gtNewIconNode(0, TYP_INT); BlockRange().InsertAfter(msk, zroCns); - GenTree* val = comp->gtNewSimdAsHWIntrinsicNode(TYP_UBYTE, msk, zroCns, NI_AdvSimd_Extract, TYP_UBYTE, simdSize); + GenTree* val = + comp->gtNewSimdAsHWIntrinsicNode(TYP_UBYTE, msk, zroCns, NI_AdvSimd_Extract, CORINFO_TYPE_UBYTE, simdSize); BlockRange().InsertAfter(zroCns, val); LowerNode(val); @@ -847,11 +850,12 @@ void Lowering::LowerHWIntrinsicCmpOp(GenTreeHWIntrinsic* node, genTreeOps cmpOp) // void Lowering::LowerHWIntrinsicCreate(GenTreeHWIntrinsic* node) { - NamedIntrinsic intrinsicId = node->gtHWIntrinsicId; - var_types simdType = node->gtType; - var_types baseType = node->gtSIMDBaseType; - unsigned simdSize = node->gtSIMDSize; - VectorConstant vecCns = {}; + NamedIntrinsic intrinsicId = node->gtHWIntrinsicId; + var_types simdType = node->gtType; + CorInfoType simdBaseJitType = node->GetSimdBaseJitType(); + var_types simdBaseType = node->GetSimdBaseType(); + unsigned simdSize = node->GetSimdSize(); + VectorConstant vecCns = {}; if ((simdSize == 8) && (simdType == TYP_DOUBLE)) { @@ -861,7 +865,7 @@ void Lowering::LowerHWIntrinsicCreate(GenTreeHWIntrinsic* node) } assert(varTypeIsSIMD(simdType)); - assert(varTypeIsArithmetic(baseType)); + assert(varTypeIsArithmetic(simdBaseType)); assert(simdSize != 0); GenTreeArgList* argList = nullptr; @@ -886,7 +890,7 @@ void Lowering::LowerHWIntrinsicCreate(GenTreeHWIntrinsic* node) for (argList = op1->AsArgList(); argList != nullptr; argList = argList->Rest()) { - if (HandleArgForHWIntrinsicCreate(argList->Current(), argCnt, vecCns, baseType)) + if (HandleArgForHWIntrinsicCreate(argList->Current(), argCnt, vecCns, simdBaseType)) { cnsArgCnt += 1; } @@ -895,7 +899,7 @@ void Lowering::LowerHWIntrinsicCreate(GenTreeHWIntrinsic* node) } else { - if (HandleArgForHWIntrinsicCreate(op1, argCnt, vecCns, baseType)) + if (HandleArgForHWIntrinsicCreate(op1, argCnt, vecCns, simdBaseType)) { cnsArgCnt += 1; } @@ -903,7 +907,7 @@ void Lowering::LowerHWIntrinsicCreate(GenTreeHWIntrinsic* node) if (op2 != nullptr) { - if (HandleArgForHWIntrinsicCreate(op2, argCnt, vecCns, baseType)) + if (HandleArgForHWIntrinsicCreate(op2, argCnt, vecCns, simdBaseType)) { cnsArgCnt += 1; } @@ -915,19 +919,19 @@ void Lowering::LowerHWIntrinsicCreate(GenTreeHWIntrinsic* node) // so we'll just specially handle it here and copy it into the remaining // indices. - for (unsigned i = 1; i < simdSize / genTypeSize(baseType); i++) + for (unsigned i = 1; i < simdSize / genTypeSize(simdBaseType); i++) { - HandleArgForHWIntrinsicCreate(op1, i, vecCns, baseType); + HandleArgForHWIntrinsicCreate(op1, i, vecCns, simdBaseType); } } } - assert((argCnt == 1) || (argCnt == (simdSize / genTypeSize(baseType)))); + assert((argCnt == 1) || (argCnt == (simdSize / genTypeSize(simdBaseType)))); if ((argCnt == cnsArgCnt) && (argCnt == 1)) { GenTree* castOp = nullptr; - if (varTypeIsIntegral(baseType) && op1->OperIs(GT_CAST)) + if (varTypeIsIntegral(simdBaseType) && op1->OperIs(GT_CAST)) { // We will sometimes get a cast around a constant value (such as for // certain long constants) which would block the below containment. @@ -1023,7 +1027,7 @@ void Lowering::LowerHWIntrinsicCreate(GenTreeHWIntrinsic* node) // This is roughly the following managed code: // return AdvSimd.Arm64.DuplicateToVector(op1); - if (varTypeIsLong(baseType) || (baseType == TYP_DOUBLE)) + if (varTypeIsLong(simdBaseType) || (simdBaseType == TYP_DOUBLE)) { node->gtHWIntrinsicId = (simdType == TYP_SIMD8) ? NI_AdvSimd_Arm64_DuplicateToVector64 : NI_AdvSimd_Arm64_DuplicateToVector128; @@ -1061,7 +1065,7 @@ void Lowering::LowerHWIntrinsicCreate(GenTreeHWIntrinsic* node) NamedIntrinsic createScalarUnsafe = (simdType == TYP_SIMD8) ? NI_Vector64_CreateScalarUnsafe : NI_Vector128_CreateScalarUnsafe; - tmp1 = comp->gtNewSimdHWIntrinsicNode(simdType, op1, createScalarUnsafe, baseType, simdSize); + tmp1 = comp->gtNewSimdHWIntrinsicNode(simdType, op1, createScalarUnsafe, simdBaseJitType, simdSize); BlockRange().InsertAfter(op1, tmp1); LowerNode(tmp1); @@ -1089,7 +1093,7 @@ void Lowering::LowerHWIntrinsicCreate(GenTreeHWIntrinsic* node) idx = comp->gtNewIconNode(N, TYP_INT); BlockRange().InsertBefore(opN, idx); - tmp1 = comp->gtNewSimdHWIntrinsicNode(simdType, tmp1, idx, opN, NI_AdvSimd_Insert, baseType, simdSize); + tmp1 = comp->gtNewSimdHWIntrinsicNode(simdType, tmp1, idx, opN, NI_AdvSimd_Insert, simdBaseJitType, simdSize); BlockRange().InsertAfter(opN, tmp1); LowerNode(tmp1); @@ -1129,14 +1133,15 @@ void Lowering::LowerHWIntrinsicCreate(GenTreeHWIntrinsic* node) // void Lowering::LowerHWIntrinsicDot(GenTreeHWIntrinsic* node) { - NamedIntrinsic intrinsicId = node->gtHWIntrinsicId; - var_types baseType = node->gtSIMDBaseType; - unsigned simdSize = node->gtSIMDSize; - var_types simdType = Compiler::getSIMDTypeForSize(simdSize); + NamedIntrinsic intrinsicId = node->gtHWIntrinsicId; + CorInfoType simdBaseJitType = node->GetSimdBaseJitType(); + var_types simdBaseType = node->GetSimdBaseType(); + unsigned simdSize = node->GetSimdSize(); + var_types simdType = Compiler::getSIMDTypeForSize(simdSize); assert((intrinsicId == NI_Vector64_Dot) || (intrinsicId == NI_Vector128_Dot)); assert(varTypeIsSIMD(simdType)); - assert(varTypeIsArithmetic(baseType)); + assert(varTypeIsArithmetic(simdBaseType)); assert(simdSize != 0); GenTree* op1 = node->gtGetOp1(); @@ -1154,7 +1159,7 @@ void Lowering::LowerHWIntrinsicDot(GenTreeHWIntrinsic* node) if (simdSize == 12) { - assert(baseType == TYP_FLOAT); + assert(simdBaseType == TYP_FLOAT); // For 12 byte SIMD, we need to clear the upper 4 bytes: // idx = CNS_INT int 0x03 @@ -1176,7 +1181,7 @@ void Lowering::LowerHWIntrinsicDot(GenTreeHWIntrinsic* node) BlockRange().InsertAfter(idx, tmp1); LowerNode(tmp1); - op1 = comp->gtNewSimdAsHWIntrinsicNode(simdType, op1, idx, tmp1, NI_AdvSimd_Insert, baseType, simdSize); + op1 = comp->gtNewSimdAsHWIntrinsicNode(simdType, op1, idx, tmp1, NI_AdvSimd_Insert, simdBaseJitType, simdSize); BlockRange().InsertAfter(tmp1, op1); LowerNode(op1); } @@ -1193,14 +1198,14 @@ void Lowering::LowerHWIntrinsicDot(GenTreeHWIntrinsic* node) // var tmp1 = AdvSimd.Multiply(op1, op2); // ... - NamedIntrinsic multiply = (baseType == TYP_DOUBLE) ? NI_AdvSimd_Arm64_Multiply : NI_AdvSimd_Multiply; - assert(!varTypeIsLong(baseType)); + NamedIntrinsic multiply = (simdBaseType == TYP_DOUBLE) ? NI_AdvSimd_Arm64_Multiply : NI_AdvSimd_Multiply; + assert(!varTypeIsLong(simdBaseType)); - tmp1 = comp->gtNewSimdAsHWIntrinsicNode(simdType, op1, op2, multiply, baseType, simdSize); + tmp1 = comp->gtNewSimdAsHWIntrinsicNode(simdType, op1, op2, multiply, simdBaseJitType, simdSize); BlockRange().InsertBefore(node, tmp1); LowerNode(tmp1); - if (varTypeIsFloating(baseType)) + if (varTypeIsFloating(simdBaseType)) { // We will be constructing the following parts: // ... @@ -1225,7 +1230,7 @@ void Lowering::LowerHWIntrinsicDot(GenTreeHWIntrinsic* node) if (simdSize == 8) { - assert(baseType == TYP_FLOAT); + assert(simdBaseType == TYP_FLOAT); // We will be constructing the following parts: // ... @@ -1239,7 +1244,8 @@ void Lowering::LowerHWIntrinsicDot(GenTreeHWIntrinsic* node) // var tmp1 = AdvSimd.AddPairwise(tmp1, tmp2); // ... - tmp1 = comp->gtNewSimdAsHWIntrinsicNode(simdType, tmp1, tmp2, NI_AdvSimd_AddPairwise, baseType, simdSize); + tmp1 = comp->gtNewSimdAsHWIntrinsicNode(simdType, tmp1, tmp2, NI_AdvSimd_AddPairwise, simdBaseJitType, + simdSize); BlockRange().InsertAfter(tmp2, tmp1); LowerNode(tmp1); } @@ -1259,12 +1265,12 @@ void Lowering::LowerHWIntrinsicDot(GenTreeHWIntrinsic* node) // var tmp1 = AdvSimd.Arm64.AddPairwise(tmp1, tmp2); // ... - tmp1 = comp->gtNewSimdAsHWIntrinsicNode(simdType, tmp1, tmp2, NI_AdvSimd_Arm64_AddPairwise, baseType, + tmp1 = comp->gtNewSimdAsHWIntrinsicNode(simdType, tmp1, tmp2, NI_AdvSimd_Arm64_AddPairwise, simdBaseJitType, simdSize); BlockRange().InsertAfter(tmp2, tmp1); LowerNode(tmp1); - if (baseType == TYP_FLOAT) + if (simdBaseType == TYP_FLOAT) { // Float needs an additional pairwise add to finish summing the parts // The first will have summed e0 with e1 and e2 with e3 and then repeats that for the upper half @@ -1298,8 +1304,8 @@ void Lowering::LowerHWIntrinsicDot(GenTreeHWIntrinsic* node) tmp2 = comp->gtClone(tmp1); BlockRange().InsertAfter(tmp1, tmp2); - tmp1 = comp->gtNewSimdAsHWIntrinsicNode(simdType, tmp1, tmp2, NI_AdvSimd_Arm64_AddPairwise, baseType, - simdSize); + tmp1 = comp->gtNewSimdAsHWIntrinsicNode(simdType, tmp1, tmp2, NI_AdvSimd_Arm64_AddPairwise, + simdBaseJitType, simdSize); BlockRange().InsertAfter(tmp2, tmp1); LowerNode(tmp1); } @@ -1309,7 +1315,7 @@ void Lowering::LowerHWIntrinsicDot(GenTreeHWIntrinsic* node) } else { - assert(varTypeIsIntegral(baseType)); + assert(varTypeIsIntegral(simdBaseType)); // We will be constructing the following parts: // ... @@ -1322,7 +1328,7 @@ void Lowering::LowerHWIntrinsicDot(GenTreeHWIntrinsic* node) // var tmp2 = AdvSimd.Arm64.AddAcross(tmp1); // ... - tmp2 = comp->gtNewSimdAsHWIntrinsicNode(simdType, tmp1, NI_AdvSimd_Arm64_AddAcross, baseType, simdSize); + tmp2 = comp->gtNewSimdAsHWIntrinsicNode(simdType, tmp1, NI_AdvSimd_Arm64_AddAcross, simdBaseJitType, simdSize); BlockRange().InsertAfter(tmp1, tmp2); LowerNode(tmp2); } @@ -1669,7 +1675,7 @@ void Lowering::ContainCheckSIMD(GenTreeSIMD* simdNode) // This implements get_Item method. The sources are: // - the source SIMD struct // - index (which element to get) - // The result is baseType of SIMD struct. + // The result is simdBaseType of SIMD struct. op1 = simdNode->AsOp()->gtOp1; op2 = simdNode->AsOp()->gtOp2; diff --git a/src/coreclr/jit/lowerxarch.cpp b/src/coreclr/jit/lowerxarch.cpp index dfa6fe68ff421d..31279fb8b435ab 100644 --- a/src/coreclr/jit/lowerxarch.cpp +++ b/src/coreclr/jit/lowerxarch.cpp @@ -682,7 +682,7 @@ void Lowering::LowerSIMD(GenTreeSIMD* simdNode) if (simdNode->gtSIMDIntrinsicID == SIMDIntrinsicInitN) { - assert(simdNode->gtSIMDBaseType == TYP_FLOAT); + assert(simdNode->GetSimdBaseType() == TYP_FLOAT); int argCount = 0; int constArgCount = 0; @@ -692,7 +692,7 @@ void Lowering::LowerSIMD(GenTreeSIMD* simdNode) { GenTree* arg = list->Current(); - assert(arg->TypeGet() == simdNode->gtSIMDBaseType); + assert(arg->TypeGet() == simdNode->GetSimdBaseType()); assert(argCount < (int)_countof(constArgValues)); if (arg->IsCnsFltOrDbl()) @@ -717,7 +717,7 @@ void Lowering::LowerSIMD(GenTreeSIMD* simdNode) unsigned cnsAlign = (comp->compCodeOpt() != Compiler::SMALL_CODE) ? cnsSize : 1; CORINFO_FIELD_HANDLE hnd = - comp->GetEmitter()->emitBlkConst(constArgValues, cnsSize, cnsAlign, simdNode->gtSIMDBaseType); + comp->GetEmitter()->emitBlkConst(constArgValues, cnsSize, cnsAlign, simdNode->GetSimdBaseType()); GenTree* clsVarAddr = new (comp, GT_CLS_VAR_ADDR) GenTreeClsVar(GT_CLS_VAR_ADDR, TYP_I_IMPL, hnd, nullptr); BlockRange().InsertBefore(simdNode, clsVarAddr); simdNode->ChangeOper(GT_IND); @@ -734,7 +734,7 @@ void Lowering::LowerSIMD(GenTreeSIMD* simdNode) // If SIMD vector is already in memory, we force its // addr to be evaluated into a reg. This would allow // us to generate [regBase] or [regBase+offset] or - // [regBase+sizeOf(SIMD vector baseType)*regIndex] + // [regBase+sizeOf(SIMD vector simdBaseType)*regIndex] // to access the required SIMD vector element directly // from memory. // @@ -980,11 +980,11 @@ void Lowering::LowerHWIntrinsic(GenTreeHWIntrinsic* node) GenTreeArgList* argList = node->gtOp1->AsArgList(); // Insert takes either a 32-bit register or a memory operand. - // In either case, only gtSIMDBaseType bits are read and so + // In either case, only SimdBaseType bits are read and so // widening or narrowing the operand may be unnecessary and it // can just be used directly. - argList->Rest()->gtOp1 = TryRemoveCastIfPresent(node->gtSIMDBaseType, argList->Rest()->gtOp1); + argList->Rest()->gtOp1 = TryRemoveCastIfPresent(node->GetSimdBaseType(), argList->Rest()->gtOp1); break; } @@ -1003,9 +1003,9 @@ void Lowering::LowerHWIntrinsic(GenTreeHWIntrinsic* node) case NI_SSE2_CompareGreaterThan: { - if (node->gtSIMDBaseType != TYP_DOUBLE) + if (node->GetSimdBaseType() != TYP_DOUBLE) { - assert(varTypeIsIntegral(node->gtSIMDBaseType)); + assert(varTypeIsIntegral(node->GetSimdBaseType())); break; } @@ -1020,7 +1020,7 @@ void Lowering::LowerHWIntrinsic(GenTreeHWIntrinsic* node) case NI_SSE2_CompareNotGreaterThan: case NI_SSE2_CompareNotGreaterThanOrEqual: { - assert((node->gtSIMDBaseType == TYP_FLOAT) || (node->gtSIMDBaseType == TYP_DOUBLE)); + assert((node->GetSimdBaseType() == TYP_FLOAT) || (node->GetSimdBaseType() == TYP_DOUBLE)); if (comp->compOpportunisticallyDependsOn(InstructionSet_AVX)) { @@ -1036,11 +1036,11 @@ void Lowering::LowerHWIntrinsic(GenTreeHWIntrinsic* node) case NI_SSE42_CompareLessThan: case NI_AVX2_CompareLessThan: { - if (node->gtSIMDBaseType == TYP_DOUBLE) + if (node->GetSimdBaseType() == TYP_DOUBLE) { break; } - assert(varTypeIsIntegral(node->gtSIMDBaseType)); + assert(varTypeIsIntegral(node->GetSimdBaseType())); // this isn't actually supported in hardware so we need to swap the operands around std::swap(node->gtOp1, node->gtOp2); @@ -1163,16 +1163,17 @@ void Lowering::LowerHWIntrinsic(GenTreeHWIntrinsic* node) // void Lowering::LowerHWIntrinsicCmpOp(GenTreeHWIntrinsic* node, genTreeOps cmpOp) { - NamedIntrinsic intrinsicId = node->gtHWIntrinsicId; - var_types baseType = node->gtSIMDBaseType; - unsigned simdSize = node->gtSIMDSize; - var_types simdType = Compiler::getSIMDTypeForSize(simdSize); + NamedIntrinsic intrinsicId = node->gtHWIntrinsicId; + CorInfoType simdBaseJitType = node->GetSimdBaseJitType(); + var_types simdBaseType = node->GetSimdBaseType(); + unsigned simdSize = node->GetSimdSize(); + var_types simdType = Compiler::getSIMDTypeForSize(simdSize); assert((intrinsicId == NI_Vector128_op_Equality) || (intrinsicId == NI_Vector128_op_Inequality) || (intrinsicId == NI_Vector256_op_Equality) || (intrinsicId == NI_Vector256_op_Inequality)); assert(varTypeIsSIMD(simdType)); - assert(varTypeIsArithmetic(baseType)); + assert(varTypeIsArithmetic(simdBaseType)); assert(simdSize != 0); assert(node->gtType == TYP_BOOL); assert((cmpOp == GT_EQ) || (cmpOp == GT_NE)); @@ -1219,12 +1220,12 @@ void Lowering::LowerHWIntrinsicCmpOp(GenTreeHWIntrinsic* node, genTreeOps cmpOp) } NamedIntrinsic cmpIntrinsic; - var_types cmpType; + CorInfoType cmpJitType; NamedIntrinsic mskIntrinsic; - var_types mskType; + CorInfoType mskJitType; int mskConstant; - switch (baseType) + switch (simdBaseType) { case TYP_BYTE: case TYP_UBYTE: @@ -1233,8 +1234,8 @@ void Lowering::LowerHWIntrinsicCmpOp(GenTreeHWIntrinsic* node, genTreeOps cmpOp) case TYP_INT: case TYP_UINT: { - cmpType = baseType; - mskType = TYP_UBYTE; + cmpJitType = simdBaseJitType; + mskJitType = CORINFO_TYPE_UBYTE; if (simdSize == 32) { @@ -1256,12 +1257,12 @@ void Lowering::LowerHWIntrinsicCmpOp(GenTreeHWIntrinsic* node, genTreeOps cmpOp) case TYP_LONG: case TYP_ULONG: { - mskType = TYP_UBYTE; + mskJitType = CORINFO_TYPE_UBYTE; if (simdSize == 32) { cmpIntrinsic = NI_AVX2_CompareEqual; - cmpType = baseType; + cmpJitType = simdBaseJitType; mskIntrinsic = NI_AVX2_MoveMask; mskConstant = -1; } @@ -1272,12 +1273,12 @@ void Lowering::LowerHWIntrinsicCmpOp(GenTreeHWIntrinsic* node, genTreeOps cmpOp) if (comp->compOpportunisticallyDependsOn(InstructionSet_SSE41)) { cmpIntrinsic = NI_SSE41_CompareEqual; - cmpType = baseType; + cmpJitType = simdBaseJitType; } else { cmpIntrinsic = NI_SSE2_CompareEqual; - cmpType = TYP_UINT; + cmpJitType = CORINFO_TYPE_UINT; } mskIntrinsic = NI_SSE2_MoveMask; @@ -1288,8 +1289,8 @@ void Lowering::LowerHWIntrinsicCmpOp(GenTreeHWIntrinsic* node, genTreeOps cmpOp) case TYP_FLOAT: { - cmpType = baseType; - mskType = baseType; + cmpJitType = simdBaseJitType; + mskJitType = simdBaseJitType; if (simdSize == 32) { @@ -1321,8 +1322,8 @@ void Lowering::LowerHWIntrinsicCmpOp(GenTreeHWIntrinsic* node, genTreeOps cmpOp) case TYP_DOUBLE: { - cmpType = baseType; - mskType = baseType; + cmpJitType = simdBaseJitType; + mskJitType = simdBaseJitType; if (simdSize == 32) { @@ -1347,18 +1348,18 @@ void Lowering::LowerHWIntrinsicCmpOp(GenTreeHWIntrinsic* node, genTreeOps cmpOp) } } - GenTree* cmp = comp->gtNewSimdHWIntrinsicNode(simdType, op1, op2, cmpIntrinsic, cmpType, simdSize); + GenTree* cmp = comp->gtNewSimdHWIntrinsicNode(simdType, op1, op2, cmpIntrinsic, cmpJitType, simdSize); BlockRange().InsertBefore(node, cmp); LowerNode(cmp); - GenTree* msk = comp->gtNewSimdHWIntrinsicNode(TYP_INT, cmp, mskIntrinsic, mskType, simdSize); + GenTree* msk = comp->gtNewSimdHWIntrinsicNode(TYP_INT, cmp, mskIntrinsic, mskJitType, simdSize); BlockRange().InsertAfter(cmp, msk); LowerNode(msk); GenTree* mskCns = comp->gtNewIconNode(mskConstant, TYP_INT); BlockRange().InsertAfter(msk, mskCns); - if ((baseType == TYP_FLOAT) && (simdSize < 16)) + if ((simdBaseType == TYP_FLOAT) && (simdSize < 16)) { // For TYP_SIMD8 and TYP_SIMD12 we need to clear the upper bits and can't assume their value @@ -1394,11 +1395,12 @@ void Lowering::LowerHWIntrinsicCmpOp(GenTreeHWIntrinsic* node, genTreeOps cmpOp) // void Lowering::LowerHWIntrinsicCreate(GenTreeHWIntrinsic* node) { - NamedIntrinsic intrinsicId = node->gtHWIntrinsicId; - var_types simdType = node->gtType; - var_types baseType = node->gtSIMDBaseType; - unsigned simdSize = node->gtSIMDSize; - VectorConstant vecCns = {}; + NamedIntrinsic intrinsicId = node->gtHWIntrinsicId; + var_types simdType = node->gtType; + CorInfoType simdBaseJitType = node->GetSimdBaseJitType(); + var_types simdBaseType = node->GetSimdBaseType(); + unsigned simdSize = node->GetSimdSize(); + VectorConstant vecCns = {}; if ((simdSize == 8) && (simdType == TYP_DOUBLE)) { @@ -1408,7 +1410,7 @@ void Lowering::LowerHWIntrinsicCreate(GenTreeHWIntrinsic* node) } assert(varTypeIsSIMD(simdType)); - assert(varTypeIsArithmetic(baseType)); + assert(varTypeIsArithmetic(simdBaseType)); assert(simdSize != 0); GenTreeArgList* argList = nullptr; @@ -1433,7 +1435,7 @@ void Lowering::LowerHWIntrinsicCreate(GenTreeHWIntrinsic* node) for (argList = op1->AsArgList(); argList != nullptr; argList = argList->Rest()) { - if (HandleArgForHWIntrinsicCreate(argList->Current(), argCnt, vecCns, baseType)) + if (HandleArgForHWIntrinsicCreate(argList->Current(), argCnt, vecCns, simdBaseType)) { cnsArgCnt += 1; } @@ -1442,7 +1444,7 @@ void Lowering::LowerHWIntrinsicCreate(GenTreeHWIntrinsic* node) } else { - if (HandleArgForHWIntrinsicCreate(op1, argCnt, vecCns, baseType)) + if (HandleArgForHWIntrinsicCreate(op1, argCnt, vecCns, simdBaseType)) { cnsArgCnt += 1; } @@ -1450,7 +1452,7 @@ void Lowering::LowerHWIntrinsicCreate(GenTreeHWIntrinsic* node) if (op2 != nullptr) { - if (HandleArgForHWIntrinsicCreate(op2, argCnt, vecCns, baseType)) + if (HandleArgForHWIntrinsicCreate(op2, argCnt, vecCns, simdBaseType)) { cnsArgCnt += 1; } @@ -1462,13 +1464,13 @@ void Lowering::LowerHWIntrinsicCreate(GenTreeHWIntrinsic* node) // so we'll just specially handle it here and copy it into the remaining // indices. - for (unsigned i = 1; i < simdSize / genTypeSize(baseType); i++) + for (unsigned i = 1; i < simdSize / genTypeSize(simdBaseType); i++) { - HandleArgForHWIntrinsicCreate(op1, i, vecCns, baseType); + HandleArgForHWIntrinsicCreate(op1, i, vecCns, simdBaseType); } } } - assert((argCnt == 1) || (argCnt == (simdSize / genTypeSize(baseType)))); + assert((argCnt == 1) || (argCnt == (simdSize / genTypeSize(simdBaseType)))); if (argCnt == cnsArgCnt) { @@ -1577,7 +1579,8 @@ void Lowering::LowerHWIntrinsicCreate(GenTreeHWIntrinsic* node) // var tmp1 = Vector128.CreateScalarUnsafe(op1); // return Avx2.BroadcastScalarToVector256(tmp1); - tmp1 = comp->gtNewSimdHWIntrinsicNode(TYP_SIMD16, op1, NI_Vector128_CreateScalarUnsafe, baseType, 16); + tmp1 = comp->gtNewSimdHWIntrinsicNode(TYP_SIMD16, op1, NI_Vector128_CreateScalarUnsafe, simdBaseJitType, + 16); BlockRange().InsertAfter(op1, tmp1); LowerNode(tmp1); @@ -1611,7 +1614,7 @@ void Lowering::LowerHWIntrinsicCreate(GenTreeHWIntrinsic* node) // var tmp3 = tmp2.ToVector256Unsafe(); // return Avx.InsertVector128(tmp3, tmp1, 0x01); - tmp1 = comp->gtNewSimdHWIntrinsicNode(TYP_SIMD16, op1, NI_Vector128_Create, baseType, 16); + tmp1 = comp->gtNewSimdHWIntrinsicNode(TYP_SIMD16, op1, NI_Vector128_Create, simdBaseJitType, 16); BlockRange().InsertAfter(op1, tmp1); LowerNode(tmp1); @@ -1623,7 +1626,8 @@ void Lowering::LowerHWIntrinsicCreate(GenTreeHWIntrinsic* node) tmp2 = comp->gtClone(tmp1); BlockRange().InsertAfter(tmp1, tmp2); - tmp3 = comp->gtNewSimdHWIntrinsicNode(TYP_SIMD32, tmp2, NI_Vector128_ToVector256Unsafe, baseType, 16); + tmp3 = + comp->gtNewSimdHWIntrinsicNode(TYP_SIMD32, tmp2, NI_Vector128_ToVector256Unsafe, simdBaseJitType, 16); BlockRange().InsertAfter(tmp2, tmp3); LowerNode(tmp3); @@ -1646,11 +1650,11 @@ void Lowering::LowerHWIntrinsicCreate(GenTreeHWIntrinsic* node) // var tmp1 = Vector128.CreateScalarUnsafe(op1); // ... - tmp1 = comp->gtNewSimdHWIntrinsicNode(TYP_SIMD16, op1, NI_Vector128_CreateScalarUnsafe, baseType, 16); + tmp1 = comp->gtNewSimdHWIntrinsicNode(TYP_SIMD16, op1, NI_Vector128_CreateScalarUnsafe, simdBaseJitType, 16); BlockRange().InsertAfter(op1, tmp1); LowerNode(tmp1); - if ((baseType != TYP_DOUBLE) && comp->compOpportunisticallyDependsOn(InstructionSet_AVX2)) + if ((simdBaseJitType != CORINFO_TYPE_DOUBLE) && comp->compOpportunisticallyDependsOn(InstructionSet_AVX2)) { // We will be constructing the following parts: // ... @@ -1668,7 +1672,7 @@ void Lowering::LowerHWIntrinsicCreate(GenTreeHWIntrinsic* node) return; } - switch (baseType) + switch (simdBaseType) { case TYP_BYTE: case TYP_UBYTE: @@ -1687,7 +1691,8 @@ void Lowering::LowerHWIntrinsicCreate(GenTreeHWIntrinsic* node) // var tmp2 = Vector128.Zero; // return Ssse3.Shuffle(tmp1, tmp2); - tmp2 = comp->gtNewSimdHWIntrinsicNode(simdType, NI_Vector128_get_Zero, TYP_UBYTE, simdSize); + tmp2 = + comp->gtNewSimdHWIntrinsicNode(simdType, NI_Vector128_get_Zero, CORINFO_TYPE_UBYTE, simdSize); BlockRange().InsertAfter(tmp1, tmp2); LowerNode(tmp2); @@ -1725,7 +1730,8 @@ void Lowering::LowerHWIntrinsicCreate(GenTreeHWIntrinsic* node) tmp2 = comp->gtClone(tmp1); BlockRange().InsertAfter(tmp1, tmp2); - tmp1 = comp->gtNewSimdHWIntrinsicNode(simdType, tmp1, tmp2, NI_SSE2_UnpackLow, TYP_UBYTE, simdSize); + tmp1 = comp->gtNewSimdHWIntrinsicNode(simdType, tmp1, tmp2, NI_SSE2_UnpackLow, CORINFO_TYPE_UBYTE, + simdSize); BlockRange().InsertAfter(tmp2, tmp1); LowerNode(tmp1); @@ -1762,7 +1768,8 @@ void Lowering::LowerHWIntrinsicCreate(GenTreeHWIntrinsic* node) tmp2 = comp->gtClone(tmp1); BlockRange().InsertAfter(tmp1, tmp2); - tmp1 = comp->gtNewSimdHWIntrinsicNode(simdType, tmp1, tmp2, NI_SSE2_UnpackLow, TYP_USHORT, simdSize); + tmp1 = comp->gtNewSimdHWIntrinsicNode(simdType, tmp1, tmp2, NI_SSE2_UnpackLow, CORINFO_TYPE_USHORT, + simdSize); BlockRange().InsertAfter(tmp2, tmp1); LowerNode(tmp1); @@ -1792,7 +1799,7 @@ void Lowering::LowerHWIntrinsicCreate(GenTreeHWIntrinsic* node) node->gtOp2 = idx; node->gtHWIntrinsicId = NI_SSE2_Shuffle; - node->gtSIMDBaseType = TYP_UINT; + node->SetSimdBaseJitType(CORINFO_TYPE_UINT); break; } @@ -1945,7 +1952,7 @@ void Lowering::LowerHWIntrinsicCreate(GenTreeHWIntrinsic* node) node->gtOp2 = tmp2; node->gtHWIntrinsicId = NI_SSE_MoveLowToHigh; - node->gtSIMDBaseType = TYP_FLOAT; + node->SetSimdBaseJitType(CORINFO_TYPE_FLOAT); break; } @@ -2037,7 +2044,7 @@ void Lowering::LowerHWIntrinsicCreate(GenTreeHWIntrinsic* node) tmp1 = argList->Current(); tmp2 = argList->Rest()->Current(); - lo = comp->gtNewSimdHWIntrinsicNode(TYP_SIMD16, tmp1, tmp2, NI_Vector128_Create, baseType, 16); + lo = comp->gtNewSimdHWIntrinsicNode(TYP_SIMD16, tmp1, tmp2, NI_Vector128_Create, simdBaseJitType, 16); BlockRange().InsertAfter(tmp2, lo); LowerNode(lo); @@ -2046,7 +2053,7 @@ void Lowering::LowerHWIntrinsicCreate(GenTreeHWIntrinsic* node) tmp1 = argList->Current(); tmp2 = argList->Rest()->Current(); - hi = comp->gtNewSimdHWIntrinsicNode(TYP_SIMD16, tmp1, tmp2, NI_Vector128_Create, baseType, 16); + hi = comp->gtNewSimdHWIntrinsicNode(TYP_SIMD16, tmp1, tmp2, NI_Vector128_Create, simdBaseJitType, 16); BlockRange().InsertAfter(tmp2, hi); LowerNode(hi); } @@ -2059,11 +2066,11 @@ void Lowering::LowerHWIntrinsicCreate(GenTreeHWIntrinsic* node) tmp1 = op2->AsArgList()->Current(); - lo = comp->gtNewSimdHWIntrinsicNode(TYP_SIMD16, op1, NI_Vector128_Create, baseType, 16); + lo = comp->gtNewSimdHWIntrinsicNode(TYP_SIMD16, op1, NI_Vector128_Create, simdBaseJitType, 16); BlockRange().InsertBefore(tmp1, lo); LowerNode(lo); - hi = comp->gtNewSimdHWIntrinsicNode(TYP_SIMD16, op2, NI_Vector128_Create, baseType, 16); + hi = comp->gtNewSimdHWIntrinsicNode(TYP_SIMD16, op2, NI_Vector128_Create, simdBaseJitType, 16); BlockRange().InsertBefore(node, hi); LowerNode(hi); } @@ -2094,11 +2101,11 @@ void Lowering::LowerHWIntrinsicCreate(GenTreeHWIntrinsic* node) // var tmp1 = Vector128.CreateScalarUnsafe(op1); // ... - tmp1 = comp->gtNewSimdHWIntrinsicNode(TYP_SIMD16, op1, NI_Vector128_CreateScalarUnsafe, baseType, 16); + tmp1 = comp->gtNewSimdHWIntrinsicNode(TYP_SIMD16, op1, NI_Vector128_CreateScalarUnsafe, simdBaseJitType, 16); BlockRange().InsertAfter(op1, tmp1); LowerNode(tmp1); - switch (baseType) + switch (simdBaseType) { case TYP_BYTE: case TYP_UBYTE: @@ -2111,7 +2118,7 @@ void Lowering::LowerHWIntrinsicCreate(GenTreeHWIntrinsic* node) GenTree* opN = nullptr; NamedIntrinsic insIntrinsic = NI_Illegal; - if ((baseType == TYP_SHORT) || (baseType == TYP_USHORT)) + if ((simdBaseType == TYP_SHORT) || (simdBaseType == TYP_USHORT)) { assert(comp->compIsaSupportedDebugOnly(InstructionSet_SSE2)); insIntrinsic = NI_SSE2_Insert; @@ -2144,7 +2151,8 @@ void Lowering::LowerHWIntrinsicCreate(GenTreeHWIntrinsic* node) idx = comp->gtNewIconNode(N, TYP_INT); BlockRange().InsertAfter(opN, idx); - tmp1 = comp->gtNewSimdHWIntrinsicNode(simdType, tmp1, opN, idx, insIntrinsic, baseType, simdSize); + tmp1 = comp->gtNewSimdHWIntrinsicNode(simdType, tmp1, opN, idx, insIntrinsic, simdBaseJitType, + simdSize); BlockRange().InsertAfter(idx, tmp1); LowerNode(tmp1); @@ -2177,7 +2185,7 @@ void Lowering::LowerHWIntrinsicCreate(GenTreeHWIntrinsic* node) break; } - assert((baseType != TYP_SHORT) && (baseType != TYP_USHORT)); + assert((simdBaseType != TYP_SHORT) && (simdBaseType != TYP_USHORT)); assert(comp->compIsaSupportedDebugOnly(InstructionSet_SSE2)); GenTree* op[16]; @@ -2187,7 +2195,8 @@ void Lowering::LowerHWIntrinsicCreate(GenTreeHWIntrinsic* node) { opN = argList->Current(); - op[N] = comp->gtNewSimdHWIntrinsicNode(TYP_SIMD16, opN, NI_Vector128_CreateScalarUnsafe, baseType, 16); + op[N] = comp->gtNewSimdHWIntrinsicNode(TYP_SIMD16, opN, NI_Vector128_CreateScalarUnsafe, + simdBaseJitType, 16); BlockRange().InsertAfter(opN, op[N]); LowerNode(op[N]); @@ -2195,7 +2204,7 @@ void Lowering::LowerHWIntrinsicCreate(GenTreeHWIntrinsic* node) } assert(argList == nullptr); - if ((baseType == TYP_BYTE) || (baseType == TYP_UBYTE)) + if ((simdBaseType == TYP_BYTE) || (simdBaseType == TYP_UBYTE)) { for (N = 0; N < argCnt; N += 4) { @@ -2231,18 +2240,18 @@ void Lowering::LowerHWIntrinsicCreate(GenTreeHWIntrinsic* node) unsigned P = N + 2; unsigned Q = N + 3; - tmp1 = - comp->gtNewSimdHWIntrinsicNode(simdType, op[N], op[O], NI_SSE2_UnpackLow, TYP_UBYTE, simdSize); + tmp1 = comp->gtNewSimdHWIntrinsicNode(simdType, op[N], op[O], NI_SSE2_UnpackLow, CORINFO_TYPE_UBYTE, + simdSize); BlockRange().InsertAfter(op[O], tmp1); LowerNode(tmp1); - tmp2 = - comp->gtNewSimdHWIntrinsicNode(simdType, op[P], op[Q], NI_SSE2_UnpackLow, TYP_UBYTE, simdSize); + tmp2 = comp->gtNewSimdHWIntrinsicNode(simdType, op[P], op[Q], NI_SSE2_UnpackLow, CORINFO_TYPE_UBYTE, + simdSize); BlockRange().InsertAfter(op[Q], tmp2); LowerNode(tmp2); - tmp3 = - comp->gtNewSimdHWIntrinsicNode(simdType, tmp1, tmp2, NI_SSE2_UnpackLow, TYP_USHORT, simdSize); + tmp3 = comp->gtNewSimdHWIntrinsicNode(simdType, tmp1, tmp2, NI_SSE2_UnpackLow, CORINFO_TYPE_USHORT, + simdSize); BlockRange().InsertAfter(tmp2, tmp3); LowerNode(tmp3); @@ -2280,11 +2289,13 @@ void Lowering::LowerHWIntrinsicCreate(GenTreeHWIntrinsic* node) // tmp2 = Sse2.UnpackLow(opP, opQ); // return Sse2.UnpackLow(tmp1, tmp2); - tmp1 = comp->gtNewSimdHWIntrinsicNode(simdType, op[0], op[1], NI_SSE2_UnpackLow, TYP_UINT, simdSize); + tmp1 = + comp->gtNewSimdHWIntrinsicNode(simdType, op[0], op[1], NI_SSE2_UnpackLow, CORINFO_TYPE_UINT, simdSize); BlockRange().InsertAfter(op[1], tmp1); LowerNode(tmp1); - tmp2 = comp->gtNewSimdHWIntrinsicNode(simdType, op[2], op[3], NI_SSE2_UnpackLow, TYP_UINT, simdSize); + tmp2 = + comp->gtNewSimdHWIntrinsicNode(simdType, op[2], op[3], NI_SSE2_UnpackLow, CORINFO_TYPE_UINT, simdSize); BlockRange().InsertAfter(op[3], tmp2); LowerNode(tmp2); @@ -2292,7 +2303,7 @@ void Lowering::LowerHWIntrinsicCreate(GenTreeHWIntrinsic* node) node->gtOp2 = tmp2; node->gtHWIntrinsicId = NI_SSE2_UnpackLow; - node->gtSIMDBaseType = TYP_ULONG; + node->SetSimdBaseJitType(CORINFO_TYPE_ULONG); break; } @@ -2339,7 +2350,8 @@ void Lowering::LowerHWIntrinsicCreate(GenTreeHWIntrinsic* node) assert(comp->compIsaSupportedDebugOnly(InstructionSet_SSE2)); - tmp2 = comp->gtNewSimdHWIntrinsicNode(TYP_SIMD16, op2, NI_Vector128_CreateScalarUnsafe, baseType, 16); + tmp2 = + comp->gtNewSimdHWIntrinsicNode(TYP_SIMD16, op2, NI_Vector128_CreateScalarUnsafe, simdBaseJitType, 16); BlockRange().InsertAfter(op2, tmp2); LowerNode(tmp2); @@ -2380,16 +2392,16 @@ void Lowering::LowerHWIntrinsicCreate(GenTreeHWIntrinsic* node) opN = argList->Current(); - tmp2 = - comp->gtNewSimdHWIntrinsicNode(TYP_SIMD16, opN, NI_Vector128_CreateScalarUnsafe, baseType, 16); + tmp2 = comp->gtNewSimdHWIntrinsicNode(TYP_SIMD16, opN, NI_Vector128_CreateScalarUnsafe, + simdBaseJitType, 16); BlockRange().InsertAfter(opN, tmp2); LowerNode(tmp2); idx = comp->gtNewIconNode(N << 4, TYP_INT); BlockRange().InsertAfter(tmp2, idx); - tmp1 = - comp->gtNewSimdHWIntrinsicNode(simdType, tmp1, tmp2, idx, NI_SSE41_Insert, baseType, simdSize); + tmp1 = comp->gtNewSimdHWIntrinsicNode(simdType, tmp1, tmp2, idx, NI_SSE41_Insert, simdBaseJitType, + simdSize); BlockRange().InsertAfter(idx, tmp1); LowerNode(tmp1); @@ -2414,7 +2426,8 @@ void Lowering::LowerHWIntrinsicCreate(GenTreeHWIntrinsic* node) opN = argList->Current(); - tmp2 = comp->gtNewSimdHWIntrinsicNode(TYP_SIMD16, opN, NI_Vector128_CreateScalarUnsafe, baseType, 16); + tmp2 = comp->gtNewSimdHWIntrinsicNode(TYP_SIMD16, opN, NI_Vector128_CreateScalarUnsafe, simdBaseJitType, + 16); BlockRange().InsertAfter(opN, tmp2); LowerNode(tmp2); @@ -2463,7 +2476,8 @@ void Lowering::LowerHWIntrinsicCreate(GenTreeHWIntrinsic* node) { opN = argList->Current(); - op[N] = comp->gtNewSimdHWIntrinsicNode(TYP_SIMD16, opN, NI_Vector128_CreateScalarUnsafe, baseType, 16); + op[N] = comp->gtNewSimdHWIntrinsicNode(TYP_SIMD16, opN, NI_Vector128_CreateScalarUnsafe, + simdBaseJitType, 16); BlockRange().InsertAfter(opN, op[N]); LowerNode(op[N]); @@ -2471,11 +2485,11 @@ void Lowering::LowerHWIntrinsicCreate(GenTreeHWIntrinsic* node) } assert(argList == nullptr); - tmp1 = comp->gtNewSimdHWIntrinsicNode(simdType, op[0], op[1], NI_SSE_UnpackLow, baseType, simdSize); + tmp1 = comp->gtNewSimdHWIntrinsicNode(simdType, op[0], op[1], NI_SSE_UnpackLow, simdBaseJitType, simdSize); BlockRange().InsertAfter(op[1], tmp1); LowerNode(tmp1); - tmp2 = comp->gtNewSimdHWIntrinsicNode(simdType, op[2], op[3], NI_SSE_UnpackLow, baseType, simdSize); + tmp2 = comp->gtNewSimdHWIntrinsicNode(simdType, op[2], op[3], NI_SSE_UnpackLow, simdBaseJitType, simdSize); BlockRange().InsertAfter(op[3], tmp2); LowerNode(tmp2); @@ -2503,7 +2517,8 @@ void Lowering::LowerHWIntrinsicCreate(GenTreeHWIntrinsic* node) assert(comp->compIsaSupportedDebugOnly(InstructionSet_SSE2)); - tmp2 = comp->gtNewSimdHWIntrinsicNode(TYP_SIMD16, op2, NI_Vector128_CreateScalarUnsafe, baseType, 16); + tmp2 = + comp->gtNewSimdHWIntrinsicNode(TYP_SIMD16, op2, NI_Vector128_CreateScalarUnsafe, simdBaseJitType, 16); BlockRange().InsertAfter(op2, tmp2); LowerNode(tmp2); @@ -2511,7 +2526,7 @@ void Lowering::LowerHWIntrinsicCreate(GenTreeHWIntrinsic* node) node->gtOp2 = tmp2; node->gtHWIntrinsicId = NI_SSE_MoveLowToHigh; - node->gtSIMDBaseType = TYP_FLOAT; + node->SetSimdBaseJitType(CORINFO_TYPE_FLOAT); break; } @@ -2531,16 +2546,16 @@ void Lowering::LowerHWIntrinsicCreate(GenTreeHWIntrinsic* node) // void Lowering::LowerHWIntrinsicDot(GenTreeHWIntrinsic* node) { - NamedIntrinsic intrinsicId = node->gtHWIntrinsicId; - ; - var_types baseType = node->gtSIMDBaseType; - unsigned simdSize = node->gtSIMDSize; - var_types simdType = Compiler::getSIMDTypeForSize(simdSize); - unsigned simd16Count = comp->getSIMDVectorLength(16, baseType); + NamedIntrinsic intrinsicId = node->gtHWIntrinsicId; + CorInfoType simdBaseJitType = node->GetSimdBaseJitType(); + var_types simdBaseType = node->GetSimdBaseType(); + unsigned simdSize = node->GetSimdSize(); + var_types simdType = Compiler::getSIMDTypeForSize(simdSize); + unsigned simd16Count = comp->getSIMDVectorLength(16, simdBaseType); assert((intrinsicId == NI_Vector128_Dot) || (intrinsicId == NI_Vector256_Dot)); assert(varTypeIsSIMD(simdType)); - assert(varTypeIsArithmetic(baseType)); + assert(varTypeIsArithmetic(simdBaseType)); assert(simdSize != 0); GenTree* op1 = node->gtGetOp1(); @@ -2566,7 +2581,7 @@ void Lowering::LowerHWIntrinsicDot(GenTreeHWIntrinsic* node) { assert(comp->compIsaSupportedDebugOnly(InstructionSet_AVX2)); - switch (baseType) + switch (simdBaseType) { case TYP_SHORT: case TYP_USHORT: @@ -2610,7 +2625,8 @@ void Lowering::LowerHWIntrinsicDot(GenTreeHWIntrinsic* node) idx = comp->gtNewIconNode(0xF1, TYP_INT); BlockRange().InsertBefore(node, idx); - tmp1 = comp->gtNewSimdHWIntrinsicNode(simdType, op1, op2, idx, NI_AVX_DotProduct, baseType, simdSize); + tmp1 = comp->gtNewSimdHWIntrinsicNode(simdType, op1, op2, idx, NI_AVX_DotProduct, simdBaseJitType, + simdSize); BlockRange().InsertAfter(idx, tmp1); LowerNode(tmp1); @@ -2625,16 +2641,16 @@ void Lowering::LowerHWIntrinsicDot(GenTreeHWIntrinsic* node) idx = comp->gtNewIconNode(0x01, TYP_INT); BlockRange().InsertAfter(tmp2, idx); - tmp2 = - comp->gtNewSimdHWIntrinsicNode(TYP_SIMD16, tmp2, idx, NI_AVX_ExtractVector128, baseType, simdSize); + tmp2 = comp->gtNewSimdHWIntrinsicNode(TYP_SIMD16, tmp2, idx, NI_AVX_ExtractVector128, simdBaseJitType, + simdSize); BlockRange().InsertAfter(idx, tmp2); LowerNode(tmp2); - tmp3 = comp->gtNewSimdHWIntrinsicNode(TYP_SIMD16, tmp1, tmp2, NI_SSE_Add, baseType, 16); + tmp3 = comp->gtNewSimdHWIntrinsicNode(TYP_SIMD16, tmp1, tmp2, NI_SSE_Add, simdBaseJitType, 16); BlockRange().InsertAfter(tmp2, tmp3); LowerNode(tmp3); - node->gtSIMDSize = 16; + node->SetSimdSize(16); node->gtOp1 = tmp3; node->gtOp2 = nullptr; @@ -2663,7 +2679,7 @@ void Lowering::LowerHWIntrinsicDot(GenTreeHWIntrinsic* node) { assert(comp->compIsaSupportedDebugOnly(InstructionSet_SSE2)); - switch (baseType) + switch (simdBaseType) { case TYP_SHORT: case TYP_USHORT: @@ -2722,7 +2738,7 @@ void Lowering::LowerHWIntrinsicDot(GenTreeHWIntrinsic* node) } BlockRange().InsertBefore(node, idx); - tmp3 = comp->gtNewSimdHWIntrinsicNode(simdType, op1, op2, idx, NI_SSE41_DotProduct, baseType, + tmp3 = comp->gtNewSimdHWIntrinsicNode(simdType, op1, op2, idx, NI_SSE41_DotProduct, simdBaseJitType, simdSize); BlockRange().InsertAfter(idx, tmp3); LowerNode(tmp3); @@ -2767,7 +2783,7 @@ void Lowering::LowerHWIntrinsicDot(GenTreeHWIntrinsic* node) idx = comp->gtNewIconNode(0x31, TYP_INT); BlockRange().InsertBefore(node, idx); - tmp3 = comp->gtNewSimdHWIntrinsicNode(simdType, op1, op2, idx, NI_SSE41_DotProduct, baseType, + tmp3 = comp->gtNewSimdHWIntrinsicNode(simdType, op1, op2, idx, NI_SSE41_DotProduct, simdBaseJitType, simdSize); BlockRange().InsertAfter(idx, tmp3); LowerNode(tmp3); @@ -2800,7 +2816,7 @@ void Lowering::LowerHWIntrinsicDot(GenTreeHWIntrinsic* node) if (simdSize == 8) { - assert(baseType == TYP_FLOAT); + assert(simdBaseType == TYP_FLOAT); // If simdSize == 8 then we have only two elements, not the 4 that we got from getSIMDVectorLength, // which we gave a simdSize of 16. So, we set the simd16Count to 2 so that only 1 hadd will @@ -2810,7 +2826,7 @@ void Lowering::LowerHWIntrinsicDot(GenTreeHWIntrinsic* node) } else if (simdSize == 12) { - assert(baseType == TYP_FLOAT); + assert(simdBaseType == TYP_FLOAT); // We will be constructing the following parts: // ... @@ -2842,11 +2858,12 @@ void Lowering::LowerHWIntrinsicDot(GenTreeHWIntrinsic* node) GenTree* cns3 = comp->gtNewIconNode(0, TYP_INT); BlockRange().InsertAfter(cns2, cns3); - tmp1 = comp->gtNewSimdHWIntrinsicNode(simdType, cns0, cns1, cns2, cns3, NI_Vector128_Create, TYP_INT, 16); + tmp1 = comp->gtNewSimdHWIntrinsicNode(simdType, cns0, cns1, cns2, cns3, NI_Vector128_Create, + CORINFO_TYPE_INT, 16); BlockRange().InsertAfter(cns3, tmp1); LowerNode(tmp1); - op1 = comp->gtNewSimdHWIntrinsicNode(simdType, op1, tmp1, NI_SSE_And, baseType, simdSize); + op1 = comp->gtNewSimdHWIntrinsicNode(simdType, op1, tmp1, NI_SSE_And, simdBaseJitType, simdSize); BlockRange().InsertAfter(tmp1, op1); LowerNode(op1); } @@ -2862,7 +2879,7 @@ void Lowering::LowerHWIntrinsicDot(GenTreeHWIntrinsic* node) // var tmp1 = Isa.Multiply(op1, op2); // ... - tmp1 = comp->gtNewSimdHWIntrinsicNode(simdType, op1, op2, multiply, baseType, simdSize); + tmp1 = comp->gtNewSimdHWIntrinsicNode(simdType, op1, op2, multiply, simdBaseJitType, simdSize); BlockRange().InsertBefore(node, tmp1); LowerNode(tmp1); @@ -2906,7 +2923,7 @@ void Lowering::LowerHWIntrinsicDot(GenTreeHWIntrinsic* node) // tmp1 = Isa.HorizontalAdd(tmp1, tmp2); // ... - tmp1 = comp->gtNewSimdHWIntrinsicNode(simdType, tmp1, tmp2, horizontalAdd, baseType, simdSize); + tmp1 = comp->gtNewSimdHWIntrinsicNode(simdType, tmp1, tmp2, horizontalAdd, simdBaseJitType, simdSize); } else { @@ -2916,7 +2933,8 @@ void Lowering::LowerHWIntrinsicDot(GenTreeHWIntrinsic* node) { case 0: { - assert((baseType == TYP_SHORT) || (baseType == TYP_USHORT) || varTypeIsFloating(baseType)); + assert((simdBaseType == TYP_SHORT) || (simdBaseType == TYP_USHORT) || + varTypeIsFloating(simdBaseType)); // Adds (e0 + e1, e1 + e0, e2 + e3, e3 + e2), giving: // e0, e1, e2, e3 | e4, e5, e6, e7 @@ -2929,7 +2947,7 @@ void Lowering::LowerHWIntrinsicDot(GenTreeHWIntrinsic* node) case 1: { - assert((baseType == TYP_SHORT) || (baseType == TYP_USHORT) || (baseType == TYP_FLOAT)); + assert((simdBaseType == TYP_SHORT) || (simdBaseType == TYP_USHORT) || (simdBaseType == TYP_FLOAT)); // Adds (e0 + e2, e1 + e3, e2 + e0, e3 + e1), giving: // ... @@ -2942,7 +2960,7 @@ void Lowering::LowerHWIntrinsicDot(GenTreeHWIntrinsic* node) case 2: { - assert((baseType == TYP_SHORT) || (baseType == TYP_USHORT)); + assert((simdBaseType == TYP_SHORT) || (simdBaseType == TYP_USHORT)); // Adds (e0 + e4, e1 + e5, e2 + e6, e3 + e7), giving: // ... @@ -2964,7 +2982,7 @@ void Lowering::LowerHWIntrinsicDot(GenTreeHWIntrinsic* node) idx = comp->gtNewIconNode(shuffleConst, TYP_INT); BlockRange().InsertAfter(tmp2, idx); - if (varTypeIsFloating(baseType)) + if (varTypeIsFloating(simdBaseType)) { // We will be constructing the following parts: // ... @@ -2993,11 +3011,11 @@ void Lowering::LowerHWIntrinsicDot(GenTreeHWIntrinsic* node) tmp3 = comp->gtClone(tmp2); BlockRange().InsertAfter(tmp2, tmp3); - tmp2 = comp->gtNewSimdHWIntrinsicNode(simdType, tmp2, tmp3, idx, shuffle, baseType, simdSize); + tmp2 = comp->gtNewSimdHWIntrinsicNode(simdType, tmp2, tmp3, idx, shuffle, simdBaseJitType, simdSize); } else { - assert((baseType == TYP_SHORT) || (baseType == TYP_USHORT)); + assert((simdBaseType == TYP_SHORT) || (simdBaseType == TYP_USHORT)); if (i < 2) { @@ -3018,14 +3036,16 @@ void Lowering::LowerHWIntrinsicDot(GenTreeHWIntrinsic* node) // tmp2 = Isa.Shuffle(tmp1, shuffleConst); // ... - tmp2 = comp->gtNewSimdHWIntrinsicNode(simdType, tmp2, idx, NI_SSE2_ShuffleLow, baseType, simdSize); + tmp2 = comp->gtNewSimdHWIntrinsicNode(simdType, tmp2, idx, NI_SSE2_ShuffleLow, simdBaseJitType, + simdSize); BlockRange().InsertAfter(idx, tmp2); LowerNode(tmp2); idx = comp->gtNewIconNode(shuffleConst, TYP_INT); BlockRange().InsertAfter(tmp2, idx); - tmp2 = comp->gtNewSimdHWIntrinsicNode(simdType, tmp2, idx, NI_SSE2_ShuffleHigh, baseType, simdSize); + tmp2 = comp->gtNewSimdHWIntrinsicNode(simdType, tmp2, idx, NI_SSE2_ShuffleHigh, simdBaseJitType, + simdSize); } else { @@ -3044,7 +3064,8 @@ void Lowering::LowerHWIntrinsicDot(GenTreeHWIntrinsic* node) // tmp2 = Isa.Shuffle(tmp1, shuffleConst); // ... - tmp2 = comp->gtNewSimdHWIntrinsicNode(simdType, tmp2, idx, NI_SSE2_Shuffle, TYP_INT, simdSize); + tmp2 = comp->gtNewSimdHWIntrinsicNode(simdType, tmp2, idx, NI_SSE2_Shuffle, CORINFO_TYPE_INT, + simdSize); } } @@ -3063,7 +3084,7 @@ void Lowering::LowerHWIntrinsicDot(GenTreeHWIntrinsic* node) // tmp1 = Isa.Add(tmp1, tmp2); // ... - tmp1 = comp->gtNewSimdHWIntrinsicNode(simdType, tmp1, tmp2, add, baseType, simdSize); + tmp1 = comp->gtNewSimdHWIntrinsicNode(simdType, tmp1, tmp2, add, simdBaseJitType, simdSize); } BlockRange().InsertAfter(tmp2, tmp1); @@ -3105,15 +3126,16 @@ void Lowering::LowerHWIntrinsicDot(GenTreeHWIntrinsic* node) idx = comp->gtNewIconNode(0x01, TYP_INT); BlockRange().InsertAfter(tmp2, idx); - tmp2 = comp->gtNewSimdHWIntrinsicNode(TYP_SIMD16, tmp2, idx, NI_AVX_ExtractVector128, baseType, simdSize); + tmp2 = + comp->gtNewSimdHWIntrinsicNode(TYP_SIMD16, tmp2, idx, NI_AVX_ExtractVector128, simdBaseJitType, simdSize); BlockRange().InsertAfter(idx, tmp2); LowerNode(tmp2); - tmp1 = comp->gtNewSimdHWIntrinsicNode(TYP_SIMD16, tmp1, tmp2, add, baseType, 16); + tmp1 = comp->gtNewSimdHWIntrinsicNode(TYP_SIMD16, tmp1, tmp2, add, simdBaseJitType, 16); BlockRange().InsertAfter(tmp2, tmp1); LowerNode(tmp1); - node->gtSIMDSize = 16; + node->SetSimdSize(16); } // We will be constructing the following parts: @@ -3142,25 +3164,25 @@ void Lowering::LowerHWIntrinsicDot(GenTreeHWIntrinsic* node) // void Lowering::LowerHWIntrinsicToScalar(GenTreeHWIntrinsic* node) { - NamedIntrinsic intrinsicId = node->gtHWIntrinsicId; - ; - var_types baseType = node->gtSIMDBaseType; - unsigned simdSize = node->gtSIMDSize; - var_types simdType = Compiler::getSIMDTypeForSize(simdSize); + NamedIntrinsic intrinsicId = node->gtHWIntrinsicId; + CorInfoType simdBaseJitType = node->GetSimdBaseJitType(); + var_types simdBaseType = node->GetSimdBaseType(); + unsigned simdSize = node->GetSimdSize(); + var_types simdType = Compiler::getSIMDTypeForSize(simdSize); assert((intrinsicId == NI_Vector128_ToScalar) || (intrinsicId == NI_Vector256_ToScalar)); assert(varTypeIsSIMD(simdType)); - assert(varTypeIsArithmetic(baseType)); + assert(varTypeIsArithmetic(simdBaseType)); assert(simdSize != 0); - switch (baseType) + switch (simdBaseType) { case TYP_BYTE: case TYP_SHORT: case TYP_INT: { - node->gtType = TYP_INT; - node->gtSIMDBaseType = TYP_INT; + node->gtType = TYP_INT; + node->SetSimdBaseJitType(CORINFO_TYPE_INT); node->gtHWIntrinsicId = NI_SSE2_ConvertToInt32; break; } @@ -3169,8 +3191,8 @@ void Lowering::LowerHWIntrinsicToScalar(GenTreeHWIntrinsic* node) case TYP_USHORT: case TYP_UINT: { - node->gtType = TYP_UINT; - node->gtSIMDBaseType = TYP_UINT; + node->gtType = TYP_UINT; + node->SetSimdBaseJitType(CORINFO_TYPE_UINT); node->gtHWIntrinsicId = NI_SSE2_ConvertToUInt32; break; } @@ -3204,12 +3226,12 @@ void Lowering::LowerHWIntrinsicToScalar(GenTreeHWIntrinsic* node) LowerNode(node); - if (genTypeSize(baseType) < 4) + if (genTypeSize(simdBaseType) < 4) { LIR::Use use; bool foundUse = BlockRange().TryGetUse(node, &use); - GenTreeCast* cast = comp->gtNewCastNode(baseType, node, node->IsUnsigned(), baseType); + GenTreeCast* cast = comp->gtNewCastNode(simdBaseType, node, node->IsUnsigned(), simdBaseType); BlockRange().InsertAfter(node, cast); if (foundUse) @@ -4669,12 +4691,12 @@ void Lowering::ContainCheckSIMD(GenTreeSIMD* simdNode) else #endif // !TARGET_64BIT if (op1->IsFPZero() || op1->IsIntegralConst(0) || - (varTypeIsIntegral(simdNode->gtSIMDBaseType) && op1->IsIntegralConst(-1))) + (varTypeIsIntegral(simdNode->GetSimdBaseType()) && op1->IsIntegralConst(-1))) { MakeSrcContained(simdNode, op1); } else if ((comp->getSIMDSupportLevel() == SIMD_AVX2_Supported) && - ((simdNode->gtSIMDSize == 16) || (simdNode->gtSIMDSize == 32))) + ((simdNode->GetSimdSize() == 16) || (simdNode->GetSimdSize() == 32))) { // Either op1 is a float or dbl constant or an addr if (op1->IsCnsFltOrDbl() || op1->OperIsLocalAddr()) @@ -4695,7 +4717,7 @@ void Lowering::ContainCheckSIMD(GenTreeSIMD* simdNode) // This implements get_Item method. The sources are: // - the source SIMD struct // - index (which element to get) - // The result is baseType of SIMD struct. + // The result is simdBaseType of SIMD struct. op1 = simdNode->AsOp()->gtOp1; op2 = simdNode->AsOp()->gtOp2; @@ -4883,7 +4905,7 @@ bool Lowering::IsContainableHWIntrinsicOp(GenTreeHWIntrinsic* containingNode, Ge case NI_SSE41_Insert: case NI_SSE41_X64_Insert: { - if (containingNode->gtSIMDBaseType == TYP_FLOAT) + if (containingNode->GetSimdBaseType() == TYP_FLOAT) { assert(containingIntrinsicId == NI_SSE41_Insert); assert(genTypeSize(node->TypeGet()) == 16); @@ -4944,7 +4966,7 @@ bool Lowering::IsContainableHWIntrinsicOp(GenTreeHWIntrinsic* containingNode, Ge assert(supportsUnalignedSIMDLoads == false); assert(supportsSIMDScalarLoads == false); - const unsigned expectedSize = genTypeSize(containingNode->gtSIMDBaseType); + const unsigned expectedSize = genTypeSize(containingNode->GetSimdBaseType()); const unsigned operandSize = genTypeSize(node->TypeGet()); supportsGeneralLoads = (operandSize >= expectedSize); @@ -4988,7 +5010,7 @@ bool Lowering::IsContainableHWIntrinsicOp(GenTreeHWIntrinsic* containingNode, Ge { assert(supportsSIMDScalarLoads == false); - const unsigned expectedSize = genTypeSize(genActualType(containingNode->gtSIMDBaseType)); + const unsigned expectedSize = genTypeSize(genActualType(containingNode->GetSimdBaseType())); const unsigned operandSize = genTypeSize(node->TypeGet()); supportsGeneralLoads = (operandSize == expectedSize); @@ -5024,7 +5046,7 @@ bool Lowering::IsContainableHWIntrinsicOp(GenTreeHWIntrinsic* containingNode, Ge assert(supportsSIMDScalarLoads == false); - const unsigned expectedSize = genTypeSize(genActualType(containingNode->gtSIMDBaseType)); + const unsigned expectedSize = genTypeSize(genActualType(containingNode->GetSimdBaseType())); const unsigned operandSize = genTypeSize(node->TypeGet()); supportsGeneralLoads = (operandSize == expectedSize); @@ -5060,7 +5082,7 @@ bool Lowering::IsContainableHWIntrinsicOp(GenTreeHWIntrinsic* containingNode, Ge // Currently, we are using SIMDBaseType to store the op2Type info. if (containingIntrinsicId == NI_SSE42_Crc32) { - var_types op2Type = containingNode->gtSIMDBaseType; + var_types op2Type = containingNode->GetSimdBaseType(); expectedSize = genTypeSize(op2Type); } @@ -5154,10 +5176,11 @@ void Lowering::ContainCheckHWIntrinsicAddr(GenTreeHWIntrinsic* node, GenTree* ad // void Lowering::ContainCheckHWIntrinsic(GenTreeHWIntrinsic* node) { - NamedIntrinsic intrinsicId = node->gtHWIntrinsicId; - HWIntrinsicCategory category = HWIntrinsicInfo::lookupCategory(intrinsicId); - int numArgs = HWIntrinsicInfo::lookupNumArgs(node); - var_types baseType = node->gtSIMDBaseType; + NamedIntrinsic intrinsicId = node->gtHWIntrinsicId; + HWIntrinsicCategory category = HWIntrinsicInfo::lookupCategory(intrinsicId); + int numArgs = HWIntrinsicInfo::lookupNumArgs(node); + CorInfoType simdBaseJitType = node->GetSimdBaseJitType(); + var_types simdBaseType = node->GetSimdBaseType(); GenTree* op1 = node->gtGetOp1(); GenTree* op2 = node->gtGetOp2(); @@ -5187,7 +5210,7 @@ void Lowering::ContainCheckHWIntrinsic(GenTreeHWIntrinsic* node) } } - if ((node->gtSIMDSize == 8) || (node->gtSIMDSize == 12)) + if ((node->GetSimdSize() == 8) || (node->GetSimdSize() == 12)) { // TODO-XArch-CQ: Ideally we would key this off of the size containingNode // expects vs the size node actually is or would be if spilled to the stack @@ -5246,7 +5269,7 @@ void Lowering::ContainCheckHWIntrinsic(GenTreeHWIntrinsic* node) case NI_AVX2_ConvertToInt32: case NI_AVX2_ConvertToUInt32: { - if (varTypeIsIntegral(baseType)) + if (varTypeIsIntegral(simdBaseType)) { // TODO-XARCH-CQ: These intrinsics are "ins reg/mem, xmm" and don't // currently support containment. diff --git a/src/coreclr/jit/lsra.cpp b/src/coreclr/jit/lsra.cpp index 609d8eaf0b9e1e..b2688b80028407 100644 --- a/src/coreclr/jit/lsra.cpp +++ b/src/coreclr/jit/lsra.cpp @@ -6952,16 +6952,16 @@ void LinearScan::insertUpperVectorSave(GenTree* tree, GenTreeSIMD* simdNode = new (compiler, GT_SIMD) GenTreeSIMD(LargeVectorSaveType, saveLcl, nullptr, SIMDIntrinsicUpperSave, - varDsc->lvBaseType, genTypeSize(varDsc->lvType)); + varDsc->GetSimdBaseJitType(), genTypeSize(varDsc->lvType)); - if (simdNode->gtSIMDBaseType == TYP_UNDEF) + if (simdNode->GetSimdBaseJitType() == CORINFO_TYPE_UNDEF) { // There are a few scenarios where we can get a LCL_VAR which // doesn't know the underlying baseType. In that scenario, we // will just lie and say it is a float. Codegen doesn't actually // care what the type is but this avoids an assert that would // otherwise be fired from the more general checks that happen. - simdNode->gtSIMDBaseType = TYP_FLOAT; + simdNode->SetSimdBaseJitType(CORINFO_TYPE_FLOAT); } SetLsraAdded(simdNode); @@ -7019,16 +7019,16 @@ void LinearScan::insertUpperVectorRestore(GenTree* tree, GenTreeSIMD* simdNode = new (compiler, GT_SIMD) GenTreeSIMD(varDsc->lvType, restoreLcl, nullptr, SIMDIntrinsicUpperRestore, - varDsc->lvBaseType, genTypeSize(varDsc->lvType)); + varDsc->GetSimdBaseJitType(), genTypeSize(varDsc->lvType)); - if (simdNode->gtSIMDBaseType == TYP_UNDEF) + if (simdNode->GetSimdBaseJitType() == CORINFO_TYPE_UNDEF) { // There are a few scenarios where we can get a LCL_VAR which // doesn't know the underlying baseType. In that scenario, we // will just lie and say it is a float. Codegen doesn't actually // care what the type is but this avoids an assert that would // otherwise be fired from the more general checks that happen. - simdNode->gtSIMDBaseType = TYP_FLOAT; + simdNode->SetSimdBaseJitType(CORINFO_TYPE_FLOAT); } regNumber restoreReg = upperVectorInterval->physReg; diff --git a/src/coreclr/jit/lsraarm64.cpp b/src/coreclr/jit/lsraarm64.cpp index d9aa71da582cf6..d7b51ff42bbe4f 100644 --- a/src/coreclr/jit/lsraarm64.cpp +++ b/src/coreclr/jit/lsraarm64.cpp @@ -871,9 +871,9 @@ int LinearScan::BuildSIMD(GenTreeSIMD* simdTree) case SIMDIntrinsicInitN: { - var_types baseType = simdTree->gtSIMDBaseType; - srcCount = (short)(simdTree->gtSIMDSize / genTypeSize(baseType)); - if (varTypeIsFloating(simdTree->gtSIMDBaseType)) + var_types baseType = simdTree->GetSimdBaseType(); + srcCount = (short)(simdTree->GetSimdSize() / genTypeSize(baseType)); + if (varTypeIsFloating(simdTree->GetSimdBaseType())) { // Need an internal register to stitch together all the values into a single vector in a SIMD reg. buildInternalFloatRegisterDefForNode(simdTree); @@ -978,13 +978,27 @@ int LinearScan::BuildHWIntrinsic(GenTreeHWIntrinsic* intrinsicTree) if (intrin.category == HW_Category_SIMDByIndexedElement) { - const unsigned int indexedElementSimdSize = genTypeSize(intrinsicTree->GetAuxiliaryType()); + var_types indexedElementOpType; + + if (intrin.numOperands == 3) + { + indexedElementOpType = intrin.op2->TypeGet(); + } + else + { + assert(intrin.numOperands == 4); + indexedElementOpType = intrin.op3->TypeGet(); + } + + assert(varTypeIsSIMD(indexedElementOpType)); + + const unsigned int indexedElementSimdSize = genTypeSize(indexedElementOpType); HWIntrinsicInfo::lookupImmBounds(intrin.id, indexedElementSimdSize, intrin.baseType, &immLowerBound, &immUpperBound); } else { - HWIntrinsicInfo::lookupImmBounds(intrin.id, intrinsicTree->gtSIMDSize, intrin.baseType, &immLowerBound, + HWIntrinsicInfo::lookupImmBounds(intrin.id, intrinsicTree->GetSimdSize(), intrin.baseType, &immLowerBound, &immUpperBound); } diff --git a/src/coreclr/jit/lsraxarch.cpp b/src/coreclr/jit/lsraxarch.cpp index 910b121ce05ee1..ad750fad953c8e 100644 --- a/src/coreclr/jit/lsraxarch.cpp +++ b/src/coreclr/jit/lsraxarch.cpp @@ -1874,7 +1874,7 @@ int LinearScan::BuildSIMD(GenTreeSIMD* simdTree) // Only SIMDIntrinsicInit can be contained assert(simdTree->gtSIMDIntrinsicID == SIMDIntrinsicInit); } - SetContainsAVXFlags(simdTree->gtSIMDSize); + SetContainsAVXFlags(simdTree->GetSimdSize()); GenTree* op1 = simdTree->gtGetOp1(); GenTree* op2 = simdTree->gtGetOp2(); int srcCount = 0; @@ -1925,8 +1925,8 @@ int LinearScan::BuildSIMD(GenTreeSIMD* simdTree) case SIMDIntrinsicInitN: { - var_types baseType = simdTree->gtSIMDBaseType; - srcCount = (short)(simdTree->gtSIMDSize / genTypeSize(baseType)); + var_types baseType = simdTree->GetSimdBaseType(); + srcCount = (short)(simdTree->GetSimdSize() / genTypeSize(baseType)); // Need an internal register to stitch together all the values into a single vector in a SIMD reg. buildInternalFloatRegisterDefForNode(simdTree); int initCount = 0; @@ -1982,13 +1982,13 @@ int LinearScan::BuildSIMD(GenTreeSIMD* simdTree) { (void)compiler->getSIMDInitTempVarNum(); } - else if (!varTypeIsFloating(simdTree->gtSIMDBaseType)) + else if (!varTypeIsFloating(simdTree->GetSimdBaseType())) { bool needFloatTemp; - if (varTypeIsSmallInt(simdTree->gtSIMDBaseType) && + if (varTypeIsSmallInt(simdTree->GetSimdBaseType()) && (compiler->getSIMDSupportLevel() == SIMD_AVX2_Supported)) { - int byteShiftCnt = (int)op2->AsIntCon()->gtIconVal * genTypeSize(simdTree->gtSIMDBaseType); + int byteShiftCnt = (int)op2->AsIntCon()->gtIconVal * genTypeSize(simdTree->GetSimdBaseType()); needFloatTemp = (byteShiftCnt >= 16); } else @@ -2007,7 +2007,7 @@ int LinearScan::BuildSIMD(GenTreeSIMD* simdTree) // generate a movzx/movsx. On x86, these require byteable registers. So figure out which // cases will require this, so the non-byteable registers can be excluded. - var_types baseType = simdTree->gtSIMDBaseType; + var_types baseType = simdTree->GetSimdBaseType(); if (op2->IsCnsIntOrI() && varTypeIsSmallInt(baseType)) { bool ZeroOrSignExtnReqd = true; @@ -2050,7 +2050,7 @@ int LinearScan::BuildSIMD(GenTreeSIMD* simdTree) break; case SIMDIntrinsicConvertToSingle: - if (simdTree->gtSIMDBaseType == TYP_UINT) + if (simdTree->GetSimdBaseType() == TYP_UINT) { // We need an internal register different from targetReg. setInternalRegsDelayFree = true; @@ -2066,7 +2066,7 @@ int LinearScan::BuildSIMD(GenTreeSIMD* simdTree) case SIMDIntrinsicWidenLo: case SIMDIntrinsicWidenHi: - if (varTypeIsIntegral(simdTree->gtSIMDBaseType)) + if (varTypeIsIntegral(simdTree->GetSimdBaseType())) { // We need an internal register different from targetReg. setInternalRegsDelayFree = true; @@ -2091,14 +2091,15 @@ int LinearScan::BuildSIMD(GenTreeSIMD* simdTree) setInternalRegsDelayFree = true; buildInternalFloatRegisterDefForNode(simdTree); #ifdef TARGET_X86 - if (simdTree->gtSIMDBaseType == TYP_LONG) + if (simdTree->GetSimdBaseType() == TYP_LONG) { buildInternalFloatRegisterDefForNode(simdTree); buildInternalFloatRegisterDefForNode(simdTree); } else #endif - if ((compiler->getSIMDSupportLevel() == SIMD_AVX2_Supported) || (simdTree->gtSIMDBaseType == TYP_ULONG)) + if ((compiler->getSIMDSupportLevel() == SIMD_AVX2_Supported) || + (simdTree->GetSimdBaseType() == TYP_ULONG)) { buildInternalFloatRegisterDefForNode(simdTree); } @@ -2110,7 +2111,7 @@ int LinearScan::BuildSIMD(GenTreeSIMD* simdTree) // We need an internal register different from targetReg. setInternalRegsDelayFree = true; buildInternalFloatRegisterDefForNode(simdTree); - if ((compiler->getSIMDSupportLevel() == SIMD_AVX2_Supported) && (simdTree->gtSIMDBaseType != TYP_DOUBLE)) + if ((compiler->getSIMDSupportLevel() == SIMD_AVX2_Supported) && (simdTree->GetSimdBaseType() != TYP_DOUBLE)) { buildInternalFloatRegisterDefForNode(simdTree); } @@ -2158,7 +2159,7 @@ int LinearScan::BuildSIMD(GenTreeSIMD* simdTree) int LinearScan::BuildHWIntrinsic(GenTreeHWIntrinsic* intrinsicTree) { NamedIntrinsic intrinsicId = intrinsicTree->gtHWIntrinsicId; - var_types baseType = intrinsicTree->gtSIMDBaseType; + var_types baseType = intrinsicTree->GetSimdBaseType(); HWIntrinsicCategory category = HWIntrinsicInfo::lookupCategory(intrinsicId); int numArgs = HWIntrinsicInfo::lookupNumArgs(intrinsicTree); @@ -2167,7 +2168,7 @@ int LinearScan::BuildHWIntrinsic(GenTreeHWIntrinsic* intrinsicTree) // or non-AVX intrinsics that will use VEX encoding if it is available on the target). if (intrinsicTree->isSIMD()) { - SetContainsAVXFlags(intrinsicTree->gtSIMDSize); + SetContainsAVXFlags(intrinsicTree->GetSimdSize()); } GenTree* op1 = intrinsicTree->gtGetOp1(); diff --git a/src/coreclr/jit/morph.cpp b/src/coreclr/jit/morph.cpp index 7ce35872d1bc08..154b131ba5b0e8 100644 --- a/src/coreclr/jit/morph.cpp +++ b/src/coreclr/jit/morph.cpp @@ -5439,7 +5439,7 @@ GenTree* Compiler::fgMorphArrayIndex(GenTree* tree) // so we need to set the correct type on the GT_IND. // (We don't care about the base type here, so we only check, but don't retain, the return value). unsigned simdElemSize = 0; - if (getBaseTypeAndSizeOfSIMDType(elemStructType, &simdElemSize) != TYP_UNKNOWN) + if (getBaseJitTypeAndSizeOfSIMDType(elemStructType, &simdElemSize) != CORINFO_TYPE_UNDEF) { assert(simdElemSize == elemSize); elemTyp = getSIMDTypeForSize(elemSize); @@ -10079,7 +10079,8 @@ GenTree* Compiler::fgMorphOneAsgBlockOp(GenTree* tree) noway_assert(src->IsIntegralConst(0)); noway_assert(destVarDsc != nullptr); - src = new (this, GT_SIMD) GenTreeSIMD(asgType, src, SIMDIntrinsicInit, destVarDsc->lvBaseType, size); + src = new (this, GT_SIMD) + GenTreeSIMD(asgType, src, SIMDIntrinsicInit, destVarDsc->GetSimdBaseJitType(), size); } else #endif @@ -11911,8 +11912,8 @@ GenTree* Compiler::fgMorphForRegisterFP(GenTree* tree) // Arguments: // tree - GentreePtr. This node will be checked to see this is a field which belongs to a simd // struct used for simd intrinsic or not. -// pBaseTypeOut - var_types pointer, if the tree node is the tree we want, we set *pBaseTypeOut -// to simd lclvar's base type. +// simdBaseJitTypeOut - CorInfoType pointer, if the tree node is the tree we want, we set *simdBaseJitTypeOut +// to simd lclvar's base JIT type. // indexOut - unsigned pointer, if the tree is used for simd intrinsic, we will set *indexOut // equals to the index number of this field. // simdSizeOut - unsigned pointer, if the tree is used for simd intrinsic, set the *simdSizeOut @@ -11925,11 +11926,11 @@ GenTree* Compiler::fgMorphForRegisterFP(GenTree* tree) // instrinic related field, return nullptr. // -GenTree* Compiler::getSIMDStructFromField(GenTree* tree, - var_types* pBaseTypeOut, - unsigned* indexOut, - unsigned* simdSizeOut, - bool ignoreUsedInSIMDIntrinsic /*false*/) +GenTree* Compiler::getSIMDStructFromField(GenTree* tree, + CorInfoType* simdBaseJitTypeOut, + unsigned* indexOut, + unsigned* simdSizeOut, + bool ignoreUsedInSIMDIntrinsic /*false*/) { GenTree* ret = nullptr; if (tree->OperGet() == GT_FIELD) @@ -11957,33 +11958,33 @@ GenTree* Compiler::getSIMDStructFromField(GenTree* tree, LclVarDsc* varDsc = &lvaTable[lclNum]; if (varDsc->lvIsUsedInSIMDIntrinsic() || ignoreUsedInSIMDIntrinsic) { - *simdSizeOut = varDsc->lvExactSize; - *pBaseTypeOut = getBaseTypeOfSIMDLocal(obj); - ret = obj; + *simdSizeOut = varDsc->lvExactSize; + *simdBaseJitTypeOut = getBaseJitTypeOfSIMDLocal(obj); + ret = obj; } } else if (obj->OperGet() == GT_SIMD) { ret = obj; GenTreeSIMD* simdNode = obj->AsSIMD(); - *simdSizeOut = simdNode->gtSIMDSize; - *pBaseTypeOut = simdNode->gtSIMDBaseType; + *simdSizeOut = simdNode->GetSimdSize(); + *simdBaseJitTypeOut = simdNode->GetSimdBaseJitType(); } #ifdef FEATURE_HW_INTRINSICS else if (obj->OperIsHWIntrinsic()) { ret = obj; GenTreeHWIntrinsic* simdNode = obj->AsHWIntrinsic(); - *simdSizeOut = simdNode->gtSIMDSize; - *pBaseTypeOut = simdNode->gtSIMDBaseType; + *simdSizeOut = simdNode->GetSimdSize(); + *simdBaseJitTypeOut = simdNode->GetSimdBaseJitType(); } #endif // FEATURE_HW_INTRINSICS } } if (ret != nullptr) { - unsigned BaseTypeSize = genTypeSize(*pBaseTypeOut); - *indexOut = tree->AsField()->gtFldOffset / BaseTypeSize; + unsigned baseTypeSize = genTypeSize(JITtype2varType(*simdBaseJitTypeOut)); + *indexOut = tree->AsField()->gtFldOffset / baseTypeSize; } return ret; } @@ -12002,15 +12003,16 @@ GenTree* Compiler::getSIMDStructFromField(GenTree* tree, GenTree* Compiler::fgMorphFieldToSIMDIntrinsicGet(GenTree* tree) { - unsigned index = 0; - var_types baseType = TYP_UNKNOWN; - unsigned simdSize = 0; - GenTree* simdStructNode = getSIMDStructFromField(tree, &baseType, &index, &simdSize); + unsigned index = 0; + CorInfoType simdBaseJitType = CORINFO_TYPE_UNDEF; + unsigned simdSize = 0; + GenTree* simdStructNode = getSIMDStructFromField(tree, &simdBaseJitType, &index, &simdSize); if (simdStructNode != nullptr) { - assert(simdSize >= ((index + 1) * genTypeSize(baseType))); + var_types simdBaseType = JitType2PreciseVarType(simdBaseJitType); + assert(simdSize >= ((index + 1) * genTypeSize(simdBaseType))); GenTree* op2 = gtNewIconNode(index); - tree = gtNewSIMDNode(baseType, simdStructNode, op2, SIMDIntrinsicGetItem, baseType, simdSize); + tree = gtNewSIMDNode(simdBaseType, simdStructNode, op2, SIMDIntrinsicGetItem, simdBaseJitType, simdSize); #ifdef DEBUG tree->gtDebugFlags |= GTF_DEBUG_NODE_MORPHED; #endif @@ -12036,14 +12038,16 @@ GenTree* Compiler::fgMorphFieldAssignToSIMDIntrinsicSet(GenTree* tree) GenTree* op1 = tree->gtGetOp1(); GenTree* op2 = tree->gtGetOp2(); - unsigned index = 0; - var_types baseType = TYP_UNKNOWN; - unsigned simdSize = 0; - GenTree* simdOp1Struct = getSIMDStructFromField(op1, &baseType, &index, &simdSize); + unsigned index = 0; + CorInfoType simdBaseJitType = CORINFO_TYPE_UNDEF; + unsigned simdSize = 0; + GenTree* simdOp1Struct = getSIMDStructFromField(op1, &simdBaseJitType, &index, &simdSize); if (simdOp1Struct != nullptr) { + var_types simdBaseType = JitType2PreciseVarType(simdBaseJitType); + // Generate the simd set intrinsic - assert(simdSize >= ((index + 1) * genTypeSize(baseType))); + assert(simdSize >= ((index + 1) * genTypeSize(simdBaseType))); SIMDIntrinsicID simdIntrinsicID = SIMDIntrinsicInvalid; switch (index) @@ -12067,7 +12071,7 @@ GenTree* Compiler::fgMorphFieldAssignToSIMDIntrinsicSet(GenTree* tree) GenTree* target = gtClone(simdOp1Struct); assert(target != nullptr); var_types simdType = target->gtType; - GenTree* simdTree = gtNewSIMDNode(simdType, simdOp1Struct, op2, simdIntrinsicID, baseType, simdSize); + GenTree* simdTree = gtNewSIMDNode(simdType, simdOp1Struct, op2, simdIntrinsicID, simdBaseJitType, simdSize); tree->AsOp()->gtOp1 = target; tree->AsOp()->gtOp2 = simdTree; @@ -19078,22 +19082,23 @@ bool Compiler::fgMorphCombineSIMDFieldAssignments(BasicBlock* block, Statement* GenTree* tree = stmt->GetRootNode(); assert(tree->OperGet() == GT_ASG); - GenTree* originalLHS = tree->AsOp()->gtOp1; - GenTree* prevLHS = tree->AsOp()->gtOp1; - GenTree* prevRHS = tree->AsOp()->gtOp2; - unsigned index = 0; - var_types baseType = TYP_UNKNOWN; - unsigned simdSize = 0; - GenTree* simdStructNode = getSIMDStructFromField(prevRHS, &baseType, &index, &simdSize, true); + GenTree* originalLHS = tree->AsOp()->gtOp1; + GenTree* prevLHS = tree->AsOp()->gtOp1; + GenTree* prevRHS = tree->AsOp()->gtOp2; + unsigned index = 0; + CorInfoType simdBaseJitType = CORINFO_TYPE_UNDEF; + unsigned simdSize = 0; + GenTree* simdStructNode = getSIMDStructFromField(prevRHS, &simdBaseJitType, &index, &simdSize, true); - if (simdStructNode == nullptr || index != 0 || baseType != TYP_FLOAT) + if (simdStructNode == nullptr || index != 0 || simdBaseJitType != CORINFO_TYPE_FLOAT) { // if the RHS is not from a SIMD vector field X, then there is no need to check further. return false; } + var_types simdBaseType = JitType2PreciseVarType(simdBaseJitType); var_types simdType = getSIMDTypeForSize(simdSize); - int assignmentsCount = simdSize / genTypeSize(baseType) - 1; + int assignmentsCount = simdSize / genTypeSize(simdBaseType) - 1; int remainingAssignments = assignmentsCount; Statement* curStmt = stmt->GetNextStmt(); Statement* lastStmt = stmt; diff --git a/src/coreclr/jit/rationalize.cpp b/src/coreclr/jit/rationalize.cpp index ebdac7725ab7f6..e15bc54d3afab1 100644 --- a/src/coreclr/jit/rationalize.cpp +++ b/src/coreclr/jit/rationalize.cpp @@ -400,13 +400,13 @@ void Rationalizer::RewriteAssignment(LIR::Use& use) { if (location->OperGet() == GT_LCL_VAR) { - var_types simdType = location->TypeGet(); - GenTree* initVal = assignment->AsOp()->gtOp2; - var_types baseType = comp->getBaseTypeOfSIMDLocal(location); - if (baseType != TYP_UNKNOWN) + var_types simdType = location->TypeGet(); + GenTree* initVal = assignment->AsOp()->gtOp2; + CorInfoType simdBaseJitType = comp->getBaseJitTypeOfSIMDLocal(location); + if (simdBaseJitType != CORINFO_TYPE_UNDEF) { GenTreeSIMD* simdTree = new (comp, GT_SIMD) - GenTreeSIMD(simdType, initVal, SIMDIntrinsicInit, baseType, genTypeSize(simdType)); + GenTreeSIMD(simdType, initVal, SIMDIntrinsicInit, simdBaseJitType, genTypeSize(simdType)); assignment->AsOp()->gtOp2 = simdTree; value = simdTree; initVal->gtNext = simdTree; @@ -734,17 +734,17 @@ Compiler::fgWalkResult Rationalizer::RewriteNode(GenTree** useEdge, Compiler::Ge { noway_assert(comp->supportSIMDTypes()); GenTreeSIMD* simdNode = node->AsSIMD(); - unsigned simdSize = simdNode->gtSIMDSize; + unsigned simdSize = simdNode->GetSimdSize(); var_types simdType = comp->getSIMDTypeForSize(simdSize); // TODO-1stClassStructs: This should be handled more generally for enregistered or promoted // structs that are passed or returned in a different register type than their enregistered // type(s). - if (simdNode->gtType == TYP_I_IMPL && simdNode->gtSIMDSize == TARGET_POINTER_SIZE) + if (simdNode->gtType == TYP_I_IMPL && simdNode->GetSimdSize() == TARGET_POINTER_SIZE) { // This happens when it is consumed by a GT_RET_EXPR. // It can only be a Vector2f or Vector2i. - assert(genTypeSize(simdNode->gtSIMDBaseType) == 4); + assert(genTypeSize(simdNode->GetSimdBaseType()) == 4); simdNode->gtType = TYP_SIMD8; } // Certain SIMD trees require rationalizing. @@ -752,7 +752,7 @@ Compiler::fgWalkResult Rationalizer::RewriteNode(GenTree** useEdge, Compiler::Ge { // Rewrite this as an explicit load. JITDUMP("Rewriting GT_SIMD array init as an explicit load:\n"); - unsigned int baseTypeSize = genTypeSize(simdNode->gtSIMDBaseType); + unsigned int baseTypeSize = genTypeSize(simdNode->GetSimdBaseType()); GenTree* address = new (comp, GT_LEA) GenTreeAddrMode(TYP_BYREF, simdNode->gtOp1, simdNode->gtOp2, baseTypeSize, OFFSETOF__CORINFO_Array__data); GenTree* ind = comp->gtNewOperNode(GT_IND, simdType, address); @@ -801,7 +801,7 @@ Compiler::fgWalkResult Rationalizer::RewriteNode(GenTree** useEdge, Compiler::Ge // TODO-1stClassStructs: This should be handled more generally for enregistered or promoted // structs that are passed or returned in a different register type than their enregistered // type(s). - if ((hwIntrinsicNode->gtType == TYP_I_IMPL) && (hwIntrinsicNode->gtSIMDSize == TARGET_POINTER_SIZE)) + if ((hwIntrinsicNode->gtType == TYP_I_IMPL) && (hwIntrinsicNode->GetSimdSize() == TARGET_POINTER_SIZE)) { #ifdef TARGET_ARM64 // Special case for GetElement/ToScalar because they take Vector64 and return T @@ -812,7 +812,7 @@ Compiler::fgWalkResult Rationalizer::RewriteNode(GenTree** useEdge, Compiler::Ge { // This happens when it is consumed by a GT_RET_EXPR. // It can only be a Vector2f or Vector2i. - assert(genTypeSize(hwIntrinsicNode->gtSIMDBaseType) == 4); + assert(genTypeSize(hwIntrinsicNode->GetSimdBaseType()) == 4); hwIntrinsicNode->gtType = TYP_SIMD8; } } diff --git a/src/coreclr/jit/simd.cpp b/src/coreclr/jit/simd.cpp index 0664089a834ef3..b5b3532f632d00 100644 --- a/src/coreclr/jit/simd.cpp +++ b/src/coreclr/jit/simd.cpp @@ -61,8 +61,9 @@ int Compiler::getSIMDVectorLength(unsigned simdSize, var_types baseType) // int Compiler::getSIMDVectorLength(CORINFO_CLASS_HANDLE typeHnd) { - unsigned sizeBytes = 0; - var_types baseType = getBaseTypeAndSizeOfSIMDType(typeHnd, &sizeBytes); + unsigned sizeBytes = 0; + CorInfoType baseJitType = getBaseJitTypeAndSizeOfSIMDType(typeHnd, &sizeBytes); + var_types baseType = JitType2PreciseVarType(baseJitType); return getSIMDVectorLength(sizeBytes, baseType); } @@ -124,7 +125,7 @@ int Compiler::getSIMDTypeAlignment(var_types simdType) // TODO-Throughput: current implementation parses class name to find base type. Change // this when we implement SIMD intrinsic identification for the final // product. -var_types Compiler::getBaseTypeAndSizeOfSIMDType(CORINFO_CLASS_HANDLE typeHnd, unsigned* sizeBytes /*= nullptr */) +CorInfoType Compiler::getBaseJitTypeAndSizeOfSIMDType(CORINFO_CLASS_HANDLE typeHnd, unsigned* sizeBytes /*= nullptr */) { assert(supportSIMDTypes()); @@ -149,12 +150,12 @@ var_types Compiler::getBaseTypeAndSizeOfSIMDType(CORINFO_CLASS_HANDLE typeHnd, u if (typeHnd == nullptr) { - return TYP_UNKNOWN; + return CORINFO_TYPE_UNDEF; } // fast path search using cached type handles of important types - var_types simdBaseType = TYP_UNKNOWN; - unsigned size = 0; + CorInfoType simdBaseJitType = CORINFO_TYPE_UNDEF; + unsigned size = 0; // TODO - Optimize SIMD type recognition by IntrinsicAttribute if (isSIMDClass(typeHnd)) @@ -163,34 +164,34 @@ var_types Compiler::getBaseTypeAndSizeOfSIMDType(CORINFO_CLASS_HANDLE typeHnd, u // less likely to be used type handles if (typeHnd == m_simdHandleCache->SIMDFloatHandle) { - simdBaseType = TYP_FLOAT; - size = getSIMDVectorRegisterByteLength(); + simdBaseJitType = CORINFO_TYPE_FLOAT; + size = getSIMDVectorRegisterByteLength(); JITDUMP(" Known type SIMD Vector\n"); } else if (typeHnd == m_simdHandleCache->SIMDIntHandle) { - simdBaseType = TYP_INT; - size = getSIMDVectorRegisterByteLength(); + simdBaseJitType = CORINFO_TYPE_INT; + size = getSIMDVectorRegisterByteLength(); JITDUMP(" Known type SIMD Vector\n"); } else if (typeHnd == m_simdHandleCache->SIMDVector2Handle) { - simdBaseType = TYP_FLOAT; - size = 2 * genTypeSize(TYP_FLOAT); + simdBaseJitType = CORINFO_TYPE_FLOAT; + size = 2 * genTypeSize(TYP_FLOAT); assert(size == roundUp(info.compCompHnd->getClassSize(typeHnd), TARGET_POINTER_SIZE)); JITDUMP(" Known type Vector2\n"); } else if (typeHnd == m_simdHandleCache->SIMDVector3Handle) { - simdBaseType = TYP_FLOAT; - size = 3 * genTypeSize(TYP_FLOAT); + simdBaseJitType = CORINFO_TYPE_FLOAT; + size = 3 * genTypeSize(TYP_FLOAT); assert(size == info.compCompHnd->getClassSize(typeHnd)); JITDUMP(" Known type Vector3\n"); } else if (typeHnd == m_simdHandleCache->SIMDVector4Handle) { - simdBaseType = TYP_FLOAT; - size = 4 * genTypeSize(TYP_FLOAT); + simdBaseJitType = CORINFO_TYPE_FLOAT; + size = 4 * genTypeSize(TYP_FLOAT); assert(size == roundUp(info.compCompHnd->getClassSize(typeHnd), TARGET_POINTER_SIZE)); JITDUMP(" Known type Vector4\n"); } @@ -201,55 +202,67 @@ var_types Compiler::getBaseTypeAndSizeOfSIMDType(CORINFO_CLASS_HANDLE typeHnd, u } else if (typeHnd == m_simdHandleCache->SIMDUShortHandle) { - simdBaseType = TYP_USHORT; - size = getSIMDVectorRegisterByteLength(); + simdBaseJitType = CORINFO_TYPE_USHORT; + size = getSIMDVectorRegisterByteLength(); JITDUMP(" Known type SIMD Vector\n"); } else if (typeHnd == m_simdHandleCache->SIMDUByteHandle) { - simdBaseType = TYP_UBYTE; - size = getSIMDVectorRegisterByteLength(); + simdBaseJitType = CORINFO_TYPE_UBYTE; + size = getSIMDVectorRegisterByteLength(); JITDUMP(" Known type SIMD Vector\n"); } else if (typeHnd == m_simdHandleCache->SIMDDoubleHandle) { - simdBaseType = TYP_DOUBLE; - size = getSIMDVectorRegisterByteLength(); + simdBaseJitType = CORINFO_TYPE_DOUBLE; + size = getSIMDVectorRegisterByteLength(); JITDUMP(" Known type SIMD Vector\n"); } else if (typeHnd == m_simdHandleCache->SIMDLongHandle) { - simdBaseType = TYP_LONG; - size = getSIMDVectorRegisterByteLength(); + simdBaseJitType = CORINFO_TYPE_LONG; + size = getSIMDVectorRegisterByteLength(); JITDUMP(" Known type SIMD Vector\n"); } else if (typeHnd == m_simdHandleCache->SIMDShortHandle) { - simdBaseType = TYP_SHORT; - size = getSIMDVectorRegisterByteLength(); + simdBaseJitType = CORINFO_TYPE_SHORT; + size = getSIMDVectorRegisterByteLength(); JITDUMP(" Known type SIMD Vector\n"); } else if (typeHnd == m_simdHandleCache->SIMDByteHandle) { - simdBaseType = TYP_BYTE; - size = getSIMDVectorRegisterByteLength(); + simdBaseJitType = CORINFO_TYPE_BYTE; + size = getSIMDVectorRegisterByteLength(); JITDUMP(" Known type SIMD Vector\n"); } else if (typeHnd == m_simdHandleCache->SIMDUIntHandle) { - simdBaseType = TYP_UINT; - size = getSIMDVectorRegisterByteLength(); + simdBaseJitType = CORINFO_TYPE_UINT; + size = getSIMDVectorRegisterByteLength(); JITDUMP(" Known type SIMD Vector\n"); } else if (typeHnd == m_simdHandleCache->SIMDULongHandle) { - simdBaseType = TYP_ULONG; - size = getSIMDVectorRegisterByteLength(); + simdBaseJitType = CORINFO_TYPE_ULONG; + size = getSIMDVectorRegisterByteLength(); JITDUMP(" Known type SIMD Vector\n"); } + else if (typeHnd == m_simdHandleCache->SIMDNIntHandle) + { + simdBaseJitType = CORINFO_TYPE_NATIVEINT; + size = getSIMDVectorRegisterByteLength(); + JITDUMP(" Known type SIMD Vector\n"); + } + else if (typeHnd == m_simdHandleCache->SIMDNUIntHandle) + { + simdBaseJitType = CORINFO_TYPE_NATIVEUINT; + size = getSIMDVectorRegisterByteLength(); + JITDUMP(" Known type SIMD Vector\n"); + } // slow path search - if (simdBaseType == TYP_UNKNOWN) + if (simdBaseJitType == CORINFO_TYPE_UNDEF) { // Doesn't match with any of the cached type handles. // Obtain base type by parsing fully qualified class name. @@ -271,63 +284,75 @@ var_types Compiler::getBaseTypeAndSizeOfSIMDType(CORINFO_CLASS_HANDLE typeHnd, u if (wcsncmp(&(className[25]), W("System.Single"), 13) == 0) { m_simdHandleCache->SIMDFloatHandle = typeHnd; - simdBaseType = TYP_FLOAT; + simdBaseJitType = CORINFO_TYPE_FLOAT; JITDUMP(" Found type SIMD Vector\n"); } else if (wcsncmp(&(className[25]), W("System.Int32"), 12) == 0) { m_simdHandleCache->SIMDIntHandle = typeHnd; - simdBaseType = TYP_INT; + simdBaseJitType = CORINFO_TYPE_INT; JITDUMP(" Found type SIMD Vector\n"); } else if (wcsncmp(&(className[25]), W("System.UInt16"), 13) == 0) { m_simdHandleCache->SIMDUShortHandle = typeHnd; - simdBaseType = TYP_USHORT; + simdBaseJitType = CORINFO_TYPE_USHORT; JITDUMP(" Found type SIMD Vector\n"); } else if (wcsncmp(&(className[25]), W("System.Byte"), 11) == 0) { m_simdHandleCache->SIMDUByteHandle = typeHnd; - simdBaseType = TYP_UBYTE; + simdBaseJitType = CORINFO_TYPE_UBYTE; JITDUMP(" Found type SIMD Vector\n"); } else if (wcsncmp(&(className[25]), W("System.Double"), 13) == 0) { m_simdHandleCache->SIMDDoubleHandle = typeHnd; - simdBaseType = TYP_DOUBLE; + simdBaseJitType = CORINFO_TYPE_DOUBLE; JITDUMP(" Found type SIMD Vector\n"); } else if (wcsncmp(&(className[25]), W("System.Int64"), 12) == 0) { m_simdHandleCache->SIMDLongHandle = typeHnd; - simdBaseType = TYP_LONG; + simdBaseJitType = CORINFO_TYPE_LONG; JITDUMP(" Found type SIMD Vector\n"); } else if (wcsncmp(&(className[25]), W("System.Int16"), 12) == 0) { m_simdHandleCache->SIMDShortHandle = typeHnd; - simdBaseType = TYP_SHORT; + simdBaseJitType = CORINFO_TYPE_SHORT; JITDUMP(" Found type SIMD Vector\n"); } else if (wcsncmp(&(className[25]), W("System.SByte"), 12) == 0) { m_simdHandleCache->SIMDByteHandle = typeHnd; - simdBaseType = TYP_BYTE; + simdBaseJitType = CORINFO_TYPE_BYTE; JITDUMP(" Found type SIMD Vector\n"); } else if (wcsncmp(&(className[25]), W("System.UInt32"), 13) == 0) { m_simdHandleCache->SIMDUIntHandle = typeHnd; - simdBaseType = TYP_UINT; + simdBaseJitType = CORINFO_TYPE_UINT; JITDUMP(" Found type SIMD Vector\n"); } else if (wcsncmp(&(className[25]), W("System.UInt64"), 13) == 0) { m_simdHandleCache->SIMDULongHandle = typeHnd; - simdBaseType = TYP_ULONG; + simdBaseJitType = CORINFO_TYPE_ULONG; JITDUMP(" Found type SIMD Vector\n"); } + else if (wcsncmp(&(className[25]), W("System.IntPtr"), 13) == 0) + { + m_simdHandleCache->SIMDNIntHandle = typeHnd; + simdBaseJitType = CORINFO_TYPE_NATIVEINT; + JITDUMP(" Found type SIMD Vector\n"); + } + else if (wcsncmp(&(className[25]), W("System.UIntPtr"), 14) == 0) + { + m_simdHandleCache->SIMDNUIntHandle = typeHnd; + simdBaseJitType = CORINFO_TYPE_NATIVEUINT; + JITDUMP(" Found type SIMD Vector\n"); + } else { JITDUMP(" Unknown SIMD Vector\n"); @@ -337,8 +362,8 @@ var_types Compiler::getBaseTypeAndSizeOfSIMDType(CORINFO_CLASS_HANDLE typeHnd, u { m_simdHandleCache->SIMDVector2Handle = typeHnd; - simdBaseType = TYP_FLOAT; - size = 2 * genTypeSize(TYP_FLOAT); + simdBaseJitType = CORINFO_TYPE_FLOAT; + size = 2 * genTypeSize(TYP_FLOAT); assert(size == roundUp(info.compCompHnd->getClassSize(typeHnd), TARGET_POINTER_SIZE)); JITDUMP(" Found Vector2\n"); } @@ -346,8 +371,8 @@ var_types Compiler::getBaseTypeAndSizeOfSIMDType(CORINFO_CLASS_HANDLE typeHnd, u { m_simdHandleCache->SIMDVector3Handle = typeHnd; - simdBaseType = TYP_FLOAT; - size = 3 * genTypeSize(TYP_FLOAT); + simdBaseJitType = CORINFO_TYPE_FLOAT; + size = 3 * genTypeSize(TYP_FLOAT); assert(size == info.compCompHnd->getClassSize(typeHnd)); JITDUMP(" Found Vector3\n"); } @@ -355,8 +380,8 @@ var_types Compiler::getBaseTypeAndSizeOfSIMDType(CORINFO_CLASS_HANDLE typeHnd, u { m_simdHandleCache->SIMDVector4Handle = typeHnd; - simdBaseType = TYP_FLOAT; - size = 4 * genTypeSize(TYP_FLOAT); + simdBaseJitType = CORINFO_TYPE_FLOAT; + size = 4 * genTypeSize(TYP_FLOAT); assert(size == roundUp(info.compCompHnd->getClassSize(typeHnd), TARGET_POINTER_SIZE)); JITDUMP(" Found Vector4\n"); } @@ -386,192 +411,192 @@ var_types Compiler::getBaseTypeAndSizeOfSIMDType(CORINFO_CLASS_HANDLE typeHnd, u if (typeHnd == m_simdHandleCache->Vector256FloatHandle) { - simdBaseType = TYP_FLOAT; - size = Vector256SizeBytes; + simdBaseJitType = CORINFO_TYPE_FLOAT; + size = Vector256SizeBytes; JITDUMP(" Known type Vector256\n"); } else if (typeHnd == m_simdHandleCache->Vector256DoubleHandle) { - simdBaseType = TYP_DOUBLE; - size = Vector256SizeBytes; + simdBaseJitType = CORINFO_TYPE_DOUBLE; + size = Vector256SizeBytes; JITDUMP(" Known type Vector256\n"); } else if (typeHnd == m_simdHandleCache->Vector256IntHandle) { - simdBaseType = TYP_INT; - size = Vector256SizeBytes; + simdBaseJitType = CORINFO_TYPE_INT; + size = Vector256SizeBytes; JITDUMP(" Known type Vector256\n"); } else if (typeHnd == m_simdHandleCache->Vector256UIntHandle) { - simdBaseType = TYP_UINT; - size = Vector256SizeBytes; + simdBaseJitType = CORINFO_TYPE_UINT; + size = Vector256SizeBytes; JITDUMP(" Known type Vector256\n"); } else if (typeHnd == m_simdHandleCache->Vector256ShortHandle) { - simdBaseType = TYP_SHORT; - size = Vector256SizeBytes; + simdBaseJitType = CORINFO_TYPE_SHORT; + size = Vector256SizeBytes; JITDUMP(" Known type Vector256\n"); } else if (typeHnd == m_simdHandleCache->Vector256UShortHandle) { - simdBaseType = TYP_USHORT; - size = Vector256SizeBytes; + simdBaseJitType = CORINFO_TYPE_USHORT; + size = Vector256SizeBytes; JITDUMP(" Known type Vector256\n"); } else if (typeHnd == m_simdHandleCache->Vector256ByteHandle) { - simdBaseType = TYP_BYTE; - size = Vector256SizeBytes; + simdBaseJitType = CORINFO_TYPE_BYTE; + size = Vector256SizeBytes; JITDUMP(" Known type Vector256\n"); } else if (typeHnd == m_simdHandleCache->Vector256UByteHandle) { - simdBaseType = TYP_UBYTE; - size = Vector256SizeBytes; + simdBaseJitType = CORINFO_TYPE_UBYTE; + size = Vector256SizeBytes; JITDUMP(" Known type Vector256\n"); } else if (typeHnd == m_simdHandleCache->Vector256LongHandle) { - simdBaseType = TYP_LONG; - size = Vector256SizeBytes; + simdBaseJitType = CORINFO_TYPE_LONG; + size = Vector256SizeBytes; JITDUMP(" Known type Vector256\n"); } else if (typeHnd == m_simdHandleCache->Vector256ULongHandle) { - simdBaseType = TYP_ULONG; - size = Vector256SizeBytes; + simdBaseJitType = CORINFO_TYPE_ULONG; + size = Vector256SizeBytes; JITDUMP(" Known type Vector256\n"); } else #endif // defined(TARGET_XARCH) if (typeHnd == m_simdHandleCache->Vector128FloatHandle) { - simdBaseType = TYP_FLOAT; - size = Vector128SizeBytes; + simdBaseJitType = CORINFO_TYPE_FLOAT; + size = Vector128SizeBytes; JITDUMP(" Known type Vector128\n"); } else if (typeHnd == m_simdHandleCache->Vector128DoubleHandle) { - simdBaseType = TYP_DOUBLE; - size = Vector128SizeBytes; + simdBaseJitType = CORINFO_TYPE_DOUBLE; + size = Vector128SizeBytes; JITDUMP(" Known type Vector128\n"); } else if (typeHnd == m_simdHandleCache->Vector128IntHandle) { - simdBaseType = TYP_INT; - size = Vector128SizeBytes; + simdBaseJitType = CORINFO_TYPE_INT; + size = Vector128SizeBytes; JITDUMP(" Known type Vector128\n"); } else if (typeHnd == m_simdHandleCache->Vector128UIntHandle) { - simdBaseType = TYP_UINT; - size = Vector128SizeBytes; + simdBaseJitType = CORINFO_TYPE_UINT; + size = Vector128SizeBytes; JITDUMP(" Known type Vector128\n"); } else if (typeHnd == m_simdHandleCache->Vector128ShortHandle) { - simdBaseType = TYP_SHORT; - size = Vector128SizeBytes; + simdBaseJitType = CORINFO_TYPE_SHORT; + size = Vector128SizeBytes; JITDUMP(" Known type Vector128\n"); } else if (typeHnd == m_simdHandleCache->Vector128UShortHandle) { - simdBaseType = TYP_USHORT; - size = Vector128SizeBytes; + simdBaseJitType = CORINFO_TYPE_USHORT; + size = Vector128SizeBytes; JITDUMP(" Known type Vector128\n"); } else if (typeHnd == m_simdHandleCache->Vector128ByteHandle) { - simdBaseType = TYP_BYTE; - size = Vector128SizeBytes; + simdBaseJitType = CORINFO_TYPE_BYTE; + size = Vector128SizeBytes; JITDUMP(" Known type Vector128\n"); } else if (typeHnd == m_simdHandleCache->Vector128UByteHandle) { - simdBaseType = TYP_UBYTE; - size = Vector128SizeBytes; + simdBaseJitType = CORINFO_TYPE_UBYTE; + size = Vector128SizeBytes; JITDUMP(" Known type Vector128\n"); } else if (typeHnd == m_simdHandleCache->Vector128LongHandle) { - simdBaseType = TYP_LONG; - size = Vector128SizeBytes; + simdBaseJitType = CORINFO_TYPE_LONG; + size = Vector128SizeBytes; JITDUMP(" Known type Vector128\n"); } else if (typeHnd == m_simdHandleCache->Vector128ULongHandle) { - simdBaseType = TYP_ULONG; - size = Vector128SizeBytes; + simdBaseJitType = CORINFO_TYPE_ULONG; + size = Vector128SizeBytes; JITDUMP(" Known type Vector128\n"); } else #if defined(TARGET_ARM64) if (typeHnd == m_simdHandleCache->Vector64FloatHandle) { - simdBaseType = TYP_FLOAT; - size = Vector64SizeBytes; + simdBaseJitType = CORINFO_TYPE_FLOAT; + size = Vector64SizeBytes; JITDUMP(" Known type Vector64\n"); } else if (typeHnd == m_simdHandleCache->Vector64DoubleHandle) { - simdBaseType = TYP_DOUBLE; - size = Vector64SizeBytes; + simdBaseJitType = CORINFO_TYPE_DOUBLE; + size = Vector64SizeBytes; JITDUMP(" Known type Vector64\n"); } else if (typeHnd == m_simdHandleCache->Vector64IntHandle) { - simdBaseType = TYP_INT; - size = Vector64SizeBytes; + simdBaseJitType = CORINFO_TYPE_INT; + size = Vector64SizeBytes; JITDUMP(" Known type Vector64\n"); } else if (typeHnd == m_simdHandleCache->Vector64UIntHandle) { - simdBaseType = TYP_UINT; - size = Vector64SizeBytes; + simdBaseJitType = CORINFO_TYPE_UINT; + size = Vector64SizeBytes; JITDUMP(" Known type Vector64\n"); } else if (typeHnd == m_simdHandleCache->Vector64ShortHandle) { - simdBaseType = TYP_SHORT; - size = Vector64SizeBytes; + simdBaseJitType = CORINFO_TYPE_SHORT; + size = Vector64SizeBytes; JITDUMP(" Known type Vector64\n"); } else if (typeHnd == m_simdHandleCache->Vector64UShortHandle) { - simdBaseType = TYP_USHORT; - size = Vector64SizeBytes; + simdBaseJitType = CORINFO_TYPE_USHORT; + size = Vector64SizeBytes; JITDUMP(" Known type Vector64\n"); } else if (typeHnd == m_simdHandleCache->Vector64ByteHandle) { - simdBaseType = TYP_BYTE; - size = Vector64SizeBytes; + simdBaseJitType = CORINFO_TYPE_BYTE; + size = Vector64SizeBytes; JITDUMP(" Known type Vector64\n"); } else if (typeHnd == m_simdHandleCache->Vector64UByteHandle) { - simdBaseType = TYP_UBYTE; - size = Vector64SizeBytes; + simdBaseJitType = CORINFO_TYPE_UBYTE; + size = Vector64SizeBytes; JITDUMP(" Known type Vector64\n"); } else if (typeHnd == m_simdHandleCache->Vector64LongHandle) { - simdBaseType = TYP_LONG; - size = Vector64SizeBytes; + simdBaseJitType = CORINFO_TYPE_LONG; + size = Vector64SizeBytes; JITDUMP(" Known type Vector64\n"); } else if (typeHnd == m_simdHandleCache->Vector64ULongHandle) { - simdBaseType = TYP_ULONG; - size = Vector64SizeBytes; + simdBaseJitType = CORINFO_TYPE_ULONG; + size = Vector64SizeBytes; JITDUMP(" Known type Vector64\n"); } #endif // defined(TARGET_ARM64) // slow path search - if (simdBaseType == TYP_UNKNOWN) + if (simdBaseJitType == CORINFO_TYPE_UNDEF) { // Doesn't match with any of the cached type handles. const char* className = getClassNameFromMetadata(typeHnd, nullptr); @@ -592,52 +617,52 @@ var_types Compiler::getBaseTypeAndSizeOfSIMDType(CORINFO_CLASS_HANDLE typeHnd, u { case CORINFO_TYPE_FLOAT: m_simdHandleCache->Vector256FloatHandle = typeHnd; - simdBaseType = TYP_FLOAT; + simdBaseJitType = CORINFO_TYPE_FLOAT; JITDUMP(" Found type Hardware Intrinsic SIMD Vector256\n"); break; case CORINFO_TYPE_DOUBLE: m_simdHandleCache->Vector256DoubleHandle = typeHnd; - simdBaseType = TYP_DOUBLE; + simdBaseJitType = CORINFO_TYPE_DOUBLE; JITDUMP(" Found type Hardware Intrinsic SIMD Vector256\n"); break; case CORINFO_TYPE_INT: m_simdHandleCache->Vector256IntHandle = typeHnd; - simdBaseType = TYP_INT; + simdBaseJitType = CORINFO_TYPE_INT; JITDUMP(" Found type Hardware Intrinsic SIMD Vector256\n"); break; case CORINFO_TYPE_UINT: m_simdHandleCache->Vector256UIntHandle = typeHnd; - simdBaseType = TYP_UINT; + simdBaseJitType = CORINFO_TYPE_UINT; JITDUMP(" Found type Hardware Intrinsic SIMD Vector256\n"); break; case CORINFO_TYPE_SHORT: m_simdHandleCache->Vector256ShortHandle = typeHnd; - simdBaseType = TYP_SHORT; + simdBaseJitType = CORINFO_TYPE_SHORT; JITDUMP(" Found type Hardware Intrinsic SIMD Vector256\n"); break; case CORINFO_TYPE_USHORT: m_simdHandleCache->Vector256UShortHandle = typeHnd; - simdBaseType = TYP_USHORT; + simdBaseJitType = CORINFO_TYPE_USHORT; JITDUMP(" Found type Hardware Intrinsic SIMD Vector256\n"); break; case CORINFO_TYPE_LONG: m_simdHandleCache->Vector256LongHandle = typeHnd; - simdBaseType = TYP_LONG; + simdBaseJitType = CORINFO_TYPE_LONG; JITDUMP(" Found type Hardware Intrinsic SIMD Vector256\n"); break; case CORINFO_TYPE_ULONG: m_simdHandleCache->Vector256ULongHandle = typeHnd; - simdBaseType = TYP_ULONG; + simdBaseJitType = CORINFO_TYPE_ULONG; JITDUMP(" Found type Hardware Intrinsic SIMD Vector256\n"); break; case CORINFO_TYPE_UBYTE: m_simdHandleCache->Vector256UByteHandle = typeHnd; - simdBaseType = TYP_UBYTE; + simdBaseJitType = CORINFO_TYPE_UBYTE; JITDUMP(" Found type Hardware Intrinsic SIMD Vector256\n"); break; case CORINFO_TYPE_BYTE: m_simdHandleCache->Vector256ByteHandle = typeHnd; - simdBaseType = TYP_BYTE; + simdBaseJitType = CORINFO_TYPE_BYTE; JITDUMP(" Found type Hardware Intrinsic SIMD Vector256\n"); break; @@ -654,52 +679,52 @@ var_types Compiler::getBaseTypeAndSizeOfSIMDType(CORINFO_CLASS_HANDLE typeHnd, u { case CORINFO_TYPE_FLOAT: m_simdHandleCache->Vector128FloatHandle = typeHnd; - simdBaseType = TYP_FLOAT; + simdBaseJitType = CORINFO_TYPE_FLOAT; JITDUMP(" Found type Hardware Intrinsic SIMD Vector128\n"); break; case CORINFO_TYPE_DOUBLE: m_simdHandleCache->Vector128DoubleHandle = typeHnd; - simdBaseType = TYP_DOUBLE; + simdBaseJitType = CORINFO_TYPE_DOUBLE; JITDUMP(" Found type Hardware Intrinsic SIMD Vector128\n"); break; case CORINFO_TYPE_INT: m_simdHandleCache->Vector128IntHandle = typeHnd; - simdBaseType = TYP_INT; + simdBaseJitType = CORINFO_TYPE_INT; JITDUMP(" Found type Hardware Intrinsic SIMD Vector128\n"); break; case CORINFO_TYPE_UINT: m_simdHandleCache->Vector128UIntHandle = typeHnd; - simdBaseType = TYP_UINT; + simdBaseJitType = CORINFO_TYPE_UINT; JITDUMP(" Found type Hardware Intrinsic SIMD Vector128\n"); break; case CORINFO_TYPE_SHORT: m_simdHandleCache->Vector128ShortHandle = typeHnd; - simdBaseType = TYP_SHORT; + simdBaseJitType = CORINFO_TYPE_SHORT; JITDUMP(" Found type Hardware Intrinsic SIMD Vector128\n"); break; case CORINFO_TYPE_USHORT: m_simdHandleCache->Vector128UShortHandle = typeHnd; - simdBaseType = TYP_USHORT; + simdBaseJitType = CORINFO_TYPE_USHORT; JITDUMP(" Found type Hardware Intrinsic SIMD Vector128\n"); break; case CORINFO_TYPE_LONG: m_simdHandleCache->Vector128LongHandle = typeHnd; - simdBaseType = TYP_LONG; + simdBaseJitType = CORINFO_TYPE_LONG; JITDUMP(" Found type Hardware Intrinsic SIMD Vector128\n"); break; case CORINFO_TYPE_ULONG: m_simdHandleCache->Vector128ULongHandle = typeHnd; - simdBaseType = TYP_ULONG; + simdBaseJitType = CORINFO_TYPE_ULONG; JITDUMP(" Found type Hardware Intrinsic SIMD Vector128\n"); break; case CORINFO_TYPE_UBYTE: m_simdHandleCache->Vector128UByteHandle = typeHnd; - simdBaseType = TYP_UBYTE; + simdBaseJitType = CORINFO_TYPE_UBYTE; JITDUMP(" Found type Hardware Intrinsic SIMD Vector128\n"); break; case CORINFO_TYPE_BYTE: m_simdHandleCache->Vector128ByteHandle = typeHnd; - simdBaseType = TYP_BYTE; + simdBaseJitType = CORINFO_TYPE_BYTE; JITDUMP(" Found type Hardware Intrinsic SIMD Vector128\n"); break; @@ -715,52 +740,52 @@ var_types Compiler::getBaseTypeAndSizeOfSIMDType(CORINFO_CLASS_HANDLE typeHnd, u { case CORINFO_TYPE_FLOAT: m_simdHandleCache->Vector64FloatHandle = typeHnd; - simdBaseType = TYP_FLOAT; + simdBaseJitType = CORINFO_TYPE_FLOAT; JITDUMP(" Found type Hardware Intrinsic SIMD Vector64\n"); break; case CORINFO_TYPE_DOUBLE: m_simdHandleCache->Vector64DoubleHandle = typeHnd; - simdBaseType = TYP_DOUBLE; + simdBaseJitType = CORINFO_TYPE_DOUBLE; JITDUMP(" Found type Hardware Intrinsic SIMD Vector64\n"); break; case CORINFO_TYPE_INT: m_simdHandleCache->Vector64IntHandle = typeHnd; - simdBaseType = TYP_INT; + simdBaseJitType = CORINFO_TYPE_INT; JITDUMP(" Found type Hardware Intrinsic SIMD Vector64\n"); break; case CORINFO_TYPE_UINT: m_simdHandleCache->Vector64UIntHandle = typeHnd; - simdBaseType = TYP_UINT; + simdBaseJitType = CORINFO_TYPE_UINT; JITDUMP(" Found type Hardware Intrinsic SIMD Vector64\n"); break; case CORINFO_TYPE_SHORT: m_simdHandleCache->Vector64ShortHandle = typeHnd; - simdBaseType = TYP_SHORT; + simdBaseJitType = CORINFO_TYPE_SHORT; JITDUMP(" Found type Hardware Intrinsic SIMD Vector64\n"); break; case CORINFO_TYPE_USHORT: m_simdHandleCache->Vector64UShortHandle = typeHnd; - simdBaseType = TYP_USHORT; + simdBaseJitType = CORINFO_TYPE_USHORT; JITDUMP(" Found type Hardware Intrinsic SIMD Vector64\n"); break; case CORINFO_TYPE_LONG: m_simdHandleCache->Vector64LongHandle = typeHnd; - simdBaseType = TYP_LONG; + simdBaseJitType = CORINFO_TYPE_LONG; JITDUMP(" Found type Hardware Intrinsic SIMD Vector64\n"); break; case CORINFO_TYPE_ULONG: m_simdHandleCache->Vector64ULongHandle = typeHnd; - simdBaseType = TYP_ULONG; + simdBaseJitType = CORINFO_TYPE_ULONG; JITDUMP(" Found type Hardware Intrinsic SIMD Vector64\n"); break; case CORINFO_TYPE_UBYTE: m_simdHandleCache->Vector64UByteHandle = typeHnd; - simdBaseType = TYP_UBYTE; + simdBaseJitType = CORINFO_TYPE_UBYTE; JITDUMP(" Found type Hardware Intrinsic SIMD Vector64\n"); break; case CORINFO_TYPE_BYTE: m_simdHandleCache->Vector64ByteHandle = typeHnd; - simdBaseType = TYP_BYTE; + simdBaseJitType = CORINFO_TYPE_BYTE; JITDUMP(" Found type Hardware Intrinsic SIMD Vector64\n"); break; @@ -775,9 +800,10 @@ var_types Compiler::getBaseTypeAndSizeOfSIMDType(CORINFO_CLASS_HANDLE typeHnd, u #if defined(TARGET_XARCH) // Even though Vector256 is TYP_SIMD32, if AVX isn't supported, then it must // be treated as a regular struct - if (size == YMM_REGSIZE_BYTES && (simdBaseType != TYP_UNKNOWN) && !compExactlyDependsOn(InstructionSet_AVX)) + if (size == YMM_REGSIZE_BYTES && (simdBaseJitType != CORINFO_TYPE_UNDEF) && + !compExactlyDependsOn(InstructionSet_AVX)) { - simdBaseType = TYP_UNKNOWN; + simdBaseJitType = CORINFO_TYPE_UNDEF; } #endif // TARGET_XARCH } @@ -788,12 +814,12 @@ var_types Compiler::getBaseTypeAndSizeOfSIMDType(CORINFO_CLASS_HANDLE typeHnd, u *sizeBytes = size; } - if (simdBaseType != TYP_UNKNOWN) + if (simdBaseJitType != CORINFO_TYPE_UNDEF) { setUsesSIMDTypes(true); } - return simdBaseType; + return simdBaseJitType; } //-------------------------------------------------------------------------------------- @@ -805,7 +831,7 @@ var_types Compiler::getBaseTypeAndSizeOfSIMDType(CORINFO_CLASS_HANDLE typeHnd, u // sig - method signature info // isNewObj - whether this call represents a newboj constructor call // argCount - argument count - out pram -// baseType - base type of the intrinsic - out param +// simdBaseJitType - base JIT type of the intrinsic - out param // sizeBytes - size of SIMD vector type on which the method is invoked - out param // // Return Value: @@ -827,23 +853,23 @@ const SIMDIntrinsicInfo* Compiler::getSIMDIntrinsicInfo(CORINFO_CLASS_HANDLE* in CORINFO_SIG_INFO* sig, bool isNewObj, unsigned* argCount, - var_types* baseType, + CorInfoType* simdBaseJitType, unsigned* sizeBytes) { assert(featureSIMD); - assert(baseType != nullptr); + assert(simdBaseJitType != nullptr); assert(sizeBytes != nullptr); - // get baseType and size of the type + // get simdBaseJitType and size of the type CORINFO_CLASS_HANDLE typeHnd = *inOutTypeHnd; - *baseType = getBaseTypeAndSizeOfSIMDType(typeHnd, sizeBytes); + *simdBaseJitType = getBaseJitTypeAndSizeOfSIMDType(typeHnd, sizeBytes); if (typeHnd == m_simdHandleCache->SIMDVectorHandle) { // All of the supported intrinsics on this static class take a first argument that's a vector, - // which determines the baseType. + // which determines the simdBaseJitType. // The exception is the IsHardwareAccelerated property, which is handled as a special case. - assert(*baseType == TYP_UNKNOWN); + assert(*simdBaseJitType == CORINFO_TYPE_UNDEF); if (sig->numArgs == 0) { const SIMDIntrinsicInfo* hwAccelIntrinsicInfo = &(simdIntrinsicInfoArray[SIMDIntrinsicHWAccel]); @@ -858,18 +884,20 @@ const SIMDIntrinsicInfo* Compiler::getSIMDIntrinsicInfo(CORINFO_CLASS_HANDLE* in } else { - typeHnd = info.compCompHnd->getArgClass(sig, sig->args); - *inOutTypeHnd = typeHnd; - *baseType = getBaseTypeAndSizeOfSIMDType(typeHnd, sizeBytes); + typeHnd = info.compCompHnd->getArgClass(sig, sig->args); + *inOutTypeHnd = typeHnd; + *simdBaseJitType = getBaseJitTypeAndSizeOfSIMDType(typeHnd, sizeBytes); } } - if (*baseType == TYP_UNKNOWN) + if (*simdBaseJitType == CORINFO_TYPE_UNDEF) { JITDUMP("NOT a SIMD Intrinsic: unsupported baseType\n"); return nullptr; } + var_types simdBaseType = JitType2PreciseVarType(*simdBaseJitType); + // account for implicit "this" arg *argCount = sig->numArgs; if (sig->hasThis()) @@ -899,7 +927,7 @@ const SIMDIntrinsicInfo* Compiler::getSIMDIntrinsicInfo(CORINFO_CLASS_HANDLE* in break; } - if (simdIntrinsicInfoArray[i].supportedBaseTypes[j] == *baseType) + if (simdIntrinsicInfoArray[i].supportedBaseTypes[j] == simdBaseType) { found = true; break; @@ -979,20 +1007,20 @@ const SIMDIntrinsicInfo* Compiler::getSIMDIntrinsicInfo(CORINFO_CLASS_HANDLE* in { // Convention: // - intrinsicInfo.argType[i] == TYP_UNDEF - intrinsic doesn't have a valid arg at position i - // - intrinsicInfo.argType[i] == TYP_UNKNOWN - arg type should be same as basetype + // - intrinsicInfo.argType[i] == TYP_UNKNOWN - arg type should be same as simdBaseType // Note that we pop the args off in reverse order. expectedArgType = simdIntrinsicInfoArray[i].argType[argIndex]; assert(expectedArgType != TYP_UNDEF); if (expectedArgType == TYP_UNKNOWN) { - // The type of the argument will be genActualType(*baseType). - expectedArgType = genActualType(*baseType); + // The type of the argument will be genActualType(*simdBaseType). + expectedArgType = genActualType(simdBaseType); argType = genActualType(argType); } } else { - expectedArgType = *baseType; + expectedArgType = simdBaseType; } if (!isThisPtr && argType == TYP_I_IMPL) @@ -1028,15 +1056,16 @@ const SIMDIntrinsicInfo* Compiler::getSIMDIntrinsicInfo(CORINFO_CLASS_HANDLE* in // Cross check return type and static vs. instance is what we are expecting. // If not, don't consider it as an intrinsic. - // Note that ret type of TYP_UNKNOWN means that it is not known apriori and must be same as baseType + // Note that ret type of TYP_UNKNOWN means that it is not known apriori and must be same as simdBaseType if (found) { var_types expectedRetType = simdIntrinsicInfoArray[i].retType; if (expectedRetType == TYP_UNKNOWN) { // JIT maps uint/ulong type vars to TYP_INT/TYP_LONG. - expectedRetType = - (*baseType == TYP_UINT || *baseType == TYP_ULONG) ? genActualType(*baseType) : *baseType; + expectedRetType = (simdBaseType == TYP_UINT || simdBaseType == TYP_ULONG) + ? genActualType(simdBaseType) + : simdBaseType; } if (JITtype2varType(sig->retType) != expectedRetType || @@ -1193,22 +1222,23 @@ GenTree* Compiler::impSIMDPopStack(var_types type, bool expectAddr, CORINFO_CLAS // impSIMDGetFixed: Create a GT_SIMD tree for a Get property of SIMD vector with a fixed index. // // Arguments: -// baseType - The base (element) type of the SIMD vector. -// simdSize - The total size in bytes of the SIMD vector. -// index - The index of the field to get. +// simdBaseJitType - The base (element) JIT type of the SIMD vector. +// simdSize - The total size in bytes of the SIMD vector. +// index - The index of the field to get. // // Return Value: // Returns a GT_SIMD node with the SIMDIntrinsicGetItem intrinsic id. // -GenTreeSIMD* Compiler::impSIMDGetFixed(var_types simdType, var_types baseType, unsigned simdSize, int index) +GenTreeSIMD* Compiler::impSIMDGetFixed(var_types simdType, CorInfoType simdBaseJitType, unsigned simdSize, int index) { - assert(simdSize >= ((index + 1) * genTypeSize(baseType))); + var_types simdBaseType = JitType2PreciseVarType(simdBaseJitType); + assert(simdSize >= ((index + 1) * genTypeSize(simdBaseType))); // op1 is a SIMD source. GenTree* op1 = impSIMDPopStack(simdType, true); GenTree* op2 = gtNewIconNode(index); - GenTreeSIMD* simdTree = gtNewSIMDNode(baseType, op1, op2, SIMDIntrinsicGetItem, baseType, simdSize); + GenTreeSIMD* simdTree = gtNewSIMDNode(simdBaseType, op1, op2, SIMDIntrinsicGetItem, simdBaseJitType, simdSize); return simdTree; } @@ -1242,7 +1272,7 @@ SIMDIntrinsicID Compiler::impSIMDLongRelOpEqual(CORINFO_CLASS_HANDLE typeHnd, // Shuffle is meant to swap the comparison results of low-32-bits and high 32-bits of respective long elements. // Compare vector as if they were vector and assign the result to a temp - GenTree* compResult = gtNewSIMDNode(simdType, *pOp1, *pOp2, SIMDIntrinsicEqual, TYP_INT, size); + GenTree* compResult = gtNewSIMDNode(simdType, *pOp1, *pOp2, SIMDIntrinsicEqual, CORINFO_TYPE_INT, size); unsigned lclNum = lvaGrabTemp(true DEBUGARG("SIMD Long ==")); lvaSetStruct(lclNum, typeHnd, false); GenTree* tmp = gtNewLclvNode(lclNum, simdType); @@ -1253,7 +1283,7 @@ SIMDIntrinsicID Compiler::impSIMDLongRelOpEqual(CORINFO_CLASS_HANDLE typeHnd, // IntrinsicId = BitwiseAnd *pOp1 = gtNewOperNode(GT_COMMA, simdType, asg, tmp); *pOp2 = gtNewSIMDNode(simdType, gtNewLclvNode(lclNum, simdType), gtNewIconNode(SHUFFLE_ZWXY, TYP_INT), - SIMDIntrinsicShuffleSSE2, TYP_INT, size); + SIMDIntrinsicShuffleSSE2, CORINFO_TYPE_INT, size); return SIMDIntrinsicBitwiseAnd; } #endif // TARGET_XARCH @@ -1264,10 +1294,10 @@ SIMDIntrinsicID Compiler::impSIMDLongRelOpEqual(CORINFO_CLASS_HANDLE typeHnd, // Arguments: // relOpIntrinsicId - Relational operator SIMD intrinsic // typeHnd - type handle of SIMD vector -// size - SIMD vector size -// inOutBaseType - base type of SIMD vector -// pOp1 - in-out parameter; first operand -// pOp2 - in-out parameter; second operand +// size - SIMD vector size +// inOutBaseJitType - base JIT type of SIMD vector +// pOp1 - in-out parameter; first operand +// pOp2 - in-out parameter; second operand // // Return Value: // Modifies in-out params pOp1, pOp2, inOutBaseType and returns intrinsic ID to be applied to modified operands @@ -1275,7 +1305,7 @@ SIMDIntrinsicID Compiler::impSIMDLongRelOpEqual(CORINFO_CLASS_HANDLE typeHnd, SIMDIntrinsicID Compiler::impSIMDRelOp(SIMDIntrinsicID relOpIntrinsicId, CORINFO_CLASS_HANDLE typeHnd, unsigned size, - var_types* inOutBaseType, + CorInfoType* inOutBaseJitType, GenTree** pOp1, GenTree** pOp2) { @@ -1286,14 +1316,15 @@ SIMDIntrinsicID Compiler::impSIMDRelOp(SIMDIntrinsicID relOpIntrinsicId, SIMDIntrinsicID intrinsicID = relOpIntrinsicId; #ifdef TARGET_XARCH - var_types baseType = *inOutBaseType; + CorInfoType simdBaseJitType = *inOutBaseJitType; + var_types simdBaseType = JitType2PreciseVarType(simdBaseJitType); - if (varTypeIsFloating(baseType)) + if (varTypeIsFloating(simdBaseType)) { } - else if (varTypeIsIntegral(baseType)) + else if (varTypeIsIntegral(simdBaseType)) { - if ((getSIMDSupportLevel() == SIMD_SSE2_Supported) && baseType == TYP_LONG) + if ((getSIMDSupportLevel() == SIMD_SSE2_Supported) && simdBaseType == TYP_LONG) { // There is no direct SSE2 support for comparing TYP_LONG vectors. // These have to be implemented interms of TYP_INT vector comparison operations. @@ -1307,7 +1338,7 @@ SIMDIntrinsicID Compiler::impSIMDRelOp(SIMDIntrinsicID relOpIntrinsicId, } } // SSE2 and AVX direct support for signed comparison of int32, int16 and int8 types - else if (varTypeIsUnsigned(baseType)) + else if (varTypeIsUnsigned(simdBaseType)) { // Vector, Vector, Vector and Vector: // SSE2 supports > for signed comparison. Therefore, to use it for @@ -1324,23 +1355,23 @@ SIMDIntrinsicID Compiler::impSIMDRelOp(SIMDIntrinsicID relOpIntrinsicId, // We need to treat op1 and op2 as signed for comparison purpose after // the transformation. __int64 constVal = 0; - switch (baseType) + switch (simdBaseType) { case TYP_UBYTE: - constVal = 0x80808080; - *inOutBaseType = TYP_BYTE; + constVal = 0x80808080; + *inOutBaseJitType = CORINFO_TYPE_BYTE; break; case TYP_USHORT: - constVal = 0x80008000; - *inOutBaseType = TYP_SHORT; + constVal = 0x80008000; + *inOutBaseJitType = CORINFO_TYPE_SHORT; break; case TYP_UINT: - constVal = 0x80000000; - *inOutBaseType = TYP_INT; + constVal = 0x80000000; + *inOutBaseJitType = CORINFO_TYPE_INT; break; case TYP_ULONG: - constVal = 0x8000000000000000LL; - *inOutBaseType = TYP_LONG; + constVal = 0x8000000000000000LL; + *inOutBaseJitType = CORINFO_TYPE_LONG; break; default: unreached(); @@ -1352,20 +1383,21 @@ SIMDIntrinsicID Compiler::impSIMDRelOp(SIMDIntrinsicID relOpIntrinsicId, if (intrinsicID != SIMDIntrinsicEqual) { // For constructing const vector use either long or int base type. - var_types tempBaseType; - GenTree* initVal; - if (baseType == TYP_ULONG) + CorInfoType tempBaseJitType; + GenTree* initVal; + if (simdBaseType == TYP_ULONG) { - tempBaseType = TYP_LONG; - initVal = gtNewLconNode(constVal); + tempBaseJitType = CORINFO_TYPE_LONG; + initVal = gtNewLconNode(constVal); } else { - tempBaseType = TYP_INT; - initVal = gtNewIconNode((ssize_t)constVal); + tempBaseJitType = CORINFO_TYPE_INT; + initVal = gtNewIconNode((ssize_t)constVal); } - initVal->gtType = tempBaseType; - GenTree* constVector = gtNewSIMDNode(simdType, initVal, nullptr, SIMDIntrinsicInit, tempBaseType, size); + initVal->gtType = JITtype2varType(tempBaseJitType); + GenTree* constVector = + gtNewSIMDNode(simdType, initVal, nullptr, SIMDIntrinsicInit, tempBaseJitType, size); // Assign constVector to a temp, since we intend to use it more than once // TODO-CQ: We have quite a few such constant vectors constructed during @@ -1375,11 +1407,11 @@ SIMDIntrinsicID Compiler::impSIMDRelOp(SIMDIntrinsicID relOpIntrinsicId, // op1 = op1 - constVector // op2 = op2 - constVector - *pOp1 = gtNewSIMDNode(simdType, *pOp1, constVector, SIMDIntrinsicSub, baseType, size); - *pOp2 = gtNewSIMDNode(simdType, *pOp2, tmp, SIMDIntrinsicSub, baseType, size); + *pOp1 = gtNewSIMDNode(simdType, *pOp1, constVector, SIMDIntrinsicSub, simdBaseJitType, size); + *pOp2 = gtNewSIMDNode(simdType, *pOp2, tmp, SIMDIntrinsicSub, simdBaseJitType, size); } - return impSIMDRelOp(intrinsicID, typeHnd, size, inOutBaseType, pOp1, pOp2); + return impSIMDRelOp(intrinsicID, typeHnd, size, inOutBaseJitType, pOp1, pOp2); } } #elif !defined(TARGET_ARM64) @@ -1713,13 +1745,14 @@ void Compiler::impMarkContiguousSIMDFieldAssignments(Statement* stmt) GenTree* expr = stmt->GetRootNode(); if (expr->OperGet() == GT_ASG && expr->TypeGet() == TYP_FLOAT) { - GenTree* curDst = expr->AsOp()->gtOp1; - GenTree* curSrc = expr->AsOp()->gtOp2; - unsigned index = 0; - var_types baseType = TYP_UNKNOWN; - unsigned simdSize = 0; - GenTree* srcSimdStructNode = getSIMDStructFromField(curSrc, &baseType, &index, &simdSize, true); - if (srcSimdStructNode == nullptr || baseType != TYP_FLOAT) + GenTree* curDst = expr->AsOp()->gtOp1; + GenTree* curSrc = expr->AsOp()->gtOp2; + unsigned index = 0; + CorInfoType simdBaseJitType = CORINFO_TYPE_UNDEF; + unsigned simdSize = 0; + GenTree* srcSimdStructNode = getSIMDStructFromField(curSrc, &simdBaseJitType, &index, &simdSize, true); + + if (srcSimdStructNode == nullptr || simdBaseJitType != CORINFO_TYPE_FLOAT) { fgPreviousCandidateSIMDFieldAsgStmt = nullptr; } @@ -1730,16 +1763,17 @@ void Compiler::impMarkContiguousSIMDFieldAssignments(Statement* stmt) else if (fgPreviousCandidateSIMDFieldAsgStmt != nullptr) { assert(index > 0); - GenTree* prevAsgExpr = fgPreviousCandidateSIMDFieldAsgStmt->GetRootNode(); - GenTree* prevDst = prevAsgExpr->AsOp()->gtOp1; - GenTree* prevSrc = prevAsgExpr->AsOp()->gtOp2; + var_types simdBaseType = JitType2PreciseVarType(simdBaseJitType); + GenTree* prevAsgExpr = fgPreviousCandidateSIMDFieldAsgStmt->GetRootNode(); + GenTree* prevDst = prevAsgExpr->AsOp()->gtOp1; + GenTree* prevSrc = prevAsgExpr->AsOp()->gtOp2; if (!areArgumentsContiguous(prevDst, curDst) || !areArgumentsContiguous(prevSrc, curSrc)) { fgPreviousCandidateSIMDFieldAsgStmt = nullptr; } else { - if (index == (simdSize / genTypeSize(baseType) - 1)) + if (index == (simdSize / genTypeSize(simdBaseType) - 1)) { // Successfully found the pattern, mark the lclvar as UsedInSIMDIntrinsic if (srcSimdStructNode->OperIsLocal()) @@ -1812,11 +1846,11 @@ GenTree* Compiler::impSIMDIntrinsic(OPCODE opcode, } // Get base type and intrinsic Id - var_types baseType = TYP_UNKNOWN; - unsigned size = 0; - unsigned argCount = 0; + CorInfoType simdBaseJitType = CORINFO_TYPE_UNDEF; + unsigned size = 0; + unsigned argCount = 0; const SIMDIntrinsicInfo* intrinsicInfo = - getSIMDIntrinsicInfo(&clsHnd, methodHnd, sig, (opcode == CEE_NEWOBJ), &argCount, &baseType, &size); + getSIMDIntrinsicInfo(&clsHnd, methodHnd, sig, (opcode == CEE_NEWOBJ), &argCount, &simdBaseJitType, &size); // Exit early if the intrinsic is invalid or unrecognized if ((intrinsicInfo == nullptr) || (intrinsicInfo->id == SIMDIntrinsicInvalid)) @@ -1844,15 +1878,19 @@ GenTree* Compiler::impSIMDIntrinsic(OPCODE opcode, } SIMDIntrinsicID simdIntrinsicID = intrinsicInfo->id; + var_types simdBaseType; var_types simdType; - if (baseType != TYP_UNKNOWN) + + if (simdBaseJitType != CORINFO_TYPE_UNDEF) { - simdType = getSIMDTypeForSize(size); + simdBaseType = JitType2PreciseVarType(simdBaseJitType); + simdType = getSIMDTypeForSize(size); } else { assert(simdIntrinsicID == SIMDIntrinsicHWAccel); - simdType = TYP_UNKNOWN; + simdBaseType = TYP_UNKNOWN; + simdType = TYP_UNKNOWN; } bool instMethod = intrinsicInfo->isInstMethod; var_types callType = JITtype2varType(sig->retType); @@ -1888,15 +1926,15 @@ GenTree* Compiler::impSIMDIntrinsic(OPCODE opcode, bool initFromFirstArgIndir = false; if (simdIntrinsicID == SIMDIntrinsicInit) { - op2 = impSIMDPopStack(baseType); + op2 = impSIMDPopStack(simdBaseType); } else { assert(simdIntrinsicID == SIMDIntrinsicInitN); - assert(baseType == TYP_FLOAT); + assert(simdBaseType == TYP_FLOAT); unsigned initCount = argCount - 1; - unsigned elementCount = getSIMDVectorLength(size, baseType); + unsigned elementCount = getSIMDVectorLength(size, simdBaseType); noway_assert(initCount == elementCount); // Build a GT_LIST with the N values. @@ -1909,7 +1947,7 @@ GenTree* Compiler::impSIMDIntrinsic(OPCODE opcode, bool areArgsContiguous = true; for (unsigned i = 0; i < initCount; i++) { - GenTree* nextArg = impSIMDPopStack(baseType); + GenTree* nextArg = impSIMDPopStack(simdBaseType); if (areArgsContiguous) { GenTree* curArg = nextArg; @@ -1923,14 +1961,14 @@ GenTree* Compiler::impSIMDIntrinsic(OPCODE opcode, prevArg = curArg; } - list = new (this, GT_LIST) GenTreeOp(GT_LIST, baseType, nextArg, list); + list = new (this, GT_LIST) GenTreeOp(GT_LIST, simdBaseType, nextArg, list); } - if (areArgsContiguous && baseType == TYP_FLOAT) + if (areArgsContiguous && simdBaseType == TYP_FLOAT) { // Since Vector2, Vector3 and Vector4's arguments type are only float, // we intialize the vector from first argument address, only when - // the baseType is TYP_FLOAT and the arguments are located contiguously in memory + // the simdBaseType is TYP_FLOAT and the arguments are located contiguously in memory initFromFirstArgIndir = true; GenTree* op2Address = createAddressNodeForSIMDInit(firstArg, size); var_types simdType = getSIMDTypeForSize(size); @@ -1945,16 +1983,16 @@ GenTree* Compiler::impSIMDIntrinsic(OPCODE opcode, op1 = getOp1ForConstructor(opcode, newobjThis, clsHnd); assert(op1->TypeGet() == TYP_BYREF); - assert(genActualType(op2->TypeGet()) == genActualType(baseType) || initFromFirstArgIndir); + assert(genActualType(op2->TypeGet()) == genActualType(simdBaseType) || initFromFirstArgIndir); // For integral base types of size less than TYP_INT, expand the initializer // to fill size of TYP_INT bytes. - if (varTypeIsSmallInt(baseType)) + if (varTypeIsSmallInt(simdBaseType)) { // This case should occur only for Init intrinsic. assert(simdIntrinsicID == SIMDIntrinsicInit); - unsigned baseSize = genTypeSize(baseType); + unsigned baseSize = genTypeSize(simdBaseType); int multiplier; if (baseSize == 1) { @@ -1967,7 +2005,7 @@ GenTree* Compiler::impSIMDIntrinsic(OPCODE opcode, } GenTree* t1 = nullptr; - if (baseType == TYP_BYTE) + if (simdBaseType == TYP_BYTE) { // What we have is a signed byte initializer, // which when loaded to a reg will get sign extended to TYP_INT. @@ -1975,7 +2013,7 @@ GenTree* Compiler::impSIMDIntrinsic(OPCODE opcode, // rather zero extended to 32-bits. t1 = gtNewOperNode(GT_AND, TYP_INT, op2, gtNewIconNode(0xff, TYP_INT)); } - else if (baseType == TYP_SHORT) + else if (simdBaseType == TYP_SHORT) { // What we have is a signed short initializer, // which when loaded to a reg will get sign extended to TYP_INT. @@ -1985,7 +2023,7 @@ GenTree* Compiler::impSIMDIntrinsic(OPCODE opcode, } else { - assert(baseType == TYP_UBYTE || baseType == TYP_USHORT); + assert(simdBaseType == TYP_UBYTE || simdBaseType == TYP_USHORT); t1 = gtNewCastNode(TYP_INT, op2, false, TYP_INT); } @@ -1993,9 +2031,9 @@ GenTree* Compiler::impSIMDIntrinsic(OPCODE opcode, GenTree* t2 = gtNewIconNode(multiplier, TYP_INT); op2 = gtNewOperNode(GT_MUL, TYP_INT, t1, t2); - // Construct a vector of TYP_INT with the new initializer and cast it back to vector of baseType - simdTree = gtNewSIMDNode(simdType, op2, nullptr, simdIntrinsicID, TYP_INT, size); - simdTree = gtNewSIMDNode(simdType, simdTree, nullptr, SIMDIntrinsicCast, baseType, size); + // Construct a vector of TYP_INT with the new initializer and cast it back to vector of simdBaseType + simdTree = gtNewSIMDNode(simdType, op2, nullptr, simdIntrinsicID, CORINFO_TYPE_INT, size); + simdTree = gtNewSIMDNode(simdType, simdTree, nullptr, SIMDIntrinsicCast, simdBaseJitType, size); } else { @@ -2012,7 +2050,7 @@ GenTree* Compiler::impSIMDIntrinsic(OPCODE opcode, } else { - simdTree = gtNewSIMDNode(simdType, op2, nullptr, simdIntrinsicID, baseType, size); + simdTree = gtNewSIMDNode(simdType, op2, nullptr, simdIntrinsicID, simdBaseJitType, size); } } @@ -2030,7 +2068,7 @@ GenTree* Compiler::impSIMDIntrinsic(OPCODE opcode, // op2 - array itself // op1 - byref to vector struct - unsigned int vectorLength = getSIMDVectorLength(size, baseType); + unsigned int vectorLength = getSIMDVectorLength(size, simdBaseType); // (This constructor takes only the zero-based arrays.) // We will add one or two bounds checks: // 1. If we have an index, we must do a check on that first. @@ -2140,7 +2178,7 @@ GenTree* Compiler::impSIMDIntrinsic(OPCODE opcode, if (simdIntrinsicID == SIMDIntrinsicInitArray || simdIntrinsicID == SIMDIntrinsicInitArrayX) { op1 = getOp1ForConstructor(opcode, newobjThis, clsHnd); - simdTree = gtNewSIMDNode(simdType, op2, op3, SIMDIntrinsicInitArray, baseType, size); + simdTree = gtNewSIMDNode(simdType, op2, op3, SIMDIntrinsicInitArray, simdBaseJitType, size); copyBlkDst = op1; doCopyBlk = true; } @@ -2156,7 +2194,7 @@ GenTree* Compiler::impSIMDIntrinsic(OPCODE opcode, // TODO-Cleanup: Though it happens to just work fine front-end phases are not aware of GT_LEA node. // Therefore, convert these to use GT_ADDR . copyBlkDst = new (this, GT_LEA) - GenTreeAddrMode(TYP_BYREF, op2, op3, genTypeSize(baseType), OFFSETOF__CORINFO_Array__data); + GenTreeAddrMode(TYP_BYREF, op2, op3, genTypeSize(simdBaseType), OFFSETOF__CORINFO_Array__data); doCopyBlk = true; } } @@ -2170,7 +2208,7 @@ GenTree* Compiler::impSIMDIntrinsic(OPCODE opcode, // op3 - float value for VLarge.Z or VLarge.W // op2 - VSmall // op1 - byref of VLarge - assert(baseType == TYP_FLOAT); + assert(simdBaseType == TYP_FLOAT); GenTree* op4 = nullptr; if (argCount == 4) @@ -2202,11 +2240,11 @@ GenTree* Compiler::impSIMDIntrinsic(OPCODE opcode, simdTree = op2; if (op3 != nullptr) { - simdTree = gtNewSIMDNode(simdType, simdTree, op3, SIMDIntrinsicSetZ, baseType, size); + simdTree = gtNewSIMDNode(simdType, simdTree, op3, SIMDIntrinsicSetZ, simdBaseJitType, size); } if (op4 != nullptr) { - simdTree = gtNewSIMDNode(simdType, simdTree, op4, SIMDIntrinsicSetW, baseType, size); + simdTree = gtNewSIMDNode(simdType, simdTree, op4, SIMDIntrinsicSetW, simdBaseJitType, size); } copyBlkDst = op1; @@ -2219,9 +2257,9 @@ GenTree* Compiler::impSIMDIntrinsic(OPCODE opcode, op2 = impSIMDPopStack(simdType); op1 = impSIMDPopStack(simdType, instMethod); - SIMDIntrinsicID intrinsicID = impSIMDRelOp(simdIntrinsicID, clsHnd, size, &baseType, &op1, &op2); - simdTree = gtNewSIMDNode(genActualType(callType), op1, op2, intrinsicID, baseType, size); - retVal = simdTree; + SIMDIntrinsicID intrinsicID = impSIMDRelOp(simdIntrinsicID, clsHnd, size, &simdBaseJitType, &op1, &op2); + simdTree = gtNewSIMDNode(genActualType(callType), op1, op2, intrinsicID, simdBaseJitType, size); + retVal = simdTree; } break; @@ -2234,7 +2272,7 @@ GenTree* Compiler::impSIMDIntrinsic(OPCODE opcode, op2 = impSIMDPopStack(simdType); op1 = impSIMDPopStack(simdType, instMethod); - simdTree = gtNewSIMDNode(simdType, op1, op2, simdIntrinsicID, baseType, size); + simdTree = gtNewSIMDNode(simdType, op1, op2, simdIntrinsicID, simdBaseJitType, size); retVal = simdTree; } break; @@ -2245,7 +2283,7 @@ GenTree* Compiler::impSIMDIntrinsic(OPCODE opcode, // op2 is an index of TYP_INT op2 = impSIMDPopStack(TYP_INT); op1 = impSIMDPopStack(simdType, instMethod); - int vectorLength = getSIMDVectorLength(size, baseType); + int vectorLength = getSIMDVectorLength(size, simdBaseType); if (!op2->IsCnsIntOrI() || op2->AsIntCon()->gtIconVal >= vectorLength || op2->AsIntCon()->gtIconVal < 0) { // We need to bounds-check the length of the vector. @@ -2275,25 +2313,25 @@ GenTree* Compiler::impSIMDIntrinsic(OPCODE opcode, assert(op1->TypeGet() == simdType); assert(op2->TypeGet() == TYP_INT); - simdTree = gtNewSIMDNode(genActualType(callType), op1, op2, simdIntrinsicID, baseType, size); + simdTree = gtNewSIMDNode(genActualType(callType), op1, op2, simdIntrinsicID, simdBaseJitType, size); retVal = simdTree; } break; case SIMDIntrinsicGetW: - retVal = impSIMDGetFixed(simdType, baseType, size, 3); + retVal = impSIMDGetFixed(simdType, simdBaseJitType, size, 3); break; case SIMDIntrinsicGetZ: - retVal = impSIMDGetFixed(simdType, baseType, size, 2); + retVal = impSIMDGetFixed(simdType, simdBaseJitType, size, 2); break; case SIMDIntrinsicGetY: - retVal = impSIMDGetFixed(simdType, baseType, size, 1); + retVal = impSIMDGetFixed(simdType, simdBaseJitType, size, 1); break; case SIMDIntrinsicGetX: - retVal = impSIMDGetFixed(simdType, baseType, size, 0); + retVal = impSIMDGetFixed(simdType, simdBaseJitType, size, 0); break; case SIMDIntrinsicSetW: @@ -2315,12 +2353,12 @@ GenTree* Compiler::impSIMDIntrinsic(OPCODE opcode, return nullptr; } - op2 = impSIMDPopStack(baseType); + op2 = impSIMDPopStack(simdBaseType); op1 = impSIMDPopStack(simdType, instMethod); GenTree* src = gtCloneExpr(op1); assert(src != nullptr); - simdTree = gtNewSIMDNode(simdType, src, op2, simdIntrinsicID, baseType, size); + simdTree = gtNewSIMDNode(simdType, src, op2, simdIntrinsicID, simdBaseJitType, size); copyBlkDst = gtNewOperNode(GT_ADDR, TYP_BYREF, op1); doCopyBlk = true; @@ -2335,7 +2373,7 @@ GenTree* Compiler::impSIMDIntrinsic(OPCODE opcode, { op1 = impSIMDPopStack(simdType, instMethod); - simdTree = gtNewSIMDNode(simdType, op1, nullptr, simdIntrinsicID, baseType, size); + simdTree = gtNewSIMDNode(simdType, op1, nullptr, simdIntrinsicID, simdBaseJitType, size); retVal = simdTree; } break; @@ -2345,7 +2383,7 @@ GenTree* Compiler::impSIMDIntrinsic(OPCODE opcode, #ifdef TARGET_64BIT op1 = impSIMDPopStack(simdType, instMethod); - simdTree = gtNewSIMDNode(simdType, op1, nullptr, simdIntrinsicID, baseType, size); + simdTree = gtNewSIMDNode(simdType, op1, nullptr, simdIntrinsicID, simdBaseJitType, size); retVal = simdTree; #else JITDUMP("SIMD Conversion to Int64 is not supported on this platform\n"); @@ -2360,7 +2398,7 @@ GenTree* Compiler::impSIMDIntrinsic(OPCODE opcode, op2 = impSIMDPopStack(simdType); op1 = impSIMDPopStack(simdType); // op1 and op2 are two input Vector. - simdTree = gtNewSIMDNode(simdType, op1, op2, simdIntrinsicID, baseType, size); + simdTree = gtNewSIMDNode(simdType, op1, op2, simdIntrinsicID, simdBaseJitType, size); retVal = simdTree; } break; @@ -2375,7 +2413,7 @@ GenTree* Compiler::impSIMDIntrinsic(OPCODE opcode, GenTree* dupOp1 = fgInsertCommaFormTemp(&op1, op1Handle); // Widen the lower half and assign it to dstAddrLo. - simdTree = gtNewSIMDNode(simdType, op1, nullptr, SIMDIntrinsicWidenLo, baseType, size); + simdTree = gtNewSIMDNode(simdType, op1, nullptr, SIMDIntrinsicWidenLo, simdBaseJitType, size); // TODO-1stClassStructs: With the introduction of ClassLayout it would be preferrable to use // GT_OBJ instead of GT_BLK nodes to avoid losing information about the actual vector type. GenTree* loDest = new (this, GT_BLK) @@ -2386,7 +2424,7 @@ GenTree* Compiler::impSIMDIntrinsic(OPCODE opcode, loAsg->gtFlags |= ((simdTree->gtFlags | dstAddrLo->gtFlags) & GTF_ALL_EFFECT); // Widen the upper half and assign it to dstAddrHi. - simdTree = gtNewSIMDNode(simdType, dupOp1, nullptr, SIMDIntrinsicWidenHi, baseType, size); + simdTree = gtNewSIMDNode(simdType, dupOp1, nullptr, SIMDIntrinsicWidenHi, simdBaseJitType, size); GenTree* hiDest = new (this, GT_BLK) GenTreeBlk(GT_BLK, simdType, dstAddrHi, typGetBlkLayout(getSIMDTypeSizeInBytes(clsHnd))); GenTree* hiAsg = gtNewBlkOpNode(hiDest, simdTree, diff --git a/src/coreclr/jit/simdashwintrinsic.cpp b/src/coreclr/jit/simdashwintrinsic.cpp index f117c48f4253f2..c093fb05f756c9 100644 --- a/src/coreclr/jit/simdashwintrinsic.cpp +++ b/src/coreclr/jit/simdashwintrinsic.cpp @@ -194,7 +194,7 @@ GenTree* Compiler::impSimdAsHWIntrinsic(NamedIntrinsic intrinsic, CORINFO_CLASS_HANDLE argClass = NO_CLASS_HANDLE; var_types retType = JITtype2varType(sig->retType); - var_types baseType = TYP_UNKNOWN; + CorInfoType simdBaseJitType = CORINFO_TYPE_UNDEF; var_types simdType = TYP_UNKNOWN; unsigned simdSize = 0; unsigned numArgs = sig->numArgs; @@ -202,9 +202,10 @@ GenTree* Compiler::impSimdAsHWIntrinsic(NamedIntrinsic intrinsic, // We want to resolve and populate the handle cache for this type even // if it isn't the basis for anything carried on the node. - baseType = getBaseTypeAndSizeOfSIMDType(clsHnd, &simdSize); + simdBaseJitType = getBaseJitTypeAndSizeOfSIMDType(clsHnd, &simdSize); - if ((clsHnd != m_simdHandleCache->SIMDVectorHandle) && !varTypeIsArithmetic(baseType)) + if ((clsHnd != m_simdHandleCache->SIMDVectorHandle) && + ((simdBaseJitType == CORINFO_TYPE_UNDEF) || !varTypeIsArithmetic(JitType2PreciseVarType(simdBaseJitType)))) { // We want to exit early if the clsHnd should have a base type and it isn't one // of the supported types. This handles cases like op_Explicit which take a Vector @@ -213,13 +214,13 @@ GenTree* Compiler::impSimdAsHWIntrinsic(NamedIntrinsic intrinsic, if (retType == TYP_STRUCT) { - baseType = getBaseTypeAndSizeOfSIMDType(sig->retTypeSigClass, &simdSize); - retType = getSIMDTypeForSize(simdSize); + simdBaseJitType = getBaseJitTypeAndSizeOfSIMDType(sig->retTypeSigClass, &simdSize); + retType = getSIMDTypeForSize(simdSize); } else if (numArgs != 0) { - argClass = info.compCompHnd->getArgClass(sig, sig->args); - baseType = getBaseTypeAndSizeOfSIMDType(argClass, &simdSize); + argClass = info.compCompHnd->getArgClass(sig, sig->args); + simdBaseJitType = getBaseJitTypeAndSizeOfSIMDType(argClass, &simdSize); } if (sig->hasThis()) @@ -236,28 +237,30 @@ GenTree* Compiler::impSimdAsHWIntrinsic(NamedIntrinsic intrinsic, // The first argument will be the appropriate Vector handle to use clsHnd = info.compCompHnd->getArgClass(sig, sig->args); - // We also need to adjust the baseType as some methods on Vector return + // We also need to adjust the simdBaseJitType as some methods on Vector return // a type different than the operation we need to perform. An example // is LessThan or Equals which takes double but returns long. This is // unlike the counterparts on Vector which take a return the same type. - baseType = getBaseTypeAndSizeOfSIMDType(clsHnd, &simdSize); + simdBaseJitType = getBaseJitTypeAndSizeOfSIMDType(clsHnd, &simdSize); } - if (!varTypeIsArithmetic(baseType) || (simdSize == 0)) + if ((simdBaseJitType == CORINFO_TYPE_UNDEF) || !varTypeIsArithmetic(JitType2PreciseVarType(simdBaseJitType)) || + (simdSize == 0)) { // We get here for a devirtualization of IEquatable`1.Equals // or if the user tries to use Vector with an unsupported type return nullptr; } - simdType = getSIMDTypeForSize(simdSize); + var_types simdBaseType = JitType2PreciseVarType(simdBaseJitType); + simdType = getSIMDTypeForSize(simdSize); assert(varTypeIsSIMD(simdType)); - NamedIntrinsic hwIntrinsic = SimdAsHWIntrinsicInfo::lookupHWIntrinsic(intrinsic, baseType); + NamedIntrinsic hwIntrinsic = SimdAsHWIntrinsicInfo::lookupHWIntrinsic(intrinsic, simdBaseType); if ((hwIntrinsic == NI_Illegal) || !varTypeIsSIMD(simdType)) { - // The baseType isn't supported by the intrinsic + // The simdBaseJitType isn't supported by the intrinsic return nullptr; } @@ -271,7 +274,7 @@ GenTree* Compiler::impSimdAsHWIntrinsic(NamedIntrinsic intrinsic, if (hwIntrinsic == intrinsic) { // The SIMD intrinsic requires special handling outside the normal code path - return impSimdAsHWIntrinsicSpecial(intrinsic, clsHnd, sig, retType, baseType, simdSize, newobjThis); + return impSimdAsHWIntrinsicSpecial(intrinsic, clsHnd, sig, retType, simdBaseJitType, simdSize, newobjThis); } CORINFO_InstructionSet hwIntrinsicIsa = HWIntrinsicInfo::lookupIsa(hwIntrinsic); @@ -293,7 +296,7 @@ GenTree* Compiler::impSimdAsHWIntrinsic(NamedIntrinsic intrinsic, case 0: { assert(!SimdAsHWIntrinsicInfo::NeedsOperandsSwapped(intrinsic)); - return gtNewSimdAsHWIntrinsicNode(retType, hwIntrinsic, baseType, simdSize); + return gtNewSimdAsHWIntrinsicNode(retType, hwIntrinsic, simdBaseJitType, simdSize); } case 1: @@ -303,7 +306,7 @@ GenTree* Compiler::impSimdAsHWIntrinsic(NamedIntrinsic intrinsic, op1 = getArgForHWIntrinsic(argType, argClass, isInstanceMethod); assert(!SimdAsHWIntrinsicInfo::NeedsOperandsSwapped(intrinsic)); - return gtNewSimdAsHWIntrinsicNode(retType, op1, hwIntrinsic, baseType, simdSize); + return gtNewSimdAsHWIntrinsicNode(retType, op1, hwIntrinsic, simdBaseJitType, simdSize); } case 2: @@ -321,7 +324,7 @@ GenTree* Compiler::impSimdAsHWIntrinsic(NamedIntrinsic intrinsic, std::swap(op1, op2); } - return gtNewSimdAsHWIntrinsicNode(retType, op1, op2, hwIntrinsic, baseType, simdSize); + return gtNewSimdAsHWIntrinsicNode(retType, op1, op2, hwIntrinsic, simdBaseJitType, simdSize); } } @@ -334,12 +337,12 @@ GenTree* Compiler::impSimdAsHWIntrinsic(NamedIntrinsic intrinsic, // This method handles cases which cannot be table driven // // Arguments: -// intrinsic -- id of the intrinsic function. -// clsHnd -- class handle containing the intrinsic function. -// sig -- signature of the intrinsic call -// retType -- the return type of the intrinsic call -// baseType -- the base type of SIMD type of the intrinsic -// simdSize -- the size of the SIMD type of the intrinsic +// intrinsic -- id of the intrinsic function. +// clsHnd -- class handle containing the intrinsic function. +// sig -- signature of the intrinsic call +// retType -- the return type of the intrinsic call +// simdBaseJitType -- the base JIT type of SIMD type of the intrinsic +// simdSize -- the size of the SIMD type of the intrinsic // // Return Value: // The GT_HWINTRINSIC node, or nullptr if not a supported intrinsic @@ -348,15 +351,17 @@ GenTree* Compiler::impSimdAsHWIntrinsicSpecial(NamedIntrinsic intrinsic, CORINFO_CLASS_HANDLE clsHnd, CORINFO_SIG_INFO* sig, var_types retType, - var_types baseType, + CorInfoType simdBaseJitType, unsigned simdSize, GenTree* newobjThis) { + var_types simdBaseType = JitType2PreciseVarType(simdBaseJitType); + assert(featureSIMD); assert(retType != TYP_UNKNOWN); - assert(varTypeIsArithmetic(baseType)); + assert(varTypeIsArithmetic(simdBaseType)); assert(simdSize != 0); - assert(SimdAsHWIntrinsicInfo::lookupHWIntrinsic(intrinsic, baseType) == intrinsic); + assert(SimdAsHWIntrinsicInfo::lookupHWIntrinsic(intrinsic, simdBaseType) == intrinsic); var_types simdType = getSIMDTypeForSize(simdSize); assert(varTypeIsSIMD(simdType)); @@ -402,7 +407,7 @@ GenTree* Compiler::impSimdAsHWIntrinsicSpecial(NamedIntrinsic intrinsic, case NI_VectorT128_CreateBroadcast: case NI_VectorT256_CreateBroadcast: { - if (varTypeIsLong(baseType)) + if (varTypeIsLong(simdBaseType)) { // TODO-XARCH-CQ: It may be beneficial to emit the movq // instruction, which takes a 64-bit memory address and @@ -418,10 +423,11 @@ GenTree* Compiler::impSimdAsHWIntrinsicSpecial(NamedIntrinsic intrinsic, #endif // TARGET_XARCH case NI_VectorT128_As: { - unsigned retSimdSize; - var_types retBaseType = getBaseTypeAndSizeOfSIMDType(sig->retTypeSigClass, &retSimdSize); + unsigned retSimdSize; + CorInfoType retBaseJitType = getBaseJitTypeAndSizeOfSIMDType(sig->retTypeSigClass, &retSimdSize); - if (!varTypeIsArithmetic(retBaseType) || (retSimdSize == 0)) + if ((retBaseJitType == CORINFO_TYPE_UNDEF) || + !varTypeIsArithmetic(JitType2PreciseVarType(retBaseJitType)) || (retSimdSize == 0)) { // We get here if the return type is an unsupported type return nullptr; @@ -437,7 +443,7 @@ GenTree* Compiler::impSimdAsHWIntrinsicSpecial(NamedIntrinsic intrinsic, // We need to exit early if this is Vector.Dot for int or uint and SSE41 is not supported // The other types should be handled via the table driven paths - assert((baseType == TYP_INT) || (baseType == TYP_UINT)); + assert((simdBaseType == TYP_INT) || (simdBaseType == TYP_UINT)); return nullptr; } break; @@ -469,7 +475,7 @@ GenTree* Compiler::impSimdAsHWIntrinsicSpecial(NamedIntrinsic intrinsic, case NI_VectorT128_get_One: case NI_VectorT256_get_One: { - switch (baseType) + switch (simdBaseType) { case TYP_BYTE: case TYP_UBYTE: @@ -492,7 +498,7 @@ GenTree* Compiler::impSimdAsHWIntrinsicSpecial(NamedIntrinsic intrinsic, case TYP_FLOAT: case TYP_DOUBLE: { - op1 = gtNewDconNode(1.0, baseType); + op1 = gtNewDconNode(1.0, simdBaseType); break; } @@ -502,14 +508,14 @@ GenTree* Compiler::impSimdAsHWIntrinsicSpecial(NamedIntrinsic intrinsic, } } - return gtNewSimdCreateBroadcastNode(retType, op1, baseType, simdSize, + return gtNewSimdCreateBroadcastNode(retType, op1, simdBaseJitType, simdSize, /* isSimdAsHWIntrinsic */ true); } case NI_VectorT128_get_Count: case NI_VectorT256_get_Count: { - GenTreeIntCon* countNode = gtNewIconNode(getSIMDVectorLength(simdSize, baseType), TYP_INT); + GenTreeIntCon* countNode = gtNewIconNode(getSIMDVectorLength(simdSize, simdBaseType), TYP_INT); countNode->gtFlags |= GTF_ICON_SIMD_COUNT; return countNode; } @@ -519,7 +525,7 @@ GenTree* Compiler::impSimdAsHWIntrinsicSpecial(NamedIntrinsic intrinsic, case NI_Vector4_get_One: case NI_VectorT128_get_One: { - switch (baseType) + switch (simdBaseType) { case TYP_BYTE: case TYP_UBYTE: @@ -542,7 +548,7 @@ GenTree* Compiler::impSimdAsHWIntrinsicSpecial(NamedIntrinsic intrinsic, case TYP_FLOAT: case TYP_DOUBLE: { - op1 = gtNewDconNode(1.0, baseType); + op1 = gtNewDconNode(1.0, simdBaseType); break; } @@ -552,13 +558,13 @@ GenTree* Compiler::impSimdAsHWIntrinsicSpecial(NamedIntrinsic intrinsic, } } - return gtNewSimdCreateBroadcastNode(retType, op1, baseType, simdSize, + return gtNewSimdCreateBroadcastNode(retType, op1, simdBaseJitType, simdSize, /* isSimdAsHWIntrinsic */ true); } case NI_VectorT128_get_Count: { - GenTreeIntCon* countNode = gtNewIconNode(getSIMDVectorLength(simdSize, baseType), TYP_INT); + GenTreeIntCon* countNode = gtNewIconNode(getSIMDVectorLength(simdSize, simdBaseType), TYP_INT); countNode->gtFlags |= GTF_ICON_SIMD_COUNT; return countNode; } @@ -614,13 +620,13 @@ GenTree* Compiler::impSimdAsHWIntrinsicSpecial(NamedIntrinsic intrinsic, case NI_VectorT128_Abs: case NI_VectorT256_Abs: { - if (varTypeIsFloating(baseType)) + if (varTypeIsFloating(simdBaseType)) { // Abs(vf) = vf & new SIMDVector(0x7fffffff); // Abs(vd) = vf & new SIMDVector(0x7fffffffffffffff); GenTree* bitMask = nullptr; - if (baseType == TYP_FLOAT) + if (simdBaseType == TYP_FLOAT) { static_assert_no_msg(sizeof(float) == sizeof(int)); int mask = 0x7fffffff; @@ -628,7 +634,7 @@ GenTree* Compiler::impSimdAsHWIntrinsicSpecial(NamedIntrinsic intrinsic, } else { - assert(baseType == TYP_DOUBLE); + assert(simdBaseType == TYP_DOUBLE); static_assert_no_msg(sizeof(double) == sizeof(__int64)); __int64 mask = 0x7fffffffffffffffLL; @@ -636,21 +642,21 @@ GenTree* Compiler::impSimdAsHWIntrinsicSpecial(NamedIntrinsic intrinsic, } assert(bitMask != nullptr); - bitMask = gtNewSimdCreateBroadcastNode(retType, bitMask, baseType, simdSize, + bitMask = gtNewSimdCreateBroadcastNode(retType, bitMask, simdBaseJitType, simdSize, /* isSimdAsHWIntrinsic */ true); intrinsic = isVectorT256 ? NI_VectorT256_op_BitwiseAnd : NI_VectorT128_op_BitwiseAnd; - intrinsic = SimdAsHWIntrinsicInfo::lookupHWIntrinsic(intrinsic, baseType); + intrinsic = SimdAsHWIntrinsicInfo::lookupHWIntrinsic(intrinsic, simdBaseType); - return gtNewSimdAsHWIntrinsicNode(retType, op1, bitMask, intrinsic, baseType, simdSize); + return gtNewSimdAsHWIntrinsicNode(retType, op1, bitMask, intrinsic, simdBaseJitType, simdSize); } - else if (varTypeIsUnsigned(baseType)) + else if (varTypeIsUnsigned(simdBaseType)) { return op1; } - else if ((baseType != TYP_LONG) && compOpportunisticallyDependsOn(InstructionSet_SSSE3)) + else if ((simdBaseType != TYP_LONG) && compOpportunisticallyDependsOn(InstructionSet_SSSE3)) { - return gtNewSimdAsHWIntrinsicNode(retType, op1, NI_SSSE3_Abs, baseType, simdSize); + return gtNewSimdAsHWIntrinsicNode(retType, op1, NI_SSSE3_Abs, simdBaseJitType, simdSize); } else { @@ -666,24 +672,26 @@ GenTree* Compiler::impSimdAsHWIntrinsicSpecial(NamedIntrinsic intrinsic, nullptr DEBUGARG("Clone op1 for Vector.Abs")); // op1 = op1 < Zero - tmp = gtNewSIMDVectorZero(retType, baseType, simdSize); + tmp = gtNewSIMDVectorZero(retType, simdBaseJitType, simdSize); hwIntrinsic = isVectorT256 ? NI_VectorT256_LessThan : NI_VectorT128_LessThan; - op1 = impSimdAsHWIntrinsicRelOp(hwIntrinsic, clsHnd, retType, baseType, simdSize, op1, tmp); + op1 = impSimdAsHWIntrinsicRelOp(hwIntrinsic, clsHnd, retType, simdBaseJitType, simdSize, op1, + tmp); // tmp = Zero - op1Dup1 - tmp = gtNewSIMDVectorZero(retType, baseType, simdSize); + tmp = gtNewSIMDVectorZero(retType, simdBaseJitType, simdSize); hwIntrinsic = isVectorT256 ? NI_AVX2_Subtract : NI_SSE2_Subtract; - tmp = gtNewSimdAsHWIntrinsicNode(retType, tmp, op1Dup1, hwIntrinsic, baseType, simdSize); + tmp = gtNewSimdAsHWIntrinsicNode(retType, tmp, op1Dup1, hwIntrinsic, simdBaseJitType, simdSize); // result = ConditionalSelect(op1, tmp, op1Dup2) - return impSimdAsHWIntrinsicCndSel(clsHnd, retType, baseType, simdSize, op1, tmp, op1Dup2); + return impSimdAsHWIntrinsicCndSel(clsHnd, retType, simdBaseJitType, simdSize, op1, tmp, + op1Dup2); } break; } #elif defined(TARGET_ARM64) case NI_VectorT128_Abs: { - assert(varTypeIsUnsigned(baseType)); + assert(varTypeIsUnsigned(simdBaseType)); return op1; } #else @@ -724,8 +732,8 @@ GenTree* Compiler::impSimdAsHWIntrinsicSpecial(NamedIntrinsic intrinsic, assert(retType == TYP_VOID); copyBlkDst = op1; - copyBlkSrc = - gtNewSimdCreateBroadcastNode(simdType, op2, baseType, simdSize, /* isSimdAsHWIntrinsic */ true); + copyBlkSrc = gtNewSimdCreateBroadcastNode(simdType, op2, simdBaseJitType, simdSize, + /* isSimdAsHWIntrinsic */ true); break; } @@ -742,24 +750,27 @@ GenTree* Compiler::impSimdAsHWIntrinsicSpecial(NamedIntrinsic intrinsic, assert((shiftCount > 0) && (shiftCount <= 16)); // retNode = Sse.Divide(op1, op2); - GenTree* retNode = gtNewSimdAsHWIntrinsicNode(retType, op1, op2, NI_SSE_Divide, baseType, simdSize); + GenTree* retNode = + gtNewSimdAsHWIntrinsicNode(retType, op1, op2, NI_SSE_Divide, simdBaseJitType, simdSize); // retNode = Sse.ShiftLeftLogical128BitLane(retNode.AsInt32(), shiftCount).AsSingle() - retNode = gtNewSimdAsHWIntrinsicNode(retType, retNode, gtNewIconNode(shiftCount, TYP_INT), - NI_SSE2_ShiftLeftLogical128BitLane, TYP_INT, simdSize); + retNode = + gtNewSimdAsHWIntrinsicNode(retType, retNode, gtNewIconNode(shiftCount, TYP_INT), + NI_SSE2_ShiftLeftLogical128BitLane, CORINFO_TYPE_INT, simdSize); // retNode = Sse.ShiftRightLogical128BitLane(retNode.AsInt32(), shiftCount).AsSingle() - retNode = gtNewSimdAsHWIntrinsicNode(retType, retNode, gtNewIconNode(shiftCount, TYP_INT), - NI_SSE2_ShiftRightLogical128BitLane, TYP_INT, simdSize); + retNode = + gtNewSimdAsHWIntrinsicNode(retType, retNode, gtNewIconNode(shiftCount, TYP_INT), + NI_SSE2_ShiftRightLogical128BitLane, CORINFO_TYPE_INT, simdSize); return retNode; } case NI_VectorT128_Dot: { - assert((baseType == TYP_INT) || (baseType == TYP_UINT)); + assert((simdBaseType == TYP_INT) || (simdBaseType == TYP_UINT)); assert(compIsaSupportedDebugOnly(InstructionSet_SSE41)); - return gtNewSimdAsHWIntrinsicNode(retType, op1, op2, NI_Vector128_Dot, baseType, simdSize); + return gtNewSimdAsHWIntrinsicNode(retType, op1, op2, NI_Vector128_Dot, simdBaseJitType, simdSize); } case NI_VectorT128_Equals: @@ -772,7 +783,7 @@ GenTree* Compiler::impSimdAsHWIntrinsicSpecial(NamedIntrinsic intrinsic, case NI_VectorT256_LessThan: case NI_VectorT256_LessThanOrEqual: { - return impSimdAsHWIntrinsicRelOp(intrinsic, clsHnd, retType, baseType, simdSize, op1, op2); + return impSimdAsHWIntrinsicRelOp(intrinsic, clsHnd, retType, simdBaseJitType, simdSize, op1, op2); } case NI_VectorT128_Max: @@ -780,29 +791,32 @@ GenTree* Compiler::impSimdAsHWIntrinsicSpecial(NamedIntrinsic intrinsic, case NI_VectorT256_Max: case NI_VectorT256_Min: { - if ((baseType == TYP_BYTE) || (baseType == TYP_USHORT)) + if ((simdBaseType == TYP_BYTE) || (simdBaseType == TYP_USHORT)) { - GenTree* constVal = nullptr; - var_types opType = baseType; + GenTree* constVal = nullptr; + CorInfoType opJitType = simdBaseJitType; + var_types opType = simdBaseType; NamedIntrinsic opIntrinsic; NamedIntrinsic hwIntrinsic; - switch (baseType) + switch (simdBaseType) { case TYP_BYTE: { - constVal = gtNewIconNode(0x80808080, TYP_INT); - opIntrinsic = NI_VectorT128_op_Subtraction; - baseType = TYP_UBYTE; + constVal = gtNewIconNode(0x80808080, TYP_INT); + opIntrinsic = NI_VectorT128_op_Subtraction; + simdBaseJitType = CORINFO_TYPE_UBYTE; + simdBaseType = TYP_UBYTE; break; } case TYP_USHORT: { - constVal = gtNewIconNode(0x80008000, TYP_INT); - opIntrinsic = NI_VectorT128_op_Addition; - baseType = TYP_SHORT; + constVal = gtNewIconNode(0x80008000, TYP_INT); + opIntrinsic = NI_VectorT128_op_Addition; + simdBaseJitType = CORINFO_TYPE_SHORT; + simdBaseType = TYP_SHORT; break; } @@ -812,8 +826,9 @@ GenTree* Compiler::impSimdAsHWIntrinsicSpecial(NamedIntrinsic intrinsic, } } - GenTree* constVector = gtNewSimdCreateBroadcastNode(retType, constVal, TYP_INT, simdSize, - /* isSimdAsHWIntrinsic */ true); + GenTree* constVector = + gtNewSimdCreateBroadcastNode(retType, constVal, CORINFO_TYPE_INT, simdSize, + /* isSimdAsHWIntrinsic */ true); GenTree* constVectorDup1; constVector = impCloneExpr(constVector, &constVectorDup1, clsHnd, (unsigned)CHECK_SPILL_ALL, @@ -829,18 +844,19 @@ GenTree* Compiler::impSimdAsHWIntrinsicSpecial(NamedIntrinsic intrinsic, // op1 = op1 - constVector // -or- // op1 = op1 + constVector - op1 = gtNewSimdAsHWIntrinsicNode(retType, op1, constVector, hwIntrinsic, opType, simdSize); + op1 = gtNewSimdAsHWIntrinsicNode(retType, op1, constVector, hwIntrinsic, opJitType, simdSize); // op2 = op2 - constVectorDup1 // -or- // op2 = op2 + constVectorDup1 - op2 = gtNewSimdAsHWIntrinsicNode(retType, op2, constVectorDup1, hwIntrinsic, opType, simdSize); + op2 = + gtNewSimdAsHWIntrinsicNode(retType, op2, constVectorDup1, hwIntrinsic, opJitType, simdSize); // op1 = Max(op1, op2) // -or- // op1 = Min(op1, op2) - hwIntrinsic = SimdAsHWIntrinsicInfo::lookupHWIntrinsic(intrinsic, baseType); - op1 = gtNewSimdAsHWIntrinsicNode(retType, op1, op2, hwIntrinsic, baseType, simdSize); + hwIntrinsic = SimdAsHWIntrinsicInfo::lookupHWIntrinsic(intrinsic, simdBaseType); + op1 = gtNewSimdAsHWIntrinsicNode(retType, op1, op2, hwIntrinsic, simdBaseJitType, simdSize); // result = op1 + constVectorDup2 // -or- @@ -848,7 +864,8 @@ GenTree* Compiler::impSimdAsHWIntrinsicSpecial(NamedIntrinsic intrinsic, opIntrinsic = (opIntrinsic == NI_VectorT128_op_Subtraction) ? NI_VectorT128_op_Addition : NI_VectorT128_op_Subtraction; hwIntrinsic = SimdAsHWIntrinsicInfo::lookupHWIntrinsic(opIntrinsic, opType); - return gtNewSimdAsHWIntrinsicNode(retType, op1, constVectorDup2, hwIntrinsic, opType, simdSize); + return gtNewSimdAsHWIntrinsicNode(retType, op1, constVectorDup2, hwIntrinsic, opJitType, + simdSize); } GenTree* op1Dup; @@ -871,10 +888,10 @@ GenTree* Compiler::impSimdAsHWIntrinsicSpecial(NamedIntrinsic intrinsic, // op1 = op1 > op2 // -or- // op1 = op1 < op2 - op1 = impSimdAsHWIntrinsicRelOp(intrinsic, clsHnd, retType, baseType, simdSize, op1, op2); + op1 = impSimdAsHWIntrinsicRelOp(intrinsic, clsHnd, retType, simdBaseJitType, simdSize, op1, op2); // result = ConditionalSelect(op1, op1Dup, op2Dup) - return impSimdAsHWIntrinsicCndSel(clsHnd, retType, baseType, simdSize, op1, op1Dup, op2Dup); + return impSimdAsHWIntrinsicCndSel(clsHnd, retType, simdBaseJitType, simdSize, op1, op1Dup, op2Dup); } case NI_VectorT128_op_Multiply: @@ -893,11 +910,11 @@ GenTree* Compiler::impSimdAsHWIntrinsicSpecial(NamedIntrinsic intrinsic, if (broadcastOp != nullptr) { - *broadcastOp = gtNewSimdCreateBroadcastNode(simdType, *broadcastOp, baseType, simdSize, + *broadcastOp = gtNewSimdCreateBroadcastNode(simdType, *broadcastOp, simdBaseJitType, simdSize, /* isSimdAsHWIntrinsic */ true); } - switch (baseType) + switch (simdBaseType) { case TYP_SHORT: case TYP_USHORT: @@ -926,30 +943,30 @@ GenTree* Compiler::impSimdAsHWIntrinsicSpecial(NamedIntrinsic intrinsic, nullptr DEBUGARG("Clone op2 for Vector.Multiply")); // op1 = Sse2.ShiftRightLogical128BitLane(op1, 4) - op1 = - gtNewSimdAsHWIntrinsicNode(retType, op1, gtNewIconNode(4, TYP_INT), - NI_SSE2_ShiftRightLogical128BitLane, baseType, simdSize); + op1 = gtNewSimdAsHWIntrinsicNode(retType, op1, gtNewIconNode(4, TYP_INT), + NI_SSE2_ShiftRightLogical128BitLane, simdBaseJitType, + simdSize); // op2 = Sse2.ShiftRightLogical128BitLane(op1, 4) - op2 = - gtNewSimdAsHWIntrinsicNode(retType, op2, gtNewIconNode(4, TYP_INT), - NI_SSE2_ShiftRightLogical128BitLane, baseType, simdSize); + op2 = gtNewSimdAsHWIntrinsicNode(retType, op2, gtNewIconNode(4, TYP_INT), + NI_SSE2_ShiftRightLogical128BitLane, simdBaseJitType, + simdSize); // op2 = Sse2.Multiply(op2.AsUInt64(), op1.AsUInt64()).AsInt32() - op2 = gtNewSimdAsHWIntrinsicNode(retType, op2, op1, NI_SSE2_Multiply, TYP_ULONG, - simdSize); + op2 = gtNewSimdAsHWIntrinsicNode(retType, op2, op1, NI_SSE2_Multiply, + CORINFO_TYPE_ULONG, simdSize); // op2 = Sse2.Shuffle(op2, (0, 0, 2, 0)) op2 = gtNewSimdAsHWIntrinsicNode(retType, op2, gtNewIconNode(SHUFFLE_XXZX, TYP_INT), - NI_SSE2_Shuffle, baseType, simdSize); + NI_SSE2_Shuffle, simdBaseJitType, simdSize); // op1 = Sse2.Multiply(op1Dup.AsUInt64(), op2Dup.AsUInt64()).AsInt32() - op1 = gtNewSimdAsHWIntrinsicNode(retType, op1Dup, op2Dup, NI_SSE2_Multiply, TYP_ULONG, - simdSize); + op1 = gtNewSimdAsHWIntrinsicNode(retType, op1Dup, op2Dup, NI_SSE2_Multiply, + CORINFO_TYPE_ULONG, simdSize); // op1 = Sse2.Shuffle(op1, (0, 0, 2, 0)) op1 = gtNewSimdAsHWIntrinsicNode(retType, op1, gtNewIconNode(SHUFFLE_XXZX, TYP_INT), - NI_SSE2_Shuffle, baseType, simdSize); + NI_SSE2_Shuffle, simdBaseJitType, simdSize); // result = Sse2.UnpackLow(op1, op2) hwIntrinsic = NI_SSE2_UnpackLow; @@ -976,7 +993,7 @@ GenTree* Compiler::impSimdAsHWIntrinsicSpecial(NamedIntrinsic intrinsic, } assert(hwIntrinsic != NI_Illegal); - return gtNewSimdAsHWIntrinsicNode(retType, op1, op2, hwIntrinsic, baseType, simdSize); + return gtNewSimdAsHWIntrinsicNode(retType, op1, op2, hwIntrinsic, simdBaseJitType, simdSize); } case NI_VectorT256_op_Multiply: @@ -995,11 +1012,11 @@ GenTree* Compiler::impSimdAsHWIntrinsicSpecial(NamedIntrinsic intrinsic, if (broadcastOp != nullptr) { - *broadcastOp = gtNewSimdCreateBroadcastNode(simdType, *broadcastOp, baseType, simdSize, + *broadcastOp = gtNewSimdCreateBroadcastNode(simdType, *broadcastOp, simdBaseJitType, simdSize, /* isSimdAsHWIntrinsic */ true); } - switch (baseType) + switch (simdBaseType) { case TYP_SHORT: case TYP_USHORT: @@ -1024,7 +1041,7 @@ GenTree* Compiler::impSimdAsHWIntrinsicSpecial(NamedIntrinsic intrinsic, } assert(hwIntrinsic != NI_Illegal); - return gtNewSimdAsHWIntrinsicNode(retType, op1, op2, hwIntrinsic, baseType, simdSize); + return gtNewSimdAsHWIntrinsicNode(retType, op1, op2, hwIntrinsic, simdBaseJitType, simdSize); } #elif defined(TARGET_ARM64) @@ -1036,15 +1053,15 @@ GenTree* Compiler::impSimdAsHWIntrinsicSpecial(NamedIntrinsic intrinsic, assert(retType == TYP_VOID); copyBlkDst = op1; - copyBlkSrc = - gtNewSimdCreateBroadcastNode(simdType, op2, baseType, simdSize, /* isSimdAsHWIntrinsic */ true); + copyBlkSrc = gtNewSimdCreateBroadcastNode(simdType, op2, simdBaseJitType, simdSize, + /* isSimdAsHWIntrinsic */ true); break; } case NI_VectorT128_Max: case NI_VectorT128_Min: { - assert((baseType == TYP_LONG) || (baseType == TYP_ULONG)); + assert((simdBaseType == TYP_LONG) || (simdBaseType == TYP_ULONG)); NamedIntrinsic hwIntrinsic; @@ -1061,11 +1078,11 @@ GenTree* Compiler::impSimdAsHWIntrinsicSpecial(NamedIntrinsic intrinsic, // op1 = op1 > op2 // -or- // op1 = op1 < op2 - hwIntrinsic = SimdAsHWIntrinsicInfo::lookupHWIntrinsic(intrinsic, baseType); - op1 = gtNewSimdAsHWIntrinsicNode(retType, op1, op2, hwIntrinsic, baseType, simdSize); + hwIntrinsic = SimdAsHWIntrinsicInfo::lookupHWIntrinsic(intrinsic, simdBaseType); + op1 = gtNewSimdAsHWIntrinsicNode(retType, op1, op2, hwIntrinsic, simdBaseJitType, simdSize); // result = ConditionalSelect(op1, op1Dup, op2Dup) - return impSimdAsHWIntrinsicCndSel(clsHnd, retType, baseType, simdSize, op1, op1Dup, op2Dup); + return impSimdAsHWIntrinsicCndSel(clsHnd, retType, simdBaseJitType, simdSize, op1, op1Dup, op2Dup); } case NI_VectorT128_op_Multiply: @@ -1086,14 +1103,14 @@ GenTree* Compiler::impSimdAsHWIntrinsicSpecial(NamedIntrinsic intrinsic, scalarOp = &op2; } - switch (baseType) + switch (simdBaseType) { case TYP_BYTE: case TYP_UBYTE: { if (scalarOp != nullptr) { - *scalarOp = gtNewSimdCreateBroadcastNode(simdType, *scalarOp, baseType, simdSize, + *scalarOp = gtNewSimdCreateBroadcastNode(simdType, *scalarOp, simdBaseJitType, simdSize, /* isSimdAsHWIntrinsic */ true); } @@ -1110,8 +1127,9 @@ GenTree* Compiler::impSimdAsHWIntrinsicSpecial(NamedIntrinsic intrinsic, if (scalarOp != nullptr) { hwIntrinsic = NI_AdvSimd_MultiplyByScalar; - *scalarOp = gtNewSimdAsHWIntrinsicNode(TYP_SIMD8, *scalarOp, - NI_Vector64_CreateScalarUnsafe, baseType, 8); + *scalarOp = + gtNewSimdAsHWIntrinsicNode(TYP_SIMD8, *scalarOp, NI_Vector64_CreateScalarUnsafe, + simdBaseJitType, 8); } else { @@ -1125,8 +1143,8 @@ GenTree* Compiler::impSimdAsHWIntrinsicSpecial(NamedIntrinsic intrinsic, if (scalarOp != nullptr) { hwIntrinsic = NI_AdvSimd_Arm64_MultiplyByScalar; - *scalarOp = - gtNewSimdAsHWIntrinsicNode(TYP_SIMD8, *scalarOp, NI_Vector64_Create, baseType, 8); + *scalarOp = gtNewSimdAsHWIntrinsicNode(TYP_SIMD8, *scalarOp, NI_Vector64_Create, + simdBaseJitType, 8); } else { @@ -1142,7 +1160,7 @@ GenTree* Compiler::impSimdAsHWIntrinsicSpecial(NamedIntrinsic intrinsic, } assert(hwIntrinsic != NI_Illegal); - return gtNewSimdAsHWIntrinsicNode(retType, op1, op2, hwIntrinsic, baseType, simdSize); + return gtNewSimdAsHWIntrinsicNode(retType, op1, op2, hwIntrinsic, simdBaseJitType, simdSize); } #else #error Unsupported platform @@ -1183,12 +1201,12 @@ GenTree* Compiler::impSimdAsHWIntrinsicSpecial(NamedIntrinsic intrinsic, case NI_VectorT128_ConditionalSelect: case NI_VectorT256_ConditionalSelect: { - return impSimdAsHWIntrinsicCndSel(clsHnd, retType, baseType, simdSize, op1, op2, op3); + return impSimdAsHWIntrinsicCndSel(clsHnd, retType, simdBaseJitType, simdSize, op1, op2, op3); } #elif defined(TARGET_ARM64) case NI_VectorT128_ConditionalSelect: { - return impSimdAsHWIntrinsicCndSel(clsHnd, retType, baseType, simdSize, op1, op2, op3); + return impSimdAsHWIntrinsicCndSel(clsHnd, retType, simdBaseJitType, simdSize, op1, op2, op3); } #else #error Unsupported platform @@ -1233,28 +1251,30 @@ GenTree* Compiler::impSimdAsHWIntrinsicSpecial(NamedIntrinsic intrinsic, // impSimdAsHWIntrinsicCndSel: Import a SIMD conditional select intrinsic // // Arguments: -// clsHnd -- class handle containing the intrinsic function. -// retType -- the return type of the intrinsic call -// baseType -- the base type of SIMD type of the intrinsic -// simdSize -- the size of the SIMD type of the intrinsic -// op1 -- the first operand of the intrinsic -// op2 -- the second operand of the intrinsic -// op3 -- the third operand of the intrinsic +// clsHnd -- class handle containing the intrinsic function. +// retType -- the return type of the intrinsic call +// simdBaseJitType -- the base JIT type of SIMD type of the intrinsic +// simdSize -- the size of the SIMD type of the intrinsic +// op1 -- the first operand of the intrinsic +// op2 -- the second operand of the intrinsic +// op3 -- the third operand of the intrinsic // // Return Value: // The GT_HWINTRINSIC node representing the conditional select // GenTree* Compiler::impSimdAsHWIntrinsicCndSel(CORINFO_CLASS_HANDLE clsHnd, var_types retType, - var_types baseType, + CorInfoType simdBaseJitType, unsigned simdSize, GenTree* op1, GenTree* op2, GenTree* op3) { + var_types simdBaseType = JitType2PreciseVarType(simdBaseJitType); + assert(featureSIMD); assert(retType != TYP_UNKNOWN); - assert(varTypeIsArithmetic(baseType)); + assert(varTypeIsArithmetic(simdBaseType)); assert(simdSize != 0); assert(varTypeIsSIMD(getSIMDTypeForSize(simdSize))); assert(op1 != nullptr); @@ -1275,24 +1295,24 @@ GenTree* Compiler::impSimdAsHWIntrinsicCndSel(CORINFO_CLASS_HANDLE clsHnd, nullptr DEBUGARG("Clone op1 for Vector.ConditionalSelect")); // op2 = op2 & op1 - hwIntrinsic = SimdAsHWIntrinsicInfo::lookupHWIntrinsic(NI_VectorT128_op_BitwiseAnd, baseType); - op2 = gtNewSimdAsHWIntrinsicNode(retType, op2, op1, hwIntrinsic, baseType, simdSize); + hwIntrinsic = SimdAsHWIntrinsicInfo::lookupHWIntrinsic(NI_VectorT128_op_BitwiseAnd, simdBaseType); + op2 = gtNewSimdAsHWIntrinsicNode(retType, op2, op1, hwIntrinsic, simdBaseJitType, simdSize); // op3 = op3 & ~op1Dup - hwIntrinsic = SimdAsHWIntrinsicInfo::lookupHWIntrinsic(NI_VectorT128_AndNot, baseType); + hwIntrinsic = SimdAsHWIntrinsicInfo::lookupHWIntrinsic(NI_VectorT128_AndNot, simdBaseType); if (SimdAsHWIntrinsicInfo::NeedsOperandsSwapped(NI_VectorT128_AndNot)) { std::swap(op3, op1Dup); } - op3 = gtNewSimdAsHWIntrinsicNode(retType, op3, op1Dup, hwIntrinsic, baseType, simdSize); + op3 = gtNewSimdAsHWIntrinsicNode(retType, op3, op1Dup, hwIntrinsic, simdBaseJitType, simdSize); // result = op2 | op3 - hwIntrinsic = SimdAsHWIntrinsicInfo::lookupHWIntrinsic(NI_VectorT128_op_BitwiseOr, baseType); - return gtNewSimdAsHWIntrinsicNode(retType, op2, op3, hwIntrinsic, baseType, simdSize); + hwIntrinsic = SimdAsHWIntrinsicInfo::lookupHWIntrinsic(NI_VectorT128_op_BitwiseOr, simdBaseType); + return gtNewSimdAsHWIntrinsicNode(retType, op2, op3, hwIntrinsic, simdBaseJitType, simdSize); #elif defined(TARGET_ARM64) - return gtNewSimdAsHWIntrinsicNode(retType, op1, op2, op3, NI_AdvSimd_BitwiseSelect, baseType, simdSize); + return gtNewSimdAsHWIntrinsicNode(retType, op1, op2, op3, NI_AdvSimd_BitwiseSelect, simdBaseJitType, simdSize); #else #error Unsupported platform #endif // !TARGET_XARCH && !TARGET_ARM64 @@ -1303,13 +1323,13 @@ GenTree* Compiler::impSimdAsHWIntrinsicCndSel(CORINFO_CLASS_HANDLE clsHnd, // impSimdAsHWIntrinsicRelOp: Import a SIMD relational operator intrinsic // // Arguments: -// intrinsic -- id of the intrinsic function. -// clsHnd -- class handle containing the intrinsic function. -// retType -- the return type of the intrinsic call -// baseType -- the base type of SIMD type of the intrinsic -// simdSize -- the size of the SIMD type of the intrinsic -// op1 -- the first operand of the intrinsic -// op2 -- the second operand of the intrinsic +// intrinsic -- id of the intrinsic function. +// clsHnd -- class handle containing the intrinsic function. +// retType -- the return type of the intrinsic call +// simdBaseJitType -- the base JIT type of SIMD type of the intrinsic +// simdSize -- the size of the SIMD type of the intrinsic +// op1 -- the first operand of the intrinsic +// op2 -- the second operand of the intrinsic // // Return Value: // The GT_HWINTRINSIC node representing the relational operator @@ -1317,14 +1337,16 @@ GenTree* Compiler::impSimdAsHWIntrinsicCndSel(CORINFO_CLASS_HANDLE clsHnd, GenTree* Compiler::impSimdAsHWIntrinsicRelOp(NamedIntrinsic intrinsic, CORINFO_CLASS_HANDLE clsHnd, var_types retType, - var_types baseType, + CorInfoType simdBaseJitType, unsigned simdSize, GenTree* op1, GenTree* op2) { + var_types simdBaseType = JitType2PreciseVarType(simdBaseJitType); + assert(featureSIMD); assert(retType != TYP_UNKNOWN); - assert(varTypeIsIntegral(baseType)); + assert(varTypeIsIntegral(simdBaseType)); assert(simdSize != 0); assert(varTypeIsSIMD(getSIMDTypeForSize(simdSize))); assert(op1 != nullptr); @@ -1349,9 +1371,9 @@ GenTree* Compiler::impSimdAsHWIntrinsicRelOp(NamedIntrinsic intrinsic, NamedIntrinsic hwIntrinsic = NI_Illegal; - if (isVectorT256 || ((baseType != TYP_LONG) && (baseType != TYP_ULONG))) + if (isVectorT256 || ((simdBaseType != TYP_LONG) && (simdBaseType != TYP_ULONG))) { - hwIntrinsic = SimdAsHWIntrinsicInfo::lookupHWIntrinsic(intrinsic, baseType); + hwIntrinsic = SimdAsHWIntrinsicInfo::lookupHWIntrinsic(intrinsic, simdBaseType); assert(hwIntrinsic != intrinsic); } else if (compOpportunisticallyDependsOn(InstructionSet_SSE41)) @@ -1374,20 +1396,20 @@ GenTree* Compiler::impSimdAsHWIntrinsicRelOp(NamedIntrinsic intrinsic, hwIntrinsic = SimdAsHWIntrinsicInfo::lookupHWIntrinsic(intrinsic, TYP_INT); assert(hwIntrinsic != intrinsic); - GenTree* tmp = gtNewSimdAsHWIntrinsicNode(retType, op1, op2, hwIntrinsic, TYP_INT, simdSize); + GenTree* tmp = gtNewSimdAsHWIntrinsicNode(retType, op1, op2, hwIntrinsic, CORINFO_TYPE_INT, simdSize); tmp = impCloneExpr(tmp, &op1, clsHnd, (unsigned)CHECK_SPILL_ALL, nullptr DEBUGARG("Clone tmp for Vector.Equals")); op2 = gtNewSimdAsHWIntrinsicNode(retType, tmp, gtNewIconNode(SHUFFLE_ZWXY, TYP_INT), NI_SSE2_Shuffle, - TYP_INT, simdSize); + CORINFO_TYPE_INT, simdSize); - hwIntrinsic = SimdAsHWIntrinsicInfo::lookupHWIntrinsic(NI_VectorT128_op_BitwiseAnd, baseType); + hwIntrinsic = SimdAsHWIntrinsicInfo::lookupHWIntrinsic(NI_VectorT128_op_BitwiseAnd, simdBaseType); assert(hwIntrinsic != NI_VectorT128_op_BitwiseAnd); } assert(hwIntrinsic != NI_Illegal); - return gtNewSimdAsHWIntrinsicNode(retType, op1, op2, hwIntrinsic, baseType, simdSize); + return gtNewSimdAsHWIntrinsicNode(retType, op1, op2, hwIntrinsic, simdBaseJitType, simdSize); } case NI_VectorT128_GreaterThanOrEqual: @@ -1450,12 +1472,12 @@ GenTree* Compiler::impSimdAsHWIntrinsicRelOp(NamedIntrinsic intrinsic, } } - op1 = impSimdAsHWIntrinsicRelOp(eqIntrinsic, clsHnd, retType, baseType, simdSize, op1, op2); - op2 = impSimdAsHWIntrinsicRelOp(intrinsic, clsHnd, retType, baseType, simdSize, op1Dup, op2Dup); + op1 = impSimdAsHWIntrinsicRelOp(eqIntrinsic, clsHnd, retType, simdBaseJitType, simdSize, op1, op2); + op2 = impSimdAsHWIntrinsicRelOp(intrinsic, clsHnd, retType, simdBaseJitType, simdSize, op1Dup, op2Dup); intrinsic = isVectorT256 ? NI_VectorT256_op_BitwiseOr : NI_VectorT128_op_BitwiseOr; - NamedIntrinsic hwIntrinsic = SimdAsHWIntrinsicInfo::lookupHWIntrinsic(intrinsic, baseType); - return gtNewSimdAsHWIntrinsicNode(retType, op1, op2, hwIntrinsic, baseType, simdSize); + NamedIntrinsic hwIntrinsic = SimdAsHWIntrinsicInfo::lookupHWIntrinsic(intrinsic, simdBaseType); + return gtNewSimdAsHWIntrinsicNode(retType, op1, op2, hwIntrinsic, simdBaseJitType, simdSize); } case NI_VectorT128_GreaterThan: @@ -1465,7 +1487,7 @@ GenTree* Compiler::impSimdAsHWIntrinsicRelOp(NamedIntrinsic intrinsic, { NamedIntrinsic hwIntrinsic = NI_Illegal; - if (varTypeIsUnsigned(baseType)) + if (varTypeIsUnsigned(simdBaseType)) { // Vector, Vector, Vector and Vector: // Hardware supports > for signed comparison. Therefore, to use it for @@ -1481,36 +1503,43 @@ GenTree* Compiler::impSimdAsHWIntrinsicRelOp(NamedIntrinsic intrinsic, // We need to treat op1 and op2 as signed for comparison purpose after // the transformation. - GenTree* constVal = nullptr; - var_types opType = baseType; + GenTree* constVal = nullptr; + CorInfoType opJitType = simdBaseJitType; + var_types opType = simdBaseType; + CorInfoType constValJitType = CORINFO_TYPE_INT; - switch (baseType) + switch (simdBaseType) { case TYP_UBYTE: { - constVal = gtNewIconNode(0x80808080, TYP_INT); - baseType = TYP_BYTE; + constVal = gtNewIconNode(0x80808080, TYP_INT); + simdBaseJitType = CORINFO_TYPE_BYTE; + simdBaseType = TYP_BYTE; break; } case TYP_USHORT: { - constVal = gtNewIconNode(0x80008000, TYP_INT); - baseType = TYP_SHORT; + constVal = gtNewIconNode(0x80008000, TYP_INT); + simdBaseJitType = CORINFO_TYPE_SHORT; + simdBaseType = TYP_SHORT; break; } case TYP_UINT: { - constVal = gtNewIconNode(0x80000000, TYP_INT); - baseType = TYP_INT; + constVal = gtNewIconNode(0x80000000, TYP_INT); + simdBaseJitType = CORINFO_TYPE_INT; + simdBaseType = TYP_INT; break; } case TYP_ULONG: { - constVal = gtNewLconNode(0x8000000000000000); - baseType = TYP_LONG; + constVal = gtNewLconNode(0x8000000000000000); + constValJitType = CORINFO_TYPE_LONG; + simdBaseJitType = CORINFO_TYPE_LONG; + simdBaseType = TYP_LONG; break; } @@ -1520,7 +1549,7 @@ GenTree* Compiler::impSimdAsHWIntrinsicRelOp(NamedIntrinsic intrinsic, } } - GenTree* constVector = gtNewSimdCreateBroadcastNode(retType, constVal, constVal->TypeGet(), simdSize, + GenTree* constVector = gtNewSimdCreateBroadcastNode(retType, constVal, constValJitType, simdSize, /* isSimdAsHWIntrinsic */ true); GenTree* constVectorDup; @@ -1530,18 +1559,18 @@ GenTree* Compiler::impSimdAsHWIntrinsicRelOp(NamedIntrinsic intrinsic, NamedIntrinsic hwIntrinsic = isVectorT256 ? NI_AVX2_Subtract : NI_SSE2_Subtract; // op1 = op1 - constVector - op1 = gtNewSimdAsHWIntrinsicNode(retType, op1, constVector, hwIntrinsic, opType, simdSize); + op1 = gtNewSimdAsHWIntrinsicNode(retType, op1, constVector, hwIntrinsic, opJitType, simdSize); // op2 = op2 - constVector - op2 = gtNewSimdAsHWIntrinsicNode(retType, op2, constVectorDup, hwIntrinsic, opType, simdSize); + op2 = gtNewSimdAsHWIntrinsicNode(retType, op2, constVectorDup, hwIntrinsic, opJitType, simdSize); } // This should have been mutated by the above path - assert(varTypeIsIntegral(baseType) && !varTypeIsUnsigned(baseType)); + assert(varTypeIsIntegral(simdBaseType) && !varTypeIsUnsigned(simdBaseType)); - if (isVectorT256 || (baseType != TYP_LONG)) + if (isVectorT256 || (simdBaseType != TYP_LONG)) { - hwIntrinsic = SimdAsHWIntrinsicInfo::lookupHWIntrinsic(intrinsic, baseType); + hwIntrinsic = SimdAsHWIntrinsicInfo::lookupHWIntrinsic(intrinsic, simdBaseType); assert(hwIntrinsic != intrinsic); } else if (compOpportunisticallyDependsOn(InstructionSet_SSE42)) @@ -1595,28 +1624,29 @@ GenTree* Compiler::impSimdAsHWIntrinsicRelOp(NamedIntrinsic intrinsic, op2Dup1 = impCloneExpr(op2Dup1, &op2Dup2, clsHnd, (unsigned)CHECK_SPILL_ALL, nullptr DEBUGARG("Clone op2 Vector.GreaterThan/LessThan")); - GenTree* t = impSimdAsHWIntrinsicRelOp(intrinsic, clsHnd, retType, TYP_INT, simdSize, op1, op2); - GenTree* u = impSimdAsHWIntrinsicRelOp(NI_VectorT128_Equals, clsHnd, retType, TYP_INT, simdSize, - op1Dup1, op2Dup1); - GenTree* v = - impSimdAsHWIntrinsicRelOp(intrinsic, clsHnd, retType, TYP_UINT, simdSize, op1Dup2, op2Dup2); + GenTree* t = + impSimdAsHWIntrinsicRelOp(intrinsic, clsHnd, retType, CORINFO_TYPE_INT, simdSize, op1, op2); + GenTree* u = impSimdAsHWIntrinsicRelOp(NI_VectorT128_Equals, clsHnd, retType, CORINFO_TYPE_INT, + simdSize, op1Dup1, op2Dup1); + GenTree* v = impSimdAsHWIntrinsicRelOp(intrinsic, clsHnd, retType, CORINFO_TYPE_UINT, simdSize, op1Dup2, + op2Dup2); op1 = gtNewSimdAsHWIntrinsicNode(retType, t, gtNewIconNode(SHUFFLE_WWYY, TYP_INT), NI_SSE2_Shuffle, - TYP_INT, simdSize); + CORINFO_TYPE_INT, simdSize); v = gtNewSimdAsHWIntrinsicNode(retType, v, gtNewIconNode(SHUFFLE_ZZXX, TYP_INT), NI_SSE2_Shuffle, - TYP_INT, simdSize); + CORINFO_TYPE_INT, simdSize); u = gtNewSimdAsHWIntrinsicNode(retType, u, gtNewIconNode(SHUFFLE_WWYY, TYP_INT), NI_SSE2_Shuffle, - TYP_INT, simdSize); + CORINFO_TYPE_INT, simdSize); - hwIntrinsic = SimdAsHWIntrinsicInfo::lookupHWIntrinsic(NI_VectorT128_op_BitwiseAnd, baseType); - op2 = gtNewSimdAsHWIntrinsicNode(retType, v, u, hwIntrinsic, baseType, simdSize); + hwIntrinsic = SimdAsHWIntrinsicInfo::lookupHWIntrinsic(NI_VectorT128_op_BitwiseAnd, simdBaseType); + op2 = gtNewSimdAsHWIntrinsicNode(retType, v, u, hwIntrinsic, simdBaseJitType, simdSize); - hwIntrinsic = SimdAsHWIntrinsicInfo::lookupHWIntrinsic(NI_VectorT128_op_BitwiseOr, baseType); + hwIntrinsic = SimdAsHWIntrinsicInfo::lookupHWIntrinsic(NI_VectorT128_op_BitwiseOr, simdBaseType); } assert(hwIntrinsic != NI_Illegal); - return gtNewSimdAsHWIntrinsicNode(retType, op1, op2, hwIntrinsic, baseType, simdSize); + return gtNewSimdAsHWIntrinsicNode(retType, op1, op2, hwIntrinsic, simdBaseJitType, simdSize); } default: diff --git a/src/coreclr/jit/simdcodegenxarch.cpp b/src/coreclr/jit/simdcodegenxarch.cpp index f85e8b6cd4f0bb..13c36742e744d0 100644 --- a/src/coreclr/jit/simdcodegenxarch.cpp +++ b/src/coreclr/jit/simdcodegenxarch.cpp @@ -489,12 +489,12 @@ void CodeGen::genSIMDIntrinsicInit(GenTreeSIMD* simdNode) assert(simdNode->gtSIMDIntrinsicID == SIMDIntrinsicInit); GenTree* op1 = simdNode->gtGetOp1(); - var_types baseType = simdNode->gtSIMDBaseType; + var_types baseType = simdNode->GetSimdBaseType(); regNumber targetReg = simdNode->GetRegNum(); assert(targetReg != REG_NA); var_types targetType = simdNode->TypeGet(); SIMDLevel level = compiler->getSIMDSupportLevel(); - unsigned size = simdNode->gtSIMDSize; + unsigned size = simdNode->GetSimdSize(); // Should never see small int base type vectors except for zero initialization. noway_assert(!varTypeIsSmallInt(baseType) || op1->IsIntegralConst(0)); @@ -674,7 +674,7 @@ void CodeGen::genSIMDIntrinsicInitN(GenTreeSIMD* simdNode) assert(simdNode->gtSIMDIntrinsicID == SIMDIntrinsicInitN); // Right now this intrinsic is supported only on TYP_FLOAT vectors - var_types baseType = simdNode->gtSIMDBaseType; + var_types baseType = simdNode->GetSimdBaseType(); noway_assert(baseType == TYP_FLOAT); regNumber targetReg = simdNode->GetRegNum(); @@ -733,7 +733,7 @@ void CodeGen::genSIMDIntrinsicInitN(GenTreeSIMD* simdNode) offset += baseTypeSize; } - noway_assert(offset == simdNode->gtSIMDSize); + noway_assert(offset == simdNode->GetSimdSize()); // Load the initialized value. if (targetReg != vectorReg) @@ -757,7 +757,7 @@ void CodeGen::genSIMDIntrinsicUnOp(GenTreeSIMD* simdNode) assert(simdNode->gtSIMDIntrinsicID == SIMDIntrinsicCast); GenTree* op1 = simdNode->gtGetOp1(); - var_types baseType = simdNode->gtSIMDBaseType; + var_types baseType = simdNode->GetSimdBaseType(); regNumber targetReg = simdNode->GetRegNum(); assert(targetReg != REG_NA); var_types targetType = simdNode->TypeGet(); @@ -786,7 +786,7 @@ void CodeGen::genSIMDIntrinsic32BitConvert(GenTreeSIMD* simdNode) assert((intrinsicID == SIMDIntrinsicConvertToSingle) || (intrinsicID == SIMDIntrinsicConvertToInt32)); GenTree* op1 = simdNode->gtGetOp1(); - var_types baseType = simdNode->gtSIMDBaseType; + var_types baseType = simdNode->GetSimdBaseType(); regNumber targetReg = simdNode->GetRegNum(); assert(targetReg != REG_NA); var_types targetType = simdNode->TypeGet(); @@ -920,7 +920,7 @@ void CodeGen::genSIMDIntrinsic64BitConvert(GenTreeSIMD* simdNode) assert((intrinsicID == SIMDIntrinsicConvertToDouble) || (intrinsicID == SIMDIntrinsicConvertToInt64)); GenTree* op1 = simdNode->gtGetOp1(); - var_types baseType = simdNode->gtSIMDBaseType; + var_types baseType = simdNode->GetSimdBaseType(); regNumber targetReg = simdNode->GetRegNum(); assert(targetReg != REG_NA); var_types simdType = simdNode->TypeGet(); @@ -1212,7 +1212,7 @@ void CodeGen::genSIMDExtractUpperHalf(GenTreeSIMD* simdNode, regNumber srcReg, r emitAttr emitSize = emitActualTypeSize(simdType); if (compiler->getSIMDSupportLevel() == SIMD_AVX2_Supported) { - instruction extractIns = varTypeIsFloating(simdNode->gtSIMDBaseType) ? INS_vextractf128 : INS_vextracti128; + instruction extractIns = varTypeIsFloating(simdNode->GetSimdBaseType()) ? INS_vextractf128 : INS_vextracti128; GetEmitter()->emitIns_R_R_I(extractIns, EA_32BYTE, tgtReg, srcReg, 0x01); } else @@ -1241,7 +1241,7 @@ void CodeGen::genSIMDIntrinsicWiden(GenTreeSIMD* simdNode) (simdNode->gtSIMDIntrinsicID == SIMDIntrinsicWidenHi)); GenTree* op1 = simdNode->gtGetOp1(); - var_types baseType = simdNode->gtSIMDBaseType; + var_types baseType = simdNode->GetSimdBaseType(); regNumber targetReg = simdNode->GetRegNum(); assert(targetReg != REG_NA); var_types simdType = simdNode->TypeGet(); @@ -1334,7 +1334,7 @@ void CodeGen::genSIMDIntrinsicNarrow(GenTreeSIMD* simdNode) GenTree* op1 = simdNode->gtGetOp1(); GenTree* op2 = simdNode->gtGetOp2(); - var_types baseType = simdNode->gtSIMDBaseType; + var_types baseType = simdNode->GetSimdBaseType(); regNumber targetReg = simdNode->GetRegNum(); assert(targetReg != REG_NA); var_types simdType = simdNode->TypeGet(); @@ -1482,7 +1482,7 @@ void CodeGen::genSIMDIntrinsicBinOp(GenTreeSIMD* simdNode) GenTree* op1 = simdNode->gtGetOp1(); GenTree* op2 = simdNode->gtGetOp2(); - var_types baseType = simdNode->gtSIMDBaseType; + var_types baseType = simdNode->GetSimdBaseType(); regNumber targetReg = simdNode->GetRegNum(); assert(targetReg != REG_NA); var_types targetType = simdNode->TypeGet(); @@ -1532,7 +1532,7 @@ void CodeGen::genSIMDIntrinsicRelOp(GenTreeSIMD* simdNode) { GenTree* op1 = simdNode->gtGetOp1(); GenTree* op2 = simdNode->gtGetOp2(); - var_types baseType = simdNode->gtSIMDBaseType; + var_types baseType = simdNode->GetSimdBaseType(); regNumber targetReg = simdNode->GetRegNum(); var_types targetType = simdNode->TypeGet(); SIMDLevel level = compiler->getSIMDSupportLevel(); @@ -1621,7 +1621,7 @@ void CodeGen::genSIMDIntrinsicGetItem(GenTreeSIMD* simdNode) simdType = TYP_SIMD16; } - var_types baseType = simdNode->gtSIMDBaseType; + var_types baseType = simdNode->GetSimdBaseType(); regNumber targetReg = simdNode->GetRegNum(); assert(targetReg != REG_NA); var_types targetType = simdNode->TypeGet(); @@ -1931,7 +1931,7 @@ void CodeGen::genSIMDIntrinsicSetItem(GenTreeSIMD* simdNode) GenTree* op1 = simdNode->gtGetOp1(); GenTree* op2 = simdNode->gtGetOp2(); - var_types baseType = simdNode->gtSIMDBaseType; + var_types baseType = simdNode->GetSimdBaseType(); regNumber targetReg = simdNode->GetRegNum(); assert(targetReg != REG_NA); var_types targetType = simdNode->TypeGet(); @@ -1941,7 +1941,7 @@ void CodeGen::genSIMDIntrinsicSetItem(GenTreeSIMD* simdNode) // supported only on vector2f/3f/4f right now noway_assert(baseType == TYP_FLOAT); assert(op2->TypeGet() == baseType); - assert(simdNode->gtSIMDSize >= ((index + 1) * genTypeSize(baseType))); + assert(simdNode->GetSimdSize() >= ((index + 1) * genTypeSize(baseType))); genConsumeOperands(simdNode); regNumber op1Reg = op1->GetRegNum(); @@ -2006,7 +2006,7 @@ void CodeGen::genSIMDIntrinsicShuffleSSE2(GenTreeSIMD* simdNode) assert(op2->isContained()); assert(op2->IsCnsIntOrI()); ssize_t shuffleControl = op2->AsIntConCommon()->IconValue(); - var_types baseType = simdNode->gtSIMDBaseType; + var_types baseType = simdNode->GetSimdBaseType(); var_types targetType = simdNode->TypeGet(); regNumber targetReg = simdNode->GetRegNum(); assert(targetReg != REG_NA); @@ -2131,7 +2131,7 @@ void CodeGen::genStoreLclTypeSIMD12(GenTree* treeNode) { // This is only possible for a zero-init. assert(op1->IsIntegralConst(0) || op1->IsSIMDZero()); - genSIMDZero(TYP_SIMD16, op1->AsSIMD()->gtSIMDBaseType, tmpReg); + genSIMDZero(TYP_SIMD16, op1->AsSIMD()->GetSimdBaseType(), tmpReg); // store lower 8 bytes GetEmitter()->emitIns_S_R(ins_Store(TYP_DOUBLE), EA_8BYTE, tmpReg, varNum, offs); @@ -2353,11 +2353,11 @@ void CodeGen::genSIMDIntrinsicUpperRestore(GenTreeSIMD* simdNode) void CodeGen::genSIMDIntrinsic(GenTreeSIMD* simdNode) { // NYI for unsupported base types - if (simdNode->gtSIMDBaseType != TYP_INT && simdNode->gtSIMDBaseType != TYP_LONG && - simdNode->gtSIMDBaseType != TYP_FLOAT && simdNode->gtSIMDBaseType != TYP_DOUBLE && - simdNode->gtSIMDBaseType != TYP_USHORT && simdNode->gtSIMDBaseType != TYP_UBYTE && - simdNode->gtSIMDBaseType != TYP_SHORT && simdNode->gtSIMDBaseType != TYP_BYTE && - simdNode->gtSIMDBaseType != TYP_UINT && simdNode->gtSIMDBaseType != TYP_ULONG) + if (simdNode->GetSimdBaseType() != TYP_INT && simdNode->GetSimdBaseType() != TYP_LONG && + simdNode->GetSimdBaseType() != TYP_FLOAT && simdNode->GetSimdBaseType() != TYP_DOUBLE && + simdNode->GetSimdBaseType() != TYP_USHORT && simdNode->GetSimdBaseType() != TYP_UBYTE && + simdNode->GetSimdBaseType() != TYP_SHORT && simdNode->GetSimdBaseType() != TYP_BYTE && + simdNode->GetSimdBaseType() != TYP_UINT && simdNode->GetSimdBaseType() != TYP_ULONG) { noway_assert(!"SIMD intrinsic with unsupported base type."); } diff --git a/src/coreclr/jit/valuenum.cpp b/src/coreclr/jit/valuenum.cpp index 3957ff13c34700..9483a7a824a785 100644 --- a/src/coreclr/jit/valuenum.cpp +++ b/src/coreclr/jit/valuenum.cpp @@ -8858,8 +8858,8 @@ void Compiler::fgValueNumberSimd(GenTree* tree) if (encodeResultType) { - ValueNum vnSize = vnStore->VNForIntCon(simdNode->gtSIMDSize); - ValueNum vnBaseType = vnStore->VNForIntCon(INT32(simdNode->gtSIMDBaseType)); + ValueNum vnSize = vnStore->VNForIntCon(simdNode->GetSimdSize()); + ValueNum vnBaseType = vnStore->VNForIntCon(INT32(simdNode->GetSimdBaseType())); ValueNum simdTypeVN = vnStore->VNForFunc(TYP_REF, VNF_SimdType, vnSize, vnBaseType); resvnp.SetBoth(simdTypeVN); @@ -8975,8 +8975,8 @@ void Compiler::fgValueNumberHWIntrinsic(GenTree* tree) if (encodeResultType) { - ValueNum vnSize = vnStore->VNForIntCon(hwIntrinsicNode->gtSIMDSize); - ValueNum vnBaseType = vnStore->VNForIntCon(INT32(hwIntrinsicNode->gtSIMDBaseType)); + ValueNum vnSize = vnStore->VNForIntCon(hwIntrinsicNode->GetSimdSize()); + ValueNum vnBaseType = vnStore->VNForIntCon(INT32(hwIntrinsicNode->GetSimdBaseType())); ValueNum simdTypeVN = vnStore->VNForFunc(TYP_REF, VNF_SimdType, vnSize, vnBaseType); resvnp.SetBoth(simdTypeVN); diff --git a/src/libraries/System.Numerics.Vectors/ref/System.Numerics.Vectors.cs b/src/libraries/System.Numerics.Vectors/ref/System.Numerics.Vectors.cs index e65e1d034e888a..4e9121fe5f131c 100644 --- a/src/libraries/System.Numerics.Vectors/ref/System.Numerics.Vectors.cs +++ b/src/libraries/System.Numerics.Vectors/ref/System.Numerics.Vectors.cs @@ -198,6 +198,9 @@ public static partial class Vector public static System.Numerics.Vector AsVectorInt16(System.Numerics.Vector value) where T : struct { throw null; } public static System.Numerics.Vector AsVectorInt32(System.Numerics.Vector value) where T : struct { throw null; } public static System.Numerics.Vector AsVectorInt64(System.Numerics.Vector value) where T : struct { throw null; } + public static System.Numerics.Vector AsVectorNInt(System.Numerics.Vector value) where T : struct { throw null; } + [System.CLSCompliantAttribute(false)] + public static System.Numerics.Vector AsVectorNUInt(System.Numerics.Vector value) where T : struct { throw null; } [System.CLSCompliantAttribute(false)] public static System.Numerics.Vector AsVectorSByte(System.Numerics.Vector value) where T : struct { throw null; } public static System.Numerics.Vector AsVectorSingle(System.Numerics.Vector value) where T : struct { throw null; } @@ -511,6 +514,9 @@ public readonly void CopyTo(T[] destination, int startIndex) { } public static explicit operator System.Numerics.Vector (System.Numerics.Vector value) { throw null; } public static explicit operator System.Numerics.Vector (System.Numerics.Vector value) { throw null; } public static explicit operator System.Numerics.Vector (System.Numerics.Vector value) { throw null; } + public static explicit operator System.Numerics.Vector (System.Numerics.Vector value) { throw null; } + [System.CLSCompliantAttribute(false)] + public static explicit operator System.Numerics.Vector (System.Numerics.Vector value) { throw null; } [System.CLSCompliantAttribute(false)] public static explicit operator System.Numerics.Vector (System.Numerics.Vector value) { throw null; } public static explicit operator System.Numerics.Vector (System.Numerics.Vector value) { throw null; } diff --git a/src/libraries/System.Private.CoreLib/src/System/Numerics/Vector.cs b/src/libraries/System.Private.CoreLib/src/System/Numerics/Vector.cs index cc2d5ab5d726e7..c563a5d79404a9 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Numerics/Vector.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Numerics/Vector.cs @@ -796,6 +796,27 @@ public static Vector AsVectorDouble(Vector value) where T : struct return (Vector)value; } + /// Reinterprets the bits of a specified vector into those of a vector of unsigned native integers. + /// The source vector. + /// The vector type. can be any primitive numeric type. + /// The reinterpreted vector. + [CLSCompliant(false)] + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static Vector AsVectorNUInt(Vector value) where T : struct + { + return (Vector)value; + } + + /// Reinterprets the bits of a specified vector into those of a vector of native integers. + /// The source vector. + /// The vector type. can be any primitive numeric type. + /// The reinterpreted vector. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static Vector AsVectorNInt(Vector value) where T : struct + { + return (Vector)value; + } + /// Widens a Vector<Byte> into two Vector<UInt16> instances. /// The source vector whose elements are widened into the outputs. /// The first output vector, whose elements will contain the widened elements from lower indices in the source vector. @@ -1266,8 +1287,8 @@ public static Vector As(this Vector vector) where TFrom : struct where TTo : struct { - ThrowHelper.ThrowForUnsupportedVectorBaseType(); - ThrowHelper.ThrowForUnsupportedVectorBaseType(); + ThrowHelper.ThrowForUnsupportedNumericsVectorBaseType(); + ThrowHelper.ThrowForUnsupportedNumericsVectorBaseType(); return Unsafe.As, Vector>(ref vector); } diff --git a/src/libraries/System.Private.CoreLib/src/System/Numerics/Vector_1.cs b/src/libraries/System.Private.CoreLib/src/System/Numerics/Vector_1.cs index d9056586a49afe..d13cbf8e402de6 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Numerics/Vector_1.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Numerics/Vector_1.cs @@ -41,7 +41,7 @@ public static int Count [Intrinsic] get { - ThrowHelper.ThrowForUnsupportedVectorBaseType(); + ThrowHelper.ThrowForUnsupportedNumericsVectorBaseType(); return Unsafe.SizeOf>() / Unsafe.SizeOf(); } } @@ -52,7 +52,7 @@ public static Vector Zero [Intrinsic] get { - ThrowHelper.ThrowForUnsupportedVectorBaseType(); + ThrowHelper.ThrowForUnsupportedNumericsVectorBaseType(); return default; } } @@ -63,7 +63,7 @@ public static Vector One [Intrinsic] get { - ThrowHelper.ThrowForUnsupportedVectorBaseType(); + ThrowHelper.ThrowForUnsupportedNumericsVectorBaseType(); return new Vector(GetOneValue()); } } @@ -73,7 +73,7 @@ internal static Vector AllBitsSet [Intrinsic] get { - ThrowHelper.ThrowForUnsupportedVectorBaseType(); + ThrowHelper.ThrowForUnsupportedNumericsVectorBaseType(); return new Vector(GetAllBitsSetValue()); } } @@ -82,7 +82,7 @@ internal static Vector AllBitsSet [Intrinsic] public unsafe Vector(T value) { - ThrowHelper.ThrowForUnsupportedVectorBaseType(); + ThrowHelper.ThrowForUnsupportedNumericsVectorBaseType(); Unsafe.SkipInit(out this); for (nint index = 0; index < Count; index++) @@ -102,7 +102,7 @@ public unsafe Vector(T[] values) : this(values, 0) { } [Intrinsic] public unsafe Vector(T[] values, int index) { - ThrowHelper.ThrowForUnsupportedVectorBaseType(); + ThrowHelper.ThrowForUnsupportedNumericsVectorBaseType(); if (values is null) { @@ -125,7 +125,7 @@ public unsafe Vector(T[] values, int index) [MethodImpl(MethodImplOptions.AggressiveInlining)] public Vector(ReadOnlySpan values) { - ThrowHelper.ThrowForUnsupportedVectorBaseType(); + ThrowHelper.ThrowForUnsupportedNumericsVectorBaseType(); if (values.Length < Vector.Count) { @@ -142,7 +142,7 @@ public Vector(ReadOnlySpan values) [MethodImpl(MethodImplOptions.AggressiveInlining)] public Vector(ReadOnlySpan values) { - ThrowHelper.ThrowForUnsupportedVectorBaseType(); + ThrowHelper.ThrowForUnsupportedNumericsVectorBaseType(); if (values.Length < Count) { @@ -167,7 +167,7 @@ public Vector(Span values) : this((ReadOnlySpan)values) { } /// If number of elements in source vector is greater than those available in destination span public readonly void CopyTo(Span destination) { - ThrowHelper.ThrowForUnsupportedVectorBaseType(); + ThrowHelper.ThrowForUnsupportedNumericsVectorBaseType(); if ((uint)destination.Length < (uint)Vector.Count) { @@ -185,7 +185,7 @@ public readonly void CopyTo(Span destination) /// If number of elements in source vector is greater than those available in destination span public readonly void CopyTo(Span destination) { - ThrowHelper.ThrowForUnsupportedVectorBaseType(); + ThrowHelper.ThrowForUnsupportedNumericsVectorBaseType(); if ((uint)destination.Length < (uint)Count) { @@ -217,7 +217,7 @@ public readonly void CopyTo(Span destination) [Intrinsic] public readonly unsafe void CopyTo(T[] destination, int startIndex) { - ThrowHelper.ThrowForUnsupportedVectorBaseType(); + ThrowHelper.ThrowForUnsupportedNumericsVectorBaseType(); if (destination is null) { @@ -244,7 +244,7 @@ public readonly unsafe T this[int index] [Intrinsic] get { - ThrowHelper.ThrowForUnsupportedVectorBaseType(); + ThrowHelper.ThrowForUnsupportedNumericsVectorBaseType(); if ((uint)index >= (uint)Count) { @@ -271,7 +271,7 @@ public readonly unsafe T this[int index] /// The hash code. public override readonly int GetHashCode() { - ThrowHelper.ThrowForUnsupportedVectorBaseType(); + ThrowHelper.ThrowForUnsupportedNumericsVectorBaseType(); HashCode hashCode = default; for (nint index = 0; index < Count; index++) @@ -297,7 +297,7 @@ public override readonly int GetHashCode() /// The string representation. public readonly string ToString(string? format, IFormatProvider? formatProvider) { - ThrowHelper.ThrowForUnsupportedVectorBaseType(); + ThrowHelper.ThrowForUnsupportedNumericsVectorBaseType(); StringBuilder sb = new StringBuilder(); string separator = NumberFormatInfo.GetInstance(formatProvider).NumberGroupSeparator; @@ -323,7 +323,7 @@ public readonly string ToString(string? format, IFormatProvider? formatProvider) /// is not large enough to hold the source vector. public readonly bool TryCopyTo(Span destination) { - ThrowHelper.ThrowForUnsupportedVectorBaseType(); + ThrowHelper.ThrowForUnsupportedNumericsVectorBaseType(); if ((uint)destination.Length < (uint)Vector.Count) { @@ -343,7 +343,7 @@ public readonly bool TryCopyTo(Span destination) /// is not large enough to hold the source vector. public readonly bool TryCopyTo(Span destination) { - ThrowHelper.ThrowForUnsupportedVectorBaseType(); + ThrowHelper.ThrowForUnsupportedNumericsVectorBaseType(); if ((uint)destination.Length < (uint)Count) { @@ -460,7 +460,7 @@ public readonly bool TryCopyTo(Span destination) [Intrinsic] public static unsafe Vector operator &(Vector left, Vector right) { - ThrowHelper.ThrowForUnsupportedVectorBaseType(); + ThrowHelper.ThrowForUnsupportedNumericsVectorBaseType(); Vector result = default; result.register.uint64_0 = left.register.uint64_0 & right.register.uint64_0; @@ -476,7 +476,7 @@ public readonly bool TryCopyTo(Span destination) [Intrinsic] public static unsafe Vector operator |(Vector left, Vector right) { - ThrowHelper.ThrowForUnsupportedVectorBaseType(); + ThrowHelper.ThrowForUnsupportedNumericsVectorBaseType(); Vector result = default; result.register.uint64_0 = left.register.uint64_0 | right.register.uint64_0; @@ -492,7 +492,7 @@ public readonly bool TryCopyTo(Span destination) [Intrinsic] public static unsafe Vector operator ^(Vector left, Vector right) { - ThrowHelper.ThrowForUnsupportedVectorBaseType(); + ThrowHelper.ThrowForUnsupportedNumericsVectorBaseType(); Vector result = default; result.register.uint64_0 = left.register.uint64_0 ^ right.register.uint64_0; @@ -540,7 +540,7 @@ public readonly bool TryCopyTo(Span destination) [Intrinsic] public static explicit operator Vector(Vector value) { - ThrowHelper.ThrowForUnsupportedVectorBaseType(); + ThrowHelper.ThrowForUnsupportedNumericsVectorBaseType(); return Unsafe.As, Vector>(ref value); } @@ -551,7 +551,7 @@ public static explicit operator Vector(Vector value) [Intrinsic] public static explicit operator Vector(Vector value) { - ThrowHelper.ThrowForUnsupportedVectorBaseType(); + ThrowHelper.ThrowForUnsupportedNumericsVectorBaseType(); return Unsafe.As, Vector>(ref value); } @@ -562,7 +562,7 @@ public static explicit operator Vector(Vector value) [Intrinsic] public static explicit operator Vector(Vector value) { - ThrowHelper.ThrowForUnsupportedVectorBaseType(); + ThrowHelper.ThrowForUnsupportedNumericsVectorBaseType(); return Unsafe.As, Vector>(ref value); } @@ -572,7 +572,7 @@ public static explicit operator Vector(Vector value) [Intrinsic] public static explicit operator Vector(Vector value) { - ThrowHelper.ThrowForUnsupportedVectorBaseType(); + ThrowHelper.ThrowForUnsupportedNumericsVectorBaseType(); return Unsafe.As, Vector>(ref value); } @@ -583,7 +583,7 @@ public static explicit operator Vector(Vector value) [Intrinsic] public static explicit operator Vector(Vector value) { - ThrowHelper.ThrowForUnsupportedVectorBaseType(); + ThrowHelper.ThrowForUnsupportedNumericsVectorBaseType(); return Unsafe.As, Vector>(ref value); } @@ -593,7 +593,7 @@ public static explicit operator Vector(Vector value) [Intrinsic] public static explicit operator Vector(Vector value) { - ThrowHelper.ThrowForUnsupportedVectorBaseType(); + ThrowHelper.ThrowForUnsupportedNumericsVectorBaseType(); return Unsafe.As, Vector>(ref value); } @@ -604,7 +604,7 @@ public static explicit operator Vector(Vector value) [Intrinsic] public static explicit operator Vector(Vector value) { - ThrowHelper.ThrowForUnsupportedVectorBaseType(); + ThrowHelper.ThrowForUnsupportedNumericsVectorBaseType(); return Unsafe.As, Vector>(ref value); } @@ -614,7 +614,7 @@ public static explicit operator Vector(Vector value) [Intrinsic] public static explicit operator Vector(Vector value) { - ThrowHelper.ThrowForUnsupportedVectorBaseType(); + ThrowHelper.ThrowForUnsupportedNumericsVectorBaseType(); return Unsafe.As, Vector>(ref value); } @@ -624,7 +624,7 @@ public static explicit operator Vector(Vector value) [Intrinsic] public static explicit operator Vector(Vector value) { - ThrowHelper.ThrowForUnsupportedVectorBaseType(); + ThrowHelper.ThrowForUnsupportedNumericsVectorBaseType(); return Unsafe.As, Vector>(ref value); } @@ -634,10 +634,31 @@ public static explicit operator Vector(Vector value) [Intrinsic] public static explicit operator Vector(Vector value) { - ThrowHelper.ThrowForUnsupportedVectorBaseType(); + ThrowHelper.ThrowForUnsupportedNumericsVectorBaseType(); return Unsafe.As, Vector>(ref value); } + /// Reinterprets the bits of the given vector into those of another type. + /// The source vector + /// The reinterpreted vector. + [CLSCompliant(false)] + [Intrinsic] + public static explicit operator Vector(Vector value) + { + ThrowHelper.ThrowForUnsupportedNumericsVectorBaseType(); + return Unsafe.As, Vector>(ref value); + } + + /// Reinterprets the bits of the given vector into those of another type. + /// The source vector + /// The reinterpreted vector. + [Intrinsic] + public static explicit operator Vector(Vector value) + { + ThrowHelper.ThrowForUnsupportedNumericsVectorBaseType(); + return Unsafe.As, Vector>(ref value); + } + [Intrinsic] [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static unsafe Vector Equals(Vector left, Vector right) @@ -715,7 +736,7 @@ internal static Vector LessThanOrEqual(Vector left, Vector right) [Intrinsic] internal static Vector ConditionalSelect(Vector condition, Vector left, Vector right) { - ThrowHelper.ThrowForUnsupportedVectorBaseType(); + ThrowHelper.ThrowForUnsupportedNumericsVectorBaseType(); Vector result = default; result.register.uint64_0 = (left.register.uint64_0 & condition.register.uint64_0) | (right.register.uint64_0 & ~condition.register.uint64_0); @@ -743,6 +764,10 @@ internal static unsafe Vector Abs(Vector value) { return value; } + else if (typeof(T) == typeof(nuint)) + { + return value; + } else { Vector result = default; @@ -879,6 +904,14 @@ private static bool ScalarEquals(T left, T right) { return (double)(object)left == (double)(object)right; } + else if (typeof(T) == typeof(nuint)) + { + return (nuint)(object)left == (nuint)(object)right; + } + else if (typeof(T) == typeof(nint)) + { + return (nint)(object)left == (nint)(object)right; + } else { throw new NotSupportedException(SR.Arg_TypeNotSupported); @@ -928,6 +961,14 @@ private static bool ScalarLessThan(T left, T right) { return (double)(object)left < (double)(object)right; } + else if (typeof(T) == typeof(nuint)) + { + return (nuint)(object)left < (nuint)(object)right; + } + else if (typeof(T) == typeof(nint)) + { + return (nint)(object)left < (nint)(object)right; + } else { throw new NotSupportedException(SR.Arg_TypeNotSupported); @@ -977,6 +1018,14 @@ private static bool ScalarLessThanOrEqual(T left, T right) { return (double)(object)left <= (double)(object)right; } + else if (typeof(T) == typeof(nuint)) + { + return (nuint)(object)left <= (nuint)(object)right; + } + else if (typeof(T) == typeof(nint)) + { + return (nint)(object)left <= (nint)(object)right; + } else { throw new NotSupportedException(SR.Arg_TypeNotSupported); @@ -1026,6 +1075,14 @@ private static bool ScalarGreaterThan(T left, T right) { return (double)(object)left > (double)(object)right; } + else if (typeof(T) == typeof(nuint)) + { + return (nuint)(object)left > (nuint)(object)right; + } + else if (typeof(T) == typeof(nint)) + { + return (nint)(object)left > (nint)(object)right; + } else { throw new NotSupportedException(SR.Arg_TypeNotSupported); @@ -1075,6 +1132,14 @@ private static bool ScalarGreaterThanOrEqual(T left, T right) { return (double)(object)left >= (double)(object)right; } + else if (typeof(T) == typeof(nuint)) + { + return (nuint)(object)left >= (nuint)(object)right; + } + else if (typeof(T) == typeof(nint)) + { + return (nint)(object)left >= (nint)(object)right; + } else { throw new NotSupportedException(SR.Arg_TypeNotSupported); @@ -1124,6 +1189,14 @@ private static T ScalarAdd(T left, T right) { return (T)(object)(double)((double)(object)left + (double)(object)right); } + else if (typeof(T) == typeof(nuint)) + { + return (T)(object)(nuint)((nuint)(object)left + (nuint)(object)right); + } + else if (typeof(T) == typeof(nint)) + { + return (T)(object)(nint)((nint)(object)left + (nint)(object)right); + } else { throw new NotSupportedException(SR.Arg_TypeNotSupported); @@ -1173,6 +1246,14 @@ private static T ScalarSubtract(T left, T right) { return (T)(object)(double)((double)(object)left - (double)(object)right); } + else if (typeof(T) == typeof(nuint)) + { + return (T)(object)(nuint)((nuint)(object)left - (nuint)(object)right); + } + else if (typeof(T) == typeof(nint)) + { + return (T)(object)(nint)((nint)(object)left - (nint)(object)right); + } else { throw new NotSupportedException(SR.Arg_TypeNotSupported); @@ -1222,6 +1303,14 @@ private static T ScalarMultiply(T left, T right) { return (T)(object)(double)((double)(object)left * (double)(object)right); } + else if (typeof(T) == typeof(nuint)) + { + return (T)(object)(nuint)((nuint)(object)left * (nuint)(object)right); + } + else if (typeof(T) == typeof(nint)) + { + return (T)(object)(nint)((nint)(object)left * (nint)(object)right); + } else { throw new NotSupportedException(SR.Arg_TypeNotSupported); @@ -1271,6 +1360,14 @@ private static T ScalarDivide(T left, T right) { return (T)(object)(double)((double)(object)left / (double)(object)right); } + else if (typeof(T) == typeof(nuint)) + { + return (T)(object)(nuint)((nuint)(object)left / (nuint)(object)right); + } + else if (typeof(T) == typeof(nint)) + { + return (T)(object)(nint)((nint)(object)left / (nint)(object)right); + } else { throw new NotSupportedException(SR.Arg_TypeNotSupported); @@ -1320,6 +1417,14 @@ private static T GetOneValue() { return (T)(object)(double)1; } + else if (typeof(T) == typeof(nuint)) + { + return (T)(object)(nuint)1; + } + else if (typeof(T) == typeof(nint)) + { + return (T)(object)(nint)1; + } else { throw new NotSupportedException(SR.Arg_TypeNotSupported); @@ -1369,6 +1474,14 @@ private static T GetAllBitsSetValue() { return (T)(object)BitConverter.Int64BitsToDouble(-1); } + else if (typeof(T) == typeof(nuint)) + { + return (T)(object)nuint.MaxValue; + } + else if (typeof(T) == typeof(nint)) + { + return (T)(object)(nint)(-1); + } else { throw new NotSupportedException(SR.Arg_TypeNotSupported); @@ -1404,6 +1517,10 @@ private static T ScalarAbs(T value) { return (T)(object)Math.Abs((double)(object)value); } + else if (typeof(T) == typeof(nint)) + { + return (T)(object)Math.Abs((nint)(object)value); + } else { throw new NotSupportedException(SR.Arg_TypeNotSupported); @@ -1453,6 +1570,14 @@ private static T ScalarSqrt(T value) { return (T)(object)(double)Math.Sqrt((double)(object)value); } + else if (typeof(T) == typeof(nuint)) + { + return (T)(object)(nuint)Math.Sqrt((nuint)(object)value); + } + else if (typeof(T) == typeof(nint)) + { + return (T)(object)(nint)Math.Sqrt((nint)(object)value); + } else { throw new NotSupportedException(SR.Arg_TypeNotSupported); diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector128.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector128.cs index 14dff017c2b69b..15ce851bae9343 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector128.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector128.cs @@ -44,8 +44,8 @@ public static Vector128 As(this Vector128 vector) where T : struct where U : struct { - ThrowHelper.ThrowForUnsupportedVectorBaseType(); - ThrowHelper.ThrowForUnsupportedVectorBaseType(); + ThrowHelper.ThrowForUnsupportedIntrinsicsVectorBaseType(); + ThrowHelper.ThrowForUnsupportedIntrinsicsVectorBaseType(); return Unsafe.As, Vector128>(ref vector); } @@ -208,7 +208,7 @@ public static Vector128 AsVector128(this Vector value) where T : struct { Debug.Assert(Vector.Count >= Vector128.Count); - ThrowHelper.ThrowForUnsupportedVectorBaseType(); + ThrowHelper.ThrowForUnsupportedIntrinsicsVectorBaseType(); return Unsafe.As, Vector128>(ref value); } @@ -247,7 +247,7 @@ public static Vector AsVector(this Vector128 value) where T : struct { Debug.Assert(Vector.Count >= Vector128.Count); - ThrowHelper.ThrowForUnsupportedVectorBaseType(); + ThrowHelper.ThrowForUnsupportedIntrinsicsVectorBaseType(); Vector result = default; Unsafe.WriteUnaligned(ref Unsafe.As, byte>(ref result), value); @@ -1622,7 +1622,7 @@ public static unsafe Vector128 CreateScalarUnsafe(ulong value) public static T GetElement(this Vector128 vector, int index) where T : struct { - ThrowHelper.ThrowForUnsupportedVectorBaseType(); + ThrowHelper.ThrowForUnsupportedIntrinsicsVectorBaseType(); if ((uint)(index) >= (uint)(Vector128.Count)) { @@ -1645,7 +1645,7 @@ public static T GetElement(this Vector128 vector, int index) public static Vector128 WithElement(this Vector128 vector, int index, T value) where T : struct { - ThrowHelper.ThrowForUnsupportedVectorBaseType(); + ThrowHelper.ThrowForUnsupportedIntrinsicsVectorBaseType(); if ((uint)(index) >= (uint)(Vector128.Count)) { @@ -1667,7 +1667,7 @@ public static Vector128 WithElement(this Vector128 vector, int index, T public static Vector64 GetLower(this Vector128 vector) where T : struct { - ThrowHelper.ThrowForUnsupportedVectorBaseType(); + ThrowHelper.ThrowForUnsupportedIntrinsicsVectorBaseType(); return Unsafe.As, Vector64>(ref vector); } @@ -1690,7 +1690,7 @@ public static Vector128 WithLower(this Vector128 vector, Vector64 va static Vector128 SoftwareFallback(Vector128 vector, Vector64 value) { - ThrowHelper.ThrowForUnsupportedVectorBaseType(); + ThrowHelper.ThrowForUnsupportedIntrinsicsVectorBaseType(); Vector128 result = vector; Unsafe.As, Vector64>(ref result) = value; @@ -1707,7 +1707,7 @@ static Vector128 SoftwareFallback(Vector128 vector, Vector64 value) public static Vector64 GetUpper(this Vector128 vector) where T : struct { - ThrowHelper.ThrowForUnsupportedVectorBaseType(); + ThrowHelper.ThrowForUnsupportedIntrinsicsVectorBaseType(); ref Vector64 lower = ref Unsafe.As, Vector64>(ref vector); return Unsafe.Add(ref lower, 1); @@ -1732,7 +1732,7 @@ public static Vector128 WithUpper(this Vector128 vector, Vector64 va static Vector128 SoftwareFallback(Vector128 vector, Vector64 value) { - ThrowHelper.ThrowForUnsupportedVectorBaseType(); + ThrowHelper.ThrowForUnsupportedIntrinsicsVectorBaseType(); Vector128 result = vector; ref Vector64 lower = ref Unsafe.As, Vector64>(ref result); @@ -1750,7 +1750,7 @@ static Vector128 SoftwareFallback(Vector128 vector, Vector64 value) public static T ToScalar(this Vector128 vector) where T : struct { - ThrowHelper.ThrowForUnsupportedVectorBaseType(); + ThrowHelper.ThrowForUnsupportedIntrinsicsVectorBaseType(); return Unsafe.As, T>(ref vector); } @@ -1763,7 +1763,7 @@ public static T ToScalar(this Vector128 vector) public static Vector256 ToVector256(this Vector128 vector) where T : struct { - ThrowHelper.ThrowForUnsupportedVectorBaseType(); + ThrowHelper.ThrowForUnsupportedIntrinsicsVectorBaseType(); Vector256 result = Vector256.Zero; Unsafe.As, Vector128>(ref result) = vector; @@ -1779,7 +1779,7 @@ public static Vector256 ToVector256(this Vector128 vector) public static unsafe Vector256 ToVector256Unsafe(this Vector128 vector) where T : struct { - ThrowHelper.ThrowForUnsupportedVectorBaseType(); + ThrowHelper.ThrowForUnsupportedIntrinsicsVectorBaseType(); // This relies on us stripping the "init" flag from the ".locals" // declaration to let the upper bits be uninitialized. diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector128_1.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector128_1.cs index 8e09a52a035c3b..65a4bb0fd2077c 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector128_1.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector128_1.cs @@ -42,7 +42,7 @@ public static int Count [Intrinsic] get { - ThrowHelper.ThrowForUnsupportedVectorBaseType(); + ThrowHelper.ThrowForUnsupportedIntrinsicsVectorBaseType(); return Vector128.Size / Unsafe.SizeOf(); } } @@ -54,7 +54,7 @@ public static Vector128 Zero [Intrinsic] get { - ThrowHelper.ThrowForUnsupportedVectorBaseType(); + ThrowHelper.ThrowForUnsupportedIntrinsicsVectorBaseType(); return default; } } @@ -66,7 +66,7 @@ public static Vector128 AllBitsSet [Intrinsic] get { - ThrowHelper.ThrowForUnsupportedVectorBaseType(); + ThrowHelper.ThrowForUnsupportedIntrinsicsVectorBaseType(); return Vector128.Create(0xFFFFFFFF).As(); } } @@ -108,7 +108,7 @@ internal static bool IsSupported [MethodImpl(MethodImplOptions.AggressiveInlining)] public bool Equals(Vector128 other) { - ThrowHelper.ThrowForUnsupportedVectorBaseType(); + ThrowHelper.ThrowForUnsupportedIntrinsicsVectorBaseType(); if (Sse.IsSupported && (typeof(T) == typeof(float))) { @@ -165,7 +165,7 @@ public override bool Equals([NotNullWhen(true)] object? obj) /// The type of the current instance () is not supported. public override int GetHashCode() { - ThrowHelper.ThrowForUnsupportedVectorBaseType(); + ThrowHelper.ThrowForUnsupportedIntrinsicsVectorBaseType(); HashCode hashCode = default; @@ -182,7 +182,7 @@ public override int GetHashCode() /// The type of the current instance () is not supported. public override string ToString() { - ThrowHelper.ThrowForUnsupportedVectorBaseType(); + ThrowHelper.ThrowForUnsupportedIntrinsicsVectorBaseType(); int lastElement = Count - 1; var sb = new ValueStringBuilder(stackalloc char[64]); diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector256.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector256.cs index e271831b47ea3f..26fd437ecc6b05 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector256.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector256.cs @@ -43,8 +43,8 @@ public static Vector256 As(this Vector256 vector) where T : struct where U : struct { - ThrowHelper.ThrowForUnsupportedVectorBaseType(); - ThrowHelper.ThrowForUnsupportedVectorBaseType(); + ThrowHelper.ThrowForUnsupportedIntrinsicsVectorBaseType(); + ThrowHelper.ThrowForUnsupportedIntrinsicsVectorBaseType(); return Unsafe.As, Vector256>(ref vector); } @@ -182,7 +182,7 @@ public static Vector256 AsVector256(this Vector value) where T : struct { Debug.Assert(Vector256.Count >= Vector.Count); - ThrowHelper.ThrowForUnsupportedVectorBaseType(); + ThrowHelper.ThrowForUnsupportedIntrinsicsVectorBaseType(); Vector256 result = default; Unsafe.WriteUnaligned(ref Unsafe.As, byte>(ref result), value); @@ -199,7 +199,7 @@ public static Vector AsVector(this Vector256 value) where T : struct { Debug.Assert(Vector256.Count >= Vector.Count); - ThrowHelper.ThrowForUnsupportedVectorBaseType(); + ThrowHelper.ThrowForUnsupportedIntrinsicsVectorBaseType(); return Unsafe.As, Vector>(ref value); } @@ -1724,7 +1724,7 @@ public static unsafe Vector256 CreateScalarUnsafe(ulong value) public static T GetElement(this Vector256 vector, int index) where T : struct { - ThrowHelper.ThrowForUnsupportedVectorBaseType(); + ThrowHelper.ThrowForUnsupportedIntrinsicsVectorBaseType(); if ((uint)(index) >= (uint)(Vector256.Count)) { @@ -1747,7 +1747,7 @@ public static T GetElement(this Vector256 vector, int index) public static Vector256 WithElement(this Vector256 vector, int index, T value) where T : struct { - ThrowHelper.ThrowForUnsupportedVectorBaseType(); + ThrowHelper.ThrowForUnsupportedIntrinsicsVectorBaseType(); if ((uint)(index) >= (uint)(Vector256.Count)) { @@ -1769,7 +1769,7 @@ public static Vector256 WithElement(this Vector256 vector, int index, T public static Vector128 GetLower(this Vector256 vector) where T : struct { - ThrowHelper.ThrowForUnsupportedVectorBaseType(); + ThrowHelper.ThrowForUnsupportedIntrinsicsVectorBaseType(); return Unsafe.As, Vector128>(ref vector); } @@ -1783,7 +1783,7 @@ public static Vector128 GetLower(this Vector256 vector) public static Vector256 WithLower(this Vector256 vector, Vector128 value) where T : struct { - ThrowHelper.ThrowForUnsupportedVectorBaseType(); + ThrowHelper.ThrowForUnsupportedIntrinsicsVectorBaseType(); if (Avx2.IsSupported && ((typeof(T) != typeof(float)) && (typeof(T) != typeof(double)))) { @@ -1817,7 +1817,7 @@ static Vector256 SoftwareFallback(Vector256 vector, Vector128 value) public static Vector128 GetUpper(this Vector256 vector) where T : struct { - ThrowHelper.ThrowForUnsupportedVectorBaseType(); + ThrowHelper.ThrowForUnsupportedIntrinsicsVectorBaseType(); if (Avx2.IsSupported && ((typeof(T) != typeof(float)) && (typeof(T) != typeof(double)))) { @@ -1851,7 +1851,7 @@ static Vector128 SoftwareFallback(Vector256 vector) public static Vector256 WithUpper(this Vector256 vector, Vector128 value) where T : struct { - ThrowHelper.ThrowForUnsupportedVectorBaseType(); + ThrowHelper.ThrowForUnsupportedIntrinsicsVectorBaseType(); if (Avx2.IsSupported && ((typeof(T) != typeof(float)) && (typeof(T) != typeof(double)))) { @@ -1886,7 +1886,7 @@ static Vector256 SoftwareFallback(Vector256 vector, Vector128 value) public static T ToScalar(this Vector256 vector) where T : struct { - ThrowHelper.ThrowForUnsupportedVectorBaseType(); + ThrowHelper.ThrowForUnsupportedIntrinsicsVectorBaseType(); return Unsafe.As, T>(ref vector); } } diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector256_1.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector256_1.cs index aaa57d1ed0060c..e336034617785b 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector256_1.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector256_1.cs @@ -44,7 +44,7 @@ public static int Count [Intrinsic] get { - ThrowHelper.ThrowForUnsupportedVectorBaseType(); + ThrowHelper.ThrowForUnsupportedIntrinsicsVectorBaseType(); return Vector256.Size / Unsafe.SizeOf(); } } @@ -56,7 +56,7 @@ public static Vector256 Zero [Intrinsic] get { - ThrowHelper.ThrowForUnsupportedVectorBaseType(); + ThrowHelper.ThrowForUnsupportedIntrinsicsVectorBaseType(); return default; } } @@ -69,7 +69,7 @@ public static Vector256 AllBitsSet [Intrinsic] get { - ThrowHelper.ThrowForUnsupportedVectorBaseType(); + ThrowHelper.ThrowForUnsupportedIntrinsicsVectorBaseType(); return Vector256.Create(0xFFFFFFFF).As(); } } @@ -168,7 +168,7 @@ public override bool Equals([NotNullWhen(true)] object? obj) /// The type of the current instance () is not supported. public override int GetHashCode() { - ThrowHelper.ThrowForUnsupportedVectorBaseType(); + ThrowHelper.ThrowForUnsupportedIntrinsicsVectorBaseType(); HashCode hashCode = default; @@ -185,7 +185,7 @@ public override int GetHashCode() /// The type of the current instance () is not supported. public override string ToString() { - ThrowHelper.ThrowForUnsupportedVectorBaseType(); + ThrowHelper.ThrowForUnsupportedIntrinsicsVectorBaseType(); int lastElement = Count - 1; var sb = new ValueStringBuilder(stackalloc char[64]); diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector64.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector64.cs index f655c5bb2e0622..a79344b9a88d90 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector64.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector64.cs @@ -23,8 +23,8 @@ public static Vector64 As(this Vector64 vector) where T : struct where U : struct { - ThrowHelper.ThrowForUnsupportedVectorBaseType(); - ThrowHelper.ThrowForUnsupportedVectorBaseType(); + ThrowHelper.ThrowForUnsupportedIntrinsicsVectorBaseType(); + ThrowHelper.ThrowForUnsupportedIntrinsicsVectorBaseType(); return Unsafe.As, Vector64>(ref vector); } @@ -944,7 +944,7 @@ public static unsafe Vector64 CreateScalarUnsafe(uint value) public static T GetElement(this Vector64 vector, int index) where T : struct { - ThrowHelper.ThrowForUnsupportedVectorBaseType(); + ThrowHelper.ThrowForUnsupportedIntrinsicsVectorBaseType(); if ((uint)(index) >= (uint)(Vector64.Count)) { @@ -967,7 +967,7 @@ public static T GetElement(this Vector64 vector, int index) public static Vector64 WithElement(this Vector64 vector, int index, T value) where T : struct { - ThrowHelper.ThrowForUnsupportedVectorBaseType(); + ThrowHelper.ThrowForUnsupportedIntrinsicsVectorBaseType(); if ((uint)(index) >= (uint)(Vector64.Count)) { @@ -989,7 +989,7 @@ public static Vector64 WithElement(this Vector64 vector, int index, T v public static T ToScalar(this Vector64 vector) where T : struct { - ThrowHelper.ThrowForUnsupportedVectorBaseType(); + ThrowHelper.ThrowForUnsupportedIntrinsicsVectorBaseType(); return Unsafe.As, T>(ref vector); } @@ -1002,7 +1002,7 @@ public static T ToScalar(this Vector64 vector) public static Vector128 ToVector128(this Vector64 vector) where T : struct { - ThrowHelper.ThrowForUnsupportedVectorBaseType(); + ThrowHelper.ThrowForUnsupportedIntrinsicsVectorBaseType(); Vector128 result = Vector128.Zero; Unsafe.As, Vector64>(ref result) = vector; @@ -1018,7 +1018,7 @@ public static Vector128 ToVector128(this Vector64 vector) public static unsafe Vector128 ToVector128Unsafe(this Vector64 vector) where T : struct { - ThrowHelper.ThrowForUnsupportedVectorBaseType(); + ThrowHelper.ThrowForUnsupportedIntrinsicsVectorBaseType(); // This relies on us stripping the "init" flag from the ".locals" // declaration to let the upper bits be uninitialized. diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector64_1.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector64_1.cs index 9f42fa6fdae014..4091e02ab3810b 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector64_1.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector64_1.cs @@ -29,7 +29,7 @@ public static int Count [Intrinsic] get { - ThrowHelper.ThrowForUnsupportedVectorBaseType(); + ThrowHelper.ThrowForUnsupportedIntrinsicsVectorBaseType(); return Vector64.Size / Unsafe.SizeOf(); } } @@ -41,7 +41,7 @@ public static Vector64 Zero [Intrinsic] get { - ThrowHelper.ThrowForUnsupportedVectorBaseType(); + ThrowHelper.ThrowForUnsupportedIntrinsicsVectorBaseType(); return default; } } @@ -54,7 +54,7 @@ public static Vector64 AllBitsSet [Intrinsic] get { - ThrowHelper.ThrowForUnsupportedVectorBaseType(); + ThrowHelper.ThrowForUnsupportedIntrinsicsVectorBaseType(); return Vector64.Create(0xFFFFFFFF).As(); } } @@ -96,7 +96,7 @@ internal static bool IsSupported /// The type of the current instance () is not supported. public bool Equals(Vector64 other) { - ThrowHelper.ThrowForUnsupportedVectorBaseType(); + ThrowHelper.ThrowForUnsupportedIntrinsicsVectorBaseType(); for (int i = 0; i < Count; i++) { @@ -123,7 +123,7 @@ public override bool Equals([NotNullWhen(true)] object? obj) /// The type of the current instance () is not supported. public override int GetHashCode() { - ThrowHelper.ThrowForUnsupportedVectorBaseType(); + ThrowHelper.ThrowForUnsupportedIntrinsicsVectorBaseType(); HashCode hashCode = default; @@ -140,7 +140,7 @@ public override int GetHashCode() /// The type of the current instance () is not supported. public override string ToString() { - ThrowHelper.ThrowForUnsupportedVectorBaseType(); + ThrowHelper.ThrowForUnsupportedIntrinsicsVectorBaseType(); int lastElement = Count - 1; var sb = new ValueStringBuilder(stackalloc char[64]); diff --git a/src/libraries/System.Private.CoreLib/src/System/Text/Unicode/Utf16Utility.Validation.cs b/src/libraries/System.Private.CoreLib/src/System/Text/Unicode/Utf16Utility.Validation.cs index 2600dff49a3dac..90cb8b9c491b1c 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Text/Unicode/Utf16Utility.Validation.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Text/Unicode/Utf16Utility.Validation.cs @@ -12,28 +12,10 @@ using Internal.Runtime.CompilerServices; #endif -#pragma warning disable SA1121 // explicitly using type aliases instead of built-in types -#if SYSTEM_PRIVATE_CORELIB -#if TARGET_64BIT -using nuint_t = System.UInt64; -#else // TARGET_64BIT -using nuint_t = System.UInt32; -#endif // TARGET_64BIT -#else -using nuint_t = System.UInt64; -#endif - namespace System.Text.Unicode { internal static unsafe partial class Utf16Utility { -#if DEBUG && SYSTEM_PRIVATE_CORELIB - static Utf16Utility() - { - Debug.Assert(sizeof(nuint_t) == IntPtr.Size && nuint.MinValue == 0, "nuint_t is defined incorrectly."); - } -#endif // DEBUG && SYSTEM_PRIVATE_CORELIB - // Returns &inputBuffer[inputLength] if the input buffer is valid. /// /// Given an input buffer of char length , @@ -341,13 +323,13 @@ static Utf16Utility() Vector utf16Data = Unsafe.ReadUnaligned>(pInputBuffer); Vector twoOrMoreUtf8Bytes = Vector.GreaterThanOrEqual(utf16Data, vector0080); Vector threeOrMoreUtf8Bytes = Vector.GreaterThanOrEqual(utf16Data, vector0800); - Vector sumVector = (Vector)(Vector.Zero - twoOrMoreUtf8Bytes - threeOrMoreUtf8Bytes); + Vector sumVector = (Vector)(Vector.Zero - twoOrMoreUtf8Bytes - threeOrMoreUtf8Bytes); // We'll try summing by a natural word (rather than a 16-bit word) at a time, // which should halve the number of operations we must perform. nuint popcnt = 0; - for (int i = 0; i < Vector.Count; i++) + for (int i = 0; i < Vector.Count; i++) { popcnt += (nuint)sumVector[i]; } diff --git a/src/libraries/System.Private.CoreLib/src/System/ThrowHelper.cs b/src/libraries/System.Private.CoreLib/src/System/ThrowHelper.cs index 117e60fdd06171..36cabd2b6fbf6f 100644 --- a/src/libraries/System.Private.CoreLib/src/System/ThrowHelper.cs +++ b/src/libraries/System.Private.CoreLib/src/System/ThrowHelper.cs @@ -537,11 +537,28 @@ internal static void IfNullAndNullsAreIllegalThenThrow(object? value, Excepti ThrowHelper.ThrowArgumentNullException(argName); } - // Throws if 'T' is disallowed in Vector / Vector128 / other related types in the - // Numerics or Intrinsics namespaces. If 'T' is allowed, no-ops. JIT will elide the method - // entirely if 'T' is supported and we're on an optimized release build. + // Throws if 'T' is disallowed in Vector in the Numerics namespace. + // If 'T' is allowed, no-ops. JIT will elide the method entirely if 'T' + // is supported and we're on an optimized release build. [MethodImpl(MethodImplOptions.AggressiveInlining)] - internal static void ThrowForUnsupportedVectorBaseType() where T : struct + internal static void ThrowForUnsupportedNumericsVectorBaseType() where T : struct + { + if (typeof(T) != typeof(byte) && typeof(T) != typeof(sbyte) && + typeof(T) != typeof(short) && typeof(T) != typeof(ushort) && + typeof(T) != typeof(int) && typeof(T) != typeof(uint) && + typeof(T) != typeof(long) && typeof(T) != typeof(ulong) && + typeof(T) != typeof(float) && typeof(T) != typeof(double) && + typeof(T) != typeof(nint) && typeof(T) != typeof(nuint)) + { + ThrowNotSupportedException(ExceptionResource.Arg_TypeNotSupported); + } + } + + // Throws if 'T' is disallowed in Vector64/128/256 in the Intrinsics namespace. + // If 'T' is allowed, no-ops. JIT will elide the method entirely if 'T' + // is supported and we're on an optimized release build. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void ThrowForUnsupportedIntrinsicsVectorBaseType() where T : struct { if (typeof(T) != typeof(byte) && typeof(T) != typeof(sbyte) && typeof(T) != typeof(short) && typeof(T) != typeof(ushort) && diff --git a/src/mono/mono/mini/intrinsics.c b/src/mono/mono/mini/intrinsics.c index 13677c2b61286a..0c544931b26add 100644 --- a/src/mono/mono/mini/intrinsics.c +++ b/src/mono/mono/mini/intrinsics.c @@ -1954,30 +1954,59 @@ mini_emit_inst_for_method (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSign if (in_corlib && !strcmp ("System", cmethod_klass_name_space) && - !strcmp ("ThrowHelper", cmethod_klass_name) && - !strcmp ("ThrowForUnsupportedVectorBaseType", cmethod->name)) { - /* The mono JIT can't optimize the body of this method away */ - MonoGenericContext *ctx = mono_method_get_context (cmethod); - g_assert (ctx); - g_assert (ctx->method_inst); + !strcmp ("ThrowHelper", cmethod_klass_name)) { - MonoType *t = ctx->method_inst->type_argv [0]; - switch (t->type) { - case MONO_TYPE_I1: - case MONO_TYPE_U1: - case MONO_TYPE_I2: - case MONO_TYPE_U2: - case MONO_TYPE_I4: - case MONO_TYPE_U4: - case MONO_TYPE_I8: - case MONO_TYPE_U8: - case MONO_TYPE_R4: - case MONO_TYPE_R8: - MONO_INST_NEW (cfg, ins, OP_NOP); - MONO_ADD_INS (cfg->cbb, ins); - return ins; - default: - break; + if (!strcmp ("ThrowForUnsupportedNumericsVectorBaseType", cmethod->name)) { + /* The mono JIT can't optimize the body of this method away */ + MonoGenericContext *ctx = mono_method_get_context (cmethod); + g_assert (ctx); + g_assert (ctx->method_inst); + + MonoType *t = ctx->method_inst->type_argv [0]; + switch (t->type) { + case MONO_TYPE_I1: + case MONO_TYPE_U1: + case MONO_TYPE_I2: + case MONO_TYPE_U2: + case MONO_TYPE_I4: + case MONO_TYPE_U4: + case MONO_TYPE_I8: + case MONO_TYPE_U8: + case MONO_TYPE_R4: + case MONO_TYPE_R8: + case MONO_TYPE_I: + case MONO_TYPE_U: + MONO_INST_NEW (cfg, ins, OP_NOP); + MONO_ADD_INS (cfg->cbb, ins); + return ins; + default: + break; + } + } + else if (!strcmp ("ThrowForUnsupportedIntrinsicsVectorBaseType", cmethod->name)) { + /* The mono JIT can't optimize the body of this method away */ + MonoGenericContext *ctx = mono_method_get_context (cmethod); + g_assert (ctx); + g_assert (ctx->method_inst); + + MonoType *t = ctx->method_inst->type_argv [0]; + switch (t->type) { + case MONO_TYPE_I1: + case MONO_TYPE_U1: + case MONO_TYPE_I2: + case MONO_TYPE_U2: + case MONO_TYPE_I4: + case MONO_TYPE_U4: + case MONO_TYPE_I8: + case MONO_TYPE_U8: + case MONO_TYPE_R4: + case MONO_TYPE_R8: + MONO_INST_NEW (cfg, ins, OP_NOP); + MONO_ADD_INS (cfg->cbb, ins); + return ins; + default: + break; + } } } diff --git a/src/mono/mono/mini/mini-amd64.c b/src/mono/mono/mini/mini-amd64.c index 94c009d334ba03..b23dd3aeaed34b 100644 --- a/src/mono/mono/mini/mini-amd64.c +++ b/src/mono/mono/mini/mini-amd64.c @@ -3391,6 +3391,13 @@ simd_type_to_comp_op (int t) case MONO_TYPE_I8: case MONO_TYPE_U8: return OP_PCMPEQQ; // SSE 4.1 + case MONO_TYPE_I: + case MONO_TYPE_U: +#if TARGET_SIZEOF_VOID_P == 8 + return OP_PCMPEQQ; // SSE 4.1 +#else + return OP_PCMPEQD; +#endif default: g_assert_not_reached (); return -1; @@ -3413,6 +3420,13 @@ simd_type_to_sub_op (int t) case MONO_TYPE_I8: case MONO_TYPE_U8: return OP_PSUBQ; + case MONO_TYPE_I: + case MONO_TYPE_U: +#if TARGET_SIZEOF_VOID_P == 8 + return OP_PSUBQ; +#else + return OP_PSUBD; +#endif default: g_assert_not_reached (); return -1; @@ -3432,6 +3446,13 @@ simd_type_to_shl_op (int t) case MONO_TYPE_I8: case MONO_TYPE_U8: return OP_PSHLQ; + case MONO_TYPE_I: + case MONO_TYPE_U: +#if TARGET_SIZEOF_VOID_P == 8 + return OP_PSHLD; +#else + return OP_PSHLQ; +#endif default: g_assert_not_reached (); return -1; @@ -3454,6 +3475,13 @@ simd_type_to_gt_op (int t) case MONO_TYPE_I8: case MONO_TYPE_U8: return OP_PCMPGTQ; // SSE 4.2 + case MONO_TYPE_I: + case MONO_TYPE_U: +#if TARGET_SIZEOF_VOID_P == 8 + return OP_PCMPGTQ; // SSE 4.2 +#else + return OP_PCMPGTD; +#endif default: g_assert_not_reached (); return -1; @@ -3472,6 +3500,13 @@ simd_type_to_max_un_op (int t) return OP_PMAXD_UN; // SSE 4.1 //case MONO_TYPE_U8: // return OP_PMAXQ_UN; // AVX +#if TARGET_SIZEOF_VOID_P == 8 + //case MONO_TYPE_U: + // return OP_PMAXQ_UN; // AVX +#else + case MONO_TYPE_U: + return OP_PMAXD_UN; // SSE 4.1 +#endif default: g_assert_not_reached (); return -1; @@ -3494,6 +3529,13 @@ simd_type_to_add_op (int t) case MONO_TYPE_I8: case MONO_TYPE_U8: return OP_PADDQ; + case MONO_TYPE_I: + case MONO_TYPE_U: +#if TARGET_SIZEOF_VOID_P == 8 + return OP_PADDQ; +#else + return OP_PADDD; +#endif default: g_assert_not_reached (); return -1; @@ -3518,6 +3560,15 @@ simd_type_to_min_op (int t) return OP_PMIND_UN; // SSE 4.1 // case MONO_TYPE_I8: // AVX // case MONO_TYPE_U8: +#if TARGET_SIZEOF_VOID_P == 8 + //case MONO_TYPE_I: // AVX + //case MONO_TYPE_U: +#else + case MONO_TYPE_I: + return OP_PMIND; // SSE 4.1 + case MONO_TYPE_U: + return OP_PMIND_UN; // SSE 4.1 +#endif default: g_assert_not_reached (); return -1; @@ -3542,6 +3593,15 @@ simd_type_to_max_op (int t) return OP_PMAXD_UN; // SSE 4.1 // case MONO_TYPE_I8: // AVX // case MONO_TYPE_U8: +#if TARGET_SIZEOF_VOID_P == 8 + //case MONO_TYPE_I: // AVX + //case MONO_TYPE_U: +#else + case MONO_TYPE_I: + return OP_PMAXD; // SSE 4.1 + case MONO_TYPE_U: + return OP_PMAXD_UN; // SSE 4.1 +#endif default: g_assert_not_reached (); return -1; @@ -3552,8 +3612,13 @@ static void emit_simd_comp_op (MonoCompile *cfg, MonoBasicBlock *bb, MonoInst *ins, int type, int dreg, int sreg1, int sreg2) { MonoInst *temp; + gboolean is64BitNativeInt = FALSE; + +#if TARGET_SIZEOF_VOID_P == 8 + is64BitNativeInt = ins->inst_c1 == MONO_TYPE_I || ins->inst_c1 == MONO_TYPE_U; +#endif - if (!mono_hwcap_x86_has_sse42 && (ins->inst_c1 == MONO_TYPE_I8 || ins->inst_c1 == MONO_TYPE_U8)) { + if (!mono_hwcap_x86_has_sse42 && (ins->inst_c1 == MONO_TYPE_I8 || ins->inst_c1 == MONO_TYPE_U8 || is64BitNativeInt)) { int temp_reg1 = mono_alloc_ireg (cfg); int temp_reg2 = mono_alloc_ireg (cfg); @@ -3613,6 +3678,15 @@ emit_simd_gt_un_op (MonoCompile *cfg, MonoBasicBlock *bb, MonoInst *ins, int typ NEW_SIMD_INS (cfg, ins, temp, simd_type_to_sub_op (type), temp_s2, sreg2, temp_c80); emit_simd_gt_op (cfg, bb, ins, type, dreg, temp_s1, temp_s2); break; + + case MONO_TYPE_U: +#if TARGET_SIZEOF_VOID_P == 8 + goto USE_SIGNED_GT; +#else + if (mono_hwcap_x86_has_sse41) + goto USE_MAX; + goto USE_SIGNED_GT; +#endif } } } @@ -3621,8 +3695,13 @@ static void emit_simd_gt_op (MonoCompile *cfg, MonoBasicBlock *bb, MonoInst *ins, int type, int dreg, int sreg1, int sreg2) { MonoInst *temp; + gboolean is64BitNativeInt = FALSE; - if (!mono_hwcap_x86_has_sse42 && (type == MONO_TYPE_I8 || type == MONO_TYPE_U8)) { +#if TARGET_SIZEOF_VOID_P == 8 + is64BitNativeInt = ins->inst_c1 == MONO_TYPE_I || ins->inst_c1 == MONO_TYPE_U; +#endif + + if (!mono_hwcap_x86_has_sse42 && (type == MONO_TYPE_I8 || type == MONO_TYPE_U8 || is64BitNativeInt)) { // Decompose 64-bit greater than to 32-bit // // t = (v1 > v2) @@ -3663,11 +3742,16 @@ static void emit_simd_min_op (MonoCompile *cfg, MonoBasicBlock *bb, MonoInst *ins, int type, int dreg, int sreg1, int sreg2) { MonoInst *temp; + gboolean is64BitNativeInt = FALSE; + +#if TARGET_SIZEOF_VOID_P == 8 + is64BitNativeInt = ins->inst_c1 == MONO_TYPE_I || ins->inst_c1 == MONO_TYPE_U; +#endif if (type == MONO_TYPE_I2 || type == MONO_TYPE_U2) { // SSE2, so always available NEW_SIMD_INS (cfg, ins, temp, simd_type_to_min_op (type), dreg, sreg1, sreg2); - } else if (!mono_hwcap_x86_has_sse41 || type == MONO_TYPE_I8 || type == MONO_TYPE_U8) { + } else if (!mono_hwcap_x86_has_sse41 || type == MONO_TYPE_I8 || type == MONO_TYPE_U8 || is64BitNativeInt) { // Decompose to t = (s1 > s2), d = (s1 & !t) | (s2 & t) int temp_t = mono_alloc_ireg (cfg); int temp_d1 = mono_alloc_ireg (cfg); @@ -3689,11 +3773,16 @@ static void emit_simd_max_op (MonoCompile *cfg, MonoBasicBlock *bb, MonoInst *ins, int type, int dreg, int sreg1, int sreg2) { MonoInst *temp; + gboolean is64BitNativeInt = FALSE; + +#if TARGET_SIZEOF_VOID_P == 8 + is64BitNativeInt = ins->inst_c1 == MONO_TYPE_I || ins->inst_c1 == MONO_TYPE_U; +#endif if (type == MONO_TYPE_I2 || type == MONO_TYPE_U2) { // SSE2, so always available NEW_SIMD_INS (cfg, ins, temp, simd_type_to_max_op (type), dreg, sreg1, sreg2); - } else if (!mono_hwcap_x86_has_sse41 || type == MONO_TYPE_I8 || type == MONO_TYPE_U8) { + } else if (!mono_hwcap_x86_has_sse41 || type == MONO_TYPE_I8 || type == MONO_TYPE_U8 || is64BitNativeInt) { // Decompose to t = (s1 > s2), d = (s1 & t) | (s2 & !t) int temp_t = mono_alloc_ireg (cfg); int temp_d1 = mono_alloc_ireg (cfg); @@ -3817,6 +3906,7 @@ mono_arch_lowering_pass (MonoCompile *cfg, MonoBasicBlock *bb) case OP_XCOMPARE: { int temp_reg; + gboolean is64BitNativeInt = FALSE; switch (ins->inst_c0) { @@ -3867,7 +3957,11 @@ mono_arch_lowering_pass (MonoCompile *cfg, MonoBasicBlock *bb) ins->sreg1 = ins->sreg2; ins->sreg2 = temp_reg; case CMP_GE_UN: - if (mono_hwcap_x86_has_sse41 && ins->inst_c1 != MONO_TYPE_U8) { +#if TARGET_SIZEOF_VOID_P == 8 + is64BitNativeInt = ins->inst_c1 == MONO_TYPE_U; +#endif + + if (mono_hwcap_x86_has_sse41 && ins->inst_c1 != MONO_TYPE_U8 && !is64BitNativeInt) { int temp_reg1 = mono_alloc_ireg (cfg); NEW_SIMD_INS (cfg, ins, temp, simd_type_to_max_un_op (ins->inst_c1), temp_reg1, ins->sreg1, ins->sreg2); diff --git a/src/mono/mono/mini/mini-llvm.c b/src/mono/mono/mini/mini-llvm.c index d0ab58de46dbe8..6b7218c9fde255 100644 --- a/src/mono/mono/mini/mini-llvm.c +++ b/src/mono/mono/mini/mini-llvm.c @@ -572,6 +572,13 @@ simd_class_to_llvm_type (EmitContext *ctx, MonoClass *klass) case MONO_TYPE_I8: case MONO_TYPE_U8: return LLVMVectorType (LLVMInt64Type (), size / 8); + case MONO_TYPE_I: + case MONO_TYPE_U: +#if TARGET_SIZEOF_VOID_P == 8 + return LLVMVectorType (LLVMInt64Type (), size / 8); +#else + return LLVMVectorType (LLVMInt32Type (), size / 4); +#endif case MONO_TYPE_R4: return LLVMVectorType (LLVMFloatType (), size / 4); case MONO_TYPE_R8: @@ -604,6 +611,13 @@ type_to_sse_type (int type) case MONO_TYPE_U8: case MONO_TYPE_I8: return LLVMVectorType (LLVMInt64Type (), 2); + case MONO_TYPE_I: + case MONO_TYPE_U: +#if TARGET_SIZEOF_VOID_P == 8 + return LLVMVectorType (LLVMInt64Type (), 2); +#else + return LLVMVectorType (LLVMInt32Type (), 4); +#endif case MONO_TYPE_R8: return LLVMVectorType (LLVMDoubleType (), 2); case MONO_TYPE_R4: @@ -774,6 +788,7 @@ primitive_type_is_unsigned (MonoTypeEnum t) case MONO_TYPE_CHAR: case MONO_TYPE_U4: case MONO_TYPE_U8: + case MONO_TYPE_U: return TRUE; default: return FALSE; diff --git a/src/mono/mono/mini/simd-intrinsics.c b/src/mono/mono/mini/simd-intrinsics.c index ee3af996c1d04e..20b1905e749158 100644 --- a/src/mono/mono/mini/simd-intrinsics.c +++ b/src/mono/mono/mini/simd-intrinsics.c @@ -292,6 +292,7 @@ type_is_unsigned (MonoType *type) { case MONO_TYPE_U2: case MONO_TYPE_U4: case MONO_TYPE_U8: + case MONO_TYPE_U: return TRUE; } return FALSE; @@ -329,6 +330,13 @@ type_to_expand_op (MonoType *type) return OP_EXPAND_R4; case MONO_TYPE_R8: return OP_EXPAND_R8; + case MONO_TYPE_I: + case MONO_TYPE_U: +#if TARGET_SIZEOF_VOID_P == 8 + return OP_EXPAND_I8; +#else + return OP_EXPAND_I4; +#endif default: g_assert_not_reached (); } @@ -354,6 +362,13 @@ type_to_insert_op (MonoType *type) return OP_INSERT_R4; case MONO_TYPE_R8: return OP_INSERT_R8; + case MONO_TYPE_I: + case MONO_TYPE_U: +#if TARGET_SIZEOF_VOID_P == 8 + return OP_INSERT_I8; +#else + return OP_INSERT_I4; +#endif default: g_assert_not_reached (); } @@ -427,6 +442,7 @@ emit_hardware_intrinsics ( case MONO_TYPE_U2: case MONO_TYPE_U4: case MONO_TYPE_U8: + case MONO_TYPE_U: is_unsigned = TRUE; break; case MONO_TYPE_R4: @@ -502,7 +518,7 @@ is_elementwise_create_overload (MonoMethodSignature *fsig, MonoType *ret_type) uint16_t param_count = fsig->param_count; if (param_count < 1) return FALSE; MonoType *type = fsig->params [0]; - gboolean is_vector_primitive = MONO_TYPE_IS_PRIMITIVE (type) && (type->type >= MONO_TYPE_I1 && type->type <= MONO_TYPE_R8); + gboolean is_vector_primitive = MONO_TYPE_IS_PRIMITIVE (type) && ((type->type >= MONO_TYPE_I1 && type->type <= MONO_TYPE_R8) || type->type == MONO_TYPE_I || type->type <= MONO_TYPE_U); if (!is_vector_primitive) return FALSE; if (!mono_metadata_type_equal (ret_type, type)) return FALSE; for (uint16_t i = 1; i < param_count; ++i) @@ -759,6 +775,17 @@ emit_sys_numerics_vector_t (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSig opcode = OP_XEXTRACT_R4; dreg = alloc_freg (cfg); break; + case MONO_TYPE_I: + case MONO_TYPE_U: +#if TARGET_SIZEOF_VOID_P == 8 + opcode = OP_XEXTRACT_I64; + is64 = TRUE; + dreg = alloc_lreg (cfg); +#else + opcode = OP_XEXTRACT_I32; + dreg = alloc_ireg (cfg); +#endif + break; default: opcode = OP_XEXTRACT_I32; dreg = alloc_ireg (cfg); @@ -875,7 +902,7 @@ emit_sys_numerics_vector_t (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSig case SN_LessThan: case SN_LessThanOrEqual: g_assert (fsig->param_count == 2 && mono_metadata_type_equal (fsig->ret, type) && mono_metadata_type_equal (fsig->params [0], type) && mono_metadata_type_equal (fsig->params [1], type)); - is_unsigned = etype->type == MONO_TYPE_U1 || etype->type == MONO_TYPE_U2 || etype->type == MONO_TYPE_U4 || etype->type == MONO_TYPE_U8; + is_unsigned = etype->type == MONO_TYPE_U1 || etype->type == MONO_TYPE_U2 || etype->type == MONO_TYPE_U4 || etype->type == MONO_TYPE_U8 || etype->type == MONO_TYPE_U; ins = emit_xcompare (cfg, klass, etype->type, args [0], args [1]); switch (id) { case SN_GreaterThan: @@ -1001,6 +1028,13 @@ type_to_extract_var_op (MonoTypeEnum type) case MONO_TYPE_I8: case MONO_TYPE_U8: return OP_EXTRACT_VAR_I8; case MONO_TYPE_R4: return OP_EXTRACT_VAR_R4; case MONO_TYPE_R8: return OP_EXTRACT_VAR_R8; + case MONO_TYPE_I: + case MONO_TYPE_U: +#if TARGET_SIZEOF_VOID_P == 8 + return OP_EXTRACT_VAR_I8; +#else + return OP_EXTRACT_VAR_I4; +#endif default: g_assert_not_reached (); } } @@ -1438,6 +1472,9 @@ emit_arm64_intrinsics ( MonoCPUFeatures feature = intrin_group->feature; gboolean arg0_i32 = (arg0_type == MONO_TYPE_I4) || (arg0_type == MONO_TYPE_U4); +#if TARGET_SIZEOF_VOID_P == 4 + arg0_i32 = arg0_i32 || (arg0_type == MONO_TYPE_I) || (arg0_type == MONO_TYPE_U); +#endif if (feature == MONO_CPU_ARM64_BASE) { switch (id) { @@ -1565,6 +1602,16 @@ emit_arm64_intrinsics ( case MONO_TYPE_I8: case MONO_TYPE_U8: insert_op = OP_XINSERT_I8; extract_op = OP_EXTRACT_I8; break; case MONO_TYPE_R4: insert_op = OP_XINSERT_R4; extract_op = OP_EXTRACT_R4; break; case MONO_TYPE_R8: insert_op = OP_XINSERT_R8; extract_op = OP_EXTRACT_R8; break; + case MONO_TYPE_I: + case MONO_TYPE_U: +#if TARGET_SIZEOF_VOID_P == 8 + insert_op = OP_XINSERT_I8; + extract_op = OP_EXTRACT_I8; +#else + insert_op = OP_XINSERT_I4; + extract_op = OP_EXTRACT_I4; +#endif + break; default: g_assert_not_reached (); } int val_src_reg = args [2]->dreg; @@ -2433,6 +2480,14 @@ emit_x86_intrinsics ( case MONO_TYPE_I8: case MONO_TYPE_U8: op = OP_XEXTRACT_I64; break; case MONO_TYPE_R4: op = OP_XEXTRACT_R4; break; + case MONO_TYPE_I: + case MONO_TYPE_U: +#if TARGET_SIZEOF_VOID_P == 8 + op = OP_XEXTRACT_I64; +#else + op = OP_XEXTRACT_I32; +#endif + break; default: g_assert_not_reached(); break; } return emit_simd_ins_for_sig (cfg, klass, op, arg0_type, 0, fsig, args); @@ -2694,7 +2749,7 @@ emit_vector128_t (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *fs g_assert (size); len = 16 / size; - if (!MONO_TYPE_IS_PRIMITIVE (etype) || etype->type == MONO_TYPE_CHAR || etype->type == MONO_TYPE_BOOLEAN) + if (!MONO_TYPE_IS_PRIMITIVE (etype) || etype->type == MONO_TYPE_CHAR || etype->type == MONO_TYPE_BOOLEAN || etype->type == MONO_TYPE_I || etype->type == MONO_TYPE_U) return NULL; if (cfg->verbose_level > 1) { @@ -2742,7 +2797,7 @@ emit_vector256_t (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *fs g_assert (size); len = 32 / size; - if (!MONO_TYPE_IS_PRIMITIVE (etype) || etype->type == MONO_TYPE_CHAR || etype->type == MONO_TYPE_BOOLEAN) + if (!MONO_TYPE_IS_PRIMITIVE (etype) || etype->type == MONO_TYPE_CHAR || etype->type == MONO_TYPE_BOOLEAN || etype->type == MONO_TYPE_I || etype->type == MONO_TYPE_U) return NULL; if (cfg->verbose_level > 1) { diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Program.NotSupported.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Program.NotSupported.cs index 781b9aa767e97c..8051abe2f4e94d 100644 --- a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Program.NotSupported.cs +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Program.NotSupported.cs @@ -11,8 +11,8 @@ public static partial class Program static Program() { TestList = new Dictionary() { - ["Vector64Zero"] = Vector64Zero, - ["Vector64AllBitsSet"] = Vector64AllBitsSet, + ["Vector64BooleanZero"] = Vector64BooleanZero, + ["Vector64BooleanAllBitsSet"] = Vector64BooleanAllBitsSet, ["Vector64BooleanAsGeneric_Boolean"] = Vector64BooleanAsGeneric_Boolean, ["Vector64ByteAsGeneric_Boolean"] = Vector64ByteAsGeneric_Boolean, ["Vector64DoubleAsGeneric_Boolean"] = Vector64DoubleAsGeneric_Boolean, @@ -44,18 +44,104 @@ static Program() ["Vector64BooleanAsUInt16"] = Vector64BooleanAsUInt16, ["Vector64BooleanAsUInt32"] = Vector64BooleanAsUInt32, ["Vector64BooleanAsUInt64"] = Vector64BooleanAsUInt64, - ["Vector64GetElementNegativeOne"] = Vector64GetElementNegativeOne, - ["Vector64GetElement0"] = Vector64GetElement0, - ["Vector64GetElementMaxValue"] = Vector64GetElementMaxValue, - ["Vector64WithElementNegativeOne"] = Vector64WithElementNegativeOne, - ["Vector64WithElement0"] = Vector64WithElement0, - ["Vector64WithElementMaxValue"] = Vector64WithElementMaxValue, - ["Vector64ToScalar"] = Vector64ToScalar, - ["Vector64ToVector128"] = Vector64ToVector128, - ["Vector64ToVector128Unsafe"] = Vector64ToVector128Unsafe, - ["Vector64ToString"] = Vector64ToString, - ["Vector128Zero"] = Vector128Zero, - ["Vector128AllBitsSet"] = Vector128AllBitsSet, + ["Vector64BooleanGetElementNegativeOne"] = Vector64BooleanGetElementNegativeOne, + ["Vector64BooleanGetElement0"] = Vector64BooleanGetElement0, + ["Vector64BooleanGetElementMaxValue"] = Vector64BooleanGetElementMaxValue, + ["Vector64BooleanWithElementNegativeOne"] = Vector64BooleanWithElementNegativeOne, + ["Vector64BooleanWithElement0"] = Vector64BooleanWithElement0, + ["Vector64BooleanWithElementMaxValue"] = Vector64BooleanWithElementMaxValue, + ["Vector64BooleanToScalar"] = Vector64BooleanToScalar, + ["Vector64BooleanToVector128"] = Vector64BooleanToVector128, + ["Vector64BooleanToVector128Unsafe"] = Vector64BooleanToVector128Unsafe, + ["Vector64BooleanToString"] = Vector64BooleanToString, + ["Vector64NIntZero"] = Vector64NIntZero, + ["Vector64NIntAllBitsSet"] = Vector64NIntAllBitsSet, + ["Vector64NIntAsGeneric_NInt"] = Vector64NIntAsGeneric_NInt, + ["Vector64ByteAsGeneric_NInt"] = Vector64ByteAsGeneric_NInt, + ["Vector64DoubleAsGeneric_NInt"] = Vector64DoubleAsGeneric_NInt, + ["Vector64Int16AsGeneric_NInt"] = Vector64Int16AsGeneric_NInt, + ["Vector64Int32AsGeneric_NInt"] = Vector64Int32AsGeneric_NInt, + ["Vector64Int64AsGeneric_NInt"] = Vector64Int64AsGeneric_NInt, + ["Vector64SByteAsGeneric_NInt"] = Vector64SByteAsGeneric_NInt, + ["Vector64SingleAsGeneric_NInt"] = Vector64SingleAsGeneric_NInt, + ["Vector64UInt16AsGeneric_NInt"] = Vector64UInt16AsGeneric_NInt, + ["Vector64UInt32AsGeneric_NInt"] = Vector64UInt32AsGeneric_NInt, + ["Vector64UInt64AsGeneric_NInt"] = Vector64UInt64AsGeneric_NInt, + ["Vector64NIntAsGeneric_Byte"] = Vector64NIntAsGeneric_Byte, + ["Vector64NIntAsGeneric_Double"] = Vector64NIntAsGeneric_Double, + ["Vector64NIntAsGeneric_Int16"] = Vector64NIntAsGeneric_Int16, + ["Vector64NIntAsGeneric_Int32"] = Vector64NIntAsGeneric_Int32, + ["Vector64NIntAsGeneric_Int64"] = Vector64NIntAsGeneric_Int64, + ["Vector64NIntAsGeneric_SByte"] = Vector64NIntAsGeneric_SByte, + ["Vector64NIntAsGeneric_Single"] = Vector64NIntAsGeneric_Single, + ["Vector64NIntAsGeneric_UInt16"] = Vector64NIntAsGeneric_UInt16, + ["Vector64NIntAsGeneric_UInt32"] = Vector64NIntAsGeneric_UInt32, + ["Vector64NIntAsGeneric_UInt64"] = Vector64NIntAsGeneric_UInt64, + ["Vector64NIntAsByte"] = Vector64NIntAsByte, + ["Vector64NIntAsDouble"] = Vector64NIntAsDouble, + ["Vector64NIntAsInt16"] = Vector64NIntAsInt16, + ["Vector64NIntAsInt32"] = Vector64NIntAsInt32, + ["Vector64NIntAsInt64"] = Vector64NIntAsInt64, + ["Vector64NIntAsSByte"] = Vector64NIntAsSByte, + ["Vector64NIntAsSingle"] = Vector64NIntAsSingle, + ["Vector64NIntAsUInt16"] = Vector64NIntAsUInt16, + ["Vector64NIntAsUInt32"] = Vector64NIntAsUInt32, + ["Vector64NIntAsUInt64"] = Vector64NIntAsUInt64, + ["Vector64NIntGetElementNegativeOne"] = Vector64NIntGetElementNegativeOne, + ["Vector64NIntGetElement0"] = Vector64NIntGetElement0, + ["Vector64NIntGetElementMaxValue"] = Vector64NIntGetElementMaxValue, + ["Vector64NIntWithElementNegativeOne"] = Vector64NIntWithElementNegativeOne, + ["Vector64NIntWithElement0"] = Vector64NIntWithElement0, + ["Vector64NIntWithElementMaxValue"] = Vector64NIntWithElementMaxValue, + ["Vector64NIntToScalar"] = Vector64NIntToScalar, + ["Vector64NIntToVector128"] = Vector64NIntToVector128, + ["Vector64NIntToVector128Unsafe"] = Vector64NIntToVector128Unsafe, + ["Vector64NIntToString"] = Vector64NIntToString, + ["Vector64NUIntZero"] = Vector64NUIntZero, + ["Vector64NUIntAllBitsSet"] = Vector64NUIntAllBitsSet, + ["Vector64NUIntAsGeneric_NUInt"] = Vector64NUIntAsGeneric_NUInt, + ["Vector64ByteAsGeneric_NUInt"] = Vector64ByteAsGeneric_NUInt, + ["Vector64DoubleAsGeneric_NUInt"] = Vector64DoubleAsGeneric_NUInt, + ["Vector64Int16AsGeneric_NUInt"] = Vector64Int16AsGeneric_NUInt, + ["Vector64Int32AsGeneric_NUInt"] = Vector64Int32AsGeneric_NUInt, + ["Vector64Int64AsGeneric_NUInt"] = Vector64Int64AsGeneric_NUInt, + ["Vector64SByteAsGeneric_NUInt"] = Vector64SByteAsGeneric_NUInt, + ["Vector64SingleAsGeneric_NUInt"] = Vector64SingleAsGeneric_NUInt, + ["Vector64UInt16AsGeneric_NUInt"] = Vector64UInt16AsGeneric_NUInt, + ["Vector64UInt32AsGeneric_NUInt"] = Vector64UInt32AsGeneric_NUInt, + ["Vector64UInt64AsGeneric_NUInt"] = Vector64UInt64AsGeneric_NUInt, + ["Vector64NUIntAsGeneric_Byte"] = Vector64NUIntAsGeneric_Byte, + ["Vector64NUIntAsGeneric_Double"] = Vector64NUIntAsGeneric_Double, + ["Vector64NUIntAsGeneric_Int16"] = Vector64NUIntAsGeneric_Int16, + ["Vector64NUIntAsGeneric_Int32"] = Vector64NUIntAsGeneric_Int32, + ["Vector64NUIntAsGeneric_Int64"] = Vector64NUIntAsGeneric_Int64, + ["Vector64NUIntAsGeneric_SByte"] = Vector64NUIntAsGeneric_SByte, + ["Vector64NUIntAsGeneric_Single"] = Vector64NUIntAsGeneric_Single, + ["Vector64NUIntAsGeneric_UInt16"] = Vector64NUIntAsGeneric_UInt16, + ["Vector64NUIntAsGeneric_UInt32"] = Vector64NUIntAsGeneric_UInt32, + ["Vector64NUIntAsGeneric_UInt64"] = Vector64NUIntAsGeneric_UInt64, + ["Vector64NUIntAsByte"] = Vector64NUIntAsByte, + ["Vector64NUIntAsDouble"] = Vector64NUIntAsDouble, + ["Vector64NUIntAsInt16"] = Vector64NUIntAsInt16, + ["Vector64NUIntAsInt32"] = Vector64NUIntAsInt32, + ["Vector64NUIntAsInt64"] = Vector64NUIntAsInt64, + ["Vector64NUIntAsSByte"] = Vector64NUIntAsSByte, + ["Vector64NUIntAsSingle"] = Vector64NUIntAsSingle, + ["Vector64NUIntAsUInt16"] = Vector64NUIntAsUInt16, + ["Vector64NUIntAsUInt32"] = Vector64NUIntAsUInt32, + ["Vector64NUIntAsUInt64"] = Vector64NUIntAsUInt64, + ["Vector64NUIntGetElementNegativeOne"] = Vector64NUIntGetElementNegativeOne, + ["Vector64NUIntGetElement0"] = Vector64NUIntGetElement0, + ["Vector64NUIntGetElementMaxValue"] = Vector64NUIntGetElementMaxValue, + ["Vector64NUIntWithElementNegativeOne"] = Vector64NUIntWithElementNegativeOne, + ["Vector64NUIntWithElement0"] = Vector64NUIntWithElement0, + ["Vector64NUIntWithElementMaxValue"] = Vector64NUIntWithElementMaxValue, + ["Vector64NUIntToScalar"] = Vector64NUIntToScalar, + ["Vector64NUIntToVector128"] = Vector64NUIntToVector128, + ["Vector64NUIntToVector128Unsafe"] = Vector64NUIntToVector128Unsafe, + ["Vector64NUIntToString"] = Vector64NUIntToString, + ["Vector128BooleanZero"] = Vector128BooleanZero, + ["Vector128BooleanAllBitsSet"] = Vector128BooleanAllBitsSet, ["Vector128BooleanAsGeneric_Boolean"] = Vector128BooleanAsGeneric_Boolean, ["Vector128ByteAsGeneric_Boolean"] = Vector128ByteAsGeneric_Boolean, ["Vector128DoubleAsGeneric_Boolean"] = Vector128DoubleAsGeneric_Boolean, @@ -87,22 +173,116 @@ static Program() ["Vector128BooleanAsUInt16"] = Vector128BooleanAsUInt16, ["Vector128BooleanAsUInt32"] = Vector128BooleanAsUInt32, ["Vector128BooleanAsUInt64"] = Vector128BooleanAsUInt64, - ["Vector128GetElementNegativeOne"] = Vector128GetElementNegativeOne, - ["Vector128GetElement0"] = Vector128GetElement0, - ["Vector128GetElementMaxValue"] = Vector128GetElementMaxValue, - ["Vector128WithElementNegativeOne"] = Vector128WithElementNegativeOne, - ["Vector128WithElement0"] = Vector128WithElement0, - ["Vector128WithElementMaxValue"] = Vector128WithElementMaxValue, - ["Vector128GetLower"] = Vector128GetLower, - ["Vector128WithLower"] = Vector128WithLower, - ["Vector128GetUpper"] = Vector128GetUpper, - ["Vector128WithUpper"] = Vector128WithUpper, - ["Vector128ToScalar"] = Vector128ToScalar, - ["Vector128ToVector256"] = Vector128ToVector256, - ["Vector128ToVector256Unsafe"] = Vector128ToVector256Unsafe, - ["Vector128ToString"] = Vector128ToString, - ["Vector256Zero"] = Vector256Zero, - ["Vector256AllBitsSet"] = Vector256AllBitsSet, + ["Vector128BooleanGetElementNegativeOne"] = Vector128BooleanGetElementNegativeOne, + ["Vector128BooleanGetElement0"] = Vector128BooleanGetElement0, + ["Vector128BooleanGetElementMaxValue"] = Vector128BooleanGetElementMaxValue, + ["Vector128BooleanWithElementNegativeOne"] = Vector128BooleanWithElementNegativeOne, + ["Vector128BooleanWithElement0"] = Vector128BooleanWithElement0, + ["Vector128BooleanWithElementMaxValue"] = Vector128BooleanWithElementMaxValue, + ["Vector128BooleanGetLower"] = Vector128BooleanGetLower, + ["Vector128BooleanWithLower"] = Vector128BooleanWithLower, + ["Vector128BooleanGetUpper"] = Vector128BooleanGetUpper, + ["Vector128BooleanWithUpper"] = Vector128BooleanWithUpper, + ["Vector128BooleanToScalar"] = Vector128BooleanToScalar, + ["Vector128BooleanToVector256"] = Vector128BooleanToVector256, + ["Vector128BooleanToVector256Unsafe"] = Vector128BooleanToVector256Unsafe, + ["Vector128BooleanToString"] = Vector128BooleanToString, + ["Vector128NIntZero"] = Vector128NIntZero, + ["Vector128NIntAllBitsSet"] = Vector128NIntAllBitsSet, + ["Vector128NIntAsGeneric_NInt"] = Vector128NIntAsGeneric_NInt, + ["Vector128ByteAsGeneric_NInt"] = Vector128ByteAsGeneric_NInt, + ["Vector128DoubleAsGeneric_NInt"] = Vector128DoubleAsGeneric_NInt, + ["Vector128Int16AsGeneric_NInt"] = Vector128Int16AsGeneric_NInt, + ["Vector128Int32AsGeneric_NInt"] = Vector128Int32AsGeneric_NInt, + ["Vector128Int64AsGeneric_NInt"] = Vector128Int64AsGeneric_NInt, + ["Vector128SByteAsGeneric_NInt"] = Vector128SByteAsGeneric_NInt, + ["Vector128SingleAsGeneric_NInt"] = Vector128SingleAsGeneric_NInt, + ["Vector128UInt16AsGeneric_NInt"] = Vector128UInt16AsGeneric_NInt, + ["Vector128UInt32AsGeneric_NInt"] = Vector128UInt32AsGeneric_NInt, + ["Vector128UInt64AsGeneric_NInt"] = Vector128UInt64AsGeneric_NInt, + ["Vector128NIntAsGeneric_Byte"] = Vector128NIntAsGeneric_Byte, + ["Vector128NIntAsGeneric_Double"] = Vector128NIntAsGeneric_Double, + ["Vector128NIntAsGeneric_Int16"] = Vector128NIntAsGeneric_Int16, + ["Vector128NIntAsGeneric_Int32"] = Vector128NIntAsGeneric_Int32, + ["Vector128NIntAsGeneric_Int64"] = Vector128NIntAsGeneric_Int64, + ["Vector128NIntAsGeneric_SByte"] = Vector128NIntAsGeneric_SByte, + ["Vector128NIntAsGeneric_Single"] = Vector128NIntAsGeneric_Single, + ["Vector128NIntAsGeneric_UInt16"] = Vector128NIntAsGeneric_UInt16, + ["Vector128NIntAsGeneric_UInt32"] = Vector128NIntAsGeneric_UInt32, + ["Vector128NIntAsGeneric_UInt64"] = Vector128NIntAsGeneric_UInt64, + ["Vector128NIntAsByte"] = Vector128NIntAsByte, + ["Vector128NIntAsDouble"] = Vector128NIntAsDouble, + ["Vector128NIntAsInt16"] = Vector128NIntAsInt16, + ["Vector128NIntAsInt32"] = Vector128NIntAsInt32, + ["Vector128NIntAsInt64"] = Vector128NIntAsInt64, + ["Vector128NIntAsSByte"] = Vector128NIntAsSByte, + ["Vector128NIntAsSingle"] = Vector128NIntAsSingle, + ["Vector128NIntAsUInt16"] = Vector128NIntAsUInt16, + ["Vector128NIntAsUInt32"] = Vector128NIntAsUInt32, + ["Vector128NIntAsUInt64"] = Vector128NIntAsUInt64, + ["Vector128NIntGetElementNegativeOne"] = Vector128NIntGetElementNegativeOne, + ["Vector128NIntGetElement0"] = Vector128NIntGetElement0, + ["Vector128NIntGetElementMaxValue"] = Vector128NIntGetElementMaxValue, + ["Vector128NIntWithElementNegativeOne"] = Vector128NIntWithElementNegativeOne, + ["Vector128NIntWithElement0"] = Vector128NIntWithElement0, + ["Vector128NIntWithElementMaxValue"] = Vector128NIntWithElementMaxValue, + ["Vector128NIntGetLower"] = Vector128NIntGetLower, + ["Vector128NIntWithLower"] = Vector128NIntWithLower, + ["Vector128NIntGetUpper"] = Vector128NIntGetUpper, + ["Vector128NIntWithUpper"] = Vector128NIntWithUpper, + ["Vector128NIntToScalar"] = Vector128NIntToScalar, + ["Vector128NIntToVector256"] = Vector128NIntToVector256, + ["Vector128NIntToVector256Unsafe"] = Vector128NIntToVector256Unsafe, + ["Vector128NIntToString"] = Vector128NIntToString, + ["Vector128NUIntZero"] = Vector128NUIntZero, + ["Vector128NUIntAllBitsSet"] = Vector128NUIntAllBitsSet, + ["Vector128NUIntAsGeneric_NUInt"] = Vector128NUIntAsGeneric_NUInt, + ["Vector128ByteAsGeneric_NUInt"] = Vector128ByteAsGeneric_NUInt, + ["Vector128DoubleAsGeneric_NUInt"] = Vector128DoubleAsGeneric_NUInt, + ["Vector128Int16AsGeneric_NUInt"] = Vector128Int16AsGeneric_NUInt, + ["Vector128Int32AsGeneric_NUInt"] = Vector128Int32AsGeneric_NUInt, + ["Vector128Int64AsGeneric_NUInt"] = Vector128Int64AsGeneric_NUInt, + ["Vector128SByteAsGeneric_NUInt"] = Vector128SByteAsGeneric_NUInt, + ["Vector128SingleAsGeneric_NUInt"] = Vector128SingleAsGeneric_NUInt, + ["Vector128UInt16AsGeneric_NUInt"] = Vector128UInt16AsGeneric_NUInt, + ["Vector128UInt32AsGeneric_NUInt"] = Vector128UInt32AsGeneric_NUInt, + ["Vector128UInt64AsGeneric_NUInt"] = Vector128UInt64AsGeneric_NUInt, + ["Vector128NUIntAsGeneric_Byte"] = Vector128NUIntAsGeneric_Byte, + ["Vector128NUIntAsGeneric_Double"] = Vector128NUIntAsGeneric_Double, + ["Vector128NUIntAsGeneric_Int16"] = Vector128NUIntAsGeneric_Int16, + ["Vector128NUIntAsGeneric_Int32"] = Vector128NUIntAsGeneric_Int32, + ["Vector128NUIntAsGeneric_Int64"] = Vector128NUIntAsGeneric_Int64, + ["Vector128NUIntAsGeneric_SByte"] = Vector128NUIntAsGeneric_SByte, + ["Vector128NUIntAsGeneric_Single"] = Vector128NUIntAsGeneric_Single, + ["Vector128NUIntAsGeneric_UInt16"] = Vector128NUIntAsGeneric_UInt16, + ["Vector128NUIntAsGeneric_UInt32"] = Vector128NUIntAsGeneric_UInt32, + ["Vector128NUIntAsGeneric_UInt64"] = Vector128NUIntAsGeneric_UInt64, + ["Vector128NUIntAsByte"] = Vector128NUIntAsByte, + ["Vector128NUIntAsDouble"] = Vector128NUIntAsDouble, + ["Vector128NUIntAsInt16"] = Vector128NUIntAsInt16, + ["Vector128NUIntAsInt32"] = Vector128NUIntAsInt32, + ["Vector128NUIntAsInt64"] = Vector128NUIntAsInt64, + ["Vector128NUIntAsSByte"] = Vector128NUIntAsSByte, + ["Vector128NUIntAsSingle"] = Vector128NUIntAsSingle, + ["Vector128NUIntAsUInt16"] = Vector128NUIntAsUInt16, + ["Vector128NUIntAsUInt32"] = Vector128NUIntAsUInt32, + ["Vector128NUIntAsUInt64"] = Vector128NUIntAsUInt64, + ["Vector128NUIntGetElementNegativeOne"] = Vector128NUIntGetElementNegativeOne, + ["Vector128NUIntGetElement0"] = Vector128NUIntGetElement0, + ["Vector128NUIntGetElementMaxValue"] = Vector128NUIntGetElementMaxValue, + ["Vector128NUIntWithElementNegativeOne"] = Vector128NUIntWithElementNegativeOne, + ["Vector128NUIntWithElement0"] = Vector128NUIntWithElement0, + ["Vector128NUIntWithElementMaxValue"] = Vector128NUIntWithElementMaxValue, + ["Vector128NUIntGetLower"] = Vector128NUIntGetLower, + ["Vector128NUIntWithLower"] = Vector128NUIntWithLower, + ["Vector128NUIntGetUpper"] = Vector128NUIntGetUpper, + ["Vector128NUIntWithUpper"] = Vector128NUIntWithUpper, + ["Vector128NUIntToScalar"] = Vector128NUIntToScalar, + ["Vector128NUIntToVector256"] = Vector128NUIntToVector256, + ["Vector128NUIntToVector256Unsafe"] = Vector128NUIntToVector256Unsafe, + ["Vector128NUIntToString"] = Vector128NUIntToString, + ["Vector256BooleanZero"] = Vector256BooleanZero, + ["Vector256BooleanAllBitsSet"] = Vector256BooleanAllBitsSet, ["Vector256BooleanAsGeneric_Boolean"] = Vector256BooleanAsGeneric_Boolean, ["Vector256ByteAsGeneric_Boolean"] = Vector256ByteAsGeneric_Boolean, ["Vector256DoubleAsGeneric_Boolean"] = Vector256DoubleAsGeneric_Boolean, @@ -134,18 +314,108 @@ static Program() ["Vector256BooleanAsUInt16"] = Vector256BooleanAsUInt16, ["Vector256BooleanAsUInt32"] = Vector256BooleanAsUInt32, ["Vector256BooleanAsUInt64"] = Vector256BooleanAsUInt64, - ["Vector256GetElementNegativeOne"] = Vector256GetElementNegativeOne, - ["Vector256GetElement0"] = Vector256GetElement0, - ["Vector256GetElementMaxValue"] = Vector256GetElementMaxValue, - ["Vector256WithElementNegativeOne"] = Vector256WithElementNegativeOne, - ["Vector256WithElement0"] = Vector256WithElement0, - ["Vector256WithElementMaxValue"] = Vector256WithElementMaxValue, - ["Vector256GetLower"] = Vector256GetLower, - ["Vector256WithLower"] = Vector256WithLower, - ["Vector256GetUpper"] = Vector256GetUpper, - ["Vector256WithUpper"] = Vector256WithUpper, - ["Vector256ToScalar"] = Vector256ToScalar, - ["Vector256ToString"] = Vector256ToString, + ["Vector256BooleanGetElementNegativeOne"] = Vector256BooleanGetElementNegativeOne, + ["Vector256BooleanGetElement0"] = Vector256BooleanGetElement0, + ["Vector256BooleanGetElementMaxValue"] = Vector256BooleanGetElementMaxValue, + ["Vector256BooleanWithElementNegativeOne"] = Vector256BooleanWithElementNegativeOne, + ["Vector256BooleanWithElement0"] = Vector256BooleanWithElement0, + ["Vector256BooleanWithElementMaxValue"] = Vector256BooleanWithElementMaxValue, + ["Vector256BooleanGetLower"] = Vector256BooleanGetLower, + ["Vector256BooleanWithLower"] = Vector256BooleanWithLower, + ["Vector256BooleanGetUpper"] = Vector256BooleanGetUpper, + ["Vector256BooleanWithUpper"] = Vector256BooleanWithUpper, + ["Vector256BooleanToScalar"] = Vector256BooleanToScalar, + ["Vector256BooleanToString"] = Vector256BooleanToString, + ["Vector256NIntZero"] = Vector256NIntZero, + ["Vector256NIntAllBitsSet"] = Vector256NIntAllBitsSet, + ["Vector256NIntAsGeneric_NInt"] = Vector256NIntAsGeneric_NInt, + ["Vector256ByteAsGeneric_NInt"] = Vector256ByteAsGeneric_NInt, + ["Vector256DoubleAsGeneric_NInt"] = Vector256DoubleAsGeneric_NInt, + ["Vector256Int16AsGeneric_NInt"] = Vector256Int16AsGeneric_NInt, + ["Vector256Int32AsGeneric_NInt"] = Vector256Int32AsGeneric_NInt, + ["Vector256Int64AsGeneric_NInt"] = Vector256Int64AsGeneric_NInt, + ["Vector256SByteAsGeneric_NInt"] = Vector256SByteAsGeneric_NInt, + ["Vector256SingleAsGeneric_NInt"] = Vector256SingleAsGeneric_NInt, + ["Vector256UInt16AsGeneric_NInt"] = Vector256UInt16AsGeneric_NInt, + ["Vector256UInt32AsGeneric_NInt"] = Vector256UInt32AsGeneric_NInt, + ["Vector256UInt64AsGeneric_NInt"] = Vector256UInt64AsGeneric_NInt, + ["Vector256NIntAsGeneric_Byte"] = Vector256NIntAsGeneric_Byte, + ["Vector256NIntAsGeneric_Double"] = Vector256NIntAsGeneric_Double, + ["Vector256NIntAsGeneric_Int16"] = Vector256NIntAsGeneric_Int16, + ["Vector256NIntAsGeneric_Int32"] = Vector256NIntAsGeneric_Int32, + ["Vector256NIntAsGeneric_Int64"] = Vector256NIntAsGeneric_Int64, + ["Vector256NIntAsGeneric_SByte"] = Vector256NIntAsGeneric_SByte, + ["Vector256NIntAsGeneric_Single"] = Vector256NIntAsGeneric_Single, + ["Vector256NIntAsGeneric_UInt16"] = Vector256NIntAsGeneric_UInt16, + ["Vector256NIntAsGeneric_UInt32"] = Vector256NIntAsGeneric_UInt32, + ["Vector256NIntAsGeneric_UInt64"] = Vector256NIntAsGeneric_UInt64, + ["Vector256NIntAsByte"] = Vector256NIntAsByte, + ["Vector256NIntAsDouble"] = Vector256NIntAsDouble, + ["Vector256NIntAsInt16"] = Vector256NIntAsInt16, + ["Vector256NIntAsInt32"] = Vector256NIntAsInt32, + ["Vector256NIntAsInt64"] = Vector256NIntAsInt64, + ["Vector256NIntAsSByte"] = Vector256NIntAsSByte, + ["Vector256NIntAsSingle"] = Vector256NIntAsSingle, + ["Vector256NIntAsUInt16"] = Vector256NIntAsUInt16, + ["Vector256NIntAsUInt32"] = Vector256NIntAsUInt32, + ["Vector256NIntAsUInt64"] = Vector256NIntAsUInt64, + ["Vector256NIntGetElementNegativeOne"] = Vector256NIntGetElementNegativeOne, + ["Vector256NIntGetElement0"] = Vector256NIntGetElement0, + ["Vector256NIntGetElementMaxValue"] = Vector256NIntGetElementMaxValue, + ["Vector256NIntWithElementNegativeOne"] = Vector256NIntWithElementNegativeOne, + ["Vector256NIntWithElement0"] = Vector256NIntWithElement0, + ["Vector256NIntWithElementMaxValue"] = Vector256NIntWithElementMaxValue, + ["Vector256NIntGetLower"] = Vector256NIntGetLower, + ["Vector256NIntWithLower"] = Vector256NIntWithLower, + ["Vector256NIntGetUpper"] = Vector256NIntGetUpper, + ["Vector256NIntWithUpper"] = Vector256NIntWithUpper, + ["Vector256NIntToScalar"] = Vector256NIntToScalar, + ["Vector256NIntToString"] = Vector256NIntToString, + ["Vector256NUIntZero"] = Vector256NUIntZero, + ["Vector256NUIntAllBitsSet"] = Vector256NUIntAllBitsSet, + ["Vector256NUIntAsGeneric_NUInt"] = Vector256NUIntAsGeneric_NUInt, + ["Vector256ByteAsGeneric_NUInt"] = Vector256ByteAsGeneric_NUInt, + ["Vector256DoubleAsGeneric_NUInt"] = Vector256DoubleAsGeneric_NUInt, + ["Vector256Int16AsGeneric_NUInt"] = Vector256Int16AsGeneric_NUInt, + ["Vector256Int32AsGeneric_NUInt"] = Vector256Int32AsGeneric_NUInt, + ["Vector256Int64AsGeneric_NUInt"] = Vector256Int64AsGeneric_NUInt, + ["Vector256SByteAsGeneric_NUInt"] = Vector256SByteAsGeneric_NUInt, + ["Vector256SingleAsGeneric_NUInt"] = Vector256SingleAsGeneric_NUInt, + ["Vector256UInt16AsGeneric_NUInt"] = Vector256UInt16AsGeneric_NUInt, + ["Vector256UInt32AsGeneric_NUInt"] = Vector256UInt32AsGeneric_NUInt, + ["Vector256UInt64AsGeneric_NUInt"] = Vector256UInt64AsGeneric_NUInt, + ["Vector256NUIntAsGeneric_Byte"] = Vector256NUIntAsGeneric_Byte, + ["Vector256NUIntAsGeneric_Double"] = Vector256NUIntAsGeneric_Double, + ["Vector256NUIntAsGeneric_Int16"] = Vector256NUIntAsGeneric_Int16, + ["Vector256NUIntAsGeneric_Int32"] = Vector256NUIntAsGeneric_Int32, + ["Vector256NUIntAsGeneric_Int64"] = Vector256NUIntAsGeneric_Int64, + ["Vector256NUIntAsGeneric_SByte"] = Vector256NUIntAsGeneric_SByte, + ["Vector256NUIntAsGeneric_Single"] = Vector256NUIntAsGeneric_Single, + ["Vector256NUIntAsGeneric_UInt16"] = Vector256NUIntAsGeneric_UInt16, + ["Vector256NUIntAsGeneric_UInt32"] = Vector256NUIntAsGeneric_UInt32, + ["Vector256NUIntAsGeneric_UInt64"] = Vector256NUIntAsGeneric_UInt64, + ["Vector256NUIntAsByte"] = Vector256NUIntAsByte, + ["Vector256NUIntAsDouble"] = Vector256NUIntAsDouble, + ["Vector256NUIntAsInt16"] = Vector256NUIntAsInt16, + ["Vector256NUIntAsInt32"] = Vector256NUIntAsInt32, + ["Vector256NUIntAsInt64"] = Vector256NUIntAsInt64, + ["Vector256NUIntAsSByte"] = Vector256NUIntAsSByte, + ["Vector256NUIntAsSingle"] = Vector256NUIntAsSingle, + ["Vector256NUIntAsUInt16"] = Vector256NUIntAsUInt16, + ["Vector256NUIntAsUInt32"] = Vector256NUIntAsUInt32, + ["Vector256NUIntAsUInt64"] = Vector256NUIntAsUInt64, + ["Vector256NUIntGetElementNegativeOne"] = Vector256NUIntGetElementNegativeOne, + ["Vector256NUIntGetElement0"] = Vector256NUIntGetElement0, + ["Vector256NUIntGetElementMaxValue"] = Vector256NUIntGetElementMaxValue, + ["Vector256NUIntWithElementNegativeOne"] = Vector256NUIntWithElementNegativeOne, + ["Vector256NUIntWithElement0"] = Vector256NUIntWithElement0, + ["Vector256NUIntWithElementMaxValue"] = Vector256NUIntWithElementMaxValue, + ["Vector256NUIntGetLower"] = Vector256NUIntGetLower, + ["Vector256NUIntWithLower"] = Vector256NUIntWithLower, + ["Vector256NUIntGetUpper"] = Vector256NUIntGetUpper, + ["Vector256NUIntWithUpper"] = Vector256NUIntWithUpper, + ["Vector256NUIntToScalar"] = Vector256NUIntToScalar, + ["Vector256NUIntToString"] = Vector256NUIntToString, }; } } diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128AllBitsSet.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128BooleanAllBitsSet.cs similarity index 90% rename from src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128AllBitsSet.cs rename to src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128BooleanAllBitsSet.cs index 5dc6f9841bd87a..b45e23225dbd70 100644 --- a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128AllBitsSet.cs +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128BooleanAllBitsSet.cs @@ -17,7 +17,7 @@ namespace JIT.HardwareIntrinsics.General { public static partial class Program { - private static void Vector128AllBitsSet() + private static void Vector128BooleanAllBitsSet() { bool succeeded = false; @@ -32,7 +32,7 @@ private static void Vector128AllBitsSet() if (!succeeded) { - TestLibrary.TestFramework.LogInformation($"Vector128AllBitsSet: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation($"Vector128BooleanAllBitsSet: RunNotSupportedScenario failed to throw NotSupportedException."); TestLibrary.TestFramework.LogInformation(string.Empty); throw new Exception("One or more scenarios did not complete as expected."); diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128GetElementMaxValue.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128BooleanGetElement0.cs similarity index 91% rename from src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128GetElementMaxValue.cs rename to src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128BooleanGetElement0.cs index d0d175e661d37e..a91113d76b2ec1 100644 --- a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128GetElementMaxValue.cs +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128BooleanGetElement0.cs @@ -17,13 +17,13 @@ namespace JIT.HardwareIntrinsics.General { public static partial class Program { - private static void Vector128GetElementMaxValue() + private static void Vector128BooleanGetElement0() { bool succeeded = false; try { - bool result = default(Vector128).GetElement(int.MaxValue); + bool result = default(Vector128).GetElement(0); } catch (NotSupportedException) { @@ -32,7 +32,7 @@ private static void Vector128GetElementMaxValue() if (!succeeded) { - TestLibrary.TestFramework.LogInformation($"Vector128GetElementMaxValue: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation($"Vector128BooleanGetElement0: RunNotSupportedScenario failed to throw NotSupportedException."); TestLibrary.TestFramework.LogInformation(string.Empty); throw new Exception("One or more scenarios did not complete as expected."); diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128GetElement0.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128BooleanGetElementMaxValue.cs similarity index 88% rename from src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128GetElement0.cs rename to src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128BooleanGetElementMaxValue.cs index 353dcd964f3a38..7c7fb94fb7cc00 100644 --- a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128GetElement0.cs +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128BooleanGetElementMaxValue.cs @@ -17,13 +17,13 @@ namespace JIT.HardwareIntrinsics.General { public static partial class Program { - private static void Vector128GetElement0() + private static void Vector128BooleanGetElementMaxValue() { bool succeeded = false; try { - bool result = default(Vector128).GetElement(0); + bool result = default(Vector128).GetElement(int.MaxValue); } catch (NotSupportedException) { @@ -32,7 +32,7 @@ private static void Vector128GetElement0() if (!succeeded) { - TestLibrary.TestFramework.LogInformation($"Vector128GetElement0: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation($"Vector128BooleanGetElementMaxValue: RunNotSupportedScenario failed to throw NotSupportedException."); TestLibrary.TestFramework.LogInformation(string.Empty); throw new Exception("One or more scenarios did not complete as expected."); diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128GetElementNegativeOne.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128BooleanGetElementNegativeOne.cs similarity index 89% rename from src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128GetElementNegativeOne.cs rename to src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128BooleanGetElementNegativeOne.cs index a4eb8d06249d6e..df7464df9af8ca 100644 --- a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128GetElementNegativeOne.cs +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128BooleanGetElementNegativeOne.cs @@ -17,7 +17,7 @@ namespace JIT.HardwareIntrinsics.General { public static partial class Program { - private static void Vector128GetElementNegativeOne() + private static void Vector128BooleanGetElementNegativeOne() { bool succeeded = false; @@ -32,7 +32,7 @@ private static void Vector128GetElementNegativeOne() if (!succeeded) { - TestLibrary.TestFramework.LogInformation($"Vector128GetElementNegativeOne: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation($"Vector128BooleanGetElementNegativeOne: RunNotSupportedScenario failed to throw NotSupportedException."); TestLibrary.TestFramework.LogInformation(string.Empty); throw new Exception("One or more scenarios did not complete as expected."); diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128GetLower.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128BooleanGetLower.cs similarity index 90% rename from src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128GetLower.cs rename to src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128BooleanGetLower.cs index f323073c3e9c3c..e740da9295252e 100644 --- a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128GetLower.cs +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128BooleanGetLower.cs @@ -17,7 +17,7 @@ namespace JIT.HardwareIntrinsics.General { public static partial class Program { - private static void Vector128GetLower() + private static void Vector128BooleanGetLower() { bool succeeded = false; @@ -32,7 +32,7 @@ private static void Vector128GetLower() if (!succeeded) { - TestLibrary.TestFramework.LogInformation($"Vector128GetLower: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation($"Vector128BooleanGetLower: RunNotSupportedScenario failed to throw NotSupportedException."); TestLibrary.TestFramework.LogInformation(string.Empty); throw new Exception("One or more scenarios did not complete as expected."); diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128GetUpper.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128BooleanGetUpper.cs similarity index 90% rename from src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128GetUpper.cs rename to src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128BooleanGetUpper.cs index 036973a010f8f4..710e3e4b4d8169 100644 --- a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128GetUpper.cs +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128BooleanGetUpper.cs @@ -17,7 +17,7 @@ namespace JIT.HardwareIntrinsics.General { public static partial class Program { - private static void Vector128GetUpper() + private static void Vector128BooleanGetUpper() { bool succeeded = false; @@ -32,7 +32,7 @@ private static void Vector128GetUpper() if (!succeeded) { - TestLibrary.TestFramework.LogInformation($"Vector128GetUpper: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation($"Vector128BooleanGetUpper: RunNotSupportedScenario failed to throw NotSupportedException."); TestLibrary.TestFramework.LogInformation(string.Empty); throw new Exception("One or more scenarios did not complete as expected."); diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128ToScalar.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128BooleanToScalar.cs similarity index 90% rename from src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128ToScalar.cs rename to src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128BooleanToScalar.cs index 7cdd90bec650ef..292fd6e224ef51 100644 --- a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128ToScalar.cs +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128BooleanToScalar.cs @@ -17,7 +17,7 @@ namespace JIT.HardwareIntrinsics.General { public static partial class Program { - private static void Vector128ToScalar() + private static void Vector128BooleanToScalar() { bool succeeded = false; @@ -32,7 +32,7 @@ private static void Vector128ToScalar() if (!succeeded) { - TestLibrary.TestFramework.LogInformation($"Vector128ToScalar: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation($"Vector128BooleanToScalar: RunNotSupportedScenario failed to throw NotSupportedException."); TestLibrary.TestFramework.LogInformation(string.Empty); throw new Exception("One or more scenarios did not complete as expected."); diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128ToString.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128BooleanToString.cs similarity index 90% rename from src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128ToString.cs rename to src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128BooleanToString.cs index 1ffb9d3c231a70..964ceecbbd135c 100644 --- a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128ToString.cs +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128BooleanToString.cs @@ -17,7 +17,7 @@ namespace JIT.HardwareIntrinsics.General { public static partial class Program { - private static void Vector128ToString() + private static void Vector128BooleanToString() { bool succeeded = false; @@ -32,7 +32,7 @@ private static void Vector128ToString() if (!succeeded) { - TestLibrary.TestFramework.LogInformation($"Vector128ToString: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation($"Vector128BooleanToString: RunNotSupportedScenario failed to throw NotSupportedException."); TestLibrary.TestFramework.LogInformation(string.Empty); throw new Exception("One or more scenarios did not complete as expected."); diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128ToVector256.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128BooleanToVector256.cs similarity index 90% rename from src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128ToVector256.cs rename to src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128BooleanToVector256.cs index 592ecca6adae55..5acbb9fbbdeffc 100644 --- a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128ToVector256.cs +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128BooleanToVector256.cs @@ -17,7 +17,7 @@ namespace JIT.HardwareIntrinsics.General { public static partial class Program { - private static void Vector128ToVector256() + private static void Vector128BooleanToVector256() { bool succeeded = false; @@ -32,7 +32,7 @@ private static void Vector128ToVector256() if (!succeeded) { - TestLibrary.TestFramework.LogInformation($"Vector128ToVector256: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation($"Vector128BooleanToVector256: RunNotSupportedScenario failed to throw NotSupportedException."); TestLibrary.TestFramework.LogInformation(string.Empty); throw new Exception("One or more scenarios did not complete as expected."); diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128ToVector256Unsafe.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128BooleanToVector256Unsafe.cs similarity index 89% rename from src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128ToVector256Unsafe.cs rename to src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128BooleanToVector256Unsafe.cs index fd24fc86dabcb3..5c4bafbb97125e 100644 --- a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128ToVector256Unsafe.cs +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128BooleanToVector256Unsafe.cs @@ -17,7 +17,7 @@ namespace JIT.HardwareIntrinsics.General { public static partial class Program { - private static void Vector128ToVector256Unsafe() + private static void Vector128BooleanToVector256Unsafe() { bool succeeded = false; @@ -32,7 +32,7 @@ private static void Vector128ToVector256Unsafe() if (!succeeded) { - TestLibrary.TestFramework.LogInformation($"Vector128ToVector256Unsafe: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation($"Vector128BooleanToVector256Unsafe: RunNotSupportedScenario failed to throw NotSupportedException."); TestLibrary.TestFramework.LogInformation(string.Empty); throw new Exception("One or more scenarios did not complete as expected."); diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128WithElement0.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128BooleanWithElement0.cs similarity index 90% rename from src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128WithElement0.cs rename to src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128BooleanWithElement0.cs index 5e0ece49d8063a..ef710e847b0174 100644 --- a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128WithElement0.cs +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128BooleanWithElement0.cs @@ -17,7 +17,7 @@ namespace JIT.HardwareIntrinsics.General { public static partial class Program { - private static void Vector128WithElement0() + private static void Vector128BooleanWithElement0() { bool succeeded = false; @@ -32,7 +32,7 @@ private static void Vector128WithElement0() if (!succeeded) { - TestLibrary.TestFramework.LogInformation($"Vector128WithElement0: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation($"Vector128BooleanWithElement0: RunNotSupportedScenario failed to throw NotSupportedException."); TestLibrary.TestFramework.LogInformation(string.Empty); throw new Exception("One or more scenarios did not complete as expected."); diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128WithElementMaxValue.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128BooleanWithElementMaxValue.cs similarity index 89% rename from src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128WithElementMaxValue.cs rename to src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128BooleanWithElementMaxValue.cs index 9664fd585a50bc..27576cf6330ef3 100644 --- a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128WithElementMaxValue.cs +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128BooleanWithElementMaxValue.cs @@ -17,7 +17,7 @@ namespace JIT.HardwareIntrinsics.General { public static partial class Program { - private static void Vector128WithElementMaxValue() + private static void Vector128BooleanWithElementMaxValue() { bool succeeded = false; @@ -32,7 +32,7 @@ private static void Vector128WithElementMaxValue() if (!succeeded) { - TestLibrary.TestFramework.LogInformation($"Vector128WithElementMaxValue: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation($"Vector128BooleanWithElementMaxValue: RunNotSupportedScenario failed to throw NotSupportedException."); TestLibrary.TestFramework.LogInformation(string.Empty); throw new Exception("One or more scenarios did not complete as expected."); diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128WithElementNegativeOne.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128BooleanWithElementNegativeOne.cs similarity index 89% rename from src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128WithElementNegativeOne.cs rename to src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128BooleanWithElementNegativeOne.cs index e5ca7b8da52a95..09ca163020d0fe 100644 --- a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128WithElementNegativeOne.cs +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128BooleanWithElementNegativeOne.cs @@ -17,7 +17,7 @@ namespace JIT.HardwareIntrinsics.General { public static partial class Program { - private static void Vector128WithElementNegativeOne() + private static void Vector128BooleanWithElementNegativeOne() { bool succeeded = false; @@ -32,7 +32,7 @@ private static void Vector128WithElementNegativeOne() if (!succeeded) { - TestLibrary.TestFramework.LogInformation($"Vector128WithElementNegativeOne: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation($"Vector128BooleanWithElementNegativeOne: RunNotSupportedScenario failed to throw NotSupportedException."); TestLibrary.TestFramework.LogInformation(string.Empty); throw new Exception("One or more scenarios did not complete as expected."); diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128WithLower.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128BooleanWithLower.cs similarity index 90% rename from src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128WithLower.cs rename to src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128BooleanWithLower.cs index 19f23cf145052e..f282c3f2ba0d19 100644 --- a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128WithLower.cs +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128BooleanWithLower.cs @@ -17,7 +17,7 @@ namespace JIT.HardwareIntrinsics.General { public static partial class Program { - private static void Vector128WithLower() + private static void Vector128BooleanWithLower() { bool succeeded = false; @@ -32,7 +32,7 @@ private static void Vector128WithLower() if (!succeeded) { - TestLibrary.TestFramework.LogInformation($"Vector128WithLower: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation($"Vector128BooleanWithLower: RunNotSupportedScenario failed to throw NotSupportedException."); TestLibrary.TestFramework.LogInformation(string.Empty); throw new Exception("One or more scenarios did not complete as expected."); diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128WithUpper.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128BooleanWithUpper.cs similarity index 90% rename from src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128WithUpper.cs rename to src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128BooleanWithUpper.cs index 70b1d8f275a76b..ec2dde217c3aaf 100644 --- a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128WithUpper.cs +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128BooleanWithUpper.cs @@ -17,7 +17,7 @@ namespace JIT.HardwareIntrinsics.General { public static partial class Program { - private static void Vector128WithUpper() + private static void Vector128BooleanWithUpper() { bool succeeded = false; @@ -32,7 +32,7 @@ private static void Vector128WithUpper() if (!succeeded) { - TestLibrary.TestFramework.LogInformation($"Vector128WithUpper: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation($"Vector128BooleanWithUpper: RunNotSupportedScenario failed to throw NotSupportedException."); TestLibrary.TestFramework.LogInformation(string.Empty); throw new Exception("One or more scenarios did not complete as expected."); diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128Zero.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128BooleanZero.cs similarity index 91% rename from src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128Zero.cs rename to src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128BooleanZero.cs index 19a839af95298b..9b7383d258ccb8 100644 --- a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128Zero.cs +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128BooleanZero.cs @@ -17,7 +17,7 @@ namespace JIT.HardwareIntrinsics.General { public static partial class Program { - private static void Vector128Zero() + private static void Vector128BooleanZero() { bool succeeded = false; @@ -32,7 +32,7 @@ private static void Vector128Zero() if (!succeeded) { - TestLibrary.TestFramework.LogInformation($"Vector128Zero: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation($"Vector128BooleanZero: RunNotSupportedScenario failed to throw NotSupportedException."); TestLibrary.TestFramework.LogInformation(string.Empty); throw new Exception("One or more scenarios did not complete as expected."); diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128ByteAsGeneric_NInt.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128ByteAsGeneric_NInt.cs new file mode 100644 index 00000000000000..b669f4f5c5b209 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128ByteAsGeneric_NInt.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector128ByteAsGeneric_NInt() + { + bool succeeded = false; + + try + { + Vector128 result = default(Vector128).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector128ByteAsGeneric_NInt: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128ByteAsGeneric_NUInt.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128ByteAsGeneric_NUInt.cs new file mode 100644 index 00000000000000..acbb3b75f6aaa9 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128ByteAsGeneric_NUInt.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector128ByteAsGeneric_NUInt() + { + bool succeeded = false; + + try + { + Vector128 result = default(Vector128).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector128ByteAsGeneric_NUInt: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128DoubleAsGeneric_NInt.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128DoubleAsGeneric_NInt.cs new file mode 100644 index 00000000000000..1fb95b4ff19b9e --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128DoubleAsGeneric_NInt.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector128DoubleAsGeneric_NInt() + { + bool succeeded = false; + + try + { + Vector128 result = default(Vector128).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector128DoubleAsGeneric_NInt: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128DoubleAsGeneric_NUInt.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128DoubleAsGeneric_NUInt.cs new file mode 100644 index 00000000000000..1fac6f017eb665 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128DoubleAsGeneric_NUInt.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector128DoubleAsGeneric_NUInt() + { + bool succeeded = false; + + try + { + Vector128 result = default(Vector128).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector128DoubleAsGeneric_NUInt: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128Int16AsGeneric_NInt.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128Int16AsGeneric_NInt.cs new file mode 100644 index 00000000000000..6c11df4ac79143 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128Int16AsGeneric_NInt.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector128Int16AsGeneric_NInt() + { + bool succeeded = false; + + try + { + Vector128 result = default(Vector128).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector128Int16AsGeneric_NInt: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128Int16AsGeneric_NUInt.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128Int16AsGeneric_NUInt.cs new file mode 100644 index 00000000000000..ae5ec500cee93e --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128Int16AsGeneric_NUInt.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector128Int16AsGeneric_NUInt() + { + bool succeeded = false; + + try + { + Vector128 result = default(Vector128).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector128Int16AsGeneric_NUInt: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128Int32AsGeneric_NInt.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128Int32AsGeneric_NInt.cs new file mode 100644 index 00000000000000..e1143fcedf8489 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128Int32AsGeneric_NInt.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector128Int32AsGeneric_NInt() + { + bool succeeded = false; + + try + { + Vector128 result = default(Vector128).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector128Int32AsGeneric_NInt: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128Int32AsGeneric_NUInt.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128Int32AsGeneric_NUInt.cs new file mode 100644 index 00000000000000..5a8099f60eca53 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128Int32AsGeneric_NUInt.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector128Int32AsGeneric_NUInt() + { + bool succeeded = false; + + try + { + Vector128 result = default(Vector128).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector128Int32AsGeneric_NUInt: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128Int64AsGeneric_NInt.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128Int64AsGeneric_NInt.cs new file mode 100644 index 00000000000000..7aeb967c9dffd7 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128Int64AsGeneric_NInt.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector128Int64AsGeneric_NInt() + { + bool succeeded = false; + + try + { + Vector128 result = default(Vector128).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector128Int64AsGeneric_NInt: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128Int64AsGeneric_NUInt.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128Int64AsGeneric_NUInt.cs new file mode 100644 index 00000000000000..a4fd17b7dffa3f --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128Int64AsGeneric_NUInt.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector128Int64AsGeneric_NUInt() + { + bool succeeded = false; + + try + { + Vector128 result = default(Vector128).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector128Int64AsGeneric_NUInt: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntAllBitsSet.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntAllBitsSet.cs new file mode 100644 index 00000000000000..f680ac34992181 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntAllBitsSet.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector128NIntAllBitsSet() + { + bool succeeded = false; + + try + { + Vector128 result = Vector128.AllBitsSet; + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector128NIntAllBitsSet: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntAsByte.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntAsByte.cs new file mode 100644 index 00000000000000..254a77e136fa4d --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntAsByte.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector128NIntAsByte() + { + bool succeeded = false; + + try + { + Vector128 result = default(Vector128).AsByte(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector128NIntAsByte: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntAsDouble.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntAsDouble.cs new file mode 100644 index 00000000000000..241933fb6b2615 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntAsDouble.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector128NIntAsDouble() + { + bool succeeded = false; + + try + { + Vector128 result = default(Vector128).AsDouble(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector128NIntAsDouble: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntAsGeneric_Byte.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntAsGeneric_Byte.cs new file mode 100644 index 00000000000000..9a90c588155881 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntAsGeneric_Byte.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector128NIntAsGeneric_Byte() + { + bool succeeded = false; + + try + { + Vector128 result = default(Vector128).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector128NIntAsGeneric_Byte: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntAsGeneric_Double.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntAsGeneric_Double.cs new file mode 100644 index 00000000000000..f587be31a3ad85 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntAsGeneric_Double.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector128NIntAsGeneric_Double() + { + bool succeeded = false; + + try + { + Vector128 result = default(Vector128).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector128NIntAsGeneric_Double: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntAsGeneric_Int16.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntAsGeneric_Int16.cs new file mode 100644 index 00000000000000..13cc88feb3a432 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntAsGeneric_Int16.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector128NIntAsGeneric_Int16() + { + bool succeeded = false; + + try + { + Vector128 result = default(Vector128).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector128NIntAsGeneric_Int16: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntAsGeneric_Int32.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntAsGeneric_Int32.cs new file mode 100644 index 00000000000000..daf16fa4c0dcf2 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntAsGeneric_Int32.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector128NIntAsGeneric_Int32() + { + bool succeeded = false; + + try + { + Vector128 result = default(Vector128).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector128NIntAsGeneric_Int32: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntAsGeneric_Int64.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntAsGeneric_Int64.cs new file mode 100644 index 00000000000000..0f30afdfae3c36 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntAsGeneric_Int64.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector128NIntAsGeneric_Int64() + { + bool succeeded = false; + + try + { + Vector128 result = default(Vector128).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector128NIntAsGeneric_Int64: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntAsGeneric_NInt.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntAsGeneric_NInt.cs new file mode 100644 index 00000000000000..4272adad5da23b --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntAsGeneric_NInt.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector128NIntAsGeneric_NInt() + { + bool succeeded = false; + + try + { + Vector128 result = default(Vector128).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector128NIntAsGeneric_NInt: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntAsGeneric_SByte.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntAsGeneric_SByte.cs new file mode 100644 index 00000000000000..f1b60dd48d7e5e --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntAsGeneric_SByte.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector128NIntAsGeneric_SByte() + { + bool succeeded = false; + + try + { + Vector128 result = default(Vector128).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector128NIntAsGeneric_SByte: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntAsGeneric_Single.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntAsGeneric_Single.cs new file mode 100644 index 00000000000000..00d40a9687e82f --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntAsGeneric_Single.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector128NIntAsGeneric_Single() + { + bool succeeded = false; + + try + { + Vector128 result = default(Vector128).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector128NIntAsGeneric_Single: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntAsGeneric_UInt16.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntAsGeneric_UInt16.cs new file mode 100644 index 00000000000000..80231d98d8461a --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntAsGeneric_UInt16.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector128NIntAsGeneric_UInt16() + { + bool succeeded = false; + + try + { + Vector128 result = default(Vector128).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector128NIntAsGeneric_UInt16: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntAsGeneric_UInt32.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntAsGeneric_UInt32.cs new file mode 100644 index 00000000000000..7d075019e09aaa --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntAsGeneric_UInt32.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector128NIntAsGeneric_UInt32() + { + bool succeeded = false; + + try + { + Vector128 result = default(Vector128).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector128NIntAsGeneric_UInt32: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntAsGeneric_UInt64.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntAsGeneric_UInt64.cs new file mode 100644 index 00000000000000..deb4cc45e5a250 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntAsGeneric_UInt64.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector128NIntAsGeneric_UInt64() + { + bool succeeded = false; + + try + { + Vector128 result = default(Vector128).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector128NIntAsGeneric_UInt64: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntAsInt16.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntAsInt16.cs new file mode 100644 index 00000000000000..7aeaac6c2496a5 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntAsInt16.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector128NIntAsInt16() + { + bool succeeded = false; + + try + { + Vector128 result = default(Vector128).AsInt16(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector128NIntAsInt16: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntAsInt32.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntAsInt32.cs new file mode 100644 index 00000000000000..341705dd66aa91 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntAsInt32.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector128NIntAsInt32() + { + bool succeeded = false; + + try + { + Vector128 result = default(Vector128).AsInt32(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector128NIntAsInt32: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntAsInt64.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntAsInt64.cs new file mode 100644 index 00000000000000..96015260bcf338 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntAsInt64.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector128NIntAsInt64() + { + bool succeeded = false; + + try + { + Vector128 result = default(Vector128).AsInt64(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector128NIntAsInt64: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntAsSByte.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntAsSByte.cs new file mode 100644 index 00000000000000..4eb25cb9c446b7 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntAsSByte.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector128NIntAsSByte() + { + bool succeeded = false; + + try + { + Vector128 result = default(Vector128).AsSByte(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector128NIntAsSByte: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntAsSingle.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntAsSingle.cs new file mode 100644 index 00000000000000..78d6335863f60d --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntAsSingle.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector128NIntAsSingle() + { + bool succeeded = false; + + try + { + Vector128 result = default(Vector128).AsSingle(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector128NIntAsSingle: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntAsUInt16.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntAsUInt16.cs new file mode 100644 index 00000000000000..ba9255a744c6f9 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntAsUInt16.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector128NIntAsUInt16() + { + bool succeeded = false; + + try + { + Vector128 result = default(Vector128).AsUInt16(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector128NIntAsUInt16: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntAsUInt32.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntAsUInt32.cs new file mode 100644 index 00000000000000..de947449cf6372 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntAsUInt32.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector128NIntAsUInt32() + { + bool succeeded = false; + + try + { + Vector128 result = default(Vector128).AsUInt32(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector128NIntAsUInt32: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntAsUInt64.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntAsUInt64.cs new file mode 100644 index 00000000000000..0fdfbb4377cf4c --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntAsUInt64.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector128NIntAsUInt64() + { + bool succeeded = false; + + try + { + Vector128 result = default(Vector128).AsUInt64(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector128NIntAsUInt64: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntGetElement0.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntGetElement0.cs new file mode 100644 index 00000000000000..9448ca147a4cf5 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntGetElement0.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector128NIntGetElement0() + { + bool succeeded = false; + + try + { + nint result = default(Vector128).GetElement(0); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector128NIntGetElement0: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntGetElementMaxValue.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntGetElementMaxValue.cs new file mode 100644 index 00000000000000..2081221cc9d573 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntGetElementMaxValue.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector128NIntGetElementMaxValue() + { + bool succeeded = false; + + try + { + nint result = default(Vector128).GetElement(int.MaxValue); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector128NIntGetElementMaxValue: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntGetElementNegativeOne.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntGetElementNegativeOne.cs new file mode 100644 index 00000000000000..f30d2722b7f21e --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntGetElementNegativeOne.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector128NIntGetElementNegativeOne() + { + bool succeeded = false; + + try + { + nint result = default(Vector128).GetElement(-1); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector128NIntGetElementNegativeOne: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntGetLower.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntGetLower.cs new file mode 100644 index 00000000000000..982f8c1bdb9277 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntGetLower.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector128NIntGetLower() + { + bool succeeded = false; + + try + { + Vector64 result = default(Vector128).GetLower(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector128NIntGetLower: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntGetUpper.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntGetUpper.cs new file mode 100644 index 00000000000000..e6f8adfea76377 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntGetUpper.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector128NIntGetUpper() + { + bool succeeded = false; + + try + { + Vector64 result = default(Vector128).GetUpper(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector128NIntGetUpper: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntToScalar.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntToScalar.cs new file mode 100644 index 00000000000000..b0682215a4b3e4 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntToScalar.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector128NIntToScalar() + { + bool succeeded = false; + + try + { + nint result = default(Vector128).ToScalar(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector128NIntToScalar: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntToString.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntToString.cs new file mode 100644 index 00000000000000..ee67026a430b4b --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntToString.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector128NIntToString() + { + bool succeeded = false; + + try + { + string result = default(Vector128).ToString(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector128NIntToString: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntToVector256.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntToVector256.cs new file mode 100644 index 00000000000000..f7fa1ffa996b95 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntToVector256.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector128NIntToVector256() + { + bool succeeded = false; + + try + { + Vector256 result = default(Vector128).ToVector256(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector128NIntToVector256: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntToVector256Unsafe.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntToVector256Unsafe.cs new file mode 100644 index 00000000000000..89667d092b8def --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntToVector256Unsafe.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector128NIntToVector256Unsafe() + { + bool succeeded = false; + + try + { + Vector256 result = default(Vector128).ToVector256Unsafe(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector128NIntToVector256Unsafe: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntWithElement0.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntWithElement0.cs new file mode 100644 index 00000000000000..68e9ba5f966b09 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntWithElement0.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector128NIntWithElement0() + { + bool succeeded = false; + + try + { + Vector128 result = default(Vector128).WithElement(0, (nint)0); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector128NIntWithElement0: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntWithElementMaxValue.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntWithElementMaxValue.cs new file mode 100644 index 00000000000000..325f433f4b5a96 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntWithElementMaxValue.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector128NIntWithElementMaxValue() + { + bool succeeded = false; + + try + { + Vector128 result = default(Vector128).WithElement(int.MaxValue, (nint)0); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector128NIntWithElementMaxValue: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntWithElementNegativeOne.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntWithElementNegativeOne.cs new file mode 100644 index 00000000000000..f2b6321d72ceb7 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntWithElementNegativeOne.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector128NIntWithElementNegativeOne() + { + bool succeeded = false; + + try + { + Vector128 result = default(Vector128).WithElement(-1, (nint)0); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector128NIntWithElementNegativeOne: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntWithLower.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntWithLower.cs new file mode 100644 index 00000000000000..c69b77167b93f4 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntWithLower.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector128NIntWithLower() + { + bool succeeded = false; + + try + { + Vector128 result = default(Vector128).WithLower(default(Vector64)); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector128NIntWithLower: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntWithUpper.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntWithUpper.cs new file mode 100644 index 00000000000000..c52bb1a0d7d181 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntWithUpper.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector128NIntWithUpper() + { + bool succeeded = false; + + try + { + Vector128 result = default(Vector128).WithUpper(default(Vector64)); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector128NIntWithUpper: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntZero.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntZero.cs new file mode 100644 index 00000000000000..3cc8f163112945 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NIntZero.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector128NIntZero() + { + bool succeeded = false; + + try + { + Vector128 result = Vector128.Zero; + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector128NIntZero: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntAllBitsSet.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntAllBitsSet.cs new file mode 100644 index 00000000000000..bbce2e3fe32d26 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntAllBitsSet.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector128NUIntAllBitsSet() + { + bool succeeded = false; + + try + { + Vector128 result = Vector128.AllBitsSet; + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector128NUIntAllBitsSet: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntAsByte.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntAsByte.cs new file mode 100644 index 00000000000000..6bf02c04bd3a73 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntAsByte.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector128NUIntAsByte() + { + bool succeeded = false; + + try + { + Vector128 result = default(Vector128).AsByte(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector128NUIntAsByte: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntAsDouble.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntAsDouble.cs new file mode 100644 index 00000000000000..f08aa076f3649d --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntAsDouble.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector128NUIntAsDouble() + { + bool succeeded = false; + + try + { + Vector128 result = default(Vector128).AsDouble(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector128NUIntAsDouble: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntAsGeneric_Byte.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntAsGeneric_Byte.cs new file mode 100644 index 00000000000000..b2569f28ae9cbb --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntAsGeneric_Byte.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector128NUIntAsGeneric_Byte() + { + bool succeeded = false; + + try + { + Vector128 result = default(Vector128).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector128NUIntAsGeneric_Byte: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntAsGeneric_Double.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntAsGeneric_Double.cs new file mode 100644 index 00000000000000..635744053cbfc4 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntAsGeneric_Double.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector128NUIntAsGeneric_Double() + { + bool succeeded = false; + + try + { + Vector128 result = default(Vector128).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector128NUIntAsGeneric_Double: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntAsGeneric_Int16.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntAsGeneric_Int16.cs new file mode 100644 index 00000000000000..ffad243abd08a2 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntAsGeneric_Int16.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector128NUIntAsGeneric_Int16() + { + bool succeeded = false; + + try + { + Vector128 result = default(Vector128).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector128NUIntAsGeneric_Int16: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntAsGeneric_Int32.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntAsGeneric_Int32.cs new file mode 100644 index 00000000000000..42be298f1b1e5f --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntAsGeneric_Int32.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector128NUIntAsGeneric_Int32() + { + bool succeeded = false; + + try + { + Vector128 result = default(Vector128).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector128NUIntAsGeneric_Int32: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntAsGeneric_Int64.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntAsGeneric_Int64.cs new file mode 100644 index 00000000000000..24f89e8e5c2c12 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntAsGeneric_Int64.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector128NUIntAsGeneric_Int64() + { + bool succeeded = false; + + try + { + Vector128 result = default(Vector128).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector128NUIntAsGeneric_Int64: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntAsGeneric_NUInt.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntAsGeneric_NUInt.cs new file mode 100644 index 00000000000000..a01ae8145371c0 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntAsGeneric_NUInt.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector128NUIntAsGeneric_NUInt() + { + bool succeeded = false; + + try + { + Vector128 result = default(Vector128).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector128NUIntAsGeneric_NUInt: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntAsGeneric_SByte.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntAsGeneric_SByte.cs new file mode 100644 index 00000000000000..484860a5ef3162 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntAsGeneric_SByte.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector128NUIntAsGeneric_SByte() + { + bool succeeded = false; + + try + { + Vector128 result = default(Vector128).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector128NUIntAsGeneric_SByte: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntAsGeneric_Single.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntAsGeneric_Single.cs new file mode 100644 index 00000000000000..274a01bfce4e63 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntAsGeneric_Single.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector128NUIntAsGeneric_Single() + { + bool succeeded = false; + + try + { + Vector128 result = default(Vector128).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector128NUIntAsGeneric_Single: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntAsGeneric_UInt16.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntAsGeneric_UInt16.cs new file mode 100644 index 00000000000000..ca7af202cd47f3 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntAsGeneric_UInt16.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector128NUIntAsGeneric_UInt16() + { + bool succeeded = false; + + try + { + Vector128 result = default(Vector128).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector128NUIntAsGeneric_UInt16: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntAsGeneric_UInt32.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntAsGeneric_UInt32.cs new file mode 100644 index 00000000000000..ccea450966fdd2 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntAsGeneric_UInt32.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector128NUIntAsGeneric_UInt32() + { + bool succeeded = false; + + try + { + Vector128 result = default(Vector128).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector128NUIntAsGeneric_UInt32: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntAsGeneric_UInt64.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntAsGeneric_UInt64.cs new file mode 100644 index 00000000000000..7eec173d1f753e --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntAsGeneric_UInt64.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector128NUIntAsGeneric_UInt64() + { + bool succeeded = false; + + try + { + Vector128 result = default(Vector128).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector128NUIntAsGeneric_UInt64: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntAsInt16.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntAsInt16.cs new file mode 100644 index 00000000000000..38e59d7d8cf65b --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntAsInt16.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector128NUIntAsInt16() + { + bool succeeded = false; + + try + { + Vector128 result = default(Vector128).AsInt16(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector128NUIntAsInt16: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntAsInt32.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntAsInt32.cs new file mode 100644 index 00000000000000..d874d4dd5169bb --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntAsInt32.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector128NUIntAsInt32() + { + bool succeeded = false; + + try + { + Vector128 result = default(Vector128).AsInt32(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector128NUIntAsInt32: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntAsInt64.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntAsInt64.cs new file mode 100644 index 00000000000000..0acb4b72be9597 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntAsInt64.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector128NUIntAsInt64() + { + bool succeeded = false; + + try + { + Vector128 result = default(Vector128).AsInt64(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector128NUIntAsInt64: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntAsSByte.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntAsSByte.cs new file mode 100644 index 00000000000000..18f7e31db07a5d --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntAsSByte.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector128NUIntAsSByte() + { + bool succeeded = false; + + try + { + Vector128 result = default(Vector128).AsSByte(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector128NUIntAsSByte: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntAsSingle.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntAsSingle.cs new file mode 100644 index 00000000000000..fb5efc494c75f4 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntAsSingle.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector128NUIntAsSingle() + { + bool succeeded = false; + + try + { + Vector128 result = default(Vector128).AsSingle(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector128NUIntAsSingle: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntAsUInt16.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntAsUInt16.cs new file mode 100644 index 00000000000000..5e6f4694d12e98 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntAsUInt16.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector128NUIntAsUInt16() + { + bool succeeded = false; + + try + { + Vector128 result = default(Vector128).AsUInt16(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector128NUIntAsUInt16: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntAsUInt32.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntAsUInt32.cs new file mode 100644 index 00000000000000..d11c045bead982 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntAsUInt32.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector128NUIntAsUInt32() + { + bool succeeded = false; + + try + { + Vector128 result = default(Vector128).AsUInt32(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector128NUIntAsUInt32: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntAsUInt64.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntAsUInt64.cs new file mode 100644 index 00000000000000..7bbaa3373c9226 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntAsUInt64.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector128NUIntAsUInt64() + { + bool succeeded = false; + + try + { + Vector128 result = default(Vector128).AsUInt64(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector128NUIntAsUInt64: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntGetElement0.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntGetElement0.cs new file mode 100644 index 00000000000000..86eb4b809b255e --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntGetElement0.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector128NUIntGetElement0() + { + bool succeeded = false; + + try + { + nuint result = default(Vector128).GetElement(0); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector128NUIntGetElement0: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntGetElementMaxValue.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntGetElementMaxValue.cs new file mode 100644 index 00000000000000..e162b71e79c51d --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntGetElementMaxValue.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector128NUIntGetElementMaxValue() + { + bool succeeded = false; + + try + { + nuint result = default(Vector128).GetElement(int.MaxValue); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector128NUIntGetElementMaxValue: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntGetElementNegativeOne.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntGetElementNegativeOne.cs new file mode 100644 index 00000000000000..96281ed629ccdf --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntGetElementNegativeOne.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector128NUIntGetElementNegativeOne() + { + bool succeeded = false; + + try + { + nuint result = default(Vector128).GetElement(-1); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector128NUIntGetElementNegativeOne: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntGetLower.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntGetLower.cs new file mode 100644 index 00000000000000..c9de4af82005d9 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntGetLower.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector128NUIntGetLower() + { + bool succeeded = false; + + try + { + Vector64 result = default(Vector128).GetLower(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector128NUIntGetLower: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntGetUpper.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntGetUpper.cs new file mode 100644 index 00000000000000..9f7e8aed6bb875 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntGetUpper.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector128NUIntGetUpper() + { + bool succeeded = false; + + try + { + Vector64 result = default(Vector128).GetUpper(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector128NUIntGetUpper: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntToScalar.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntToScalar.cs new file mode 100644 index 00000000000000..338e1708a890bb --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntToScalar.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector128NUIntToScalar() + { + bool succeeded = false; + + try + { + nuint result = default(Vector128).ToScalar(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector128NUIntToScalar: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntToString.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntToString.cs new file mode 100644 index 00000000000000..6e39f5d3ea8926 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntToString.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector128NUIntToString() + { + bool succeeded = false; + + try + { + string result = default(Vector128).ToString(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector128NUIntToString: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntToVector256.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntToVector256.cs new file mode 100644 index 00000000000000..71b3ae97d063cd --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntToVector256.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector128NUIntToVector256() + { + bool succeeded = false; + + try + { + Vector256 result = default(Vector128).ToVector256(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector128NUIntToVector256: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntToVector256Unsafe.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntToVector256Unsafe.cs new file mode 100644 index 00000000000000..90d068c860350b --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntToVector256Unsafe.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector128NUIntToVector256Unsafe() + { + bool succeeded = false; + + try + { + Vector256 result = default(Vector128).ToVector256Unsafe(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector128NUIntToVector256Unsafe: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntWithElement0.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntWithElement0.cs new file mode 100644 index 00000000000000..af3ea7d1879b6d --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntWithElement0.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector128NUIntWithElement0() + { + bool succeeded = false; + + try + { + Vector128 result = default(Vector128).WithElement(0, (nuint)0); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector128NUIntWithElement0: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntWithElementMaxValue.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntWithElementMaxValue.cs new file mode 100644 index 00000000000000..e003ddff222983 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntWithElementMaxValue.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector128NUIntWithElementMaxValue() + { + bool succeeded = false; + + try + { + Vector128 result = default(Vector128).WithElement(int.MaxValue, (nuint)0); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector128NUIntWithElementMaxValue: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntWithElementNegativeOne.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntWithElementNegativeOne.cs new file mode 100644 index 00000000000000..d2d2615a8b1826 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntWithElementNegativeOne.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector128NUIntWithElementNegativeOne() + { + bool succeeded = false; + + try + { + Vector128 result = default(Vector128).WithElement(-1, (nuint)0); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector128NUIntWithElementNegativeOne: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntWithLower.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntWithLower.cs new file mode 100644 index 00000000000000..0bd8c205be650f --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntWithLower.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector128NUIntWithLower() + { + bool succeeded = false; + + try + { + Vector128 result = default(Vector128).WithLower(default(Vector64)); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector128NUIntWithLower: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntWithUpper.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntWithUpper.cs new file mode 100644 index 00000000000000..6f82ad29890870 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntWithUpper.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector128NUIntWithUpper() + { + bool succeeded = false; + + try + { + Vector128 result = default(Vector128).WithUpper(default(Vector64)); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector128NUIntWithUpper: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntZero.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntZero.cs new file mode 100644 index 00000000000000..8774c22e655076 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128NUIntZero.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector128NUIntZero() + { + bool succeeded = false; + + try + { + Vector128 result = Vector128.Zero; + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector128NUIntZero: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128SByteAsGeneric_NInt.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128SByteAsGeneric_NInt.cs new file mode 100644 index 00000000000000..393d57b2b93316 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128SByteAsGeneric_NInt.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector128SByteAsGeneric_NInt() + { + bool succeeded = false; + + try + { + Vector128 result = default(Vector128).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector128SByteAsGeneric_NInt: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128SByteAsGeneric_NUInt.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128SByteAsGeneric_NUInt.cs new file mode 100644 index 00000000000000..63895e44bb644e --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128SByteAsGeneric_NUInt.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector128SByteAsGeneric_NUInt() + { + bool succeeded = false; + + try + { + Vector128 result = default(Vector128).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector128SByteAsGeneric_NUInt: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128SingleAsGeneric_NInt.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128SingleAsGeneric_NInt.cs new file mode 100644 index 00000000000000..cf7de036d60cb4 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128SingleAsGeneric_NInt.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector128SingleAsGeneric_NInt() + { + bool succeeded = false; + + try + { + Vector128 result = default(Vector128).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector128SingleAsGeneric_NInt: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128SingleAsGeneric_NUInt.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128SingleAsGeneric_NUInt.cs new file mode 100644 index 00000000000000..47637cda542448 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128SingleAsGeneric_NUInt.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector128SingleAsGeneric_NUInt() + { + bool succeeded = false; + + try + { + Vector128 result = default(Vector128).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector128SingleAsGeneric_NUInt: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128UInt16AsGeneric_NInt.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128UInt16AsGeneric_NInt.cs new file mode 100644 index 00000000000000..c9cc447d021a55 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128UInt16AsGeneric_NInt.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector128UInt16AsGeneric_NInt() + { + bool succeeded = false; + + try + { + Vector128 result = default(Vector128).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector128UInt16AsGeneric_NInt: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128UInt16AsGeneric_NUInt.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128UInt16AsGeneric_NUInt.cs new file mode 100644 index 00000000000000..fa39baa38c4478 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128UInt16AsGeneric_NUInt.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector128UInt16AsGeneric_NUInt() + { + bool succeeded = false; + + try + { + Vector128 result = default(Vector128).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector128UInt16AsGeneric_NUInt: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128UInt32AsGeneric_NInt.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128UInt32AsGeneric_NInt.cs new file mode 100644 index 00000000000000..68e4d8ef9e4092 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128UInt32AsGeneric_NInt.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector128UInt32AsGeneric_NInt() + { + bool succeeded = false; + + try + { + Vector128 result = default(Vector128).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector128UInt32AsGeneric_NInt: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128UInt32AsGeneric_NUInt.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128UInt32AsGeneric_NUInt.cs new file mode 100644 index 00000000000000..22644f04d7f66a --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128UInt32AsGeneric_NUInt.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector128UInt32AsGeneric_NUInt() + { + bool succeeded = false; + + try + { + Vector128 result = default(Vector128).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector128UInt32AsGeneric_NUInt: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128UInt64AsGeneric_NInt.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128UInt64AsGeneric_NInt.cs new file mode 100644 index 00000000000000..8b01b21bde78f2 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128UInt64AsGeneric_NInt.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector128UInt64AsGeneric_NInt() + { + bool succeeded = false; + + try + { + Vector128 result = default(Vector128).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector128UInt64AsGeneric_NInt: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128UInt64AsGeneric_NUInt.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128UInt64AsGeneric_NUInt.cs new file mode 100644 index 00000000000000..3f687b98b82b22 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector128UInt64AsGeneric_NUInt.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector128UInt64AsGeneric_NUInt() + { + bool succeeded = false; + + try + { + Vector128 result = default(Vector128).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector128UInt64AsGeneric_NUInt: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256AllBitsSet.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256BooleanAllBitsSet.cs similarity index 90% rename from src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256AllBitsSet.cs rename to src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256BooleanAllBitsSet.cs index 8fc13ac22272ee..57232bce44eb31 100644 --- a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256AllBitsSet.cs +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256BooleanAllBitsSet.cs @@ -17,7 +17,7 @@ namespace JIT.HardwareIntrinsics.General { public static partial class Program { - private static void Vector256AllBitsSet() + private static void Vector256BooleanAllBitsSet() { bool succeeded = false; @@ -32,7 +32,7 @@ private static void Vector256AllBitsSet() if (!succeeded) { - TestLibrary.TestFramework.LogInformation($"Vector256AllBitsSet: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation($"Vector256BooleanAllBitsSet: RunNotSupportedScenario failed to throw NotSupportedException."); TestLibrary.TestFramework.LogInformation(string.Empty); throw new Exception("One or more scenarios did not complete as expected."); diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256GetElementMaxValue.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256BooleanGetElement0.cs similarity index 91% rename from src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256GetElementMaxValue.cs rename to src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256BooleanGetElement0.cs index a94030fd51b6de..fd450dc24fc2f7 100644 --- a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256GetElementMaxValue.cs +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256BooleanGetElement0.cs @@ -17,13 +17,13 @@ namespace JIT.HardwareIntrinsics.General { public static partial class Program { - private static void Vector256GetElementMaxValue() + private static void Vector256BooleanGetElement0() { bool succeeded = false; try { - bool result = default(Vector256).GetElement(int.MaxValue); + bool result = default(Vector256).GetElement(0); } catch (NotSupportedException) { @@ -32,7 +32,7 @@ private static void Vector256GetElementMaxValue() if (!succeeded) { - TestLibrary.TestFramework.LogInformation($"Vector256GetElementMaxValue: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation($"Vector256BooleanGetElement0: RunNotSupportedScenario failed to throw NotSupportedException."); TestLibrary.TestFramework.LogInformation(string.Empty); throw new Exception("One or more scenarios did not complete as expected."); diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256GetElement0.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256BooleanGetElementMaxValue.cs similarity index 88% rename from src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256GetElement0.cs rename to src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256BooleanGetElementMaxValue.cs index ab69d2d994c80e..e0bff5c0402a86 100644 --- a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256GetElement0.cs +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256BooleanGetElementMaxValue.cs @@ -17,13 +17,13 @@ namespace JIT.HardwareIntrinsics.General { public static partial class Program { - private static void Vector256GetElement0() + private static void Vector256BooleanGetElementMaxValue() { bool succeeded = false; try { - bool result = default(Vector256).GetElement(0); + bool result = default(Vector256).GetElement(int.MaxValue); } catch (NotSupportedException) { @@ -32,7 +32,7 @@ private static void Vector256GetElement0() if (!succeeded) { - TestLibrary.TestFramework.LogInformation($"Vector256GetElement0: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation($"Vector256BooleanGetElementMaxValue: RunNotSupportedScenario failed to throw NotSupportedException."); TestLibrary.TestFramework.LogInformation(string.Empty); throw new Exception("One or more scenarios did not complete as expected."); diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256GetElementNegativeOne.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256BooleanGetElementNegativeOne.cs similarity index 89% rename from src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256GetElementNegativeOne.cs rename to src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256BooleanGetElementNegativeOne.cs index 35c9f220aaad15..d3974509c4c1f8 100644 --- a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256GetElementNegativeOne.cs +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256BooleanGetElementNegativeOne.cs @@ -17,7 +17,7 @@ namespace JIT.HardwareIntrinsics.General { public static partial class Program { - private static void Vector256GetElementNegativeOne() + private static void Vector256BooleanGetElementNegativeOne() { bool succeeded = false; @@ -32,7 +32,7 @@ private static void Vector256GetElementNegativeOne() if (!succeeded) { - TestLibrary.TestFramework.LogInformation($"Vector256GetElementNegativeOne: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation($"Vector256BooleanGetElementNegativeOne: RunNotSupportedScenario failed to throw NotSupportedException."); TestLibrary.TestFramework.LogInformation(string.Empty); throw new Exception("One or more scenarios did not complete as expected."); diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256GetLower.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256BooleanGetLower.cs similarity index 90% rename from src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256GetLower.cs rename to src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256BooleanGetLower.cs index 07af53b1e58029..58c547242a3e8d 100644 --- a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256GetLower.cs +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256BooleanGetLower.cs @@ -17,7 +17,7 @@ namespace JIT.HardwareIntrinsics.General { public static partial class Program { - private static void Vector256GetLower() + private static void Vector256BooleanGetLower() { bool succeeded = false; @@ -32,7 +32,7 @@ private static void Vector256GetLower() if (!succeeded) { - TestLibrary.TestFramework.LogInformation($"Vector256GetLower: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation($"Vector256BooleanGetLower: RunNotSupportedScenario failed to throw NotSupportedException."); TestLibrary.TestFramework.LogInformation(string.Empty); throw new Exception("One or more scenarios did not complete as expected."); diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256GetUpper.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256BooleanGetUpper.cs similarity index 90% rename from src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256GetUpper.cs rename to src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256BooleanGetUpper.cs index f7aa6168393ff5..cb1d9105616688 100644 --- a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256GetUpper.cs +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256BooleanGetUpper.cs @@ -17,7 +17,7 @@ namespace JIT.HardwareIntrinsics.General { public static partial class Program { - private static void Vector256GetUpper() + private static void Vector256BooleanGetUpper() { bool succeeded = false; @@ -32,7 +32,7 @@ private static void Vector256GetUpper() if (!succeeded) { - TestLibrary.TestFramework.LogInformation($"Vector256GetUpper: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation($"Vector256BooleanGetUpper: RunNotSupportedScenario failed to throw NotSupportedException."); TestLibrary.TestFramework.LogInformation(string.Empty); throw new Exception("One or more scenarios did not complete as expected."); diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256ToScalar.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256BooleanToScalar.cs similarity index 90% rename from src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256ToScalar.cs rename to src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256BooleanToScalar.cs index 73024c08f11a6d..9b6fb978c3c0ce 100644 --- a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256ToScalar.cs +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256BooleanToScalar.cs @@ -17,7 +17,7 @@ namespace JIT.HardwareIntrinsics.General { public static partial class Program { - private static void Vector256ToScalar() + private static void Vector256BooleanToScalar() { bool succeeded = false; @@ -32,7 +32,7 @@ private static void Vector256ToScalar() if (!succeeded) { - TestLibrary.TestFramework.LogInformation($"Vector256ToScalar: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation($"Vector256BooleanToScalar: RunNotSupportedScenario failed to throw NotSupportedException."); TestLibrary.TestFramework.LogInformation(string.Empty); throw new Exception("One or more scenarios did not complete as expected."); diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256ToString.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256BooleanToString.cs similarity index 90% rename from src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256ToString.cs rename to src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256BooleanToString.cs index 44370bcd92628a..f21f0cc54208a2 100644 --- a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256ToString.cs +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256BooleanToString.cs @@ -17,7 +17,7 @@ namespace JIT.HardwareIntrinsics.General { public static partial class Program { - private static void Vector256ToString() + private static void Vector256BooleanToString() { bool succeeded = false; @@ -32,7 +32,7 @@ private static void Vector256ToString() if (!succeeded) { - TestLibrary.TestFramework.LogInformation($"Vector256ToString: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation($"Vector256BooleanToString: RunNotSupportedScenario failed to throw NotSupportedException."); TestLibrary.TestFramework.LogInformation(string.Empty); throw new Exception("One or more scenarios did not complete as expected."); diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256WithElement0.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256BooleanWithElement0.cs similarity index 90% rename from src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256WithElement0.cs rename to src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256BooleanWithElement0.cs index 40cafb3d883288..1ee073038cc78e 100644 --- a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256WithElement0.cs +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256BooleanWithElement0.cs @@ -17,7 +17,7 @@ namespace JIT.HardwareIntrinsics.General { public static partial class Program { - private static void Vector256WithElement0() + private static void Vector256BooleanWithElement0() { bool succeeded = false; @@ -32,7 +32,7 @@ private static void Vector256WithElement0() if (!succeeded) { - TestLibrary.TestFramework.LogInformation($"Vector256WithElement0: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation($"Vector256BooleanWithElement0: RunNotSupportedScenario failed to throw NotSupportedException."); TestLibrary.TestFramework.LogInformation(string.Empty); throw new Exception("One or more scenarios did not complete as expected."); diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256WithElementMaxValue.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256BooleanWithElementMaxValue.cs similarity index 89% rename from src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256WithElementMaxValue.cs rename to src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256BooleanWithElementMaxValue.cs index fa84acdf66e72e..46dbdc3cfee27d 100644 --- a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256WithElementMaxValue.cs +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256BooleanWithElementMaxValue.cs @@ -17,7 +17,7 @@ namespace JIT.HardwareIntrinsics.General { public static partial class Program { - private static void Vector256WithElementMaxValue() + private static void Vector256BooleanWithElementMaxValue() { bool succeeded = false; @@ -32,7 +32,7 @@ private static void Vector256WithElementMaxValue() if (!succeeded) { - TestLibrary.TestFramework.LogInformation($"Vector256WithElementMaxValue: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation($"Vector256BooleanWithElementMaxValue: RunNotSupportedScenario failed to throw NotSupportedException."); TestLibrary.TestFramework.LogInformation(string.Empty); throw new Exception("One or more scenarios did not complete as expected."); diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256WithElementNegativeOne.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256BooleanWithElementNegativeOne.cs similarity index 89% rename from src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256WithElementNegativeOne.cs rename to src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256BooleanWithElementNegativeOne.cs index 43af294a2458ad..11e91b38ae1389 100644 --- a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256WithElementNegativeOne.cs +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256BooleanWithElementNegativeOne.cs @@ -17,7 +17,7 @@ namespace JIT.HardwareIntrinsics.General { public static partial class Program { - private static void Vector256WithElementNegativeOne() + private static void Vector256BooleanWithElementNegativeOne() { bool succeeded = false; @@ -32,7 +32,7 @@ private static void Vector256WithElementNegativeOne() if (!succeeded) { - TestLibrary.TestFramework.LogInformation($"Vector256WithElementNegativeOne: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation($"Vector256BooleanWithElementNegativeOne: RunNotSupportedScenario failed to throw NotSupportedException."); TestLibrary.TestFramework.LogInformation(string.Empty); throw new Exception("One or more scenarios did not complete as expected."); diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256WithLower.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256BooleanWithLower.cs similarity index 90% rename from src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256WithLower.cs rename to src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256BooleanWithLower.cs index 2410775db565a1..3a9c48d9ce3c9a 100644 --- a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256WithLower.cs +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256BooleanWithLower.cs @@ -17,7 +17,7 @@ namespace JIT.HardwareIntrinsics.General { public static partial class Program { - private static void Vector256WithLower() + private static void Vector256BooleanWithLower() { bool succeeded = false; @@ -32,7 +32,7 @@ private static void Vector256WithLower() if (!succeeded) { - TestLibrary.TestFramework.LogInformation($"Vector256WithLower: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation($"Vector256BooleanWithLower: RunNotSupportedScenario failed to throw NotSupportedException."); TestLibrary.TestFramework.LogInformation(string.Empty); throw new Exception("One or more scenarios did not complete as expected."); diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256WithUpper.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256BooleanWithUpper.cs similarity index 90% rename from src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256WithUpper.cs rename to src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256BooleanWithUpper.cs index 715a5a9fcca353..4292396806edd2 100644 --- a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256WithUpper.cs +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256BooleanWithUpper.cs @@ -17,7 +17,7 @@ namespace JIT.HardwareIntrinsics.General { public static partial class Program { - private static void Vector256WithUpper() + private static void Vector256BooleanWithUpper() { bool succeeded = false; @@ -32,7 +32,7 @@ private static void Vector256WithUpper() if (!succeeded) { - TestLibrary.TestFramework.LogInformation($"Vector256WithUpper: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation($"Vector256BooleanWithUpper: RunNotSupportedScenario failed to throw NotSupportedException."); TestLibrary.TestFramework.LogInformation(string.Empty); throw new Exception("One or more scenarios did not complete as expected."); diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256Zero.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256BooleanZero.cs similarity index 91% rename from src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256Zero.cs rename to src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256BooleanZero.cs index f645f27388b946..250e38e64a53ae 100644 --- a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256Zero.cs +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256BooleanZero.cs @@ -17,7 +17,7 @@ namespace JIT.HardwareIntrinsics.General { public static partial class Program { - private static void Vector256Zero() + private static void Vector256BooleanZero() { bool succeeded = false; @@ -32,7 +32,7 @@ private static void Vector256Zero() if (!succeeded) { - TestLibrary.TestFramework.LogInformation($"Vector256Zero: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation($"Vector256BooleanZero: RunNotSupportedScenario failed to throw NotSupportedException."); TestLibrary.TestFramework.LogInformation(string.Empty); throw new Exception("One or more scenarios did not complete as expected."); diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256ByteAsGeneric_NInt.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256ByteAsGeneric_NInt.cs new file mode 100644 index 00000000000000..2e6c47e4cb812f --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256ByteAsGeneric_NInt.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector256ByteAsGeneric_NInt() + { + bool succeeded = false; + + try + { + Vector256 result = default(Vector256).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector256ByteAsGeneric_NInt: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256ByteAsGeneric_NUInt.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256ByteAsGeneric_NUInt.cs new file mode 100644 index 00000000000000..6f2448ba422c86 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256ByteAsGeneric_NUInt.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector256ByteAsGeneric_NUInt() + { + bool succeeded = false; + + try + { + Vector256 result = default(Vector256).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector256ByteAsGeneric_NUInt: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256DoubleAsGeneric_NInt.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256DoubleAsGeneric_NInt.cs new file mode 100644 index 00000000000000..5f6958ada6e862 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256DoubleAsGeneric_NInt.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector256DoubleAsGeneric_NInt() + { + bool succeeded = false; + + try + { + Vector256 result = default(Vector256).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector256DoubleAsGeneric_NInt: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256DoubleAsGeneric_NUInt.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256DoubleAsGeneric_NUInt.cs new file mode 100644 index 00000000000000..936898648d5779 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256DoubleAsGeneric_NUInt.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector256DoubleAsGeneric_NUInt() + { + bool succeeded = false; + + try + { + Vector256 result = default(Vector256).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector256DoubleAsGeneric_NUInt: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256Int16AsGeneric_NInt.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256Int16AsGeneric_NInt.cs new file mode 100644 index 00000000000000..90a2e52341af6b --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256Int16AsGeneric_NInt.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector256Int16AsGeneric_NInt() + { + bool succeeded = false; + + try + { + Vector256 result = default(Vector256).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector256Int16AsGeneric_NInt: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256Int16AsGeneric_NUInt.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256Int16AsGeneric_NUInt.cs new file mode 100644 index 00000000000000..18f288ed3b4423 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256Int16AsGeneric_NUInt.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector256Int16AsGeneric_NUInt() + { + bool succeeded = false; + + try + { + Vector256 result = default(Vector256).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector256Int16AsGeneric_NUInt: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256Int32AsGeneric_NInt.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256Int32AsGeneric_NInt.cs new file mode 100644 index 00000000000000..7c03d61cdc7afa --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256Int32AsGeneric_NInt.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector256Int32AsGeneric_NInt() + { + bool succeeded = false; + + try + { + Vector256 result = default(Vector256).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector256Int32AsGeneric_NInt: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256Int32AsGeneric_NUInt.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256Int32AsGeneric_NUInt.cs new file mode 100644 index 00000000000000..3e586b608594d9 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256Int32AsGeneric_NUInt.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector256Int32AsGeneric_NUInt() + { + bool succeeded = false; + + try + { + Vector256 result = default(Vector256).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector256Int32AsGeneric_NUInt: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256Int64AsGeneric_NInt.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256Int64AsGeneric_NInt.cs new file mode 100644 index 00000000000000..8dafbcf63f6760 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256Int64AsGeneric_NInt.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector256Int64AsGeneric_NInt() + { + bool succeeded = false; + + try + { + Vector256 result = default(Vector256).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector256Int64AsGeneric_NInt: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256Int64AsGeneric_NUInt.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256Int64AsGeneric_NUInt.cs new file mode 100644 index 00000000000000..5c7093ad827f63 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256Int64AsGeneric_NUInt.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector256Int64AsGeneric_NUInt() + { + bool succeeded = false; + + try + { + Vector256 result = default(Vector256).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector256Int64AsGeneric_NUInt: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntAllBitsSet.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntAllBitsSet.cs new file mode 100644 index 00000000000000..4c2258adc4d29a --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntAllBitsSet.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector256NIntAllBitsSet() + { + bool succeeded = false; + + try + { + Vector256 result = Vector256.AllBitsSet; + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector256NIntAllBitsSet: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntAsByte.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntAsByte.cs new file mode 100644 index 00000000000000..bf3634888444b9 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntAsByte.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector256NIntAsByte() + { + bool succeeded = false; + + try + { + Vector256 result = default(Vector256).AsByte(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector256NIntAsByte: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntAsDouble.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntAsDouble.cs new file mode 100644 index 00000000000000..96049376c8bf5f --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntAsDouble.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector256NIntAsDouble() + { + bool succeeded = false; + + try + { + Vector256 result = default(Vector256).AsDouble(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector256NIntAsDouble: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntAsGeneric_Byte.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntAsGeneric_Byte.cs new file mode 100644 index 00000000000000..24e257bcb861a0 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntAsGeneric_Byte.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector256NIntAsGeneric_Byte() + { + bool succeeded = false; + + try + { + Vector256 result = default(Vector256).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector256NIntAsGeneric_Byte: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntAsGeneric_Double.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntAsGeneric_Double.cs new file mode 100644 index 00000000000000..9b3731ac165c72 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntAsGeneric_Double.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector256NIntAsGeneric_Double() + { + bool succeeded = false; + + try + { + Vector256 result = default(Vector256).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector256NIntAsGeneric_Double: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntAsGeneric_Int16.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntAsGeneric_Int16.cs new file mode 100644 index 00000000000000..da3d854ee7b041 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntAsGeneric_Int16.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector256NIntAsGeneric_Int16() + { + bool succeeded = false; + + try + { + Vector256 result = default(Vector256).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector256NIntAsGeneric_Int16: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntAsGeneric_Int32.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntAsGeneric_Int32.cs new file mode 100644 index 00000000000000..ea5815061e3fd3 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntAsGeneric_Int32.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector256NIntAsGeneric_Int32() + { + bool succeeded = false; + + try + { + Vector256 result = default(Vector256).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector256NIntAsGeneric_Int32: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntAsGeneric_Int64.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntAsGeneric_Int64.cs new file mode 100644 index 00000000000000..22a4d72ddb720e --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntAsGeneric_Int64.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector256NIntAsGeneric_Int64() + { + bool succeeded = false; + + try + { + Vector256 result = default(Vector256).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector256NIntAsGeneric_Int64: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntAsGeneric_NInt.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntAsGeneric_NInt.cs new file mode 100644 index 00000000000000..58be0c76f381e0 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntAsGeneric_NInt.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector256NIntAsGeneric_NInt() + { + bool succeeded = false; + + try + { + Vector256 result = default(Vector256).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector256NIntAsGeneric_NInt: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntAsGeneric_SByte.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntAsGeneric_SByte.cs new file mode 100644 index 00000000000000..7812f4e83d6672 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntAsGeneric_SByte.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector256NIntAsGeneric_SByte() + { + bool succeeded = false; + + try + { + Vector256 result = default(Vector256).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector256NIntAsGeneric_SByte: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntAsGeneric_Single.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntAsGeneric_Single.cs new file mode 100644 index 00000000000000..538cc535be5b13 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntAsGeneric_Single.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector256NIntAsGeneric_Single() + { + bool succeeded = false; + + try + { + Vector256 result = default(Vector256).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector256NIntAsGeneric_Single: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntAsGeneric_UInt16.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntAsGeneric_UInt16.cs new file mode 100644 index 00000000000000..f67dd7e5040bb4 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntAsGeneric_UInt16.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector256NIntAsGeneric_UInt16() + { + bool succeeded = false; + + try + { + Vector256 result = default(Vector256).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector256NIntAsGeneric_UInt16: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntAsGeneric_UInt32.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntAsGeneric_UInt32.cs new file mode 100644 index 00000000000000..bd4c4870021519 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntAsGeneric_UInt32.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector256NIntAsGeneric_UInt32() + { + bool succeeded = false; + + try + { + Vector256 result = default(Vector256).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector256NIntAsGeneric_UInt32: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntAsGeneric_UInt64.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntAsGeneric_UInt64.cs new file mode 100644 index 00000000000000..73667ac9d59081 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntAsGeneric_UInt64.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector256NIntAsGeneric_UInt64() + { + bool succeeded = false; + + try + { + Vector256 result = default(Vector256).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector256NIntAsGeneric_UInt64: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntAsInt16.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntAsInt16.cs new file mode 100644 index 00000000000000..b3bfca55722b4e --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntAsInt16.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector256NIntAsInt16() + { + bool succeeded = false; + + try + { + Vector256 result = default(Vector256).AsInt16(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector256NIntAsInt16: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntAsInt32.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntAsInt32.cs new file mode 100644 index 00000000000000..ad18f8b64c1ba4 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntAsInt32.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector256NIntAsInt32() + { + bool succeeded = false; + + try + { + Vector256 result = default(Vector256).AsInt32(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector256NIntAsInt32: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntAsInt64.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntAsInt64.cs new file mode 100644 index 00000000000000..bb1caa6457d490 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntAsInt64.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector256NIntAsInt64() + { + bool succeeded = false; + + try + { + Vector256 result = default(Vector256).AsInt64(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector256NIntAsInt64: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntAsSByte.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntAsSByte.cs new file mode 100644 index 00000000000000..9ebd47bc09b351 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntAsSByte.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector256NIntAsSByte() + { + bool succeeded = false; + + try + { + Vector256 result = default(Vector256).AsSByte(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector256NIntAsSByte: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntAsSingle.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntAsSingle.cs new file mode 100644 index 00000000000000..91e0255e7575b4 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntAsSingle.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector256NIntAsSingle() + { + bool succeeded = false; + + try + { + Vector256 result = default(Vector256).AsSingle(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector256NIntAsSingle: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntAsUInt16.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntAsUInt16.cs new file mode 100644 index 00000000000000..0d97c74f3fc023 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntAsUInt16.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector256NIntAsUInt16() + { + bool succeeded = false; + + try + { + Vector256 result = default(Vector256).AsUInt16(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector256NIntAsUInt16: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntAsUInt32.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntAsUInt32.cs new file mode 100644 index 00000000000000..78100732a78a78 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntAsUInt32.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector256NIntAsUInt32() + { + bool succeeded = false; + + try + { + Vector256 result = default(Vector256).AsUInt32(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector256NIntAsUInt32: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntAsUInt64.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntAsUInt64.cs new file mode 100644 index 00000000000000..6fc48f0b53be7f --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntAsUInt64.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector256NIntAsUInt64() + { + bool succeeded = false; + + try + { + Vector256 result = default(Vector256).AsUInt64(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector256NIntAsUInt64: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntGetElement0.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntGetElement0.cs new file mode 100644 index 00000000000000..65ba88e2c2c44f --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntGetElement0.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector256NIntGetElement0() + { + bool succeeded = false; + + try + { + nint result = default(Vector256).GetElement(0); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector256NIntGetElement0: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntGetElementMaxValue.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntGetElementMaxValue.cs new file mode 100644 index 00000000000000..41364ff884e4a6 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntGetElementMaxValue.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector256NIntGetElementMaxValue() + { + bool succeeded = false; + + try + { + nint result = default(Vector256).GetElement(int.MaxValue); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector256NIntGetElementMaxValue: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntGetElementNegativeOne.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntGetElementNegativeOne.cs new file mode 100644 index 00000000000000..f95229cf4f5c94 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntGetElementNegativeOne.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector256NIntGetElementNegativeOne() + { + bool succeeded = false; + + try + { + nint result = default(Vector256).GetElement(-1); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector256NIntGetElementNegativeOne: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntGetLower.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntGetLower.cs new file mode 100644 index 00000000000000..db105b30523dfd --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntGetLower.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector256NIntGetLower() + { + bool succeeded = false; + + try + { + Vector128 result = default(Vector256).GetLower(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector256NIntGetLower: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntGetUpper.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntGetUpper.cs new file mode 100644 index 00000000000000..8d9b59b3b2fbf2 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntGetUpper.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector256NIntGetUpper() + { + bool succeeded = false; + + try + { + Vector128 result = default(Vector256).GetUpper(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector256NIntGetUpper: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntToScalar.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntToScalar.cs new file mode 100644 index 00000000000000..af2fd8db63d7c7 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntToScalar.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector256NIntToScalar() + { + bool succeeded = false; + + try + { + nint result = default(Vector256).ToScalar(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector256NIntToScalar: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntToString.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntToString.cs new file mode 100644 index 00000000000000..ff52e34ed88d3a --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntToString.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector256NIntToString() + { + bool succeeded = false; + + try + { + string result = default(Vector256).ToString(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector256NIntToString: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntWithElement0.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntWithElement0.cs new file mode 100644 index 00000000000000..c40de0b042b14c --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntWithElement0.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector256NIntWithElement0() + { + bool succeeded = false; + + try + { + Vector256 result = default(Vector256).WithElement(0, (nint)0); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector256NIntWithElement0: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntWithElementMaxValue.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntWithElementMaxValue.cs new file mode 100644 index 00000000000000..17cda97ed53924 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntWithElementMaxValue.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector256NIntWithElementMaxValue() + { + bool succeeded = false; + + try + { + Vector256 result = default(Vector256).WithElement(int.MaxValue, (nint)0); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector256NIntWithElementMaxValue: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntWithElementNegativeOne.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntWithElementNegativeOne.cs new file mode 100644 index 00000000000000..6185cbc051f3d0 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntWithElementNegativeOne.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector256NIntWithElementNegativeOne() + { + bool succeeded = false; + + try + { + Vector256 result = default(Vector256).WithElement(-1, (nint)0); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector256NIntWithElementNegativeOne: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntWithLower.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntWithLower.cs new file mode 100644 index 00000000000000..c12d7db111d58a --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntWithLower.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector256NIntWithLower() + { + bool succeeded = false; + + try + { + Vector256 result = default(Vector256).WithLower(default(Vector128)); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector256NIntWithLower: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntWithUpper.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntWithUpper.cs new file mode 100644 index 00000000000000..6eed94fc0cf9a5 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntWithUpper.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector256NIntWithUpper() + { + bool succeeded = false; + + try + { + Vector256 result = default(Vector256).WithUpper(default(Vector128)); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector256NIntWithUpper: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntZero.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntZero.cs new file mode 100644 index 00000000000000..0d52064f659d05 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NIntZero.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector256NIntZero() + { + bool succeeded = false; + + try + { + Vector256 result = Vector256.Zero; + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector256NIntZero: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntAllBitsSet.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntAllBitsSet.cs new file mode 100644 index 00000000000000..d8c27873b087f2 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntAllBitsSet.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector256NUIntAllBitsSet() + { + bool succeeded = false; + + try + { + Vector256 result = Vector256.AllBitsSet; + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector256NUIntAllBitsSet: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntAsByte.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntAsByte.cs new file mode 100644 index 00000000000000..08fa5790c48500 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntAsByte.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector256NUIntAsByte() + { + bool succeeded = false; + + try + { + Vector256 result = default(Vector256).AsByte(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector256NUIntAsByte: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntAsDouble.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntAsDouble.cs new file mode 100644 index 00000000000000..e0ca300be09933 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntAsDouble.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector256NUIntAsDouble() + { + bool succeeded = false; + + try + { + Vector256 result = default(Vector256).AsDouble(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector256NUIntAsDouble: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntAsGeneric_Byte.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntAsGeneric_Byte.cs new file mode 100644 index 00000000000000..c7bcbdf46fbc37 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntAsGeneric_Byte.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector256NUIntAsGeneric_Byte() + { + bool succeeded = false; + + try + { + Vector256 result = default(Vector256).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector256NUIntAsGeneric_Byte: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntAsGeneric_Double.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntAsGeneric_Double.cs new file mode 100644 index 00000000000000..ada85560c6f501 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntAsGeneric_Double.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector256NUIntAsGeneric_Double() + { + bool succeeded = false; + + try + { + Vector256 result = default(Vector256).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector256NUIntAsGeneric_Double: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntAsGeneric_Int16.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntAsGeneric_Int16.cs new file mode 100644 index 00000000000000..5e41d0083f5a4f --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntAsGeneric_Int16.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector256NUIntAsGeneric_Int16() + { + bool succeeded = false; + + try + { + Vector256 result = default(Vector256).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector256NUIntAsGeneric_Int16: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntAsGeneric_Int32.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntAsGeneric_Int32.cs new file mode 100644 index 00000000000000..4d12503d4e13fe --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntAsGeneric_Int32.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector256NUIntAsGeneric_Int32() + { + bool succeeded = false; + + try + { + Vector256 result = default(Vector256).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector256NUIntAsGeneric_Int32: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntAsGeneric_Int64.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntAsGeneric_Int64.cs new file mode 100644 index 00000000000000..9e6e659f6fe7ad --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntAsGeneric_Int64.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector256NUIntAsGeneric_Int64() + { + bool succeeded = false; + + try + { + Vector256 result = default(Vector256).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector256NUIntAsGeneric_Int64: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntAsGeneric_NUInt.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntAsGeneric_NUInt.cs new file mode 100644 index 00000000000000..f40f081499906d --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntAsGeneric_NUInt.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector256NUIntAsGeneric_NUInt() + { + bool succeeded = false; + + try + { + Vector256 result = default(Vector256).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector256NUIntAsGeneric_NUInt: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntAsGeneric_SByte.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntAsGeneric_SByte.cs new file mode 100644 index 00000000000000..1450c5764591b4 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntAsGeneric_SByte.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector256NUIntAsGeneric_SByte() + { + bool succeeded = false; + + try + { + Vector256 result = default(Vector256).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector256NUIntAsGeneric_SByte: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntAsGeneric_Single.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntAsGeneric_Single.cs new file mode 100644 index 00000000000000..b8d2484581988b --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntAsGeneric_Single.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector256NUIntAsGeneric_Single() + { + bool succeeded = false; + + try + { + Vector256 result = default(Vector256).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector256NUIntAsGeneric_Single: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntAsGeneric_UInt16.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntAsGeneric_UInt16.cs new file mode 100644 index 00000000000000..8675c6012c7a52 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntAsGeneric_UInt16.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector256NUIntAsGeneric_UInt16() + { + bool succeeded = false; + + try + { + Vector256 result = default(Vector256).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector256NUIntAsGeneric_UInt16: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntAsGeneric_UInt32.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntAsGeneric_UInt32.cs new file mode 100644 index 00000000000000..4c24284b310096 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntAsGeneric_UInt32.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector256NUIntAsGeneric_UInt32() + { + bool succeeded = false; + + try + { + Vector256 result = default(Vector256).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector256NUIntAsGeneric_UInt32: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntAsGeneric_UInt64.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntAsGeneric_UInt64.cs new file mode 100644 index 00000000000000..f6057ed15f9d06 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntAsGeneric_UInt64.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector256NUIntAsGeneric_UInt64() + { + bool succeeded = false; + + try + { + Vector256 result = default(Vector256).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector256NUIntAsGeneric_UInt64: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntAsInt16.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntAsInt16.cs new file mode 100644 index 00000000000000..fab66a3f86f296 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntAsInt16.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector256NUIntAsInt16() + { + bool succeeded = false; + + try + { + Vector256 result = default(Vector256).AsInt16(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector256NUIntAsInt16: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntAsInt32.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntAsInt32.cs new file mode 100644 index 00000000000000..26782a2449b439 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntAsInt32.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector256NUIntAsInt32() + { + bool succeeded = false; + + try + { + Vector256 result = default(Vector256).AsInt32(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector256NUIntAsInt32: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntAsInt64.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntAsInt64.cs new file mode 100644 index 00000000000000..171363e33054e5 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntAsInt64.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector256NUIntAsInt64() + { + bool succeeded = false; + + try + { + Vector256 result = default(Vector256).AsInt64(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector256NUIntAsInt64: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntAsSByte.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntAsSByte.cs new file mode 100644 index 00000000000000..d39402a3348906 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntAsSByte.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector256NUIntAsSByte() + { + bool succeeded = false; + + try + { + Vector256 result = default(Vector256).AsSByte(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector256NUIntAsSByte: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntAsSingle.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntAsSingle.cs new file mode 100644 index 00000000000000..9dfdaf9b9b417b --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntAsSingle.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector256NUIntAsSingle() + { + bool succeeded = false; + + try + { + Vector256 result = default(Vector256).AsSingle(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector256NUIntAsSingle: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntAsUInt16.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntAsUInt16.cs new file mode 100644 index 00000000000000..2d085a2b23323d --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntAsUInt16.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector256NUIntAsUInt16() + { + bool succeeded = false; + + try + { + Vector256 result = default(Vector256).AsUInt16(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector256NUIntAsUInt16: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntAsUInt32.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntAsUInt32.cs new file mode 100644 index 00000000000000..f392f946e36a67 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntAsUInt32.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector256NUIntAsUInt32() + { + bool succeeded = false; + + try + { + Vector256 result = default(Vector256).AsUInt32(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector256NUIntAsUInt32: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntAsUInt64.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntAsUInt64.cs new file mode 100644 index 00000000000000..3c35240ba9e51b --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntAsUInt64.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector256NUIntAsUInt64() + { + bool succeeded = false; + + try + { + Vector256 result = default(Vector256).AsUInt64(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector256NUIntAsUInt64: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntGetElement0.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntGetElement0.cs new file mode 100644 index 00000000000000..5299c4c7372cb4 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntGetElement0.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector256NUIntGetElement0() + { + bool succeeded = false; + + try + { + nuint result = default(Vector256).GetElement(0); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector256NUIntGetElement0: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntGetElementMaxValue.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntGetElementMaxValue.cs new file mode 100644 index 00000000000000..4a9cc8cb80032f --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntGetElementMaxValue.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector256NUIntGetElementMaxValue() + { + bool succeeded = false; + + try + { + nuint result = default(Vector256).GetElement(int.MaxValue); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector256NUIntGetElementMaxValue: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntGetElementNegativeOne.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntGetElementNegativeOne.cs new file mode 100644 index 00000000000000..5bce2c7dee2c65 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntGetElementNegativeOne.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector256NUIntGetElementNegativeOne() + { + bool succeeded = false; + + try + { + nuint result = default(Vector256).GetElement(-1); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector256NUIntGetElementNegativeOne: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntGetLower.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntGetLower.cs new file mode 100644 index 00000000000000..6c040c41b49443 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntGetLower.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector256NUIntGetLower() + { + bool succeeded = false; + + try + { + Vector128 result = default(Vector256).GetLower(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector256NUIntGetLower: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntGetUpper.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntGetUpper.cs new file mode 100644 index 00000000000000..d39a9794685e52 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntGetUpper.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector256NUIntGetUpper() + { + bool succeeded = false; + + try + { + Vector128 result = default(Vector256).GetUpper(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector256NUIntGetUpper: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntToScalar.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntToScalar.cs new file mode 100644 index 00000000000000..859a633b11db53 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntToScalar.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector256NUIntToScalar() + { + bool succeeded = false; + + try + { + nuint result = default(Vector256).ToScalar(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector256NUIntToScalar: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntToString.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntToString.cs new file mode 100644 index 00000000000000..33c3d79df0bdb3 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntToString.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector256NUIntToString() + { + bool succeeded = false; + + try + { + string result = default(Vector256).ToString(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector256NUIntToString: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntWithElement0.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntWithElement0.cs new file mode 100644 index 00000000000000..33902ca350f716 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntWithElement0.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector256NUIntWithElement0() + { + bool succeeded = false; + + try + { + Vector256 result = default(Vector256).WithElement(0, (nuint)0); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector256NUIntWithElement0: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntWithElementMaxValue.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntWithElementMaxValue.cs new file mode 100644 index 00000000000000..9100c10f115576 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntWithElementMaxValue.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector256NUIntWithElementMaxValue() + { + bool succeeded = false; + + try + { + Vector256 result = default(Vector256).WithElement(int.MaxValue, (nuint)0); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector256NUIntWithElementMaxValue: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntWithElementNegativeOne.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntWithElementNegativeOne.cs new file mode 100644 index 00000000000000..67fe1c4fc4218e --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntWithElementNegativeOne.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector256NUIntWithElementNegativeOne() + { + bool succeeded = false; + + try + { + Vector256 result = default(Vector256).WithElement(-1, (nuint)0); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector256NUIntWithElementNegativeOne: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntWithLower.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntWithLower.cs new file mode 100644 index 00000000000000..470dee4e18011e --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntWithLower.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector256NUIntWithLower() + { + bool succeeded = false; + + try + { + Vector256 result = default(Vector256).WithLower(default(Vector128)); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector256NUIntWithLower: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntWithUpper.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntWithUpper.cs new file mode 100644 index 00000000000000..bbd1f81f081e73 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntWithUpper.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector256NUIntWithUpper() + { + bool succeeded = false; + + try + { + Vector256 result = default(Vector256).WithUpper(default(Vector128)); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector256NUIntWithUpper: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntZero.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntZero.cs new file mode 100644 index 00000000000000..6584720676eb9d --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256NUIntZero.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector256NUIntZero() + { + bool succeeded = false; + + try + { + Vector256 result = Vector256.Zero; + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector256NUIntZero: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256SByteAsGeneric_NInt.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256SByteAsGeneric_NInt.cs new file mode 100644 index 00000000000000..a4dd35e13d0fc2 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256SByteAsGeneric_NInt.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector256SByteAsGeneric_NInt() + { + bool succeeded = false; + + try + { + Vector256 result = default(Vector256).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector256SByteAsGeneric_NInt: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256SByteAsGeneric_NUInt.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256SByteAsGeneric_NUInt.cs new file mode 100644 index 00000000000000..0bdbf5dd1e7a56 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256SByteAsGeneric_NUInt.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector256SByteAsGeneric_NUInt() + { + bool succeeded = false; + + try + { + Vector256 result = default(Vector256).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector256SByteAsGeneric_NUInt: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256SingleAsGeneric_NInt.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256SingleAsGeneric_NInt.cs new file mode 100644 index 00000000000000..67452b78d6e2c7 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256SingleAsGeneric_NInt.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector256SingleAsGeneric_NInt() + { + bool succeeded = false; + + try + { + Vector256 result = default(Vector256).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector256SingleAsGeneric_NInt: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256SingleAsGeneric_NUInt.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256SingleAsGeneric_NUInt.cs new file mode 100644 index 00000000000000..c8465a57f834db --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256SingleAsGeneric_NUInt.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector256SingleAsGeneric_NUInt() + { + bool succeeded = false; + + try + { + Vector256 result = default(Vector256).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector256SingleAsGeneric_NUInt: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256UInt16AsGeneric_NInt.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256UInt16AsGeneric_NInt.cs new file mode 100644 index 00000000000000..fb349f47904c7c --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256UInt16AsGeneric_NInt.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector256UInt16AsGeneric_NInt() + { + bool succeeded = false; + + try + { + Vector256 result = default(Vector256).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector256UInt16AsGeneric_NInt: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256UInt16AsGeneric_NUInt.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256UInt16AsGeneric_NUInt.cs new file mode 100644 index 00000000000000..f9a723c1e51a41 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256UInt16AsGeneric_NUInt.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector256UInt16AsGeneric_NUInt() + { + bool succeeded = false; + + try + { + Vector256 result = default(Vector256).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector256UInt16AsGeneric_NUInt: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256UInt32AsGeneric_NInt.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256UInt32AsGeneric_NInt.cs new file mode 100644 index 00000000000000..0e81d994bac39b --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256UInt32AsGeneric_NInt.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector256UInt32AsGeneric_NInt() + { + bool succeeded = false; + + try + { + Vector256 result = default(Vector256).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector256UInt32AsGeneric_NInt: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256UInt32AsGeneric_NUInt.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256UInt32AsGeneric_NUInt.cs new file mode 100644 index 00000000000000..160dce9e385381 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256UInt32AsGeneric_NUInt.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector256UInt32AsGeneric_NUInt() + { + bool succeeded = false; + + try + { + Vector256 result = default(Vector256).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector256UInt32AsGeneric_NUInt: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256UInt64AsGeneric_NInt.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256UInt64AsGeneric_NInt.cs new file mode 100644 index 00000000000000..d72035754e3466 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256UInt64AsGeneric_NInt.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector256UInt64AsGeneric_NInt() + { + bool succeeded = false; + + try + { + Vector256 result = default(Vector256).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector256UInt64AsGeneric_NInt: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256UInt64AsGeneric_NUInt.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256UInt64AsGeneric_NUInt.cs new file mode 100644 index 00000000000000..384254b5f9dc21 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector256UInt64AsGeneric_NUInt.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector256UInt64AsGeneric_NUInt() + { + bool succeeded = false; + + try + { + Vector256 result = default(Vector256).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector256UInt64AsGeneric_NUInt: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64AllBitsSet.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64BooleanAllBitsSet.cs similarity index 90% rename from src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64AllBitsSet.cs rename to src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64BooleanAllBitsSet.cs index 51e0c1e2243359..2f9ee1dc871434 100644 --- a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64AllBitsSet.cs +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64BooleanAllBitsSet.cs @@ -17,7 +17,7 @@ namespace JIT.HardwareIntrinsics.General { public static partial class Program { - private static void Vector64AllBitsSet() + private static void Vector64BooleanAllBitsSet() { bool succeeded = false; @@ -32,7 +32,7 @@ private static void Vector64AllBitsSet() if (!succeeded) { - TestLibrary.TestFramework.LogInformation($"Vector64AllBitsSet: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation($"Vector64BooleanAllBitsSet: RunNotSupportedScenario failed to throw NotSupportedException."); TestLibrary.TestFramework.LogInformation(string.Empty); throw new Exception("One or more scenarios did not complete as expected."); diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64GetElementMaxValue.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64BooleanGetElement0.cs similarity index 91% rename from src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64GetElementMaxValue.cs rename to src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64BooleanGetElement0.cs index 711ad9acd1d5c7..cdcca887803134 100644 --- a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64GetElementMaxValue.cs +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64BooleanGetElement0.cs @@ -17,13 +17,13 @@ namespace JIT.HardwareIntrinsics.General { public static partial class Program { - private static void Vector64GetElementMaxValue() + private static void Vector64BooleanGetElement0() { bool succeeded = false; try { - bool result = default(Vector64).GetElement(int.MaxValue); + bool result = default(Vector64).GetElement(0); } catch (NotSupportedException) { @@ -32,7 +32,7 @@ private static void Vector64GetElementMaxValue() if (!succeeded) { - TestLibrary.TestFramework.LogInformation($"Vector64GetElementMaxValue: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation($"Vector64BooleanGetElement0: RunNotSupportedScenario failed to throw NotSupportedException."); TestLibrary.TestFramework.LogInformation(string.Empty); throw new Exception("One or more scenarios did not complete as expected."); diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64GetElement0.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64BooleanGetElementMaxValue.cs similarity index 88% rename from src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64GetElement0.cs rename to src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64BooleanGetElementMaxValue.cs index fc814c23357fa6..db4ac69e433134 100644 --- a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64GetElement0.cs +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64BooleanGetElementMaxValue.cs @@ -17,13 +17,13 @@ namespace JIT.HardwareIntrinsics.General { public static partial class Program { - private static void Vector64GetElement0() + private static void Vector64BooleanGetElementMaxValue() { bool succeeded = false; try { - bool result = default(Vector64).GetElement(0); + bool result = default(Vector64).GetElement(int.MaxValue); } catch (NotSupportedException) { @@ -32,7 +32,7 @@ private static void Vector64GetElement0() if (!succeeded) { - TestLibrary.TestFramework.LogInformation($"Vector64GetElement0: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation($"Vector64BooleanGetElementMaxValue: RunNotSupportedScenario failed to throw NotSupportedException."); TestLibrary.TestFramework.LogInformation(string.Empty); throw new Exception("One or more scenarios did not complete as expected."); diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64GetElementNegativeOne.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64BooleanGetElementNegativeOne.cs similarity index 89% rename from src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64GetElementNegativeOne.cs rename to src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64BooleanGetElementNegativeOne.cs index 04add6c9d2270c..9b25e8b3dc7936 100644 --- a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64GetElementNegativeOne.cs +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64BooleanGetElementNegativeOne.cs @@ -17,7 +17,7 @@ namespace JIT.HardwareIntrinsics.General { public static partial class Program { - private static void Vector64GetElementNegativeOne() + private static void Vector64BooleanGetElementNegativeOne() { bool succeeded = false; @@ -32,7 +32,7 @@ private static void Vector64GetElementNegativeOne() if (!succeeded) { - TestLibrary.TestFramework.LogInformation($"Vector64GetElementNegativeOne: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation($"Vector64BooleanGetElementNegativeOne: RunNotSupportedScenario failed to throw NotSupportedException."); TestLibrary.TestFramework.LogInformation(string.Empty); throw new Exception("One or more scenarios did not complete as expected."); diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64ToScalar.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64BooleanToScalar.cs similarity index 90% rename from src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64ToScalar.cs rename to src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64BooleanToScalar.cs index b75e28ef424160..6fb021cbb396e4 100644 --- a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64ToScalar.cs +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64BooleanToScalar.cs @@ -17,7 +17,7 @@ namespace JIT.HardwareIntrinsics.General { public static partial class Program { - private static void Vector64ToScalar() + private static void Vector64BooleanToScalar() { bool succeeded = false; @@ -32,7 +32,7 @@ private static void Vector64ToScalar() if (!succeeded) { - TestLibrary.TestFramework.LogInformation($"Vector64ToScalar: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation($"Vector64BooleanToScalar: RunNotSupportedScenario failed to throw NotSupportedException."); TestLibrary.TestFramework.LogInformation(string.Empty); throw new Exception("One or more scenarios did not complete as expected."); diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64ToString.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64BooleanToString.cs similarity index 90% rename from src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64ToString.cs rename to src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64BooleanToString.cs index d344af123600fb..bc6c37209db967 100644 --- a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64ToString.cs +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64BooleanToString.cs @@ -17,7 +17,7 @@ namespace JIT.HardwareIntrinsics.General { public static partial class Program { - private static void Vector64ToString() + private static void Vector64BooleanToString() { bool succeeded = false; @@ -32,7 +32,7 @@ private static void Vector64ToString() if (!succeeded) { - TestLibrary.TestFramework.LogInformation($"Vector64ToString: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation($"Vector64BooleanToString: RunNotSupportedScenario failed to throw NotSupportedException."); TestLibrary.TestFramework.LogInformation(string.Empty); throw new Exception("One or more scenarios did not complete as expected."); diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64ToVector128.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64BooleanToVector128.cs similarity index 90% rename from src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64ToVector128.cs rename to src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64BooleanToVector128.cs index add934d67af436..ac6de4dfae461e 100644 --- a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64ToVector128.cs +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64BooleanToVector128.cs @@ -17,7 +17,7 @@ namespace JIT.HardwareIntrinsics.General { public static partial class Program { - private static void Vector64ToVector128() + private static void Vector64BooleanToVector128() { bool succeeded = false; @@ -32,7 +32,7 @@ private static void Vector64ToVector128() if (!succeeded) { - TestLibrary.TestFramework.LogInformation($"Vector64ToVector128: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation($"Vector64BooleanToVector128: RunNotSupportedScenario failed to throw NotSupportedException."); TestLibrary.TestFramework.LogInformation(string.Empty); throw new Exception("One or more scenarios did not complete as expected."); diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64ToVector128Unsafe.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64BooleanToVector128Unsafe.cs similarity index 90% rename from src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64ToVector128Unsafe.cs rename to src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64BooleanToVector128Unsafe.cs index 18187a8f07e676..730924aca0406b 100644 --- a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64ToVector128Unsafe.cs +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64BooleanToVector128Unsafe.cs @@ -17,7 +17,7 @@ namespace JIT.HardwareIntrinsics.General { public static partial class Program { - private static void Vector64ToVector128Unsafe() + private static void Vector64BooleanToVector128Unsafe() { bool succeeded = false; @@ -32,7 +32,7 @@ private static void Vector64ToVector128Unsafe() if (!succeeded) { - TestLibrary.TestFramework.LogInformation($"Vector64ToVector128Unsafe: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation($"Vector64BooleanToVector128Unsafe: RunNotSupportedScenario failed to throw NotSupportedException."); TestLibrary.TestFramework.LogInformation(string.Empty); throw new Exception("One or more scenarios did not complete as expected."); diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64WithElement0.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64BooleanWithElement0.cs similarity index 90% rename from src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64WithElement0.cs rename to src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64BooleanWithElement0.cs index 23149674596a7c..dd5baa0c3cfde4 100644 --- a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64WithElement0.cs +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64BooleanWithElement0.cs @@ -17,7 +17,7 @@ namespace JIT.HardwareIntrinsics.General { public static partial class Program { - private static void Vector64WithElement0() + private static void Vector64BooleanWithElement0() { bool succeeded = false; @@ -32,7 +32,7 @@ private static void Vector64WithElement0() if (!succeeded) { - TestLibrary.TestFramework.LogInformation($"Vector64WithElement0: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation($"Vector64BooleanWithElement0: RunNotSupportedScenario failed to throw NotSupportedException."); TestLibrary.TestFramework.LogInformation(string.Empty); throw new Exception("One or more scenarios did not complete as expected."); diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64WithElementMaxValue.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64BooleanWithElementMaxValue.cs similarity index 89% rename from src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64WithElementMaxValue.cs rename to src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64BooleanWithElementMaxValue.cs index e3322d81faeda6..89367d7b0d0b0a 100644 --- a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64WithElementMaxValue.cs +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64BooleanWithElementMaxValue.cs @@ -17,7 +17,7 @@ namespace JIT.HardwareIntrinsics.General { public static partial class Program { - private static void Vector64WithElementMaxValue() + private static void Vector64BooleanWithElementMaxValue() { bool succeeded = false; @@ -32,7 +32,7 @@ private static void Vector64WithElementMaxValue() if (!succeeded) { - TestLibrary.TestFramework.LogInformation($"Vector64WithElementMaxValue: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation($"Vector64BooleanWithElementMaxValue: RunNotSupportedScenario failed to throw NotSupportedException."); TestLibrary.TestFramework.LogInformation(string.Empty); throw new Exception("One or more scenarios did not complete as expected."); diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64WithElementNegativeOne.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64BooleanWithElementNegativeOne.cs similarity index 89% rename from src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64WithElementNegativeOne.cs rename to src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64BooleanWithElementNegativeOne.cs index 4179611f6446a0..710ab157f022b7 100644 --- a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64WithElementNegativeOne.cs +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64BooleanWithElementNegativeOne.cs @@ -17,7 +17,7 @@ namespace JIT.HardwareIntrinsics.General { public static partial class Program { - private static void Vector64WithElementNegativeOne() + private static void Vector64BooleanWithElementNegativeOne() { bool succeeded = false; @@ -32,7 +32,7 @@ private static void Vector64WithElementNegativeOne() if (!succeeded) { - TestLibrary.TestFramework.LogInformation($"Vector64WithElementNegativeOne: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation($"Vector64BooleanWithElementNegativeOne: RunNotSupportedScenario failed to throw NotSupportedException."); TestLibrary.TestFramework.LogInformation(string.Empty); throw new Exception("One or more scenarios did not complete as expected."); diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64Zero.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64BooleanZero.cs similarity index 91% rename from src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64Zero.cs rename to src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64BooleanZero.cs index 449383469aab90..fbc8249f373c7f 100644 --- a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64Zero.cs +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64BooleanZero.cs @@ -17,7 +17,7 @@ namespace JIT.HardwareIntrinsics.General { public static partial class Program { - private static void Vector64Zero() + private static void Vector64BooleanZero() { bool succeeded = false; @@ -32,7 +32,7 @@ private static void Vector64Zero() if (!succeeded) { - TestLibrary.TestFramework.LogInformation($"Vector64Zero: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation($"Vector64BooleanZero: RunNotSupportedScenario failed to throw NotSupportedException."); TestLibrary.TestFramework.LogInformation(string.Empty); throw new Exception("One or more scenarios did not complete as expected."); diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64ByteAsGeneric_NInt.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64ByteAsGeneric_NInt.cs new file mode 100644 index 00000000000000..e4c88419b8c9ca --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64ByteAsGeneric_NInt.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector64ByteAsGeneric_NInt() + { + bool succeeded = false; + + try + { + Vector64 result = default(Vector64).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector64ByteAsGeneric_NInt: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64ByteAsGeneric_NUInt.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64ByteAsGeneric_NUInt.cs new file mode 100644 index 00000000000000..c0ed9718a174ae --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64ByteAsGeneric_NUInt.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector64ByteAsGeneric_NUInt() + { + bool succeeded = false; + + try + { + Vector64 result = default(Vector64).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector64ByteAsGeneric_NUInt: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64DoubleAsGeneric_NInt.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64DoubleAsGeneric_NInt.cs new file mode 100644 index 00000000000000..823f3f7474dd22 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64DoubleAsGeneric_NInt.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector64DoubleAsGeneric_NInt() + { + bool succeeded = false; + + try + { + Vector64 result = default(Vector64).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector64DoubleAsGeneric_NInt: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64DoubleAsGeneric_NUInt.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64DoubleAsGeneric_NUInt.cs new file mode 100644 index 00000000000000..f17452b935422a --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64DoubleAsGeneric_NUInt.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector64DoubleAsGeneric_NUInt() + { + bool succeeded = false; + + try + { + Vector64 result = default(Vector64).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector64DoubleAsGeneric_NUInt: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64Int16AsGeneric_NInt.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64Int16AsGeneric_NInt.cs new file mode 100644 index 00000000000000..026886a615f485 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64Int16AsGeneric_NInt.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector64Int16AsGeneric_NInt() + { + bool succeeded = false; + + try + { + Vector64 result = default(Vector64).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector64Int16AsGeneric_NInt: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64Int16AsGeneric_NUInt.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64Int16AsGeneric_NUInt.cs new file mode 100644 index 00000000000000..a10540bb54a54d --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64Int16AsGeneric_NUInt.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector64Int16AsGeneric_NUInt() + { + bool succeeded = false; + + try + { + Vector64 result = default(Vector64).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector64Int16AsGeneric_NUInt: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64Int32AsGeneric_NInt.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64Int32AsGeneric_NInt.cs new file mode 100644 index 00000000000000..bdd510702b210f --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64Int32AsGeneric_NInt.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector64Int32AsGeneric_NInt() + { + bool succeeded = false; + + try + { + Vector64 result = default(Vector64).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector64Int32AsGeneric_NInt: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64Int32AsGeneric_NUInt.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64Int32AsGeneric_NUInt.cs new file mode 100644 index 00000000000000..d034bb290b8da8 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64Int32AsGeneric_NUInt.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector64Int32AsGeneric_NUInt() + { + bool succeeded = false; + + try + { + Vector64 result = default(Vector64).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector64Int32AsGeneric_NUInt: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64Int64AsGeneric_NInt.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64Int64AsGeneric_NInt.cs new file mode 100644 index 00000000000000..adf98f93ef3bff --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64Int64AsGeneric_NInt.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector64Int64AsGeneric_NInt() + { + bool succeeded = false; + + try + { + Vector64 result = default(Vector64).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector64Int64AsGeneric_NInt: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64Int64AsGeneric_NUInt.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64Int64AsGeneric_NUInt.cs new file mode 100644 index 00000000000000..57683b28225c80 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64Int64AsGeneric_NUInt.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector64Int64AsGeneric_NUInt() + { + bool succeeded = false; + + try + { + Vector64 result = default(Vector64).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector64Int64AsGeneric_NUInt: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntAllBitsSet.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntAllBitsSet.cs new file mode 100644 index 00000000000000..8bb11c55130912 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntAllBitsSet.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector64NIntAllBitsSet() + { + bool succeeded = false; + + try + { + Vector64 result = Vector64.AllBitsSet; + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector64NIntAllBitsSet: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntAsByte.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntAsByte.cs new file mode 100644 index 00000000000000..f16ed0c72a14b8 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntAsByte.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector64NIntAsByte() + { + bool succeeded = false; + + try + { + Vector64 result = default(Vector64).AsByte(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector64NIntAsByte: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntAsDouble.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntAsDouble.cs new file mode 100644 index 00000000000000..e0d6ec61d3a6b9 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntAsDouble.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector64NIntAsDouble() + { + bool succeeded = false; + + try + { + Vector64 result = default(Vector64).AsDouble(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector64NIntAsDouble: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntAsGeneric_Byte.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntAsGeneric_Byte.cs new file mode 100644 index 00000000000000..2a4d30bdaf4f3f --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntAsGeneric_Byte.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector64NIntAsGeneric_Byte() + { + bool succeeded = false; + + try + { + Vector64 result = default(Vector64).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector64NIntAsGeneric_Byte: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntAsGeneric_Double.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntAsGeneric_Double.cs new file mode 100644 index 00000000000000..c09ae5d6ae1c03 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntAsGeneric_Double.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector64NIntAsGeneric_Double() + { + bool succeeded = false; + + try + { + Vector64 result = default(Vector64).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector64NIntAsGeneric_Double: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntAsGeneric_Int16.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntAsGeneric_Int16.cs new file mode 100644 index 00000000000000..9a4411a6f6b380 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntAsGeneric_Int16.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector64NIntAsGeneric_Int16() + { + bool succeeded = false; + + try + { + Vector64 result = default(Vector64).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector64NIntAsGeneric_Int16: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntAsGeneric_Int32.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntAsGeneric_Int32.cs new file mode 100644 index 00000000000000..9e5255df254be0 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntAsGeneric_Int32.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector64NIntAsGeneric_Int32() + { + bool succeeded = false; + + try + { + Vector64 result = default(Vector64).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector64NIntAsGeneric_Int32: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntAsGeneric_Int64.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntAsGeneric_Int64.cs new file mode 100644 index 00000000000000..83e755ee814547 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntAsGeneric_Int64.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector64NIntAsGeneric_Int64() + { + bool succeeded = false; + + try + { + Vector64 result = default(Vector64).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector64NIntAsGeneric_Int64: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntAsGeneric_NInt.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntAsGeneric_NInt.cs new file mode 100644 index 00000000000000..4af55ed4e9fd3f --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntAsGeneric_NInt.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector64NIntAsGeneric_NInt() + { + bool succeeded = false; + + try + { + Vector64 result = default(Vector64).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector64NIntAsGeneric_NInt: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntAsGeneric_SByte.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntAsGeneric_SByte.cs new file mode 100644 index 00000000000000..941568c17506f3 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntAsGeneric_SByte.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector64NIntAsGeneric_SByte() + { + bool succeeded = false; + + try + { + Vector64 result = default(Vector64).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector64NIntAsGeneric_SByte: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntAsGeneric_Single.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntAsGeneric_Single.cs new file mode 100644 index 00000000000000..5d93e26fcb9411 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntAsGeneric_Single.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector64NIntAsGeneric_Single() + { + bool succeeded = false; + + try + { + Vector64 result = default(Vector64).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector64NIntAsGeneric_Single: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntAsGeneric_UInt16.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntAsGeneric_UInt16.cs new file mode 100644 index 00000000000000..2db8dc5b5b6b47 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntAsGeneric_UInt16.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector64NIntAsGeneric_UInt16() + { + bool succeeded = false; + + try + { + Vector64 result = default(Vector64).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector64NIntAsGeneric_UInt16: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntAsGeneric_UInt32.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntAsGeneric_UInt32.cs new file mode 100644 index 00000000000000..b19ec2d767d251 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntAsGeneric_UInt32.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector64NIntAsGeneric_UInt32() + { + bool succeeded = false; + + try + { + Vector64 result = default(Vector64).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector64NIntAsGeneric_UInt32: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntAsGeneric_UInt64.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntAsGeneric_UInt64.cs new file mode 100644 index 00000000000000..3c1425e835ca46 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntAsGeneric_UInt64.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector64NIntAsGeneric_UInt64() + { + bool succeeded = false; + + try + { + Vector64 result = default(Vector64).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector64NIntAsGeneric_UInt64: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntAsInt16.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntAsInt16.cs new file mode 100644 index 00000000000000..f0c6c9f70c78e7 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntAsInt16.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector64NIntAsInt16() + { + bool succeeded = false; + + try + { + Vector64 result = default(Vector64).AsInt16(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector64NIntAsInt16: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntAsInt32.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntAsInt32.cs new file mode 100644 index 00000000000000..e3249be86d88ff --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntAsInt32.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector64NIntAsInt32() + { + bool succeeded = false; + + try + { + Vector64 result = default(Vector64).AsInt32(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector64NIntAsInt32: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntAsInt64.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntAsInt64.cs new file mode 100644 index 00000000000000..48a5892912633d --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntAsInt64.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector64NIntAsInt64() + { + bool succeeded = false; + + try + { + Vector64 result = default(Vector64).AsInt64(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector64NIntAsInt64: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntAsSByte.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntAsSByte.cs new file mode 100644 index 00000000000000..fd76ea04c1686f --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntAsSByte.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector64NIntAsSByte() + { + bool succeeded = false; + + try + { + Vector64 result = default(Vector64).AsSByte(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector64NIntAsSByte: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntAsSingle.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntAsSingle.cs new file mode 100644 index 00000000000000..17aab61c6e6eca --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntAsSingle.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector64NIntAsSingle() + { + bool succeeded = false; + + try + { + Vector64 result = default(Vector64).AsSingle(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector64NIntAsSingle: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntAsUInt16.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntAsUInt16.cs new file mode 100644 index 00000000000000..f2c1bc0132cd94 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntAsUInt16.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector64NIntAsUInt16() + { + bool succeeded = false; + + try + { + Vector64 result = default(Vector64).AsUInt16(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector64NIntAsUInt16: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntAsUInt32.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntAsUInt32.cs new file mode 100644 index 00000000000000..a0967404fcfc17 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntAsUInt32.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector64NIntAsUInt32() + { + bool succeeded = false; + + try + { + Vector64 result = default(Vector64).AsUInt32(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector64NIntAsUInt32: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntAsUInt64.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntAsUInt64.cs new file mode 100644 index 00000000000000..b492b0263189bf --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntAsUInt64.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector64NIntAsUInt64() + { + bool succeeded = false; + + try + { + Vector64 result = default(Vector64).AsUInt64(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector64NIntAsUInt64: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntGetElement0.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntGetElement0.cs new file mode 100644 index 00000000000000..70a18cdbed2948 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntGetElement0.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector64NIntGetElement0() + { + bool succeeded = false; + + try + { + nint result = default(Vector64).GetElement(0); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector64NIntGetElement0: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntGetElementMaxValue.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntGetElementMaxValue.cs new file mode 100644 index 00000000000000..0b3ffc883cef85 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntGetElementMaxValue.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector64NIntGetElementMaxValue() + { + bool succeeded = false; + + try + { + nint result = default(Vector64).GetElement(int.MaxValue); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector64NIntGetElementMaxValue: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntGetElementNegativeOne.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntGetElementNegativeOne.cs new file mode 100644 index 00000000000000..79f7e3e4d94122 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntGetElementNegativeOne.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector64NIntGetElementNegativeOne() + { + bool succeeded = false; + + try + { + nint result = default(Vector64).GetElement(-1); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector64NIntGetElementNegativeOne: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntToScalar.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntToScalar.cs new file mode 100644 index 00000000000000..1397196f45adab --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntToScalar.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector64NIntToScalar() + { + bool succeeded = false; + + try + { + nint result = default(Vector64).ToScalar(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector64NIntToScalar: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntToString.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntToString.cs new file mode 100644 index 00000000000000..7f207d4004c50f --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntToString.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector64NIntToString() + { + bool succeeded = false; + + try + { + string result = default(Vector64).ToString(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector64NIntToString: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntToVector128.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntToVector128.cs new file mode 100644 index 00000000000000..d838ee9dd39ab8 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntToVector128.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector64NIntToVector128() + { + bool succeeded = false; + + try + { + Vector128 result = default(Vector64).ToVector128(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector64NIntToVector128: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntToVector128Unsafe.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntToVector128Unsafe.cs new file mode 100644 index 00000000000000..9fac3deb4334ec --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntToVector128Unsafe.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector64NIntToVector128Unsafe() + { + bool succeeded = false; + + try + { + Vector128 result = default(Vector64).ToVector128Unsafe(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector64NIntToVector128Unsafe: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntWithElement0.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntWithElement0.cs new file mode 100644 index 00000000000000..f6086853e87b80 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntWithElement0.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector64NIntWithElement0() + { + bool succeeded = false; + + try + { + Vector64 result = default(Vector64).WithElement(0, (nint)0); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector64NIntWithElement0: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntWithElementMaxValue.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntWithElementMaxValue.cs new file mode 100644 index 00000000000000..ba24898f863e26 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntWithElementMaxValue.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector64NIntWithElementMaxValue() + { + bool succeeded = false; + + try + { + Vector64 result = default(Vector64).WithElement(int.MaxValue, (nint)0); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector64NIntWithElementMaxValue: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntWithElementNegativeOne.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntWithElementNegativeOne.cs new file mode 100644 index 00000000000000..e28ab951c0dfa3 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntWithElementNegativeOne.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector64NIntWithElementNegativeOne() + { + bool succeeded = false; + + try + { + Vector64 result = default(Vector64).WithElement(-1, (nint)0); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector64NIntWithElementNegativeOne: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntZero.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntZero.cs new file mode 100644 index 00000000000000..f3936a9e91f704 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NIntZero.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector64NIntZero() + { + bool succeeded = false; + + try + { + Vector64 result = Vector64.Zero; + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector64NIntZero: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntAllBitsSet.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntAllBitsSet.cs new file mode 100644 index 00000000000000..8c96632df4fb56 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntAllBitsSet.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector64NUIntAllBitsSet() + { + bool succeeded = false; + + try + { + Vector64 result = Vector64.AllBitsSet; + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector64NUIntAllBitsSet: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntAsByte.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntAsByte.cs new file mode 100644 index 00000000000000..3c8ff70624cf79 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntAsByte.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector64NUIntAsByte() + { + bool succeeded = false; + + try + { + Vector64 result = default(Vector64).AsByte(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector64NUIntAsByte: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntAsDouble.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntAsDouble.cs new file mode 100644 index 00000000000000..2452481307f7aa --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntAsDouble.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector64NUIntAsDouble() + { + bool succeeded = false; + + try + { + Vector64 result = default(Vector64).AsDouble(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector64NUIntAsDouble: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntAsGeneric_Byte.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntAsGeneric_Byte.cs new file mode 100644 index 00000000000000..69b5a13e59401b --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntAsGeneric_Byte.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector64NUIntAsGeneric_Byte() + { + bool succeeded = false; + + try + { + Vector64 result = default(Vector64).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector64NUIntAsGeneric_Byte: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntAsGeneric_Double.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntAsGeneric_Double.cs new file mode 100644 index 00000000000000..2adc98f18ddbdf --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntAsGeneric_Double.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector64NUIntAsGeneric_Double() + { + bool succeeded = false; + + try + { + Vector64 result = default(Vector64).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector64NUIntAsGeneric_Double: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntAsGeneric_Int16.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntAsGeneric_Int16.cs new file mode 100644 index 00000000000000..f3095671bf5096 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntAsGeneric_Int16.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector64NUIntAsGeneric_Int16() + { + bool succeeded = false; + + try + { + Vector64 result = default(Vector64).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector64NUIntAsGeneric_Int16: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntAsGeneric_Int32.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntAsGeneric_Int32.cs new file mode 100644 index 00000000000000..01aa49318cd20b --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntAsGeneric_Int32.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector64NUIntAsGeneric_Int32() + { + bool succeeded = false; + + try + { + Vector64 result = default(Vector64).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector64NUIntAsGeneric_Int32: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntAsGeneric_Int64.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntAsGeneric_Int64.cs new file mode 100644 index 00000000000000..9769a76e9ffc4b --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntAsGeneric_Int64.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector64NUIntAsGeneric_Int64() + { + bool succeeded = false; + + try + { + Vector64 result = default(Vector64).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector64NUIntAsGeneric_Int64: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntAsGeneric_NUInt.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntAsGeneric_NUInt.cs new file mode 100644 index 00000000000000..695e1b223e34a2 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntAsGeneric_NUInt.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector64NUIntAsGeneric_NUInt() + { + bool succeeded = false; + + try + { + Vector64 result = default(Vector64).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector64NUIntAsGeneric_NUInt: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntAsGeneric_SByte.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntAsGeneric_SByte.cs new file mode 100644 index 00000000000000..2edf3e9d1461c4 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntAsGeneric_SByte.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector64NUIntAsGeneric_SByte() + { + bool succeeded = false; + + try + { + Vector64 result = default(Vector64).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector64NUIntAsGeneric_SByte: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntAsGeneric_Single.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntAsGeneric_Single.cs new file mode 100644 index 00000000000000..08c44c1216d17d --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntAsGeneric_Single.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector64NUIntAsGeneric_Single() + { + bool succeeded = false; + + try + { + Vector64 result = default(Vector64).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector64NUIntAsGeneric_Single: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntAsGeneric_UInt16.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntAsGeneric_UInt16.cs new file mode 100644 index 00000000000000..5e181102a2a7e0 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntAsGeneric_UInt16.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector64NUIntAsGeneric_UInt16() + { + bool succeeded = false; + + try + { + Vector64 result = default(Vector64).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector64NUIntAsGeneric_UInt16: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntAsGeneric_UInt32.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntAsGeneric_UInt32.cs new file mode 100644 index 00000000000000..12691c9964c66e --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntAsGeneric_UInt32.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector64NUIntAsGeneric_UInt32() + { + bool succeeded = false; + + try + { + Vector64 result = default(Vector64).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector64NUIntAsGeneric_UInt32: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntAsGeneric_UInt64.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntAsGeneric_UInt64.cs new file mode 100644 index 00000000000000..f75996157ca12b --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntAsGeneric_UInt64.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector64NUIntAsGeneric_UInt64() + { + bool succeeded = false; + + try + { + Vector64 result = default(Vector64).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector64NUIntAsGeneric_UInt64: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntAsInt16.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntAsInt16.cs new file mode 100644 index 00000000000000..95898ef448338e --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntAsInt16.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector64NUIntAsInt16() + { + bool succeeded = false; + + try + { + Vector64 result = default(Vector64).AsInt16(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector64NUIntAsInt16: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntAsInt32.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntAsInt32.cs new file mode 100644 index 00000000000000..14166b6d5ed38e --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntAsInt32.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector64NUIntAsInt32() + { + bool succeeded = false; + + try + { + Vector64 result = default(Vector64).AsInt32(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector64NUIntAsInt32: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntAsInt64.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntAsInt64.cs new file mode 100644 index 00000000000000..9259f2d1473314 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntAsInt64.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector64NUIntAsInt64() + { + bool succeeded = false; + + try + { + Vector64 result = default(Vector64).AsInt64(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector64NUIntAsInt64: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntAsSByte.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntAsSByte.cs new file mode 100644 index 00000000000000..5cef96facdf295 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntAsSByte.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector64NUIntAsSByte() + { + bool succeeded = false; + + try + { + Vector64 result = default(Vector64).AsSByte(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector64NUIntAsSByte: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntAsSingle.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntAsSingle.cs new file mode 100644 index 00000000000000..52c7c19fb779fe --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntAsSingle.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector64NUIntAsSingle() + { + bool succeeded = false; + + try + { + Vector64 result = default(Vector64).AsSingle(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector64NUIntAsSingle: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntAsUInt16.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntAsUInt16.cs new file mode 100644 index 00000000000000..001594406f22e9 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntAsUInt16.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector64NUIntAsUInt16() + { + bool succeeded = false; + + try + { + Vector64 result = default(Vector64).AsUInt16(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector64NUIntAsUInt16: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntAsUInt32.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntAsUInt32.cs new file mode 100644 index 00000000000000..273d75b55793e5 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntAsUInt32.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector64NUIntAsUInt32() + { + bool succeeded = false; + + try + { + Vector64 result = default(Vector64).AsUInt32(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector64NUIntAsUInt32: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntAsUInt64.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntAsUInt64.cs new file mode 100644 index 00000000000000..e2886be29b4cf4 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntAsUInt64.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector64NUIntAsUInt64() + { + bool succeeded = false; + + try + { + Vector64 result = default(Vector64).AsUInt64(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector64NUIntAsUInt64: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntGetElement0.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntGetElement0.cs new file mode 100644 index 00000000000000..9425e75c2e3389 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntGetElement0.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector64NUIntGetElement0() + { + bool succeeded = false; + + try + { + nuint result = default(Vector64).GetElement(0); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector64NUIntGetElement0: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntGetElementMaxValue.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntGetElementMaxValue.cs new file mode 100644 index 00000000000000..503cdb3e6179e2 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntGetElementMaxValue.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector64NUIntGetElementMaxValue() + { + bool succeeded = false; + + try + { + nuint result = default(Vector64).GetElement(int.MaxValue); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector64NUIntGetElementMaxValue: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntGetElementNegativeOne.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntGetElementNegativeOne.cs new file mode 100644 index 00000000000000..c704be4275dfb0 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntGetElementNegativeOne.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector64NUIntGetElementNegativeOne() + { + bool succeeded = false; + + try + { + nuint result = default(Vector64).GetElement(-1); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector64NUIntGetElementNegativeOne: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntToScalar.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntToScalar.cs new file mode 100644 index 00000000000000..836b5613fcf8a3 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntToScalar.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector64NUIntToScalar() + { + bool succeeded = false; + + try + { + nuint result = default(Vector64).ToScalar(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector64NUIntToScalar: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntToString.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntToString.cs new file mode 100644 index 00000000000000..07b3d75e1c97b7 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntToString.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector64NUIntToString() + { + bool succeeded = false; + + try + { + string result = default(Vector64).ToString(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector64NUIntToString: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntToVector128.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntToVector128.cs new file mode 100644 index 00000000000000..337409feb173dd --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntToVector128.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector64NUIntToVector128() + { + bool succeeded = false; + + try + { + Vector128 result = default(Vector64).ToVector128(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector64NUIntToVector128: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntToVector128Unsafe.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntToVector128Unsafe.cs new file mode 100644 index 00000000000000..c5632ad37e30b6 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntToVector128Unsafe.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector64NUIntToVector128Unsafe() + { + bool succeeded = false; + + try + { + Vector128 result = default(Vector64).ToVector128Unsafe(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector64NUIntToVector128Unsafe: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntWithElement0.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntWithElement0.cs new file mode 100644 index 00000000000000..ac8c21f8e05c4b --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntWithElement0.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector64NUIntWithElement0() + { + bool succeeded = false; + + try + { + Vector64 result = default(Vector64).WithElement(0, (nuint)0); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector64NUIntWithElement0: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntWithElementMaxValue.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntWithElementMaxValue.cs new file mode 100644 index 00000000000000..b81015713d7e3b --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntWithElementMaxValue.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector64NUIntWithElementMaxValue() + { + bool succeeded = false; + + try + { + Vector64 result = default(Vector64).WithElement(int.MaxValue, (nuint)0); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector64NUIntWithElementMaxValue: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntWithElementNegativeOne.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntWithElementNegativeOne.cs new file mode 100644 index 00000000000000..541ad5c8558e48 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntWithElementNegativeOne.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector64NUIntWithElementNegativeOne() + { + bool succeeded = false; + + try + { + Vector64 result = default(Vector64).WithElement(-1, (nuint)0); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector64NUIntWithElementNegativeOne: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntZero.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntZero.cs new file mode 100644 index 00000000000000..6a833dccde2557 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64NUIntZero.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector64NUIntZero() + { + bool succeeded = false; + + try + { + Vector64 result = Vector64.Zero; + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector64NUIntZero: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64SByteAsGeneric_NInt.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64SByteAsGeneric_NInt.cs new file mode 100644 index 00000000000000..232a5e5937f2f6 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64SByteAsGeneric_NInt.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector64SByteAsGeneric_NInt() + { + bool succeeded = false; + + try + { + Vector64 result = default(Vector64).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector64SByteAsGeneric_NInt: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64SByteAsGeneric_NUInt.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64SByteAsGeneric_NUInt.cs new file mode 100644 index 00000000000000..9518dc66ba6531 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64SByteAsGeneric_NUInt.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector64SByteAsGeneric_NUInt() + { + bool succeeded = false; + + try + { + Vector64 result = default(Vector64).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector64SByteAsGeneric_NUInt: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64SingleAsGeneric_NInt.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64SingleAsGeneric_NInt.cs new file mode 100644 index 00000000000000..bd7ce65c492678 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64SingleAsGeneric_NInt.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector64SingleAsGeneric_NInt() + { + bool succeeded = false; + + try + { + Vector64 result = default(Vector64).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector64SingleAsGeneric_NInt: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64SingleAsGeneric_NUInt.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64SingleAsGeneric_NUInt.cs new file mode 100644 index 00000000000000..0d7f5848ada1f4 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64SingleAsGeneric_NUInt.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector64SingleAsGeneric_NUInt() + { + bool succeeded = false; + + try + { + Vector64 result = default(Vector64).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector64SingleAsGeneric_NUInt: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64UInt16AsGeneric_NInt.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64UInt16AsGeneric_NInt.cs new file mode 100644 index 00000000000000..a3874fed0ec034 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64UInt16AsGeneric_NInt.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector64UInt16AsGeneric_NInt() + { + bool succeeded = false; + + try + { + Vector64 result = default(Vector64).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector64UInt16AsGeneric_NInt: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64UInt16AsGeneric_NUInt.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64UInt16AsGeneric_NUInt.cs new file mode 100644 index 00000000000000..53a0149baa8386 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64UInt16AsGeneric_NUInt.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector64UInt16AsGeneric_NUInt() + { + bool succeeded = false; + + try + { + Vector64 result = default(Vector64).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector64UInt16AsGeneric_NUInt: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64UInt32AsGeneric_NInt.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64UInt32AsGeneric_NInt.cs new file mode 100644 index 00000000000000..6ca6485d873fa2 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64UInt32AsGeneric_NInt.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector64UInt32AsGeneric_NInt() + { + bool succeeded = false; + + try + { + Vector64 result = default(Vector64).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector64UInt32AsGeneric_NInt: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64UInt32AsGeneric_NUInt.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64UInt32AsGeneric_NUInt.cs new file mode 100644 index 00000000000000..9782e4dc01aa13 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64UInt32AsGeneric_NUInt.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector64UInt32AsGeneric_NUInt() + { + bool succeeded = false; + + try + { + Vector64 result = default(Vector64).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector64UInt32AsGeneric_NUInt: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64UInt64AsGeneric_NInt.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64UInt64AsGeneric_NInt.cs new file mode 100644 index 00000000000000..1fcaf52e7c9c9e --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64UInt64AsGeneric_NInt.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector64UInt64AsGeneric_NInt() + { + bool succeeded = false; + + try + { + Vector64 result = default(Vector64).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector64UInt64AsGeneric_NInt: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64UInt64AsGeneric_NUInt.cs b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64UInt64AsGeneric_NUInt.cs new file mode 100644 index 00000000000000..2632de65d9028d --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/General/NotSupported/Vector64UInt64AsGeneric_NUInt.cs @@ -0,0 +1,42 @@ +// 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\General\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; + +namespace JIT.HardwareIntrinsics.General +{ + public static partial class Program + { + private static void Vector64UInt64AsGeneric_NUInt() + { + bool succeeded = false; + + try + { + Vector64 result = default(Vector64).As(); + } + catch (NotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"Vector64UInt64AsGeneric_NUInt: RunNotSupportedScenario failed to throw NotSupportedException."); + TestLibrary.TestFramework.LogInformation(string.Empty); + + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/General/Shared/GenerateTests.csx b/src/tests/JIT/HardwareIntrinsics/General/Shared/GenerateTests.csx index df2d1386570b3c..2e16dcc9720d9d 100644 --- a/src/tests/JIT/HardwareIntrinsics/General/Shared/GenerateTests.csx +++ b/src/tests/JIT/HardwareIntrinsics/General/Shared/GenerateTests.csx @@ -69,7 +69,7 @@ private static readonly (string templateFileName, Dictionary tem ("VectorZeroTest.template", new Dictionary { ["Isa"] = "Vector64_1", ["Method"] = "Zero", ["VectorType"] = "Vector64", ["BaseType"] = "UInt16", ["LargestVectorSize"] = "8" }), ("VectorZeroTest.template", new Dictionary { ["Isa"] = "Vector64_1", ["Method"] = "Zero", ["VectorType"] = "Vector64", ["BaseType"] = "UInt32", ["LargestVectorSize"] = "8" }), ("VectorZeroTest.template", new Dictionary { ["Isa"] = "Vector64_1", ["Method"] = "Zero", ["VectorType"] = "Vector64", ["BaseType"] = "UInt64", ["LargestVectorSize"] = "8" }), - + ("VectorAllBitsSetTest.template", new Dictionary { ["Isa"] = "Vector64_1", ["Method"] = "AllBitsSet", ["VectorType"] = "Vector64", ["BaseType"] = "Byte", ["LargestVectorSize"] = "8" }), ("VectorAllBitsSetTest.template", new Dictionary { ["Isa"] = "Vector64_1", ["Method"] = "AllBitsSet", ["VectorType"] = "Vector64", ["BaseType"] = "Double", ["LargestVectorSize"] = "8" }), ("VectorAllBitsSetTest.template", new Dictionary { ["Isa"] = "Vector64_1", ["Method"] = "AllBitsSet", ["VectorType"] = "Vector64", ["BaseType"] = "Int16", ["LargestVectorSize"] = "8" }), @@ -500,143 +500,419 @@ private static readonly (string templateFileName, Dictionary tem private static readonly (string templateFileName, Dictionary templateData)[] NotSupportedInputs = new [] { - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64Zero", ["TargetType"] = "Vector64", ["Source"] = "Vector64", ["Method"] = "Zero" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64AllBitsSet", ["TargetType"] = "Vector64", ["Source"] = "Vector64", ["Method"] = "AllBitsSet" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64BooleanAsGeneric_Boolean", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64ByteAsGeneric_Boolean", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64DoubleAsGeneric_Boolean", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64Int16AsGeneric_Boolean", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64Int32AsGeneric_Boolean", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64Int64AsGeneric_Boolean", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64SByteAsGeneric_Boolean", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64SingleAsGeneric_Boolean", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64UInt16AsGeneric_Boolean", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64UInt32AsGeneric_Boolean", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64UInt64AsGeneric_Boolean", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64BooleanAsGeneric_Byte", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64BooleanAsGeneric_Double", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64BooleanAsGeneric_Int16", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64BooleanAsGeneric_Int32", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64BooleanAsGeneric_Int64", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64BooleanAsGeneric_SByte", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64BooleanAsGeneric_Single", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64BooleanAsGeneric_UInt16", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64BooleanAsGeneric_UInt32", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64BooleanAsGeneric_UInt64", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64BooleanAsByte", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "AsByte()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64BooleanAsDouble", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "AsDouble()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64BooleanAsInt16", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "AsInt16()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64BooleanAsInt32", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "AsInt32()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64BooleanAsInt64", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "AsInt64()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64BooleanAsSByte", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "AsSByte()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64BooleanAsSingle", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "AsSingle()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64BooleanAsUInt16", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "AsUInt16()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64BooleanAsUInt32", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "AsUInt32()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64BooleanAsUInt64", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "AsUInt64()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64GetElementNegativeOne", ["TargetType"] = "bool", ["Source"] = "default(Vector64)", ["Method"] = "GetElement(-1)" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64GetElement0", ["TargetType"] = "bool", ["Source"] = "default(Vector64)", ["Method"] = "GetElement(0)" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64GetElementMaxValue", ["TargetType"] = "bool", ["Source"] = "default(Vector64)", ["Method"] = "GetElement(int.MaxValue)" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64WithElementNegativeOne", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "WithElement(-1, false)" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64WithElement0", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "WithElement(0, false)" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64WithElementMaxValue", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "WithElement(int.MaxValue, false)" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64ToScalar", ["TargetType"] = "bool", ["Source"] = "default(Vector64)", ["Method"] = "ToScalar()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64ToVector128", ["TargetType"] = "Vector128", ["Source"] = "default(Vector64)", ["Method"] = "ToVector128()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64ToVector128Unsafe", ["TargetType"] = "Vector128", ["Source"] = "default(Vector64)", ["Method"] = "ToVector128Unsafe()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64ToString", ["TargetType"] = "string", ["Source"] = "default(Vector64)", ["Method"] = "ToString()" }), - - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128Zero", ["TargetType"] = "Vector128", ["Source"] = "Vector128", ["Method"] = "Zero" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128AllBitsSet", ["TargetType"] = "Vector128", ["Source"] = "Vector128", ["Method"] = "AllBitsSet" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128BooleanAsGeneric_Boolean", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128ByteAsGeneric_Boolean", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128DoubleAsGeneric_Boolean", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128Int16AsGeneric_Boolean", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128Int32AsGeneric_Boolean", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128Int64AsGeneric_Boolean", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128SByteAsGeneric_Boolean", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128SingleAsGeneric_Boolean", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128UInt16AsGeneric_Boolean", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128UInt32AsGeneric_Boolean", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128UInt64AsGeneric_Boolean", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128BooleanAsGeneric_Byte", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128BooleanAsGeneric_Double", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128BooleanAsGeneric_Int16", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128BooleanAsGeneric_Int32", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128BooleanAsGeneric_Int64", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128BooleanAsGeneric_SByte", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128BooleanAsGeneric_Single", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128BooleanAsGeneric_UInt16", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128BooleanAsGeneric_UInt32", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128BooleanAsGeneric_UInt64", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128BooleanAsByte", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "AsByte()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128BooleanAsDouble", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "AsDouble()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128BooleanAsInt16", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "AsInt16()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128BooleanAsInt32", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "AsInt32()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128BooleanAsInt64", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "AsInt64()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128BooleanAsSByte", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "AsSByte()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128BooleanAsSingle", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "AsSingle()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128BooleanAsUInt16", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "AsUInt16()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128BooleanAsUInt32", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "AsUInt32()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128BooleanAsUInt64", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "AsUInt64()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128GetElementNegativeOne", ["TargetType"] = "bool", ["Source"] = "default(Vector128)", ["Method"] = "GetElement(-1)" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128GetElement0", ["TargetType"] = "bool", ["Source"] = "default(Vector128)", ["Method"] = "GetElement(0)" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128GetElementMaxValue", ["TargetType"] = "bool", ["Source"] = "default(Vector128)", ["Method"] = "GetElement(int.MaxValue)" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128WithElementNegativeOne", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "WithElement(-1, false)" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128WithElement0", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "WithElement(0, false)" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128WithElementMaxValue", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "WithElement(int.MaxValue, false)" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128GetLower", ["TargetType"] = "Vector64", ["Source"] = "default(Vector128)", ["Method"] = "GetLower()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128WithLower", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "WithLower(default(Vector64))" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128GetUpper", ["TargetType"] = "Vector64", ["Source"] = "default(Vector128)", ["Method"] = "GetUpper()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128WithUpper", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "WithUpper(default(Vector64))" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128ToScalar", ["TargetType"] = "bool", ["Source"] = "default(Vector128)", ["Method"] = "ToScalar()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128ToVector256", ["TargetType"] = "Vector256", ["Source"] = "default(Vector128)", ["Method"] = "ToVector256()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128ToVector256Unsafe", ["TargetType"] = "Vector256", ["Source"] = "default(Vector128)", ["Method"] = "ToVector256Unsafe()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128ToString", ["TargetType"] = "string", ["Source"] = "default(Vector128)", ["Method"] = "ToString()" }), - - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256Zero", ["TargetType"] = "Vector256", ["Source"] = "Vector256", ["Method"] = "Zero" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256AllBitsSet", ["TargetType"] = "Vector256", ["Source"] = "Vector256", ["Method"] = "AllBitsSet" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256BooleanAsGeneric_Boolean", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256ByteAsGeneric_Boolean", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256DoubleAsGeneric_Boolean", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256Int16AsGeneric_Boolean", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256Int32AsGeneric_Boolean", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256Int64AsGeneric_Boolean", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256SByteAsGeneric_Boolean", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256SingleAsGeneric_Boolean", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256UInt16AsGeneric_Boolean", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256UInt32AsGeneric_Boolean", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256UInt64AsGeneric_Boolean", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256BooleanAsGeneric_Byte", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256BooleanAsGeneric_Double", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256BooleanAsGeneric_Int16", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256BooleanAsGeneric_Int32", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256BooleanAsGeneric_Int64", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256BooleanAsGeneric_SByte", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256BooleanAsGeneric_Single", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256BooleanAsGeneric_UInt16", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256BooleanAsGeneric_UInt32", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256BooleanAsGeneric_UInt64", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256BooleanAsByte", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "AsByte()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256BooleanAsDouble", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "AsDouble()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256BooleanAsInt16", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "AsInt16()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256BooleanAsInt32", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "AsInt32()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256BooleanAsInt64", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "AsInt64()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256BooleanAsSByte", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "AsSByte()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256BooleanAsSingle", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "AsSingle()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256BooleanAsUInt16", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "AsUInt16()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256BooleanAsUInt32", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "AsUInt32()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256BooleanAsUInt64", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "AsUInt64()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256GetElementNegativeOne", ["TargetType"] = "bool", ["Source"] = "default(Vector256)", ["Method"] = "GetElement(-1)" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256GetElement0", ["TargetType"] = "bool", ["Source"] = "default(Vector256)", ["Method"] = "GetElement(0)" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256GetElementMaxValue", ["TargetType"] = "bool", ["Source"] = "default(Vector256)", ["Method"] = "GetElement(int.MaxValue)" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256WithElementNegativeOne", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "WithElement(-1, false)" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256WithElement0", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "WithElement(0, false)" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256WithElementMaxValue", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "WithElement(int.MaxValue, false)" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256GetLower", ["TargetType"] = "Vector128", ["Source"] = "default(Vector256)", ["Method"] = "GetLower()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256WithLower", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "WithLower(default(Vector128))" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256GetUpper", ["TargetType"] = "Vector128", ["Source"] = "default(Vector256)", ["Method"] = "GetUpper()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256WithUpper", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "WithUpper(default(Vector128))" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256ToScalar", ["TargetType"] = "bool", ["Source"] = "default(Vector256)", ["Method"] = "ToScalar()" }), - ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256ToString", ["TargetType"] = "string", ["Source"] = "default(Vector256)", ["Method"] = "ToString()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64BooleanZero", ["TargetType"] = "Vector64", ["Source"] = "Vector64", ["Method"] = "Zero" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64BooleanAllBitsSet", ["TargetType"] = "Vector64", ["Source"] = "Vector64", ["Method"] = "AllBitsSet" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64BooleanAsGeneric_Boolean", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64ByteAsGeneric_Boolean", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64DoubleAsGeneric_Boolean", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64Int16AsGeneric_Boolean", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64Int32AsGeneric_Boolean", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64Int64AsGeneric_Boolean", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64SByteAsGeneric_Boolean", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64SingleAsGeneric_Boolean", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64UInt16AsGeneric_Boolean", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64UInt32AsGeneric_Boolean", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64UInt64AsGeneric_Boolean", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64BooleanAsGeneric_Byte", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64BooleanAsGeneric_Double", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64BooleanAsGeneric_Int16", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64BooleanAsGeneric_Int32", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64BooleanAsGeneric_Int64", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64BooleanAsGeneric_SByte", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64BooleanAsGeneric_Single", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64BooleanAsGeneric_UInt16", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64BooleanAsGeneric_UInt32", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64BooleanAsGeneric_UInt64", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64BooleanAsByte", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "AsByte()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64BooleanAsDouble", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "AsDouble()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64BooleanAsInt16", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "AsInt16()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64BooleanAsInt32", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "AsInt32()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64BooleanAsInt64", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "AsInt64()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64BooleanAsSByte", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "AsSByte()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64BooleanAsSingle", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "AsSingle()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64BooleanAsUInt16", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "AsUInt16()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64BooleanAsUInt32", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "AsUInt32()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64BooleanAsUInt64", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "AsUInt64()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64BooleanGetElementNegativeOne", ["TargetType"] = "bool", ["Source"] = "default(Vector64)", ["Method"] = "GetElement(-1)" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64BooleanGetElement0", ["TargetType"] = "bool", ["Source"] = "default(Vector64)", ["Method"] = "GetElement(0)" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64BooleanGetElementMaxValue", ["TargetType"] = "bool", ["Source"] = "default(Vector64)", ["Method"] = "GetElement(int.MaxValue)" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64BooleanWithElementNegativeOne", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "WithElement(-1, false)" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64BooleanWithElement0", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "WithElement(0, false)" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64BooleanWithElementMaxValue", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "WithElement(int.MaxValue, false)" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64BooleanToScalar", ["TargetType"] = "bool", ["Source"] = "default(Vector64)", ["Method"] = "ToScalar()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64BooleanToVector128", ["TargetType"] = "Vector128", ["Source"] = "default(Vector64)", ["Method"] = "ToVector128()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64BooleanToVector128Unsafe", ["TargetType"] = "Vector128", ["Source"] = "default(Vector64)", ["Method"] = "ToVector128Unsafe()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64BooleanToString", ["TargetType"] = "string", ["Source"] = "default(Vector64)", ["Method"] = "ToString()" }), + + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64NIntZero", ["TargetType"] = "Vector64", ["Source"] = "Vector64", ["Method"] = "Zero" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64NIntAllBitsSet", ["TargetType"] = "Vector64", ["Source"] = "Vector64", ["Method"] = "AllBitsSet" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64NIntAsGeneric_NInt", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64ByteAsGeneric_NInt", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64DoubleAsGeneric_NInt", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64Int16AsGeneric_NInt", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64Int32AsGeneric_NInt", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64Int64AsGeneric_NInt", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64SByteAsGeneric_NInt", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64SingleAsGeneric_NInt", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64UInt16AsGeneric_NInt", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64UInt32AsGeneric_NInt", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64UInt64AsGeneric_NInt", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64NIntAsGeneric_Byte", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64NIntAsGeneric_Double", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64NIntAsGeneric_Int16", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64NIntAsGeneric_Int32", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64NIntAsGeneric_Int64", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64NIntAsGeneric_SByte", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64NIntAsGeneric_Single", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64NIntAsGeneric_UInt16", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64NIntAsGeneric_UInt32", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64NIntAsGeneric_UInt64", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64NIntAsByte", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "AsByte()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64NIntAsDouble", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "AsDouble()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64NIntAsInt16", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "AsInt16()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64NIntAsInt32", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "AsInt32()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64NIntAsInt64", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "AsInt64()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64NIntAsSByte", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "AsSByte()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64NIntAsSingle", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "AsSingle()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64NIntAsUInt16", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "AsUInt16()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64NIntAsUInt32", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "AsUInt32()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64NIntAsUInt64", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "AsUInt64()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64NIntGetElementNegativeOne", ["TargetType"] = "nint", ["Source"] = "default(Vector64)", ["Method"] = "GetElement(-1)" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64NIntGetElement0", ["TargetType"] = "nint", ["Source"] = "default(Vector64)", ["Method"] = "GetElement(0)" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64NIntGetElementMaxValue", ["TargetType"] = "nint", ["Source"] = "default(Vector64)", ["Method"] = "GetElement(int.MaxValue)" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64NIntWithElementNegativeOne", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "WithElement(-1, (nint)0)" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64NIntWithElement0", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "WithElement(0, (nint)0)" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64NIntWithElementMaxValue", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "WithElement(int.MaxValue, (nint)0)" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64NIntToScalar", ["TargetType"] = "nint", ["Source"] = "default(Vector64)", ["Method"] = "ToScalar()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64NIntToVector128", ["TargetType"] = "Vector128", ["Source"] = "default(Vector64)", ["Method"] = "ToVector128()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64NIntToVector128Unsafe", ["TargetType"] = "Vector128", ["Source"] = "default(Vector64)", ["Method"] = "ToVector128Unsafe()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64NIntToString", ["TargetType"] = "string", ["Source"] = "default(Vector64)", ["Method"] = "ToString()" }), + + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64NUIntZero", ["TargetType"] = "Vector64", ["Source"] = "Vector64", ["Method"] = "Zero" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64NUIntAllBitsSet", ["TargetType"] = "Vector64", ["Source"] = "Vector64", ["Method"] = "AllBitsSet" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64NUIntAsGeneric_NUInt", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64ByteAsGeneric_NUInt", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64DoubleAsGeneric_NUInt", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64Int16AsGeneric_NUInt", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64Int32AsGeneric_NUInt", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64Int64AsGeneric_NUInt", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64SByteAsGeneric_NUInt", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64SingleAsGeneric_NUInt", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64UInt16AsGeneric_NUInt", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64UInt32AsGeneric_NUInt", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64UInt64AsGeneric_NUInt", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64NUIntAsGeneric_Byte", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64NUIntAsGeneric_Double", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64NUIntAsGeneric_Int16", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64NUIntAsGeneric_Int32", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64NUIntAsGeneric_Int64", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64NUIntAsGeneric_SByte", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64NUIntAsGeneric_Single", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64NUIntAsGeneric_UInt16", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64NUIntAsGeneric_UInt32", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64NUIntAsGeneric_UInt64", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64NUIntAsByte", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "AsByte()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64NUIntAsDouble", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "AsDouble()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64NUIntAsInt16", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "AsInt16()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64NUIntAsInt32", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "AsInt32()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64NUIntAsInt64", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "AsInt64()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64NUIntAsSByte", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "AsSByte()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64NUIntAsSingle", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "AsSingle()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64NUIntAsUInt16", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "AsUInt16()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64NUIntAsUInt32", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "AsUInt32()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64NUIntAsUInt64", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "AsUInt64()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64NUIntGetElementNegativeOne", ["TargetType"] = "nuint", ["Source"] = "default(Vector64)", ["Method"] = "GetElement(-1)" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64NUIntGetElement0", ["TargetType"] = "nuint", ["Source"] = "default(Vector64)", ["Method"] = "GetElement(0)" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64NUIntGetElementMaxValue", ["TargetType"] = "nuint", ["Source"] = "default(Vector64)", ["Method"] = "GetElement(int.MaxValue)" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64NUIntWithElementNegativeOne", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "WithElement(-1, (nuint)0)" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64NUIntWithElement0", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "WithElement(0, (nuint)0)" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64NUIntWithElementMaxValue", ["TargetType"] = "Vector64", ["Source"] = "default(Vector64)", ["Method"] = "WithElement(int.MaxValue, (nuint)0)" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64NUIntToScalar", ["TargetType"] = "nuint", ["Source"] = "default(Vector64)", ["Method"] = "ToScalar()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64NUIntToVector128", ["TargetType"] = "Vector128", ["Source"] = "default(Vector64)", ["Method"] = "ToVector128()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64NUIntToVector128Unsafe", ["TargetType"] = "Vector128", ["Source"] = "default(Vector64)", ["Method"] = "ToVector128Unsafe()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector64NUIntToString", ["TargetType"] = "string", ["Source"] = "default(Vector64)", ["Method"] = "ToString()" }), + + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128BooleanZero", ["TargetType"] = "Vector128", ["Source"] = "Vector128", ["Method"] = "Zero" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128BooleanAllBitsSet", ["TargetType"] = "Vector128", ["Source"] = "Vector128", ["Method"] = "AllBitsSet" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128BooleanAsGeneric_Boolean", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128ByteAsGeneric_Boolean", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128DoubleAsGeneric_Boolean", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128Int16AsGeneric_Boolean", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128Int32AsGeneric_Boolean", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128Int64AsGeneric_Boolean", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128SByteAsGeneric_Boolean", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128SingleAsGeneric_Boolean", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128UInt16AsGeneric_Boolean", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128UInt32AsGeneric_Boolean", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128UInt64AsGeneric_Boolean", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128BooleanAsGeneric_Byte", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128BooleanAsGeneric_Double", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128BooleanAsGeneric_Int16", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128BooleanAsGeneric_Int32", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128BooleanAsGeneric_Int64", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128BooleanAsGeneric_SByte", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128BooleanAsGeneric_Single", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128BooleanAsGeneric_UInt16", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128BooleanAsGeneric_UInt32", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128BooleanAsGeneric_UInt64", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128BooleanAsByte", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "AsByte()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128BooleanAsDouble", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "AsDouble()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128BooleanAsInt16", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "AsInt16()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128BooleanAsInt32", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "AsInt32()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128BooleanAsInt64", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "AsInt64()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128BooleanAsSByte", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "AsSByte()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128BooleanAsSingle", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "AsSingle()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128BooleanAsUInt16", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "AsUInt16()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128BooleanAsUInt32", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "AsUInt32()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128BooleanAsUInt64", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "AsUInt64()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128BooleanGetElementNegativeOne", ["TargetType"] = "bool", ["Source"] = "default(Vector128)", ["Method"] = "GetElement(-1)" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128BooleanGetElement0", ["TargetType"] = "bool", ["Source"] = "default(Vector128)", ["Method"] = "GetElement(0)" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128BooleanGetElementMaxValue", ["TargetType"] = "bool", ["Source"] = "default(Vector128)", ["Method"] = "GetElement(int.MaxValue)" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128BooleanWithElementNegativeOne", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "WithElement(-1, false)" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128BooleanWithElement0", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "WithElement(0, false)" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128BooleanWithElementMaxValue", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "WithElement(int.MaxValue, false)" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128BooleanGetLower", ["TargetType"] = "Vector64", ["Source"] = "default(Vector128)", ["Method"] = "GetLower()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128BooleanWithLower", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "WithLower(default(Vector64))" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128BooleanGetUpper", ["TargetType"] = "Vector64", ["Source"] = "default(Vector128)", ["Method"] = "GetUpper()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128BooleanWithUpper", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "WithUpper(default(Vector64))" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128BooleanToScalar", ["TargetType"] = "bool", ["Source"] = "default(Vector128)", ["Method"] = "ToScalar()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128BooleanToVector256", ["TargetType"] = "Vector256", ["Source"] = "default(Vector128)", ["Method"] = "ToVector256()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128BooleanToVector256Unsafe", ["TargetType"] = "Vector256", ["Source"] = "default(Vector128)", ["Method"] = "ToVector256Unsafe()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128BooleanToString", ["TargetType"] = "string", ["Source"] = "default(Vector128)", ["Method"] = "ToString()" }), + + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128NIntZero", ["TargetType"] = "Vector128", ["Source"] = "Vector128", ["Method"] = "Zero" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128NIntAllBitsSet", ["TargetType"] = "Vector128", ["Source"] = "Vector128", ["Method"] = "AllBitsSet" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128NIntAsGeneric_NInt", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128ByteAsGeneric_NInt", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128DoubleAsGeneric_NInt", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128Int16AsGeneric_NInt", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128Int32AsGeneric_NInt", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128Int64AsGeneric_NInt", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128SByteAsGeneric_NInt", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128SingleAsGeneric_NInt", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128UInt16AsGeneric_NInt", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128UInt32AsGeneric_NInt", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128UInt64AsGeneric_NInt", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128NIntAsGeneric_Byte", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128NIntAsGeneric_Double", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128NIntAsGeneric_Int16", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128NIntAsGeneric_Int32", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128NIntAsGeneric_Int64", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128NIntAsGeneric_SByte", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128NIntAsGeneric_Single", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128NIntAsGeneric_UInt16", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128NIntAsGeneric_UInt32", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128NIntAsGeneric_UInt64", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128NIntAsByte", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "AsByte()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128NIntAsDouble", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "AsDouble()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128NIntAsInt16", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "AsInt16()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128NIntAsInt32", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "AsInt32()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128NIntAsInt64", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "AsInt64()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128NIntAsSByte", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "AsSByte()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128NIntAsSingle", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "AsSingle()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128NIntAsUInt16", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "AsUInt16()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128NIntAsUInt32", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "AsUInt32()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128NIntAsUInt64", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "AsUInt64()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128NIntGetElementNegativeOne", ["TargetType"] = "nint", ["Source"] = "default(Vector128)", ["Method"] = "GetElement(-1)" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128NIntGetElement0", ["TargetType"] = "nint", ["Source"] = "default(Vector128)", ["Method"] = "GetElement(0)" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128NIntGetElementMaxValue", ["TargetType"] = "nint", ["Source"] = "default(Vector128)", ["Method"] = "GetElement(int.MaxValue)" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128NIntWithElementNegativeOne", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "WithElement(-1, (nint)0)" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128NIntWithElement0", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "WithElement(0, (nint)0)" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128NIntWithElementMaxValue", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "WithElement(int.MaxValue, (nint)0)" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128NIntGetLower", ["TargetType"] = "Vector64", ["Source"] = "default(Vector128)", ["Method"] = "GetLower()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128NIntWithLower", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "WithLower(default(Vector64))" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128NIntGetUpper", ["TargetType"] = "Vector64", ["Source"] = "default(Vector128)", ["Method"] = "GetUpper()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128NIntWithUpper", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "WithUpper(default(Vector64))" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128NIntToScalar", ["TargetType"] = "nint", ["Source"] = "default(Vector128)", ["Method"] = "ToScalar()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128NIntToVector256", ["TargetType"] = "Vector256", ["Source"] = "default(Vector128)", ["Method"] = "ToVector256()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128NIntToVector256Unsafe", ["TargetType"] = "Vector256", ["Source"] = "default(Vector128)", ["Method"] = "ToVector256Unsafe()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128NIntToString", ["TargetType"] = "string", ["Source"] = "default(Vector128)", ["Method"] = "ToString()" }), + + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128NUIntZero", ["TargetType"] = "Vector128", ["Source"] = "Vector128", ["Method"] = "Zero" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128NUIntAllBitsSet", ["TargetType"] = "Vector128", ["Source"] = "Vector128", ["Method"] = "AllBitsSet" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128NUIntAsGeneric_NUInt", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128ByteAsGeneric_NUInt", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128DoubleAsGeneric_NUInt", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128Int16AsGeneric_NUInt", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128Int32AsGeneric_NUInt", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128Int64AsGeneric_NUInt", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128SByteAsGeneric_NUInt", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128SingleAsGeneric_NUInt", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128UInt16AsGeneric_NUInt", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128UInt32AsGeneric_NUInt", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128UInt64AsGeneric_NUInt", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128NUIntAsGeneric_Byte", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128NUIntAsGeneric_Double", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128NUIntAsGeneric_Int16", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128NUIntAsGeneric_Int32", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128NUIntAsGeneric_Int64", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128NUIntAsGeneric_SByte", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128NUIntAsGeneric_Single", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128NUIntAsGeneric_UInt16", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128NUIntAsGeneric_UInt32", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128NUIntAsGeneric_UInt64", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128NUIntAsByte", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "AsByte()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128NUIntAsDouble", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "AsDouble()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128NUIntAsInt16", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "AsInt16()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128NUIntAsInt32", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "AsInt32()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128NUIntAsInt64", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "AsInt64()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128NUIntAsSByte", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "AsSByte()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128NUIntAsSingle", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "AsSingle()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128NUIntAsUInt16", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "AsUInt16()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128NUIntAsUInt32", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "AsUInt32()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128NUIntAsUInt64", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "AsUInt64()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128NUIntGetElementNegativeOne", ["TargetType"] = "nuint", ["Source"] = "default(Vector128)", ["Method"] = "GetElement(-1)" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128NUIntGetElement0", ["TargetType"] = "nuint", ["Source"] = "default(Vector128)", ["Method"] = "GetElement(0)" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128NUIntGetElementMaxValue", ["TargetType"] = "nuint", ["Source"] = "default(Vector128)", ["Method"] = "GetElement(int.MaxValue)" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128NUIntWithElementNegativeOne", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "WithElement(-1, (nuint)0)" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128NUIntWithElement0", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "WithElement(0, (nuint)0)" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128NUIntWithElementMaxValue", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "WithElement(int.MaxValue, (nuint)0)" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128NUIntGetLower", ["TargetType"] = "Vector64", ["Source"] = "default(Vector128)", ["Method"] = "GetLower()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128NUIntWithLower", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "WithLower(default(Vector64))" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128NUIntGetUpper", ["TargetType"] = "Vector64", ["Source"] = "default(Vector128)", ["Method"] = "GetUpper()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128NUIntWithUpper", ["TargetType"] = "Vector128", ["Source"] = "default(Vector128)", ["Method"] = "WithUpper(default(Vector64))" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128NUIntToScalar", ["TargetType"] = "nuint", ["Source"] = "default(Vector128)", ["Method"] = "ToScalar()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128NUIntToVector256", ["TargetType"] = "Vector256", ["Source"] = "default(Vector128)", ["Method"] = "ToVector256()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128NUIntToVector256Unsafe", ["TargetType"] = "Vector256", ["Source"] = "default(Vector128)", ["Method"] = "ToVector256Unsafe()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector128NUIntToString", ["TargetType"] = "string", ["Source"] = "default(Vector128)", ["Method"] = "ToString()" }), + + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256BooleanZero", ["TargetType"] = "Vector256", ["Source"] = "Vector256", ["Method"] = "Zero" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256BooleanAllBitsSet", ["TargetType"] = "Vector256", ["Source"] = "Vector256", ["Method"] = "AllBitsSet" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256BooleanAsGeneric_Boolean", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256ByteAsGeneric_Boolean", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256DoubleAsGeneric_Boolean", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256Int16AsGeneric_Boolean", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256Int32AsGeneric_Boolean", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256Int64AsGeneric_Boolean", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256SByteAsGeneric_Boolean", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256SingleAsGeneric_Boolean", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256UInt16AsGeneric_Boolean", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256UInt32AsGeneric_Boolean", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256UInt64AsGeneric_Boolean", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256BooleanAsGeneric_Byte", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256BooleanAsGeneric_Double", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256BooleanAsGeneric_Int16", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256BooleanAsGeneric_Int32", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256BooleanAsGeneric_Int64", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256BooleanAsGeneric_SByte", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256BooleanAsGeneric_Single", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256BooleanAsGeneric_UInt16", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256BooleanAsGeneric_UInt32", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256BooleanAsGeneric_UInt64", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256BooleanAsByte", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "AsByte()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256BooleanAsDouble", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "AsDouble()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256BooleanAsInt16", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "AsInt16()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256BooleanAsInt32", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "AsInt32()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256BooleanAsInt64", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "AsInt64()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256BooleanAsSByte", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "AsSByte()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256BooleanAsSingle", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "AsSingle()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256BooleanAsUInt16", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "AsUInt16()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256BooleanAsUInt32", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "AsUInt32()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256BooleanAsUInt64", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "AsUInt64()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256BooleanGetElementNegativeOne", ["TargetType"] = "bool", ["Source"] = "default(Vector256)", ["Method"] = "GetElement(-1)" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256BooleanGetElement0", ["TargetType"] = "bool", ["Source"] = "default(Vector256)", ["Method"] = "GetElement(0)" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256BooleanGetElementMaxValue", ["TargetType"] = "bool", ["Source"] = "default(Vector256)", ["Method"] = "GetElement(int.MaxValue)" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256BooleanWithElementNegativeOne", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "WithElement(-1, false)" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256BooleanWithElement0", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "WithElement(0, false)" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256BooleanWithElementMaxValue", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "WithElement(int.MaxValue, false)" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256BooleanGetLower", ["TargetType"] = "Vector128", ["Source"] = "default(Vector256)", ["Method"] = "GetLower()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256BooleanWithLower", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "WithLower(default(Vector128))" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256BooleanGetUpper", ["TargetType"] = "Vector128", ["Source"] = "default(Vector256)", ["Method"] = "GetUpper()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256BooleanWithUpper", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "WithUpper(default(Vector128))" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256BooleanToScalar", ["TargetType"] = "bool", ["Source"] = "default(Vector256)", ["Method"] = "ToScalar()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256BooleanToString", ["TargetType"] = "string", ["Source"] = "default(Vector256)", ["Method"] = "ToString()" }), + + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256NIntZero", ["TargetType"] = "Vector256", ["Source"] = "Vector256", ["Method"] = "Zero" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256NIntAllBitsSet", ["TargetType"] = "Vector256", ["Source"] = "Vector256", ["Method"] = "AllBitsSet" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256NIntAsGeneric_NInt", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256ByteAsGeneric_NInt", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256DoubleAsGeneric_NInt", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256Int16AsGeneric_NInt", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256Int32AsGeneric_NInt", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256Int64AsGeneric_NInt", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256SByteAsGeneric_NInt", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256SingleAsGeneric_NInt", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256UInt16AsGeneric_NInt", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256UInt32AsGeneric_NInt", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256UInt64AsGeneric_NInt", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256NIntAsGeneric_Byte", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256NIntAsGeneric_Double", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256NIntAsGeneric_Int16", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256NIntAsGeneric_Int32", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256NIntAsGeneric_Int64", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256NIntAsGeneric_SByte", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256NIntAsGeneric_Single", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256NIntAsGeneric_UInt16", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256NIntAsGeneric_UInt32", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256NIntAsGeneric_UInt64", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256NIntAsByte", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "AsByte()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256NIntAsDouble", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "AsDouble()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256NIntAsInt16", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "AsInt16()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256NIntAsInt32", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "AsInt32()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256NIntAsInt64", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "AsInt64()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256NIntAsSByte", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "AsSByte()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256NIntAsSingle", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "AsSingle()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256NIntAsUInt16", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "AsUInt16()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256NIntAsUInt32", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "AsUInt32()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256NIntAsUInt64", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "AsUInt64()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256NIntGetElementNegativeOne", ["TargetType"] = "nint", ["Source"] = "default(Vector256)", ["Method"] = "GetElement(-1)" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256NIntGetElement0", ["TargetType"] = "nint", ["Source"] = "default(Vector256)", ["Method"] = "GetElement(0)" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256NIntGetElementMaxValue", ["TargetType"] = "nint", ["Source"] = "default(Vector256)", ["Method"] = "GetElement(int.MaxValue)" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256NIntWithElementNegativeOne", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "WithElement(-1, (nint)0)" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256NIntWithElement0", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "WithElement(0, (nint)0)" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256NIntWithElementMaxValue", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "WithElement(int.MaxValue, (nint)0)" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256NIntGetLower", ["TargetType"] = "Vector128", ["Source"] = "default(Vector256)", ["Method"] = "GetLower()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256NIntWithLower", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "WithLower(default(Vector128))" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256NIntGetUpper", ["TargetType"] = "Vector128", ["Source"] = "default(Vector256)", ["Method"] = "GetUpper()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256NIntWithUpper", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "WithUpper(default(Vector128))" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256NIntToScalar", ["TargetType"] = "nint", ["Source"] = "default(Vector256)", ["Method"] = "ToScalar()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256NIntToString", ["TargetType"] = "string", ["Source"] = "default(Vector256)", ["Method"] = "ToString()" }), + + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256NUIntZero", ["TargetType"] = "Vector256", ["Source"] = "Vector256", ["Method"] = "Zero" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256NUIntAllBitsSet", ["TargetType"] = "Vector256", ["Source"] = "Vector256", ["Method"] = "AllBitsSet" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256NUIntAsGeneric_NUInt", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256ByteAsGeneric_NUInt", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256DoubleAsGeneric_NUInt", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256Int16AsGeneric_NUInt", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256Int32AsGeneric_NUInt", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256Int64AsGeneric_NUInt", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256SByteAsGeneric_NUInt", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256SingleAsGeneric_NUInt", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256UInt16AsGeneric_NUInt", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256UInt32AsGeneric_NUInt", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256UInt64AsGeneric_NUInt", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256NUIntAsGeneric_Byte", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256NUIntAsGeneric_Double", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256NUIntAsGeneric_Int16", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256NUIntAsGeneric_Int32", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256NUIntAsGeneric_Int64", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256NUIntAsGeneric_SByte", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256NUIntAsGeneric_Single", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256NUIntAsGeneric_UInt16", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256NUIntAsGeneric_UInt32", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256NUIntAsGeneric_UInt64", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "As()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256NUIntAsByte", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "AsByte()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256NUIntAsDouble", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "AsDouble()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256NUIntAsInt16", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "AsInt16()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256NUIntAsInt32", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "AsInt32()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256NUIntAsInt64", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "AsInt64()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256NUIntAsSByte", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "AsSByte()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256NUIntAsSingle", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "AsSingle()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256NUIntAsUInt16", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "AsUInt16()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256NUIntAsUInt32", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "AsUInt32()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256NUIntAsUInt64", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "AsUInt64()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256NUIntGetElementNegativeOne", ["TargetType"] = "nuint", ["Source"] = "default(Vector256)", ["Method"] = "GetElement(-1)" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256NUIntGetElement0", ["TargetType"] = "nuint", ["Source"] = "default(Vector256)", ["Method"] = "GetElement(0)" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256NUIntGetElementMaxValue", ["TargetType"] = "nuint", ["Source"] = "default(Vector256)", ["Method"] = "GetElement(int.MaxValue)" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256NUIntWithElementNegativeOne", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "WithElement(-1, (nuint)0)" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256NUIntWithElement0", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "WithElement(0, (nuint)0)" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256NUIntWithElementMaxValue", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "WithElement(int.MaxValue, (nuint)0)" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256NUIntGetLower", ["TargetType"] = "Vector128", ["Source"] = "default(Vector256)", ["Method"] = "GetLower()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256NUIntWithLower", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "WithLower(default(Vector128))" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256NUIntGetUpper", ["TargetType"] = "Vector128", ["Source"] = "default(Vector256)", ["Method"] = "GetUpper()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256NUIntWithUpper", ["TargetType"] = "Vector256", ["Source"] = "default(Vector256)", ["Method"] = "WithUpper(default(Vector128))" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256NUIntToScalar", ["TargetType"] = "nuint", ["Source"] = "default(Vector256)", ["Method"] = "ToScalar()" }), + ("VectorNotSupportedTest.template", new Dictionary { ["Isa"] = "NotSupported", ["Name"] = "Vector256NUIntToString", ["TargetType"] = "string", ["Source"] = "default(Vector256)", ["Method"] = "ToString()" }), }; private static void ProcessInputs(string groupName, (string templateFileName, Dictionary templateData)[] inputs) diff --git a/src/tests/JIT/SIMD/VectorAbs.cs b/src/tests/JIT/SIMD/VectorAbs.cs index f0966bd8cf318b..f4f8936d5ac074 100644 --- a/src/tests/JIT/SIMD/VectorAbs.cs +++ b/src/tests/JIT/SIMD/VectorAbs.cs @@ -84,6 +84,8 @@ private static int Main() if (VectorAbsTest.VectorAbs((byte)0xff, (byte)0xff) != Pass) returnVal = Fail; if (VectorAbsTest.VectorAbs(0x41000000u, 0x41000000u) != Pass) returnVal = Fail; if (VectorAbsTest.VectorAbs(0x4100000000000000ul, 0x4100000000000000ul) != Pass) returnVal = Fail; + if (VectorAbsTest.VectorAbs(-1, 1) != Pass) returnVal = Fail; + if (VectorAbsTest.VectorAbs(0x41000000u, 0x41000000u) != Pass) returnVal = Fail; JitLog jitLog = new JitLog(); if (!jitLog.Check("Abs", "Single")) returnVal = Fail; @@ -99,6 +101,8 @@ private static int Main() if (!jitLog.Check("Abs", "Byte")) returnVal = Fail; if (!jitLog.Check("Abs", "UInt32")) returnVal = Fail; if (!jitLog.Check("Abs", "UInt64")) returnVal = Fail; + if (!jitLog.Check("Abs", "IntPtr")) returnVal = Fail; + if (!jitLog.Check("Abs", "UIntPtr")) returnVal = Fail; jitLog.Dispose(); diff --git a/src/tests/JIT/SIMD/VectorAdd.cs b/src/tests/JIT/SIMD/VectorAdd.cs index 3ca30f578bb988..034f1cdd3f62f3 100644 --- a/src/tests/JIT/SIMD/VectorAdd.cs +++ b/src/tests/JIT/SIMD/VectorAdd.cs @@ -85,6 +85,8 @@ private static int Main() if (VectorAddTest.VectorAdd(-1, -2, (sbyte)(-1 - 2)) != Pass) returnVal = Fail; if (VectorAddTest.VectorAdd(0x41000000u, 0x42000000u, 0x41000000u + 0x42000000u) != Pass) returnVal = Fail; if (VectorAddTest.VectorAdd(0x4100000000000000ul, 0x4200000000000000ul, 0x4100000000000000ul + 0x4200000000000000ul) != Pass) returnVal = Fail; + if (VectorAddTest.VectorAdd(1, 2, (nint)(1 + 2)) != Pass) returnVal = Fail; + if (VectorAddTest.VectorAdd(0x41000000u, 0x42000000u, 0x41000000u + 0x42000000u) != Pass) returnVal = Fail; JitLog jitLog = new JitLog(); if (!jitLog.Check("op_Addition", "Single")) returnVal = Fail; @@ -100,6 +102,8 @@ private static int Main() if (!jitLog.Check("op_Addition", "SByte")) returnVal = Fail; if (!jitLog.Check("op_Addition", "UInt32")) returnVal = Fail; if (!jitLog.Check("op_Addition", "UInt64")) returnVal = Fail; + if (!jitLog.Check("op_Addition", "IntPtr")) returnVal = Fail; + if (!jitLog.Check("op_Addition", "UIntPtr")) returnVal = Fail; jitLog.Dispose(); return returnVal; diff --git a/src/tests/JIT/SIMD/VectorArray.cs b/src/tests/JIT/SIMD/VectorArray.cs index 32aaec0e2a4343..505743a7e8c72e 100644 --- a/src/tests/JIT/SIMD/VectorArray.cs +++ b/src/tests/JIT/SIMD/VectorArray.cs @@ -158,6 +158,8 @@ private static int Main() if (VectorArrayTest.VectorArray(1) != Pass) returnVal = Fail; if (VectorArrayTest.VectorArray(1) != Pass) returnVal = Fail; if (VectorArrayTest.VectorArray(1ul) != Pass) returnVal = Fail; + if (VectorArrayTest.VectorArray(1) != Pass) returnVal = Fail; + if (VectorArrayTest.VectorArray(1) != Pass) returnVal = Fail; JitLog jitLog = new JitLog(); if (!jitLog.Check("get_Item", "Single")) returnVal = Fail; @@ -191,6 +193,10 @@ private static int Main() if (!jitLog.Check("System.Numerics.Vector`1[UInt32][System.UInt32]:.ctor(int)")) returnVal = Fail; if (!jitLog.Check("get_Item", "UInt64")) returnVal = Fail; if (!jitLog.Check("System.Numerics.Vector`1[UInt64][System.UInt64]:.ctor(long)")) returnVal = Fail; + if (!jitLog.Check("get_Item", "IntPtr")) returnVal = Fail; + if (!jitLog.Check("System.Numerics.Vector`1[IntPtr][System.UIntPtr]:.ctor(nuint)")) returnVal = Fail; + if (!jitLog.Check("get_Item", "UIntPtr")) returnVal = Fail; + if (!jitLog.Check("System.Numerics.Vector`1[UIntPtr][System.IntPtr]:.ctor(nint)")) returnVal = Fail; jitLog.Dispose(); } diff --git a/src/tests/JIT/SIMD/VectorArrayInit.cs b/src/tests/JIT/SIMD/VectorArrayInit.cs index 8f9212873126d4..befc7399a0dd78 100644 --- a/src/tests/JIT/SIMD/VectorArrayInit.cs +++ b/src/tests/JIT/SIMD/VectorArrayInit.cs @@ -142,6 +142,10 @@ private static int Main() if (VectorArrayInitTest.VectorArrayInit(17, random) == Fail) returnVal = Fail; if (VectorArrayInitTest.VectorArrayInit(12, random) == Fail) returnVal = Fail; if (VectorArrayInitTest.VectorArrayInit(17, random) == Fail) returnVal = Fail; + if (VectorArrayInitTest.VectorArrayInit(12, random) == Fail) returnVal = Fail; + if (VectorArrayInitTest.VectorArrayInit(17, random) == Fail) returnVal = Fail; + if (VectorArrayInitTest.VectorArrayInit(12, random) == Fail) returnVal = Fail; + if (VectorArrayInitTest.VectorArrayInit(17, random) == Fail) returnVal = Fail; JitLog jitLog = new JitLog(); if (!jitLog.Check(".ctor(ref)", "Single")) returnVal = Fail; @@ -164,6 +168,10 @@ private static int Main() if (!jitLog.Check(".ctor(ref,int)", "UInt32")) returnVal = Fail; if (!jitLog.Check(".ctor(ref)", "UInt64")) returnVal = Fail; if (!jitLog.Check(".ctor(ref,int)", "UInt64")) returnVal = Fail; + if (!jitLog.Check(".ctor(ref)", "IntPtr")) returnVal = Fail; + if (!jitLog.Check(".ctor(ref,int)", "IntPtr")) returnVal = Fail; + if (!jitLog.Check(".ctor(ref)", "UIntPtr")) returnVal = Fail; + if (!jitLog.Check(".ctor(ref,int)", "UIntPtr")) returnVal = Fail; jitLog.Dispose(); return returnVal; diff --git a/src/tests/JIT/SIMD/VectorCast.cs b/src/tests/JIT/SIMD/VectorCast.cs index 0c2b42658b835b..b32e21e50a4548 100644 --- a/src/tests/JIT/SIMD/VectorCast.cs +++ b/src/tests/JIT/SIMD/VectorCast.cs @@ -24,7 +24,7 @@ static VectorTest() static T[] GetPatternAs() where T : struct { - T[] pattern = new T[bytePattern.Length]; // should be bytes.Length / sizeof(T) but sizeof(T) doesn't work + T[] pattern = new T[bytePattern.Length]; // should be bytes.Length / sizeof(T) but sizeof(T) doesn't work // so we'll settle for a larger than needed array Buffer.BlockCopy(bytePattern, 0, pattern, 0, bytePattern.Length); return pattern; @@ -46,6 +46,8 @@ static T[] GetPatternAs() where T : struct static Vector To_Int64 (Vector from) where T : struct => (Vector ) from; static Vector To_Single (Vector from) where T : struct => (Vector) from; static Vector To_Double (Vector from) where T : struct => (Vector) from; + static Vector To_NUInt (Vector from) where T : struct => (Vector) from; + static Vector To_NInt (Vector from) where T : struct => (Vector) from; // Check the result of casting Vector to a specific vector type. static bool Test_Byte () where T : struct => GetVector () == To_Byte ( GetVector() ); @@ -58,6 +60,8 @@ static T[] GetPatternAs() where T : struct static bool Test_Int64 () where T : struct => GetVector () == To_Int64 ( GetVector() ); static bool Test_Single () where T : struct => GetVector() == To_Single ( GetVector() ); static bool Test_Double () where T : struct => GetVector() == To_Double ( GetVector() ); + static bool Test_NUInt () where T : struct => GetVector () == To_NUInt ( GetVector() ); + static bool Test_NInt () where T : struct => GetVector () == To_NInt ( GetVector() ); [MethodImpl(MethodImplOptions.NoInlining)] static bool ReportFailure(bool success, [CallerLineNumber] int line = 0) @@ -84,6 +88,8 @@ static int Main() succeeded &= ReportFailure( Test_Int64 () ); succeeded &= ReportFailure( Test_Single() ); succeeded &= ReportFailure( Test_Double() ); + succeeded &= ReportFailure( Test_NUInt () ); + succeeded &= ReportFailure( Test_NInt () ); succeeded &= ReportFailure( Test_Byte () ); succeeded &= ReportFailure( Test_SByte () ); @@ -95,6 +101,8 @@ static int Main() succeeded &= ReportFailure( Test_Int64 () ); succeeded &= ReportFailure( Test_Single() ); succeeded &= ReportFailure( Test_Double() ); + succeeded &= ReportFailure( Test_NUInt () ); + succeeded &= ReportFailure( Test_NInt () ); succeeded &= ReportFailure( Test_Byte () ); succeeded &= ReportFailure( Test_SByte () ); @@ -106,6 +114,8 @@ static int Main() succeeded &= ReportFailure( Test_Int64 () ); succeeded &= ReportFailure( Test_Single() ); succeeded &= ReportFailure( Test_Double() ); + succeeded &= ReportFailure( Test_NUInt () ); + succeeded &= ReportFailure( Test_NInt () ); succeeded &= ReportFailure( Test_Byte () ); succeeded &= ReportFailure( Test_SByte () ); @@ -117,6 +127,8 @@ static int Main() succeeded &= ReportFailure( Test_Int64 () ); succeeded &= ReportFailure( Test_Single() ); succeeded &= ReportFailure( Test_Double() ); + succeeded &= ReportFailure( Test_NUInt () ); + succeeded &= ReportFailure( Test_NInt () ); succeeded &= ReportFailure( Test_Byte () ); succeeded &= ReportFailure( Test_SByte () ); @@ -128,6 +140,8 @@ static int Main() succeeded &= ReportFailure( Test_Int64 () ); succeeded &= ReportFailure( Test_Single() ); succeeded &= ReportFailure( Test_Double() ); + succeeded &= ReportFailure( Test_NUInt () ); + succeeded &= ReportFailure( Test_NInt () ); succeeded &= ReportFailure( Test_Byte () ); succeeded &= ReportFailure( Test_SByte () ); @@ -139,6 +153,8 @@ static int Main() succeeded &= ReportFailure( Test_Int64 () ); succeeded &= ReportFailure( Test_Single() ); succeeded &= ReportFailure( Test_Double() ); + succeeded &= ReportFailure( Test_NUInt () ); + succeeded &= ReportFailure( Test_NInt () ); succeeded &= ReportFailure( Test_Byte () ); succeeded &= ReportFailure( Test_SByte () ); @@ -150,6 +166,8 @@ static int Main() succeeded &= ReportFailure( Test_Int64 () ); succeeded &= ReportFailure( Test_Single() ); succeeded &= ReportFailure( Test_Double() ); + succeeded &= ReportFailure( Test_NUInt () ); + succeeded &= ReportFailure( Test_NInt () ); succeeded &= ReportFailure( Test_Byte () ); succeeded &= ReportFailure( Test_SByte () ); @@ -161,6 +179,8 @@ static int Main() succeeded &= ReportFailure( Test_Int64 () ); succeeded &= ReportFailure( Test_Single() ); succeeded &= ReportFailure( Test_Double() ); + succeeded &= ReportFailure( Test_NUInt () ); + succeeded &= ReportFailure( Test_NInt () ); succeeded &= ReportFailure( Test_Byte () ); succeeded &= ReportFailure( Test_SByte () ); @@ -172,6 +192,8 @@ static int Main() succeeded &= ReportFailure( Test_Int64 () ); succeeded &= ReportFailure( Test_Single() ); succeeded &= ReportFailure( Test_Double() ); + succeeded &= ReportFailure( Test_NUInt () ); + succeeded &= ReportFailure( Test_NInt () ); succeeded &= ReportFailure( Test_Byte () ); succeeded &= ReportFailure( Test_SByte () ); @@ -183,6 +205,34 @@ static int Main() succeeded &= ReportFailure( Test_Int64 () ); succeeded &= ReportFailure( Test_Single() ); succeeded &= ReportFailure( Test_Double() ); + succeeded &= ReportFailure( Test_NUInt () ); + succeeded &= ReportFailure( Test_NInt () ); + + succeeded &= ReportFailure( Test_Byte () ); + succeeded &= ReportFailure( Test_SByte () ); + succeeded &= ReportFailure( Test_UInt16() ); + succeeded &= ReportFailure( Test_Int16 () ); + succeeded &= ReportFailure( Test_UInt32() ); + succeeded &= ReportFailure( Test_Int32 () ); + succeeded &= ReportFailure( Test_UInt64() ); + succeeded &= ReportFailure( Test_Int64 () ); + succeeded &= ReportFailure( Test_Single() ); + succeeded &= ReportFailure( Test_Double() ); + succeeded &= ReportFailure( Test_NUInt () ); + succeeded &= ReportFailure( Test_NInt () ); + + succeeded &= ReportFailure( Test_Byte () ); + succeeded &= ReportFailure( Test_SByte () ); + succeeded &= ReportFailure( Test_UInt16() ); + succeeded &= ReportFailure( Test_Int16 () ); + succeeded &= ReportFailure( Test_UInt32() ); + succeeded &= ReportFailure( Test_Int32 () ); + succeeded &= ReportFailure( Test_UInt64() ); + succeeded &= ReportFailure( Test_Int64 () ); + succeeded &= ReportFailure( Test_Single() ); + succeeded &= ReportFailure( Test_Double() ); + succeeded &= ReportFailure( Test_NUInt () ); + succeeded &= ReportFailure( Test_NInt () ); using (JitLog jitLog = new JitLog()) { @@ -196,6 +246,8 @@ static int Main() succeeded &= ReportFailure( jitLog.Check("op_Explicit", "Int64" ) ); succeeded &= ReportFailure( jitLog.Check("op_Explicit", "Single") ); succeeded &= ReportFailure( jitLog.Check("op_Explicit", "Double") ); + succeeded &= ReportFailure( jitLog.Check("op_Explicit", "IntPtr") ); + succeeded &= ReportFailure( jitLog.Check("op_Explicit", "UIntPtr") ); } return succeeded ? Pass : Fail; diff --git a/src/tests/JIT/SIMD/VectorCopyToArray.cs b/src/tests/JIT/SIMD/VectorCopyToArray.cs index c5c9c677a0b861..abbac422a0e954 100644 --- a/src/tests/JIT/SIMD/VectorCopyToArray.cs +++ b/src/tests/JIT/SIMD/VectorCopyToArray.cs @@ -143,6 +143,10 @@ private static int Main() if (VectorCopyToArrayTest.VectorCopyToArray(17, random) == Fail) returnVal = Fail; if (VectorCopyToArrayTest.VectorCopyToArray(12, random) == Fail) returnVal = Fail; if (VectorCopyToArrayTest.VectorCopyToArray(17, random) == Fail) returnVal = Fail; + if (VectorCopyToArrayTest.VectorCopyToArray(12, random) == Fail) returnVal = Fail; + if (VectorCopyToArrayTest.VectorCopyToArray(17, random) == Fail) returnVal = Fail; + if (VectorCopyToArrayTest.VectorCopyToArray(12, random) == Fail) returnVal = Fail; + if (VectorCopyToArrayTest.VectorCopyToArray(17, random) == Fail) returnVal = Fail; JitLog jitLog = new JitLog(); if (!jitLog.Check("CopyTo(ref)", "Single")) returnVal = Fail; @@ -165,6 +169,10 @@ private static int Main() if (!jitLog.Check("CopyTo(ref,int)", "UInt32")) returnVal = Fail; if (!jitLog.Check("CopyTo(ref)", "UInt64")) returnVal = Fail; if (!jitLog.Check("CopyTo(ref,int)", "UInt64")) returnVal = Fail; + if (!jitLog.Check("CopyTo(ref)", "IntPtr")) returnVal = Fail; + if (!jitLog.Check("CopyTo(ref,int)", "IntPtr")) returnVal = Fail; + if (!jitLog.Check("CopyTo(ref)", "UIntPtr")) returnVal = Fail; + if (!jitLog.Check("CopyTo(ref,int)", "UIntPtr")) returnVal = Fail; jitLog.Dispose(); return returnVal; diff --git a/src/tests/JIT/SIMD/VectorDiv.cs b/src/tests/JIT/SIMD/VectorDiv.cs index 59017823ddcb30..bba58b88f9e3af 100644 --- a/src/tests/JIT/SIMD/VectorDiv.cs +++ b/src/tests/JIT/SIMD/VectorDiv.cs @@ -106,6 +106,8 @@ private static int Main() if (VectorMulTest.VectorDiv(6, -3, -2) != Pass) returnVal = Fail; if (VectorMulTest.VectorDiv(6u, 3u, 2u) != Pass) returnVal = Fail; if (VectorMulTest.VectorDiv(8ul, 2ul, 4ul) != Pass) returnVal = Fail; + if (VectorMulTest.VectorDiv(6, 3, 2) != Pass) returnVal = Fail; + if (VectorMulTest.VectorDiv(6u, 3u, 2u) != Pass) returnVal = Fail; JitLog jitLog = new JitLog(); // Division is only recognized as an intrinsic for floating point element types. diff --git a/src/tests/JIT/SIMD/VectorDot.cs b/src/tests/JIT/SIMD/VectorDot.cs index c39c81f99ac9d6..1bc057eea7b879 100644 --- a/src/tests/JIT/SIMD/VectorDot.cs +++ b/src/tests/JIT/SIMD/VectorDot.cs @@ -110,6 +110,8 @@ private static int Main() if (VectorDotTest.VectorDot(3, 2, (sbyte)(6 * Vector.Count)) != Pass) returnVal = Fail; if (VectorDotTest.VectorDot(3u, 2u, (uint)(6 * Vector.Count)) != Pass) returnVal = Fail; if (VectorDotTest.VectorDot(3ul, 2ul, 6ul * (ulong)Vector.Count) != Pass) returnVal = Fail; + if (VectorDotTest.VectorDot(3, 2, 6 * Vector.Count) != Pass) returnVal = Fail; + if (VectorDotTest.VectorDot(3u, 2u, (nuint)(6 * Vector.Count)) != Pass) returnVal = Fail; JitLog jitLog = new JitLog(); // Dot is only recognized as an intrinsic for floating point element types diff --git a/src/tests/JIT/SIMD/VectorGet.cs b/src/tests/JIT/SIMD/VectorGet.cs index 19705614cd9410..e89862001ec00a 100644 --- a/src/tests/JIT/SIMD/VectorGet.cs +++ b/src/tests/JIT/SIMD/VectorGet.cs @@ -199,6 +199,12 @@ private static int Main() if (VectorGetTest.VectorGet(101, 1) == Fail) returnVal = Fail; if (VectorGetTest.VectorGet(100, 1) == Fail) returnVal = Fail; if (VectorGetTest.VectorGetIndexerOutOfRange(100, 1) == Fail) returnVal = Fail; + if (VectorGetTest.VectorGet(101, 1) == Fail) returnVal = Fail; + if (VectorGetTest.VectorGet(100, 1) == Fail) returnVal = Fail; + if (VectorGetTest.VectorGetIndexerOutOfRange(100, 1) == Fail) returnVal = Fail; + if (VectorGetTest.VectorGet(101, 1) == Fail) returnVal = Fail; + if (VectorGetTest.VectorGet(100, 1) == Fail) returnVal = Fail; + if (VectorGetTest.VectorGetIndexerOutOfRange(100, 1) == Fail) returnVal = Fail; JitLog jitLog = new JitLog(); if (!jitLog.Check("get_Item", "Double")) returnVal = Fail; @@ -221,6 +227,10 @@ private static int Main() if (!jitLog.Check("get_Count", "UInt32")) returnVal = Fail; if (!jitLog.Check("get_Item", "UInt64")) returnVal = Fail; if (!jitLog.Check("get_Count", "UInt64")) returnVal = Fail; + if (!jitLog.Check("get_Item", "IntPtr")) returnVal = Fail; + if (!jitLog.Check("get_Count", "IntPtr")) returnVal = Fail; + if (!jitLog.Check("get_Item", "UIntPtr")) returnVal = Fail; + if (!jitLog.Check("get_Count", "UIntPtr")) returnVal = Fail; jitLog.Dispose(); return returnVal; diff --git a/src/tests/JIT/SIMD/VectorMax.cs b/src/tests/JIT/SIMD/VectorMax.cs index aa0c88159fe54f..92c2a8347e6484 100644 --- a/src/tests/JIT/SIMD/VectorMax.cs +++ b/src/tests/JIT/SIMD/VectorMax.cs @@ -86,6 +86,8 @@ private static int Main() if (VectorMaxTest.VectorMax(-2, 3, 3) != Pass) returnVal = Fail; if (VectorMaxTest.VectorMax(0x80000000u, 0x40000000u, 0x80000000u) != Pass) returnVal = Fail; if (VectorMaxTest.VectorMax(2ul, 3ul, 3ul) != Pass) returnVal = Fail; + if (VectorMaxTest.VectorMax(2, 3, 3) != Pass) returnVal = Fail; + if (VectorMaxTest.VectorMax(0x80000000u, 0x40000000u, 0x80000000u) != Pass) returnVal = Fail; JitLog jitLog = new JitLog(); if (!jitLog.Check("Max", "Single")) returnVal = Fail; @@ -101,6 +103,8 @@ private static int Main() if (!jitLog.Check("Max", "SByte")) returnVal = Fail; if (!jitLog.Check("Max", "UInt32")) returnVal = Fail; if (!jitLog.Check("Max", "UInt64")) returnVal = Fail; + if (!jitLog.Check("Max", "IntPtr")) returnVal = Fail; + if (!jitLog.Check("Max", "UIntPtr")) returnVal = Fail; jitLog.Dispose(); return returnVal; diff --git a/src/tests/JIT/SIMD/VectorMin.cs b/src/tests/JIT/SIMD/VectorMin.cs index 9ebe2d7dac017c..80cd5e645272d8 100644 --- a/src/tests/JIT/SIMD/VectorMin.cs +++ b/src/tests/JIT/SIMD/VectorMin.cs @@ -86,6 +86,8 @@ private static int Main() if (VectorMinTest.VectorMin(-2, 3, -2) != Pass) returnVal = Fail; if (VectorMinTest.VectorMin(0x80000000u, 0x40000000u, 0x40000000u) != Pass) returnVal = Fail; if (VectorMinTest.VectorMin(2ul, 3ul, 2ul) != Pass) returnVal = Fail; + if (VectorMinTest.VectorMin(2, 3, 2) != Pass) returnVal = Fail; + if (VectorMinTest.VectorMin(0x80000000u, 0x40000000u, 0x40000000u) != Pass) returnVal = Fail; JitLog jitLog = new JitLog(); if (!jitLog.Check("Min", "Single")) returnVal = Fail; @@ -101,6 +103,8 @@ private static int Main() if (!jitLog.Check("Min", "SByte")) returnVal = Fail; if (!jitLog.Check("Min", "UInt32")) returnVal = Fail; if (!jitLog.Check("Min", "UInt64")) returnVal = Fail; + if (!jitLog.Check("Min", "IntPtr")) returnVal = Fail; + if (!jitLog.Check("Min", "UIntPtr")) returnVal = Fail; jitLog.Dispose(); return returnVal; diff --git a/src/tests/JIT/SIMD/VectorMul.cs b/src/tests/JIT/SIMD/VectorMul.cs index 607c0765ef992a..76b0713d1780f6 100644 --- a/src/tests/JIT/SIMD/VectorMul.cs +++ b/src/tests/JIT/SIMD/VectorMul.cs @@ -118,6 +118,10 @@ private static int Main() returnVal = Fail; if (VectorMulTest.VectorMul(2ul, 3ul, 2ul * 3ul, (2ul * 3ul) * (2ul * 3ul), (3ul * 3ul)) != Pass) returnVal = Fail; + if (VectorMulTest.VectorMul(2, 3, (2 * 3), (2 * 3) * (2 * 3), (3 * 3)) != Pass) + returnVal = Fail; + if (VectorMulTest.VectorMul(2u, 3u, 2u * 3u, (2u * 3u) * (2u * 3u), (3u * 3u)) != Pass) + returnVal = Fail; JitLog jitLog = new JitLog(); // Multiply is supported only for float, double, int and short diff --git a/src/tests/JIT/SIMD/VectorRelOp.cs b/src/tests/JIT/SIMD/VectorRelOp.cs index ddac285543966c..454b4e983d430d 100644 --- a/src/tests/JIT/SIMD/VectorRelOp.cs +++ b/src/tests/JIT/SIMD/VectorRelOp.cs @@ -154,12 +154,14 @@ private static int Main() if (VectorRelopTest.VectorRelOp(-2, -3) != Pass) returnVal = Fail; if (VectorRelopTest.VectorRelOp(3u, 2u) != Pass) returnVal = Fail; if (VectorRelopTest.VectorRelOp(3ul, 2ul) != Pass) returnVal = Fail; + if (VectorRelopTest.VectorRelOp(3, 2) != Pass) returnVal = Fail; + if (VectorRelopTest.VectorRelOp(3u, 2u) != Pass) returnVal = Fail; JitLog jitLog = new JitLog(); // ConditionalSelect, LessThanOrEqual and GreaterThanOrEqual are defined // on the Vector type, so the overloads can't be distinguished. - // + // if (!jitLog.Check("System.Numerics.Vector:ConditionalSelect(struct,struct,struct):struct")) returnVal = Fail; if (!jitLog.Check("System.Numerics.Vector:LessThanOrEqual(struct,struct):struct")) returnVal = Fail; if (!jitLog.Check("System.Numerics.Vector:GreaterThanOrEqual(struct,struct):struct")) returnVal = Fail; @@ -274,6 +276,28 @@ private static int Main() if (!jitLog.Check("GetOneValue", "UInt64")) returnVal = Fail; if (!jitLog.Check("GetZeroValue", "UInt64")) returnVal = Fail; + if (!jitLog.Check("Equals", "IntPtr")) returnVal = Fail; + if (!jitLog.Check("LessThan", "IntPtr")) returnVal = Fail; + if (!jitLog.Check("GreaterThan", "IntPtr")) returnVal = Fail; + if (!jitLog.Check("op_BitwiseAnd", "IntPtr")) returnVal = Fail; + if (!jitLog.Check("op_ExclusiveOr", "IntPtr")) returnVal = Fail; + if (!jitLog.Check("GreaterThan", "IntPtr")) returnVal = Fail; + // This relies on an implementation detail - i.e. that the One and Zero property are implemented + // in the library by GetOneValue and GetZeroValue, respectively. + if (!jitLog.Check("GetOneValue", "IntPtr")) returnVal = Fail; + if (!jitLog.Check("GetZeroValue", "IntPtr")) returnVal = Fail; + + if (!jitLog.Check("Equals", "UIntPtr")) returnVal = Fail; + if (!jitLog.Check("LessThan", "UIntPtr")) returnVal = Fail; + if (!jitLog.Check("GreaterThan", "UIntPtr")) returnVal = Fail; + if (!jitLog.Check("op_BitwiseAnd", "UIntPtr")) returnVal = Fail; + if (!jitLog.Check("op_ExclusiveOr", "UIntPtr")) returnVal = Fail; + if (!jitLog.Check("GreaterThan", "UIntPtr")) returnVal = Fail; + // This relies on an implementation detail - i.e. that the One and Zero property are implemented + // in the library by GetOneValue and GetZeroValue, respectively. + if (!jitLog.Check("GetOneValue", "UIntPtr")) returnVal = Fail; + if (!jitLog.Check("GetZeroValue", "UIntPtr")) returnVal = Fail; + jitLog.Dispose(); return returnVal; diff --git a/src/tests/JIT/SIMD/VectorSub.cs b/src/tests/JIT/SIMD/VectorSub.cs index ea1b128f7af252..e4c7518f3c8dba 100644 --- a/src/tests/JIT/SIMD/VectorSub.cs +++ b/src/tests/JIT/SIMD/VectorSub.cs @@ -81,6 +81,8 @@ private static int Main() if (VectorSubTest.VectorSub(3, -2, (sbyte)(3 + 2)) != Pass) returnVal = Fail; if (VectorSubTest.VectorSub(0x42000000u, 0x41000000u, 0x42000000u - 0x41000000u) != Pass) returnVal = Fail; if (VectorSubTest.VectorSub(0x42000000ul, 0x41000000ul, 0x42000000ul - 0x41000000ul) != Pass) returnVal = Fail; + if (VectorSubTest.VectorSub(3, 2, (nint)(3 - 2)) != Pass) returnVal = Fail; + if (VectorSubTest.VectorSub(0x42000000u, 0x41000000u, 0x42000000u - 0x41000000u) != Pass) returnVal = Fail; return returnVal; } } diff --git a/src/tests/JIT/SIMD/VectorUnused.cs b/src/tests/JIT/SIMD/VectorUnused.cs index f4c11e5fc0df77..631d48216b8fac 100644 --- a/src/tests/JIT/SIMD/VectorUnused.cs +++ b/src/tests/JIT/SIMD/VectorUnused.cs @@ -75,6 +75,8 @@ private static int Main() if (VectorUnusedTest.VectorUnused(3, 2) != Pass) returnVal = Fail; if (VectorUnusedTest.VectorUnused(3, 2) != Pass) returnVal = Fail; if (VectorUnusedTest.VectorUnused(3, 2) != Pass) returnVal = Fail; + if (VectorUnusedTest.VectorUnused(3, 2) != Pass) returnVal = Fail; + if (VectorUnusedTest.VectorUnused(3, 2) != Pass) returnVal = Fail; if (Vector4Test.VectorUnused() != Pass) returnVal = Fail; if (Vector3Test.VectorUnused() != Pass) returnVal = Fail; if (Vector2Test.VectorUnused() != Pass) returnVal = Fail; diff --git a/src/tests/JIT/SIMD/VectorUtil.cs b/src/tests/JIT/SIMD/VectorUtil.cs index 68a9db084109dd..fbf83189599122 100644 --- a/src/tests/JIT/SIMD/VectorUtil.cs +++ b/src/tests/JIT/SIMD/VectorUtil.cs @@ -96,6 +96,16 @@ public static T GetValueFromInt(int value) { return (T)(object)(sbyte)value; } + if (typeof(T) == typeof(nint)) + { + nint nintValue = (nint)value; + return (T)(object)nintValue; + } + if (typeof(T) == typeof(nuint)) + { + nuint nuintValue = (nuint)value; + return (T)(object)nuintValue; + } else { throw new ArgumentException(); @@ -155,6 +165,14 @@ private static T Add(T left, T right) where T : struct, IComparable, IEqua { return (T)(object)(((ulong)(object)left) + ((ulong)(object)right)); } + if (typeof(T) == typeof(nint)) + { + return (T)(object)(((nint)(object)left) + ((nint)(object)right)); + } + if (typeof(T) == typeof(nuint)) + { + return (T)(object)(((nuint)(object)left) + ((nuint)(object)right)); + } else { throw new ArgumentException(); @@ -202,6 +220,14 @@ private static T Multiply(T left, T right) where T : struct, IComparable, { return (T)(object)(((ulong)(object)left) * ((ulong)(object)right)); } + if (typeof(T) == typeof(nint)) + { + return (T)(object)(((nint)(object)left) * ((nint)(object)right)); + } + if (typeof(T) == typeof(nuint)) + { + return (T)(object)(((nuint)(object)left) * ((nuint)(object)right)); + } else { throw new ArgumentException();