summaryrefslogtreecommitdiff
path: root/src/jit
diff options
context:
space:
mode:
authorLubomir Litchev <LLITCHEV@users.noreply.github.com>2016-04-15 17:01:40 -0700
committerLubomir Litchev <LLITCHEV@users.noreply.github.com>2016-04-15 17:01:40 -0700
commit71f8969056232b6c01d57e5ad4d9dc53c6bc0e99 (patch)
tree79de829df49a7dd222ecbf348314429c4a9ba8e8 /src/jit
parent861e76a3b7c0b0cf1d6fbd6eb456a975c2ec9148 (diff)
parentd07a34f33a862a40a1456cbff245a1e141a7264d (diff)
downloadcoreclr-71f8969056232b6c01d57e5ad4d9dc53c6bc0e99.tar.gz
coreclr-71f8969056232b6c01d57e5ad4d9dc53c6bc0e99.tar.bz2
coreclr-71f8969056232b6c01d57e5ad4d9dc53c6bc0e99.zip
Merge pull request #4346 from LLITCHEV/Issue4276
Set the lvIsMultiRegArgOrRet for a variable containing the result of in-lined multi-register return call.
Diffstat (limited to 'src/jit')
-rw-r--r--src/jit/codegenxarch.cpp5
-rw-r--r--src/jit/flowgraph.cpp7
2 files changed, 9 insertions, 3 deletions
diff --git a/src/jit/codegenxarch.cpp b/src/jit/codegenxarch.cpp
index 8e2482f6c6..d8af37721c 100644
--- a/src/jit/codegenxarch.cpp
+++ b/src/jit/codegenxarch.cpp
@@ -2663,9 +2663,8 @@ CodeGen::genMultiRegCallStoreToLocal(GenTreePtr treeNode)
// var in 'var = call' is flagged as lvIsMultiRegArgOrRet to prevent it from
// being struct poromoted.
//
- // TODO-BUG: Crossgen of mscorlib fires the below assert.
- // A git issue is opened for investigating this.
- // noway_assert(varDsc->lvIsMultiRegArgOrRet);
+
+ noway_assert(varDsc->lvIsMultiRegArgOrRet);
getEmitter()->emitIns_S_R(ins_Store(type0), emitTypeSize(type0), reg0, lclNum, 0);
getEmitter()->emitIns_S_R(ins_Store(type1), emitTypeSize(type1), reg1, lclNum, 8);
diff --git a/src/jit/flowgraph.cpp b/src/jit/flowgraph.cpp
index b5abc81f94..ffd6c89166 100644
--- a/src/jit/flowgraph.cpp
+++ b/src/jit/flowgraph.cpp
@@ -21670,6 +21670,13 @@ GenTreePtr Compiler::fgAssignStructInlineeToVar(GenTreePtr child, CORINFO_CLASS_
// If inlinee was just a call, new inlinee is v05 = call()
newInlinee = gtNewAssignNode(dst, src);
+ // When returning a multi-register value in a local var, make sure the variable is
+ // marked as lvIsMultiRegArgOrRet, so it does not get promoted.
+ if (src->AsCall()->HasMultiRegRetVal())
+ {
+ lvaTable[tmpNum].lvIsMultiRegArgOrRet = true;
+ }
+
// If inlinee was comma, but a deeper call, new inlinee is (, , , v05 = call())
if (child->gtOper == GT_COMMA)
{