Skip to content
Open
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
11 changes: 11 additions & 0 deletions src/coreclr/jit/lower.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5859,6 +5859,17 @@ void Lowering::LowerRetStruct(GenTreeUnOp* ret)
else
{
assert(varTypeUsesIntReg(nativeReturnType));
// ZeroObj assertion propagation can create an INT zero for a wider
// (e.g. LONG) integer struct return. Retype it to the native return type
// so that targets with a typed value stack (Wasm) emit e.g. an i64.const
// rather than an i32.const. Mirrors the float/double case above.
#if defined(TARGET_WASM)
if (genActualType(retVal) != genActualType(nativeReturnType))
{
assert(retVal->IsIntegralConst(0));
retVal->BashToZeroConst(nativeReturnType);
}
Comment thread
lewing marked this conversation as resolved.
Comment on lines +5867 to +5871

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think instead of an assertion this should just be part of the if condition

#endif // defined(TARGET_WASM)
}
break;
}
Expand Down
Loading