Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 6864d70

Browse files
committed
Restore missing impSIMD method definition
1 parent ba191a7 commit 6864d70

File tree

1 file changed

+19
-3
lines changed

1 file changed

+19
-3
lines changed

src/jit/simd.cpp

+19-3
Original file line numberDiff line numberDiff line change
@@ -917,9 +917,25 @@ const SIMDIntrinsicInfo* Compiler::getSIMDIntrinsicInfo(CORINFO_CLASS_HANDLE* in
917917
GenTreePtr Compiler::impSIMDPopStack(var_types type, bool expectAddr)
918918
{
919919
StackEntry se = impPopStack();
920-
typeInfo ti = se.seTypeInfo;
920+
typeInfo* ti = &se.seTypeInfo;
921921
GenTreePtr tree = se.val;
922922

923+
return impSIMD(type, tree, ti, expectAddr);
924+
}
925+
926+
// Normalizes TYP_STRUCT value in case of GT_CALL, GT_RET_EXPR and arg nodes and returns GenTree node
927+
//
928+
// Arguments:
929+
// type - the type of value that the caller expects to be passed into function.
930+
// tree - the GenTree node representing type
931+
// ti - typeInfo struct containing passed type data
932+
// expectAddr - if true indicates we are expecting type stack entry to be a TYP_BYREF.
933+
//
934+
// Notes:
935+
// If the passed value is a struct, and the expected type is a simd type, it will be set
936+
// to that type, otherwise it will assert if the type passed is not the expected type.
937+
GenTreePtr Compiler::impSIMD(var_types type, GenTreePtr tree, typeInfo* ti, bool expectAddr)
938+
{
923939
// If expectAddr is true implies what we have on stack is address and we need
924940
// SIMD type struct that it points to.
925941
if (expectAddr)
@@ -957,8 +973,8 @@ GenTreePtr Compiler::impSIMDPopStack(var_types type, bool expectAddr)
957973
// normalize TYP_STRUCT value
958974
if (varTypeIsStruct(tree) && ((tree->OperGet() == GT_RET_EXPR) || (tree->OperGet() == GT_CALL) || isParam))
959975
{
960-
assert(ti.IsType(TI_STRUCT));
961-
CORINFO_CLASS_HANDLE structType = ti.GetClassHandleForValueClass();
976+
assert(ti->IsType(TI_STRUCT));
977+
CORINFO_CLASS_HANDLE structType = ti->GetClassHandleForValueClass();
962978
tree = impNormStructVal(tree, structType, (unsigned)CHECK_SPILL_ALL);
963979
}
964980

0 commit comments

Comments
 (0)