From 075a2d6f382e370dee1ae73b66bca28c827cc4c5 Mon Sep 17 00:00:00 2001 From: Hyeongseok Oh Date: Sat, 20 May 2017 08:12:09 +0900 Subject: [PATCH] [ARM32] Simplify getting aligment value when remorphing (#11709) * [ARM32] Skip getting aligment when remorphing Skip aligment computation in morphing phase when remorphing It simplify getting alignment value for struct morphed to FIELD_LIST in ARM32/RyuJIT * Move comment Move comment about `InferOpSizeAlign` --- src/jit/morph.cpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/jit/morph.cpp b/src/jit/morph.cpp index 284cc3e..6627175 100644 --- a/src/jit/morph.cpp +++ b/src/jit/morph.cpp @@ -3212,11 +3212,18 @@ GenTreeCall* Compiler::fgMorphArgs(GenTreeCall* call) curArg = argEntry->node; } - // We don't use the "size" return value from InferOpSizeAlign(). - codeGen->InferOpSizeAlign(curArg, &argAlign); + if (reMorphing) + { + argAlign = argEntry->alignment; + } + else + { + // We don't use the "size" return value from InferOpSizeAlign(). + codeGen->InferOpSizeAlign(curArg, &argAlign); - argAlign = roundUp(argAlign, TARGET_POINTER_SIZE); - argAlign /= TARGET_POINTER_SIZE; + argAlign = roundUp(argAlign, TARGET_POINTER_SIZE); + argAlign /= TARGET_POINTER_SIZE; + } if (argAlign == 2) { -- 2.7.4