summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Ayers <andya@microsoft.com>2016-03-25 15:49:54 -0700
committerAndy Ayers <andya@microsoft.com>2016-03-25 15:49:54 -0700
commit4042556fe08e0eaac0ea8379b7f8e12dec60e5eb (patch)
treeaf59f04852d1f8913489dd6935c6ad859355d6fc
parent12870d860aebfeff0bd92d3919c88b3ed7519359 (diff)
parent13ff9aef107018c26c8d255b20ced32a84be25cf (diff)
downloadcoreclr-4042556fe08e0eaac0ea8379b7f8e12dec60e5eb.tar.gz
coreclr-4042556fe08e0eaac0ea8379b7f8e12dec60e5eb.tar.bz2
coreclr-4042556fe08e0eaac0ea8379b7f8e12dec60e5eb.zip
Merge pull request #3924 from AndyAyersMS/Fix-VSO-205323
Inliner: fix issue introduced by refactoring
-rw-r--r--src/jit/flowgraph.cpp5
-rw-r--r--tests/src/JIT/Regression/JitBlue/DevDiv_205323/app.config27
-rw-r--r--tests/src/JIT/Regression/JitBlue/DevDiv_205323/starg0.il49
-rw-r--r--tests/src/JIT/Regression/JitBlue/DevDiv_205323/starg0.ilproj48
4 files changed, 128 insertions, 1 deletions
diff --git a/src/jit/flowgraph.cpp b/src/jit/flowgraph.cpp
index d7cac71b51..b3da7646db 100644
--- a/src/jit/flowgraph.cpp
+++ b/src/jit/flowgraph.cpp
@@ -4752,7 +4752,10 @@ ARG_WRITE:
return;
}
}
- else
+
+ // In non-inline cases, note written-to locals.
+
+ if (!isInlining)
{
noway_assert(sz == sizeof(BYTE) || sz == sizeof(WORD));
if (codeAddr > codeEndp - sz)
diff --git a/tests/src/JIT/Regression/JitBlue/DevDiv_205323/app.config b/tests/src/JIT/Regression/JitBlue/DevDiv_205323/app.config
new file mode 100644
index 0000000000..8077c95440
--- /dev/null
+++ b/tests/src/JIT/Regression/JitBlue/DevDiv_205323/app.config
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<configuration>
+ <runtime>
+ <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+ <dependentAssembly>
+ <assemblyIdentity name="System.Runtime" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.20.0" newVersion="4.0.20.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Text.Encoding" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Threading.Tasks" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.IO" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Reflection" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0" />
+ </dependentAssembly>
+ </assemblyBinding>
+ </runtime>
+</configuration> \ No newline at end of file
diff --git a/tests/src/JIT/Regression/JitBlue/DevDiv_205323/starg0.il b/tests/src/JIT/Regression/JitBlue/DevDiv_205323/starg0.il
new file mode 100644
index 0000000000..d69453372d
--- /dev/null
+++ b/tests/src/JIT/Regression/JitBlue/DevDiv_205323/starg0.il
@@ -0,0 +1,49 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+// Storing to arg 0 in an instance method requires special
+// handling by the jit.
+
+.assembly extern mscorlib {}
+.assembly starg0 {}
+.module starg0.exe
+
+.class public F
+{
+
+.method public instance void .ctor(int32 a)
+{
+ ldarg.0
+ ldarg.1
+ ldc.i4 100
+ add
+ stfld int32 F::A
+ ret
+}
+
+.field public int32 A
+
+.method public int32 Starg0() cil managed
+{
+ ldarg.0
+ ldfld int32 F::A
+ newobj instance void F::.ctor(int32)
+ starg.s 0
+ ldarg.0
+ ldfld int32 F::A
+ ret
+}
+
+.method public hidebysig static int32 Main(string[] args) cil managed
+{
+ .entrypoint
+ ldc.i4 -100
+ newobj instance void F::.ctor(int32)
+ call instance int32 F::Starg0()
+ ret
+}
+
+
+}
+
diff --git a/tests/src/JIT/Regression/JitBlue/DevDiv_205323/starg0.ilproj b/tests/src/JIT/Regression/JitBlue/DevDiv_205323/starg0.ilproj
new file mode 100644
index 0000000000..8c5291161f
--- /dev/null
+++ b/tests/src/JIT/Regression/JitBlue/DevDiv_205323/starg0.ilproj
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <AssemblyName>$(MSBuildProjectName)</AssemblyName>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <RestorePackages>true</RestorePackages>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <PropertyGroup>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="starg0.il" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="$(JitPackagesConfigFileDirectory)minimal\project.json" />
+ <None Include="app.config" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <PropertyGroup>
+ <ProjectJson>$(JitPackagesConfigFileDirectory)minimal\project.json</ProjectJson>
+ <ProjectLockJson>$(JitPackagesConfigFileDirectory)minimal\project.lock.json</ProjectLockJson>
+ </PropertyGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file