From 4ad9c3e8f45f36d6e35de4383ea6d504b87295f5 Mon Sep 17 00:00:00 2001 From: Hyeongseok Oh Date: Thu, 10 Aug 2017 10:55:51 +0900 Subject: [PATCH] Fix lclVar move node type inserted in lsra phase When we try to insert lclVal move node (load, store) on lsra phase, fix type as TYP_INT when size is smaller than TYP_INT --- src/jit/lsra.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/jit/lsra.cpp b/src/jit/lsra.cpp index 28617b9..09636f4 100644 --- a/src/jit/lsra.cpp +++ b/src/jit/lsra.cpp @@ -9209,6 +9209,11 @@ void LinearScan::insertMove( GenTreePtr src = compiler->gtNewLclvNode(lclNum, varDsc->TypeGet()); src->gtLsraInfo.isLsraAdded = true; + if (varDsc->lvNormalizeOnStore()) + { + src->gtType = TYP_INT; + } + // There are three cases we need to handle: // - We are loading a lclVar from the stack. // - We are storing a lclVar to the stack. -- 2.7.4