@@ -7667,6 +7667,17 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
7667
7667
return NO_CLASS_HANDLE;
7668
7668
}
7669
7669
7670
+ // Returns true if this is a SIMD type that should be considered an opaque
7671
+ // vector type (i.e. do not analyze or promote its fields).
7672
+ // Note that all but the fixed vector types are opaque, even though they may
7673
+ // actually be declared as having fields.
7674
+ bool isOpaqueSIMDType (CORINFO_CLASS_HANDLE structHandle)
7675
+ {
7676
+ return ((m_simdHandleCache != nullptr ) && (structHandle != m_simdHandleCache->SIMDVector2Handle ) &&
7677
+ (structHandle != m_simdHandleCache->SIMDVector3Handle ) &&
7678
+ (structHandle != m_simdHandleCache->SIMDVector4Handle ));
7679
+ }
7680
+
7670
7681
// Returns true if the tree corresponds to a TYP_SIMD lcl var.
7671
7682
// Note that both SIMD vector args and locals are mared as lvSIMDType = true, but
7672
7683
// type of an arg node is TYP_BYREF and a local node is TYP_SIMD or TYP_STRUCT.
@@ -7675,6 +7686,16 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
7675
7686
return tree->OperIsLocal () && lvaTable[tree->AsLclVarCommon ()->gtLclNum ].lvSIMDType ;
7676
7687
}
7677
7688
7689
+ // Returns true if the lclVar is an opaque SIMD type.
7690
+ bool isOpaqueSIMDLclVar (LclVarDsc* varDsc)
7691
+ {
7692
+ if (!varDsc->lvSIMDType )
7693
+ {
7694
+ return false ;
7695
+ }
7696
+ return isOpaqueSIMDType (varDsc->lvVerTypeInfo .GetClassHandle ());
7697
+ }
7698
+
7678
7699
// Returns true if the type of the tree is a byref of TYP_SIMD
7679
7700
bool isAddrOfSIMDType (GenTree* tree)
7680
7701
{
@@ -8014,6 +8035,11 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
8014
8035
return lvaSIMDInitTempVarNum;
8015
8036
}
8016
8037
8038
+ #else // !FEATURE_SIMD
8039
+ bool isOpaqueSIMDLclVar (LclVarDsc* varDsc)
8040
+ {
8041
+ return false ;
8042
+ }
8017
8043
#endif // FEATURE_SIMD
8018
8044
8019
8045
public:
0 commit comments