From ab9ce53b5e0747c55f94e21d082c3926ccb016dd Mon Sep 17 00:00:00 2001 From: Kunal Pathak Date: Wed, 30 Sep 2020 11:07:31 -0700 Subject: [PATCH] fix condition to align method at 32 bytes --- src/coreclr/src/jit/emit.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/coreclr/src/jit/emit.cpp b/src/coreclr/src/jit/emit.cpp index 27e65ca197c0f2..39081ea0664823 100644 --- a/src/coreclr/src/jit/emit.cpp +++ b/src/coreclr/src/jit/emit.cpp @@ -4771,10 +4771,11 @@ unsigned emitter::emitEndCodeGen(Compiler* comp, #endif #ifdef TARGET_XARCH - // For x64/x86, align Tier1 methods to 32 byte boundaries if + // For x64/x86, align methods that are "optimizations enabled" to 32 byte boundaries if // they are larger than 16 bytes and contain a loop. // - if (emitComp->opts.jitFlags->IsSet(JitFlags::JIT_FLAG_TIER1) && (emitTotalHotCodeSize > 16) && emitComp->fgHasLoops) + if (emitComp->opts.OptimizationEnabled() && !emitComp->opts.jitFlags->IsSet(JitFlags::JIT_FLAG_PREJIT) && + (emitTotalHotCodeSize > 16) && emitComp->fgHasLoops) { allocMemFlag = CORJIT_ALLOCMEM_FLG_32BYTE_ALIGN; }