Skip to content
Merged
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: 3 additions & 2 deletions src/coreclr/jit/codegenwasm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2302,8 +2302,9 @@ void CodeGen::genCodeForLclVar(GenTreeLclVar* tree)
else
{
assert(genIsValidReg(varDsc->GetRegNum()));
unsigned wasmLclIndex = WasmRegToIndex(varDsc->GetRegNum());
GetEmitter()->emitIns_I(INS_local_get, emitTypeSize(tree), wasmLclIndex);
var_types type = varDsc->GetRegisterType(tree);
unsigned wasmLclIndex = WasmRegToIndex(varDsc->GetRegNum());
GetEmitter()->emitIns_I(INS_local_get, emitTypeSize(type), wasmLclIndex);
// In this case, the resulting tree type may be different from the local var type where the value originates,
// and so we need an explicit conversion since we can't "load"
// the value with a different type like we can if the value is on the shadow stack.
Expand Down
Loading