JIT: fix CHK/REL diff from fgRetypeImplicitByRefArgs (#13372)
authorAndy Ayers <andya@microsoft.com>
Tue, 15 Aug 2017 05:42:43 +0000 (22:42 -0700)
committerJan Kotas <jkotas@microsoft.com>
Tue, 15 Aug 2017 05:42:43 +0000 (22:42 -0700)
Make sure some important code is not under DEBUG.

Fixes #13358.

src/jit/morph.cpp

index 4acabc1..2dd18a2 100644 (file)
@@ -18132,11 +18132,6 @@ void Compiler::fgRetypeImplicitByRefArgs()
             //
             varDsc->lvOverlappingFields = 0; // This flag could have been set, clear it.
 
-#ifdef DEBUG
-            // This should not be converted to a double in stress mode,
-            // because it is really a pointer
-            varDsc->lvKeepType = 1;
-
             // The struct parameter may have had its address taken, but the pointer parameter
             // cannot -- any uses of the struct parameter's address are uses of the pointer
             // parameter's value, and there's no way for the MSIL to reference the pointer
@@ -18144,6 +18139,11 @@ void Compiler::fgRetypeImplicitByRefArgs()
             varDsc->lvAddrExposed     = 0;
             varDsc->lvDoNotEnregister = 0;
 
+#ifdef DEBUG
+            // This should not be converted to a double in stress mode,
+            // because it is really a pointer
+            varDsc->lvKeepType = 1;
+
             if (verbose)
             {
                 printf("Changing the lvType for struct parameter V%02d to TYP_BYREF.\n", lclNum);