[ARM32/RyuJIT] Use regtype instead of node's type in PUTARG_SPLIT case
authorJiyoung Yun <jy910.yun@samsung.com>
Thu, 3 Aug 2017 05:31:12 +0000 (14:31 +0900)
committerJiyoung Yun <jy910.yun@samsung.com>
Tue, 8 Aug 2017 09:52:15 +0000 (18:52 +0900)
The size of TYP_STRUCT in definition is 1 and it is lower than sizeof(int).
It means TYP_STRUCT should use the node's type instead of its type.
In PUTARG_SPLIT case, it wil use its regtype of child nodes.

src/jit/lsra.cpp

index 2044960..252dea5 100644 (file)
@@ -8916,6 +8916,12 @@ void LinearScan::updateMaxSpill(RefPosition* refPosition)
                     ReturnTypeDesc* retTypeDesc = treeNode->AsCall()->GetReturnTypeDesc();
                     typ                         = retTypeDesc->GetReturnRegType(refPosition->getMultiRegIdx());
                 }
+#ifdef _TARGET_ARM_
+                else if (treeNode->OperIsPutArgSplit())
+                {
+                    typ = treeNode->AsPutArgSplit()->GetRegType(refPosition->getMultiRegIdx());
+                }
+#endif
 #ifdef ARM_SOFTFP
                 else if (treeNode->OperIsPutArgReg())
                 {
@@ -9248,11 +9254,6 @@ void LinearScan::resolveRegisters()
                                 GenTreePutArgSplit* splitArg = treeNode->AsPutArgSplit();
                                 splitArg->SetRegSpillFlagByIdx(GTF_SPILL, currentRefPosition->getMultiRegIdx());
                             }
-                            else if (treeNode->OperIsMultiRegOp())
-                            {
-                                GenTreeMultiRegOp* multiReg = treeNode->AsMultiRegOp();
-                                multiReg->SetRegSpillFlagByIdx(GTF_SPILL, currentRefPosition->getMultiRegIdx());
-                            }
 #endif
                         }