Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/coreclr/jit/codegencommon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1789,9 +1789,12 @@ void CodeGen::genEmitCallWithCurrentGC(EmitCallParams& params)
if (retBuf != nullptr)
{
GenTree* node = retBuf->GetNode();
assert(node->OperIsPutArg());

#if HAS_FIXED_REGISTER_SET
assert(node->OperIsPutArg());
node = node->gtGetOp1()->gtSkipReloadOrCopy();
#endif

if (!node->OperIs(GT_LCL_ADDR))
{
return;
Expand Down
27 changes: 24 additions & 3 deletions src/coreclr/jit/codegenwasm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2441,9 +2441,15 @@ void CodeGen::genCodeForLclFld(GenTreeLclFld* tree)
{
assert(tree->OperIs(GT_LCL_FLD));
LclVarDsc* varDsc = m_compiler->lvaGetDesc(tree);
var_types type = tree->TypeGet();

if (type == TYP_SIMD16)
{
NYI_WASM_SIMD("SIMD16 local field load");
}

GetEmitter()->emitIns_I(INS_local_get, EA_PTRSIZE, GetFramePointerRegIndex());
GetEmitter()->emitIns_S(ins_Load(tree->TypeGet()), emitTypeSize(tree), tree->GetLclNum(), tree->GetLclOffs());
GetEmitter()->emitIns_S(ins_Load(type), emitTypeSize(tree), tree->GetLclNum(), tree->GetLclOffs());
WasmProduceReg(tree);
}

Expand All @@ -2465,6 +2471,11 @@ void CodeGen::genCodeForLclVar(GenTreeLclVar* tree)
if (!varDsc->lvIsRegCandidate())
{
var_types type = varDsc->GetRegisterType(tree);
if (type == TYP_SIMD16)
{
NYI_WASM_SIMD("SIMD16 local load");
}
Comment thread
AndyAyersMS marked this conversation as resolved.

GetEmitter()->emitIns_I(INS_local_get, EA_PTRSIZE, GetFramePointerRegIndex());
GetEmitter()->emitIns_S(ins_Load(type), emitTypeSize(type), tree->GetLclNum(), 0);
WasmProduceReg(tree);
Expand Down Expand Up @@ -2549,8 +2560,13 @@ void CodeGen::genCodeForIndir(GenTreeIndir* tree)
{
assert(tree->OperIs(GT_IND));

var_types type = tree->TypeGet();
instruction ins = ins_Load(type);
var_types type = tree->TypeGet();
if (type == TYP_SIMD16)
{
NYI_WASM_SIMD("SIMD16 indirect load");
}

instruction ins = ins_Load(type);

genConsumeAddress(tree->Addr());

Expand Down Expand Up @@ -3571,6 +3587,11 @@ void CodeGen::genLoadLocalIntoReg(regNumber targetReg, unsigned lclNum)
{
LclVarDsc* varDsc = m_compiler->lvaGetDesc(lclNum);
var_types type = varDsc->GetRegisterType();
if (type == TYP_SIMD16)
{
NYI_WASM_SIMD("SIMD16 local load");
}

GetEmitter()->emitIns_I(INS_local_get, EA_PTRSIZE, GetFramePointerRegIndex());
GetEmitter()->emitIns_S(ins_Load(type), emitTypeSize(type), lclNum, 0);
GetEmitter()->emitIns_I(INS_local_set, emitTypeSize(type), WasmRegToIndex(targetReg));
Expand Down
21 changes: 21 additions & 0 deletions src/coreclr/jit/flowgraph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7982,6 +7982,27 @@ void FlowGraphTryRegions::AddMultipleEntryRegionEdges(ArrayStack<FlowEdge*>& edg
// And an edge from method entry to dest.
FlowEdge* const entryDestEdge = m_compiler->fgAddRefPred(destBlock, m_compiler->fgFirstBB);
edges.Push(entryDestEdge);

// If the dest is not reachable within the try, then we need to also add
// a temporary edge from the try header to the dest to create the SCC.
// Since we've pruned away dead blocks, any other pred edge suffices to
// establish reachability.
//
bool isReachableInTry = false;
for (FlowEdge* const predEdge : destBlock->PredEdges())
{
if (predEdge != edge)
{
isReachableInTry = true;
break;
}
}

if (!isReachableInTry)
{
FlowEdge* const headerDestEdge = m_compiler->fgAddRefPred(destBlock, headerBlock);
edges.Push(headerDestEdge);
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/jit/layout.h
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ class ClassLayout
case 8:
return TYP_LONG;
#endif
#ifdef FEATURE_SIMD
#if defined(FEATURE_SIMD) && !defined(TARGET_WASM)
// TODO: check TYP_SIMD12 profitability,
// it will need additional support in `BuildStoreLoc`.
case 16:
Expand Down
Loading