[RyuJIT/armel] Fix PutArgReg BuildRefPositions
authorHanjoung Lee <hanjoung.lee@samsung.com>
Fri, 11 Aug 2017 07:19:02 +0000 (16:19 +0900)
committerHanjoung Lee <hanjoung.lee@samsung.com>
Fri, 11 Aug 2017 07:19:02 +0000 (16:19 +0900)
We should fix registers for GT_PUTARG_REG, not GT_COPY or GT_MUL_LONG.
And merge the `if` statement with GT_PUTARG_SPLIT case.

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

src/coreclr/src/jit/lsra.cpp

index 49a4854..6c347cb 100644 (file)
@@ -3990,22 +3990,12 @@ void LinearScan::buildRefPositionsForNode(GenTree*                  tree,
 
             regMaskTP candidates = getUseCandidates(useNode);
 #ifdef _TARGET_ARM_
-            // If oper is GT_PUTARG_SPLIT, set bits in useCandidates must be in sequential order.
-            if (useNode->OperIsPutArgSplit())
+            if (useNode->OperIsPutArgSplit() || (compiler->opts.compUseSoftFP && useNode->OperIsPutArgReg()))
             {
-                // get i-th candidate
+                // get i-th candidate, set bits in useCandidates must be in sequential order.
                 candidates = genFindLowestReg(candidates & ~currCandidates);
                 currCandidates |= candidates;
             }
-#ifdef ARM_SOFTFP
-            // If oper is GT_PUTARG_REG, set bits in useCandidates must be in sequential order.
-            if (useNode->OperIsMultiRegOp())
-            {
-                regMaskTP candidate = genFindLowestReg(candidates);
-                useNode->gtLsraInfo.setSrcCandidates(this, candidates & ~candidate);
-                candidates = candidate;
-            }
-#endif // ARM_SOFTFP
 #endif // _TARGET_ARM_
 
             assert((candidates & allRegs(i->registerType)) != 0);