When returning a SIMD value use v0 register as the candidate for source operand of...
authorEgor Chesakov <Egor.Chesakov@microsoft.com>
Sat, 8 Aug 2020 00:28:41 +0000 (17:28 -0700)
committerGitHub <noreply@github.com>
Sat, 8 Aug 2020 00:28:41 +0000 (17:28 -0700)
src/coreclr/src/jit/lsrabuild.cpp

index d902b3a..e2f8775 100644 (file)
@@ -3443,10 +3443,15 @@ int LinearScan::BuildReturn(GenTree* tree)
         if (varTypeIsSIMD(tree) && !op1->IsMultiRegLclVar())
         {
             useCandidates = allSIMDRegs();
+            if (op1->OperGet() == GT_LCL_VAR)
+            {
+                assert(op1->TypeGet() != TYP_SIMD32);
+                useCandidates = RBM_DOUBLERET;
+            }
             BuildUse(op1, useCandidates);
             return 1;
         }
-#endif // !TARGET_ARM64
+#endif // TARGET_ARM64
 
         if (varTypeIsStruct(tree))
         {