Fix genSpillVar
authorHyeongseok Oh <hseok82.oh@samsung.com>
Fri, 11 Aug 2017 05:00:02 +0000 (14:00 +0900)
committerHyeongseok Oh <hseok82.oh@samsung.com>
Fri, 11 Aug 2017 05:00:02 +0000 (14:00 +0900)
Fix genSpillVar() instead of insertMove()

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

src/coreclr/src/jit/codegenlinear.cpp
src/coreclr/src/jit/lsra.cpp

index 59d08de..f1a8d24 100644 (file)
@@ -735,7 +735,7 @@ void CodeGen::genSpillVar(GenTreePtr tree)
             restoreRegVar = true;
         }
 
-        instruction storeIns = ins_Store(tree->TypeGet(), compiler->isSIMDTypeLocalAligned(varNum));
+        instruction storeIns = ins_Store(lclTyp, compiler->isSIMDTypeLocalAligned(varNum));
 #if CPU_LONG_USES_REGPAIR
         if (varTypeIsMultiReg(tree))
         {
index 09636f4..28617b9 100644 (file)
@@ -9209,11 +9209,6 @@ void LinearScan::insertMove(
     GenTreePtr src              = compiler->gtNewLclvNode(lclNum, varDsc->TypeGet());
     src->gtLsraInfo.isLsraAdded = true;
 
-    if (varDsc->lvNormalizeOnStore())
-    {
-        src->gtType = TYP_INT;
-    }
-
     // There are three cases we need to handle:
     // - We are loading a lclVar from the stack.
     // - We are storing a lclVar to the stack.