var_types Compiler::GetHfaType(GenTreePtr tree)
{
#ifdef FEATURE_HFA
- if (tree->TypeGet() == TYP_STRUCT)
- {
- return GetHfaType(gtGetStructHandleIfPresent(tree));
- }
+ return GetHfaType(gtGetStructHandleIfPresent(tree));
#endif
return TYP_UNDEF;
}
unsigned lvHfaSlots() const
{
assert(lvIsHfa());
- assert(lvType == TYP_STRUCT);
+ assert(varTypeIsStruct(lvType));
#ifdef _TARGET_ARM_
return lvExactSize / sizeof(float);
#else // _TARGET_ARM64_
// Returns true if this local var is a multireg struct
bool Compiler::lvaIsMultiregStruct(LclVarDsc* varDsc)
{
- if (varDsc->TypeGet() == TYP_STRUCT)
+ if (varTypeIsStruct(varDsc->TypeGet()))
{
CORINFO_CLASS_HANDLE clsHnd = varDsc->lvVerTypeInfo.GetClassHandleForValueClass();
structPassingKind howToPassStruct;
GenTreePtr arg = argx;
- if (arg->TypeGet() == TYP_STRUCT)
+ if (varTypeIsStruct(arg->TypeGet()))
{
foundStructArg = true;
//
GenTreePtr Compiler::fgMorphMultiregStructArg(GenTreePtr arg, fgArgTabEntryPtr fgEntryPtr)
{
- assert(arg->TypeGet() == TYP_STRUCT);
+ assert(varTypeIsStruct(arg->TypeGet()));
#ifndef _TARGET_ARMARCH_
NYI("fgMorphMultiregStructArg requires implementation for this target");
}
}
// We should still have a TYP_STRUCT
- assert(argValue->TypeGet() == TYP_STRUCT);
+ assert(varTypeIsStruct(argValue->TypeGet()));
GenTreeFieldList* newArg = nullptr;
{
var_types type = tree->TypeGet();
- if (type == TYP_STRUCT && IsHfa(tree))
+ if (varTypeIsStruct(type) && IsHfa(tree))
{
int retSlots = GetHfaCount(tree);
return ((1 << retSlots) - 1) << REG_FLOATRET;
#endif // _TARGET_ARM_
#if FEATURE_MULTIREG_ARGS
- if (argDsc->lvType == TYP_STRUCT)
+ if (varTypeIsStruct(argDsc->lvType))
{
if (argDsc->lvIsHfaRegArg())
{