Fix incorrect test of structSize in struct promoted
authorBrian Sullivan <briansul@microsoft.com>
Tue, 18 Apr 2017 18:32:21 +0000 (11:32 -0700)
committerBrian Sullivan <briansul@microsoft.com>
Tue, 18 Apr 2017 18:32:21 +0000 (11:32 -0700)
Fixes the desktop test Crossgen NI and Ngen NI validation

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

src/coreclr/src/jit/lclvars.cpp

index 5bcb1c8..e64b5a1 100644 (file)
@@ -1459,7 +1459,7 @@ void Compiler::lvaCanPromoteStructType(CORINFO_CLASS_HANDLE    typeHnd,
         StructPromotionInfo->canPromote = false;
 
         unsigned structSize = info.compCompHnd->getClassSize(typeHnd);
-        if (structSize >= MaxOffset)
+        if (structSize > MaxOffset)
         {
             return; // struct is too large
         }