From 24ae31e3537a578d14585f987851b066ee9d75e2 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 --- src/jit/lclvars.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/jit/lclvars.cpp b/src/jit/lclvars.cpp index 5bcb1c8f7728..e64b5a164595 100644 --- a/src/jit/lclvars.cpp +++ b/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 }