[RyuJIT/ARM32] Clear assigned interval of double register
authorHyung-Kyu Choi <hk0110.choi@samsung.com>
Thu, 8 Jun 2017 10:21:35 +0000 (19:21 +0900)
committerHyung-Kyu Choi <hk0110.choi@samsung.com>
Wed, 21 Jun 2017 00:05:03 +0000 (09:05 +0900)
Clear assigned interval of double register properly

Signed-off-by: Hyung-Kyu Choi <hk0110.choi@samsung.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/fc3492a8a831e768ff6a6de9ae41b977ac6d4fbc

src/coreclr/src/jit/lsra.cpp

index 319195e..d7d97a7 100644 (file)
@@ -7006,7 +7006,8 @@ void LinearScan::processBlockStartLocations(BasicBlock* currentBlock, bool alloc
                 if (assignedInterval != nullptr)
                 {
 #ifdef _TARGET_ARM_
-                    if (assignedInterval->assignedReg == targetRegRecord || isSecondHalfReg(targetRegRecord, assignedInterval))
+                    if (assignedInterval->assignedReg == targetRegRecord ||
+                        isSecondHalfReg(targetRegRecord, assignedInterval))
 #else
                     if (assignedInterval->assignedReg == targetRegRecord)
 #endif
@@ -7028,6 +7029,13 @@ void LinearScan::processBlockStartLocations(BasicBlock* currentBlock, bool alloc
                     {
                         // This interval is no longer assigned to this register.
                         targetRegRecord->assignedInterval = nullptr;
+#ifdef _TARGET_ARM_
+                        if (assignedInterval->registerType == TYP_DOUBLE)
+                        {
+                            RegRecord* anotherHalfRegRec        = findAnotherHalfRegRec(targetRegRecord);
+                            anotherHalfRegRec->assignedInterval = nullptr;
+                        }
+#endif
                     }
                 }
                 assignPhysReg(targetRegRecord, interval);