summaryrefslogtreecommitdiff
path: root/src/jit
diff options
context:
space:
mode:
authorCarol Eidt <carol.eidt@microsoft.com>2018-08-01 16:44:41 -0700
committerCarol Eidt <carol.eidt@microsoft.com>2018-08-01 16:44:41 -0700
commit3b17a68bf2825295a5f442ce9fc587930c0f07fa (patch)
treef59755b110f0a55ea4b6b555fe1a58f193f2f45e /src/jit
parentc4c16723a83c995838508ed7bca7fb99687f6d40 (diff)
downloadcoreclr-3b17a68bf2825295a5f442ce9fc587930c0f07fa.tar.gz
coreclr-3b17a68bf2825295a5f442ce9fc587930c0f07fa.tar.bz2
coreclr-3b17a68bf2825295a5f442ce9fc587930c0f07fa.zip
Handle COMMA nodes when morphing struct args
Fix #19124
Diffstat (limited to 'src/jit')
-rw-r--r--src/jit/morph.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/jit/morph.cpp b/src/jit/morph.cpp
index 9b642c2ddf..9465f4e0f8 100644
--- a/src/jit/morph.cpp
+++ b/src/jit/morph.cpp
@@ -4617,21 +4617,22 @@ GenTree* Compiler::fgMorphMultiregStructArg(GenTree* arg, fgArgTabEntry* fgEntry
#endif
{
GenTreeLclVarCommon* lcl = nullptr;
+ GenTree* actualArg = arg->gtEffectiveVal();
- if (arg->OperGet() == GT_OBJ)
+ if (actualArg->OperGet() == GT_OBJ)
{
- if (arg->gtGetOp1()->OperIs(GT_ADDR) && arg->gtGetOp1()->gtGetOp1()->OperIs(GT_LCL_VAR))
+ if (actualArg->gtGetOp1()->OperIs(GT_ADDR) && actualArg->gtGetOp1()->gtGetOp1()->OperIs(GT_LCL_VAR))
{
- lcl = arg->gtGetOp1()->gtGetOp1()->AsLclVarCommon();
+ lcl = actualArg->gtGetOp1()->gtGetOp1()->AsLclVarCommon();
}
}
else
{
- assert(arg->OperGet() == GT_LCL_VAR);
+ assert(actualArg->OperGet() == GT_LCL_VAR);
// We need to construct a `GT_OBJ` node for the argument,
// so we need to get the address of the lclVar.
- lcl = arg->AsLclVarCommon();
+ lcl = actualArg->AsLclVarCommon();
}
if (lcl != nullptr)
{
@@ -4642,7 +4643,7 @@ GenTree* Compiler::fgMorphMultiregStructArg(GenTree* arg, fgArgTabEntry* fgEntry
else if (arg->TypeGet() == TYP_STRUCT)
{
// If this is a non-register struct, it must be referenced from memory.
- if (!arg->OperIs(GT_OBJ))
+ if (!actualArg->OperIs(GT_OBJ))
{
// Create an Obj of the temp to use it as a call argument.
arg = gtNewOperNode(GT_ADDR, TYP_I_IMPL, arg);