Fix DevDiv issue with JitStressRegs=0x3 on arm32. (#20485)
authorSergey Andreenko <seandree@microsoft.com>
Wed, 31 Oct 2018 19:13:25 +0000 (12:13 -0700)
committerGitHub <noreply@github.com>
Wed, 31 Oct 2018 19:13:25 +0000 (12:13 -0700)
* Fix the issue.

* Fix the comment.

* update the comment

src/jit/lsrabuild.cpp

index 3326372..02464a1 100644 (file)
@@ -1581,6 +1581,14 @@ void LinearScan::buildRefPositionsForNode(GenTree* tree, BasicBlock* block, Lsra
                 }
             }
         }
+
+        if (tree->OperIsPutArgSplit())
+        {
+            // While we have attempted to account for any "specialPutArg" defs above, we're only looking at RefPositions
+            // created for this node. We must be defining at least one register in the PutArgSplit, so conservatively
+            // add one less than the maximum number of registers args to 'minRegCount'.
+            minRegCount += MAX_REG_ARG - 1;
+        }
         for (refPositionMark++; refPositionMark != refPositions.end(); refPositionMark++)
         {
             RefPosition* newRefPosition    = &(*refPositionMark);