From 9faca541f96ff9807cc93cae7df115947ad24821 Mon Sep 17 00:00:00 2001 From: Brian Sullivan Date: Tue, 18 Apr 2017 11:32:21 -0700 Subject: [PATCH] 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 --- src/coreclr/src/jit/lclvars.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 } -- 2.7.4