-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't run optJumpThreading when fgCurBBEpochSize != (fgBBNumMax + 1) #72440
Merged
Merged
Changes from 3 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
114 changes: 114 additions & 0 deletions
114
src/tests/JIT/Regression/JitBlue/Runtime_71599/Runtime_71599.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,114 @@ | ||
// 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.5 on 2022-07-03 16:41:26 | ||
// Run on Arm64 MacOS | ||
// Seed: 15254214336696406464 | ||
// Reduced from 47.2 KiB to 1.6 KiB in 00:00:23 | ||
// Hits JIT assert in Release: | ||
// Assertion failed 'i < BitSetTraits::GetSize(env)' in 'Program:Main(Fuzzlyn.ExecutionServer.IRuntime)' during 'Redundant branch opts' (IL size 260; hash 0xade6b36b; FullOpts) | ||
// | ||
// File: /Users/runner/work/1/s/src/coreclr/jit/bitsetasshortlong.h Line: 261 | ||
// | ||
|
||
using System; | ||
|
||
public class C0 | ||
{ | ||
public ushort F0; | ||
public ulong F1; | ||
} | ||
|
||
public class C1 | ||
{ | ||
public C0 F0; | ||
public C0 F3; | ||
public C0 F6; | ||
} | ||
|
||
public struct S0 | ||
{ | ||
public bool F1; | ||
public ushort F3; | ||
public byte F6; | ||
} | ||
|
||
public struct S1 | ||
{ | ||
public int F0; | ||
} | ||
|
||
public class Runtime_71599 | ||
{ | ||
public static IRuntime s_rt; | ||
public static C1[] s_1; | ||
public static S0[] s_3; | ||
public static S1 s_7; | ||
|
||
public static int Main() | ||
{ | ||
try | ||
{ | ||
Test(); | ||
} | ||
catch (NullReferenceException) | ||
{ | ||
return 100; | ||
} | ||
return 101; | ||
} | ||
|
||
|
||
public static void Test() | ||
{ | ||
ushort[] vr2 = default(ushort[]); | ||
S0 vr3 = default(S0); | ||
bool vr4 = vr3.F1; | ||
byte vr5 = vr3.F6--; | ||
if (vr4) | ||
{ | ||
try | ||
{ | ||
s_rt.WriteLine(1); | ||
} | ||
finally | ||
{ | ||
C1 vr6 = s_1[0]; | ||
var vr7 = new long[] { 1 }; | ||
var vr8 = vr6.F3; | ||
long[] vr10 = vr7; | ||
C0 vr11 = vr8; | ||
int vr13 = s_7.F0; | ||
s_rt.WriteLine(vr6.F0.F0); | ||
s_rt.WriteLine(vr6.F0.F1); | ||
s_rt.WriteLine(vr6.F6.F0); | ||
} | ||
|
||
if (!vr4) | ||
{ | ||
s_1[0].F3.F0 = vr3.F3; | ||
} | ||
} | ||
|
||
for (int vr9 = 0; vr9 < 2; vr9++) | ||
{ | ||
if (vr4) | ||
{ | ||
s_3[0].F3 = vr2[0]; | ||
} | ||
|
||
s_rt.WriteLine(vr9); | ||
} | ||
|
||
} | ||
} | ||
|
||
public interface IRuntime | ||
{ | ||
void WriteLine<T>(T value); | ||
} | ||
|
||
public class Runtime : IRuntime | ||
{ | ||
public void WriteLine<T>(T value) => System.Console.WriteLine(value); | ||
} |
9 changes: 9 additions & 0 deletions
9
src/tests/JIT/Regression/JitBlue/Runtime_71599/Runtime_71599.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,9 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<Optimize>True</Optimize> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Compile Include="$(MSBuildProjectName).cs" /> | ||
</ItemGroup> | ||
</Project> |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would put this check down at the start of
optJumpThread
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
optJumpThread
doesn't really depend on the epoch, it depends onBlockSet
which depends on the epoch.Down the road we should consider giving
optJumpThread
alternative ways of keeping track of the different sets of preds, I only usedBlockSet
here because it seemed convenient. The pred sets are likely going to be pretty small (most blocks don't have many preds) so something simpler might actually both remove this dependency and be more efficient overall.I'll add a note to #48115.