File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2302,8 +2302,9 @@ void CodeGen::genCodeForLclVar(GenTreeLclVar* tree)
23022302 else
23032303 {
23042304 assert (genIsValidReg (varDsc->GetRegNum ()));
2305- unsigned wasmLclIndex = WasmRegToIndex (varDsc->GetRegNum ());
2306- GetEmitter ()->emitIns_I (INS_local_get, emitTypeSize (tree), wasmLclIndex);
2305+ var_types type = varDsc->GetRegisterType (tree);
2306+ unsigned wasmLclIndex = WasmRegToIndex (varDsc->GetRegNum ());
2307+ GetEmitter ()->emitIns_I (INS_local_get, emitTypeSize (type), wasmLclIndex);
23072308 // In this case, the resulting tree type may be different from the local var type where the value originates,
23082309 // and so we need an explicit conversion since we can't "load"
23092310 // the value with a different type like we can if the value is on the shadow stack.
You can’t perform that action at this time.
0 commit comments