Fix devdiv 491210
authorjashook <jashoo@microsoft.com>
Thu, 14 Sep 2017 21:55:05 +0000 (14:55 -0700)
committerjashook <jashoo@microsoft.com>
Thu, 14 Sep 2017 21:55:05 +0000 (14:55 -0700)
Specifically, this insures the GT_LIST nodes of gtCallArgs
and gtCallLateArgs flags are set correctly, based on their
child nodes.

Commit migrated from https://github.com/dotnet/coreclr/commit/c3ed0c88cbbb8f00784b30ea75356fd1ecccff9d

src/coreclr/src/jit/morph.cpp

index 0de22ca..6fd199b 100644 (file)
@@ -2459,6 +2459,8 @@ void fgArgInfo::EvalArgsToTemps()
                 noway_assert(parent->OperIsList());
                 noway_assert(parent->gtOp.gtOp1 == argx);
 
+                parent->gtFlags |= (setupArg->gtFlags & GTF_ALL_EFFECT);
+
                 parent->gtOp.gtOp1 = setupArg;
             }
             else
@@ -2482,9 +2484,13 @@ void fgArgInfo::EvalArgsToTemps()
             noway_assert(tmpRegArgNext->OperIsList());
             noway_assert(tmpRegArgNext->Current());
             tmpRegArgNext->gtOp.gtOp2 = compiler->gtNewArgList(defArg);
+
+            tmpRegArgNext->gtFlags |= (defArg->gtFlags & GTF_ALL_EFFECT);
             tmpRegArgNext             = tmpRegArgNext->Rest();
         }
 
+        tmpRegArgNext->gtFlags |= (defArg->gtFlags & GTF_ALL_EFFECT);
+
         curArgTabEntry->node       = defArg;
         curArgTabEntry->lateArgInx = regArgInx++;
     }