-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
JIT: properly update loop memory dependence when loops are removed (#…
…56436) If a loop is removed (because of unrolling) then the loop dependence tracking introduced in #55936 and #56184 may not properly update. So when a loop is removed, walk up the chain of parent loops looking for one that is not removed, and record the dependence on that parent. Addresses last part of #54118.
- Loading branch information
1 parent
db1b302
commit b25bd29
Showing
3 changed files
with
77 additions
and
2 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
37 changes: 37 additions & 0 deletions
37
src/tests/JIT/Regression/JitBlue/Runtime_54118/Runtime_54118_2.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,37 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
using System; | ||
using System.Runtime.CompilerServices; | ||
|
||
// Generated by Fuzzlyn v1.2 on 2021-07-22 13:36:33 | ||
// Seed: 11656046881568048475 | ||
// Reduced from 224.5 KiB to 0.4 KiB in 00:02:42 | ||
// Debug: Outputs 1 | ||
// Release: Outputs 0 | ||
|
||
public class Program | ||
{ | ||
[MethodImpl(MethodImplOptions.NoInlining)] | ||
static bool Eval(byte b) => b == 100; | ||
|
||
static ulong[] s_34 = new ulong[]{0}; | ||
public static int Main() | ||
{ | ||
byte[] vr1 = new byte[]{0}; | ||
bool result = false; | ||
for (int vr2 = 0; vr2 < 2; vr2++) | ||
{ | ||
for (int vr3 = 0; vr3 < 1; vr3++) | ||
{ | ||
ulong vr4 = s_34[0]++; | ||
} | ||
|
||
vr1[0] = 100; | ||
var vr5 = vr1[0]; | ||
result = Eval(vr5); | ||
} | ||
|
||
return result ? 100 : -1; | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
src/tests/JIT/Regression/JitBlue/Runtime_54118/Runtime_54118_2.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> |