fix fgMorphArgs for stress mode (#81346)
authorEgor Bogatov <egorbo@gmail.com>
Mon, 30 Jan 2023 12:14:41 +0000 (13:14 +0100)
committerGitHub <noreply@github.com>
Mon, 30 Jan 2023 12:14:41 +0000 (13:14 +0100)
src/coreclr/jit/morph.cpp

index c2aab0c..82cfb35 100644 (file)
@@ -3307,8 +3307,9 @@ GenTreeCall* Compiler::fgMorphArgs(GenTreeCall* call)
                     if (argObj->OperIsIndir())
                     {
                         assert(argObj->AsIndir()->Size() == genTypeSize(structBaseType));
-                        argObj->ChangeType(structBaseType);
                         argObj->SetOper(GT_IND);
+                        // Use ChangeType over argx to update types in COMMAs as well
+                        argx->ChangeType(structBaseType);
                     }
                     else if (argObj->OperIsLocalRead())
                     {