Handle SIMD field of GT_FIELD_LIST in codegen.
authorCarol Eidt <carol.eidt@microsoft.com>
Wed, 9 May 2018 00:20:04 +0000 (17:20 -0700)
committerCarol Eidt <carol.eidt@microsoft.com>
Wed, 9 May 2018 00:20:04 +0000 (17:20 -0700)
Add header to test case.

Commit migrated from https://github.com/dotnet/coreclr/commit/687da67b16ac9f09810aa1fb546ec25785980c97

src/coreclr/src/jit/codegenarmarch.cpp
src/coreclr/tests/src/JIT/Regression/JitBlue/GitHub_16377/GitHub_16377.cs

index 99826f766a02fb86468ff3837ea4c63d16756737..90b802d67b08d34bbb7d746225c171436537a316 100644 (file)
@@ -592,24 +592,24 @@ void CodeGen::genPutArgStk(GenTreePutArgStk* treeNode)
 
     bool isStruct = (targetType == TYP_STRUCT) || (source->OperGet() == GT_FIELD_LIST);
 
-    if (varTypeIsSIMD(targetType))
+    if (!isStruct) // a normal non-Struct argument
     {
-        assert(!source->isContained());
+        if (varTypeIsSIMD(targetType))
+        {
+            assert(!source->isContained());
 
-        regNumber srcReg = genConsumeReg(source);
+            regNumber srcReg = genConsumeReg(source);
 
-        emitAttr storeAttr = emitTypeSize(targetType);
+            emitAttr storeAttr = emitTypeSize(targetType);
 
-        assert((srcReg != REG_NA) && (genIsValidFloatReg(srcReg)));
-        emit->emitIns_S_R(INS_str, storeAttr, srcReg, varNumOut, argOffsetOut);
+            assert((srcReg != REG_NA) && (genIsValidFloatReg(srcReg)));
+            emit->emitIns_S_R(INS_str, storeAttr, srcReg, varNumOut, argOffsetOut);
 
-        argOffsetOut += EA_SIZE_IN_BYTES(storeAttr);
-        assert(argOffsetOut <= argOffsetMax); // We can't write beyound the outgoing area area
-        return;
-    }
+            argOffsetOut += EA_SIZE_IN_BYTES(storeAttr);
+            assert(argOffsetOut <= argOffsetMax); // We can't write beyound the outgoing area area
+            return;
+        }
 
-    if (!isStruct) // a normal non-Struct argument
-    {
         instruction storeIns  = ins_Store(targetType);
         emitAttr    storeAttr = emitTypeSize(targetType);
 
index 069eff401337308e4db7c56e3c17dcc1be1648e4..1f78cd0dcc5b4bf98e64b8ac9957be2c81ced641 100644 (file)
@@ -1,3 +1,7 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
 using System;
 
 class GitHub_16377