Mark RetBuf as SIMD variable
authorBruce Forstall <brucefo@microsoft.com>
Mon, 30 Jan 2017 23:34:28 +0000 (15:34 -0800)
committerBruce Forstall <brucefo@microsoft.com>
Tue, 31 Jan 2017 22:43:27 +0000 (14:43 -0800)
I see changes where storeIndir is used now instead of
a BLK copy, which is an IR shape improvement.

This improves codegen for SIMD8, degrades it for SIMD12 (due
to encoding size differences with SSE instructions, though
the IR looks better), and is neutral for SIMD16, in the
VectorReturn test.

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

src/coreclr/src/jit/lclvars.cpp

index b51b1a8..3af0813 100644 (file)
@@ -488,6 +488,16 @@ void Compiler::lvaInitRetBuffArg(InitVarDscInfo* varDscInfo)
                 varDsc->lvType = TYP_I_IMPL;
             }
         }
+#ifdef FEATURE_SIMD
+        else if (featureSIMD && varTypeIsSIMD(info.compRetType))
+        {
+            varDsc->lvSIMDType = true;
+            varDsc->lvBaseType =
+                getBaseTypeAndSizeOfSIMDType(info.compMethodInfo->args.retTypeClass, &varDsc->lvExactSize);
+            assert(varDsc->lvBaseType != TYP_UNKNOWN);
+        }
+#endif // FEATURE_SIMD
+
         assert(isValidIntArgReg(varDsc->lvArgReg));
 
 #ifdef DEBUG