[RyuJIT/ARM32] Change the 3bytes struct to int on morph phase.
authorsjsujinkim <sjsujin.kim@samsung.com>
Thu, 22 Jun 2017 01:52:59 +0000 (10:52 +0900)
committersjsujinkim <sjsujin.kim@samsung.com>
Thu, 22 Jun 2017 07:22:54 +0000 (16:22 +0900)
It is necessary that the 3bytes struct which is a local var to int on morph phase.

Related Issue : dotnet/coreclr#12290 (Assertion failed 'emitTypeSizes[TypeGet(type)] > 0')

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

src/coreclr/src/jit/morph.cpp

index 18c570b..7d8e693 100644 (file)
@@ -2262,17 +2262,17 @@ void fgArgInfo::EvalArgsToTemps()
                     if (setupArg->OperIsCopyBlkOp())
                     {
                         setupArg = compiler->fgMorphCopyBlock(setupArg);
-#ifdef _TARGET_ARM64_
-                        // This scalar LclVar widening step is only performed for ARM64
+#if defined(_TARGET_ARM64_) || (!defined(LEGACY_BACKEND) && defined(_TARGET_ARM_))
+                        // This scalar LclVar widening step is only performed for ARM architectures.
                         //
                         CORINFO_CLASS_HANDLE clsHnd     = compiler->lvaGetStruct(tmpVarNum);
                         unsigned             structSize = varDsc->lvExactSize;
 
                         scalarType = compiler->getPrimitiveTypeForStruct(structSize, clsHnd);
-#endif // _TARGET_ARM64_
+#endif // _TARGET_ARM*_
                     }
 
-                    // scalarType can be set to a wider type for ARM64: (3 => 4)  or (5,6,7 => 8)
+                    // scalarType can be set to a wider type for ARM architectures: (3 => 4)  or (5,6,7 => 8)
                     if ((scalarType != TYP_UNKNOWN) && (scalarType != lclVarType))
                     {
                         // Create a GT_LCL_FLD using the wider type to go to the late argument list