return pTypeInfo->IsStruct() && isSIMDClass(pTypeInfo->GetClassHandleForValueClass());
}
+ bool isHWSIMDClass(CORINFO_CLASS_HANDLE clsHnd)
+ {
+#ifdef FEATURE_HW_INTRINSICS
+ if (isIntrinsicType(clsHnd))
+ {
+ const char* namespaceName = nullptr;
+ (void)getClassNameFromMetadata(clsHnd, &namespaceName);
+ return strcmp(namespaceName, "System.Runtime.Intrinsics") == 0;
+ }
+#endif // FEATURE_HW_INTRINSICS
+ return false;
+ }
+
+ bool isHWSIMDClass(typeInfo* pTypeInfo)
+ {
+#ifdef FEATURE_HW_INTRINSICS
+ return pTypeInfo->IsStruct() && isHWSIMDClass(pTypeInfo->GetClassHandleForValueClass());
+#else
+ return false;
+#endif
+ }
+
+ bool isSIMDorHWSIMDClass(CORINFO_CLASS_HANDLE clsHnd)
+ {
+ return isSIMDClass(clsHnd) || isHWSIMDClass(clsHnd);
+ }
+
+ bool isSIMDorHWSIMDClass(typeInfo* pTypeInfo)
+ {
+ 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);
// the inlining multiplier) for anything in that assembly.
// But we only need to normalize it if it is a TYP_STRUCT
// (which we need to do even if we have already set foundSIMDType).
- if ((!foundSIMDType || (sigType == TYP_STRUCT)) && isSIMDClass(&(lclVarInfo[0].lclVerTypeInfo)))
+ if ((!foundSIMDType || (sigType == TYP_STRUCT)) && isSIMDorHWSIMDClass(&(lclVarInfo[0].lclVerTypeInfo)))
{
if (sigType == TYP_STRUCT)
{
lclVarInfo[i].lclVerTypeInfo = verParseArgSigToTypeInfo(&methInfo->args, argLst);
#ifdef FEATURE_SIMD
- if ((!foundSIMDType || (sigType == TYP_STRUCT)) && isSIMDClass(&(lclVarInfo[i].lclVerTypeInfo)))
+ if ((!foundSIMDType || (sigType == TYP_STRUCT)) && isSIMDorHWSIMDClass(&(lclVarInfo[i].lclVerTypeInfo)))
{
// If this is a SIMD class (i.e. in the SIMD assembly), then we will consider that we've
// found a SIMD type, even if this may not be a type we recognize (the assumption is that
localsSig = info.compCompHnd->getArgNext(localsSig);
#ifdef FEATURE_SIMD
- if ((!foundSIMDType || (type == TYP_STRUCT)) && isSIMDClass(&(lclVarInfo[i + argCnt].lclVerTypeInfo)))
+ if ((!foundSIMDType || (type == TYP_STRUCT)) && isSIMDorHWSIMDClass(&(lclVarInfo[i + argCnt].lclVerTypeInfo)))
{
foundSIMDType = true;
if (featureSIMD && type == TYP_STRUCT)
}
#ifdef FEATURE_SIMD
- if (!foundSIMDType && (call->AsCall()->gtRetClsHnd != nullptr) && isSIMDClass(call->AsCall()->gtRetClsHnd))
+ if (!foundSIMDType && (call->AsCall()->gtRetClsHnd != nullptr) && isSIMDorHWSIMDClass(call->AsCall()->gtRetClsHnd))
{
foundSIMDType = true;
}
// Check to see if this is a SIMD type.
// We will only check this if we have already found a SIMD type, which will be true if
// we have encountered any SIMD intrinsics.
- if (usesSIMDTypes() && (pFieldInfo->fldSize == 0) && isSIMDClass(pFieldInfo->fldTypeHnd))
+ if (usesSIMDTypes() && (pFieldInfo->fldSize == 0) && isSIMDorHWSIMDClass(pFieldInfo->fldTypeHnd))
{
unsigned simdSize;
var_types simdBaseType = getBaseTypeAndSizeOfSIMDType(pFieldInfo->fldTypeHnd, &simdSize);
}
else
#endif // FEATURE_SIMD
+#ifdef FEATURE_HW_INTRINSICS
+ if (tree->gtOp.gtOp1->OperIsSimdHWIntrinsic())
+ {
+ axcStack->Push(AXC_None);
+ }
+ else
+#endif // FEATURE_HW_INTRINSICS
if (axc == AXC_Ind)
{
axcStack->Push(AXC_None);