forked from dotnet/runtime
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix spill check for struct lclVars (dotnet/coreclr#23570)
* Fix spill check for struct lclVars With the 1st class struct changes, the `SPILL_APPEND` check for the case of an assignment to a lclVar needs to handle block ops as well as lclVar lhs. Fix dotnet/coreclr#23545 Commit migrated from dotnet/coreclr@f036d23
- Loading branch information
Showing
4 changed files
with
96 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
src/coreclr/tests/src/JIT/Regression/JitBlue/GitHub_23545/GitHub_23545.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
// 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. | ||
|
||
using System; | ||
using System.Collections.Generic; | ||
|
||
namespace GitHub_23545 | ||
{ | ||
public struct TestStruct | ||
{ | ||
public int value1; | ||
|
||
public override string ToString() | ||
{ | ||
return this.value1.ToString(); | ||
} | ||
} | ||
|
||
class Test | ||
{ | ||
public static Dictionary<TestStruct, TestStruct> StructKeyValue | ||
{ | ||
get | ||
{ | ||
return new Dictionary<TestStruct, TestStruct>() | ||
{ | ||
{ | ||
new TestStruct(){value1 = 12}, new TestStruct(){value1 = 15} | ||
} | ||
}; | ||
} | ||
} | ||
|
||
static int Main() | ||
{ | ||
int value = 0; | ||
foreach (var e in StructKeyValue) | ||
{ | ||
value += e.Key.value1 + e.Value.value1; | ||
Console.WriteLine(e.Key.ToString() + " " + e.Value.ToString()); | ||
} | ||
if (value != 27) | ||
{ | ||
return -1; | ||
} | ||
return 100; | ||
} | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
src/coreclr/tests/src/JIT/Regression/JitBlue/GitHub_23545/GitHub_23545.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?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)' == '' ">Release</Configuration> | ||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
<AssemblyName>$(MSBuildProjectName)</AssemblyName> | ||
<OutputType>Exe</OutputType> | ||
<DebugType></DebugType> | ||
<Optimize>True</Optimize> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Compile Include="$(MSBuildProjectName).cs" /> | ||
</ItemGroup> | ||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" /> | ||
<PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' "></PropertyGroup> | ||
</Project> |