From: Brian Sullivan Date: Tue, 18 Apr 2017 18:32:21 +0000 (-0700) Subject: Fix incorrect test of structSize in struct promoted X-Git-Tag: submit/tizen/20210909.063632~11030^2~7195^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9faca541f96ff9807cc93cae7df115947ad24821;p=platform%2Fupstream%2Fdotnet%2Fruntime.git Fix incorrect test of structSize in struct promoted Fixes the desktop test Crossgen NI and Ngen NI validation Commit migrated from https://github.com/dotnet/coreclr/commit/24ae31e3537a578d14585f987851b066ee9d75e2 --- diff --git a/src/coreclr/src/jit/lclvars.cpp b/src/coreclr/src/jit/lclvars.cpp index 5bcb1c8..e64b5a1 100644 --- a/src/coreclr/src/jit/lclvars.cpp +++ b/src/coreclr/src/jit/lclvars.cpp @@ -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 }