Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Only report live ranges for allocated variables (#57843)
With dead code it is possible that certain IL locals are never allocated, but still live in other blocks. In this case there is no information to report to the VM. Fixes #57767
- Loading branch information
1 parent
9671726
commit b11ba76
Showing
3 changed files
with
66 additions
and
4 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
49 changes: 49 additions & 0 deletions
49
src/tests/JIT/Regression/JitBlue/Runtime_57767/Runtime_57767.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,49 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
// Generated by Fuzzlyn v1.3 on 2021-08-19 18:34:52 | ||
// Run on .NET 6.0.0-dev on X64 Windows | ||
// Seed: 14701429021631883067 | ||
// Reduced from 466.6 KiB to 0.7 KiB in 02:59:01 | ||
// | ||
// Assert failure(PID 32388 [0x00007e84], Thread: 36304 [0x8dd0]): Assertion failed 'offset != BAD_STK_OFFS' in 'Program:M101(bool)' during 'Generate code' (IL size 78) | ||
// | ||
// File: D:\dev\dotnet\runtime\src\coreclr\jit\scopeinfo.cpp Line: 278 | ||
// Image: D:\dev\Fuzzlyn\Fuzzlyn\publish\windows-x64\Fuzzlyn.exe | ||
// | ||
// | ||
public class Program | ||
{ | ||
internal static sbyte s_4; | ||
internal static sbyte[] s_28; | ||
public static int Main() | ||
{ | ||
M101(false); | ||
return 100; | ||
} | ||
|
||
internal static void M101(bool arg0) | ||
{ | ||
uint var0 = default(uint); | ||
bool var2 = default(bool); | ||
for (int var5 = 0; var5 < 1; var5++) | ||
{ | ||
return; | ||
} | ||
|
||
for (int var9 = 0; var9 < 2; var9++) | ||
{ | ||
for (int var10 = 0; var10 < 2; var10++) | ||
{ | ||
var0 = (uint)var9; | ||
s_28[0] = s_4; | ||
if (var2) | ||
{ | ||
arg0 = true; | ||
} | ||
} | ||
} | ||
|
||
System.Console.WriteLine(var0); | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
src/tests/JIT/Regression/JitBlue/Runtime_57767/Runtime_57767.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,12 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
</PropertyGroup> | ||
<PropertyGroup> | ||
<DebugType>None</DebugType> | ||
<Optimize>True</Optimize> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Compile Include="$(MSBuildProjectName).cs" /> | ||
</ItemGroup> | ||
</Project> |