-
Notifications
You must be signed in to change notification settings - Fork 5.1k
JIT: update layout of BLK nodes during escape analysis #115845
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
Merged
Merged
Changes from all commits
Commits
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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,71 @@ | ||
// 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 v3.0 on 2025-05-20 22:26:35 | ||
// Run on X64 Windows | ||
// Seed: 457555340882575514-vectort,vector128,vector256,x86aes,x86avx,x86avx2,x86avx512bw,x86avx512bwvl,x86avx512cd,x86avx512cdvl,x86avx512dq,x86avx512dqvl,x86avx512f,x86avx512fvl,x86avx512fx64,x86bmi1,x86bmi1x64,x86bmi2,x86bmi2x64,x86fma,x86lzcnt,x86lzcntx64,x86pclmulqdq,x86popcnt,x86popcntx64,x86sse,x86ssex64,x86sse2,x86sse2x64,x86sse3,x86sse41,x86sse41x64,x86sse42,x86sse42x64,x86ssse3,x86x86base | ||
// Reduced from 154.0 KiB to 0.8 KiB in 00:06:12 | ||
// Hits JIT assert in Release: | ||
// Assertion failed 'm_blockLayout->CanAssignFrom(m_src->GetLayout(m_comp))' in 'Program:Main(Fuzzlyn.ExecutionServer.IRuntime)' during 'Morph - Global' (IL size 69; hash 0xade6b36b; FullOpts) | ||
// | ||
// File: D:\a\_work\1\s\src\coreclr\jit\morphblock.cpp Line: 668 | ||
// | ||
using System; | ||
using Xunit; | ||
|
||
public class C0 | ||
{ | ||
} | ||
|
||
public struct S0 | ||
{ | ||
public int F5; | ||
} | ||
|
||
public struct S1 | ||
{ | ||
public C0 F2; | ||
public S0 F3; | ||
public S1(C0 f2) : this() | ||
{ | ||
F2 = f2; | ||
} | ||
} | ||
|
||
public struct S2 | ||
{ | ||
public S1 F5; | ||
public S1 F7; | ||
public S2(S1 f5) : this() | ||
{ | ||
F5 = f5; | ||
} | ||
} | ||
|
||
public struct S4 | ||
{ | ||
public S2 F1; | ||
public S4(S2 f1) : this() | ||
{ | ||
F1 = f1; | ||
} | ||
} | ||
|
||
public struct S5 | ||
{ | ||
public S4 F5; | ||
public S5(S4 f5) : this() | ||
{ | ||
F5 = f5; | ||
} | ||
} | ||
|
||
public class Runtime_115832 | ||
{ | ||
[Fact] | ||
public static void Problem() | ||
{ | ||
S5 vr0 = new S5(new S4(new S2(new S1(new C0())))); | ||
System.Console.WriteLine(vr0.F5.F1.F7.F3.F5); | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
src/tests/JIT/opt/ObjectStackAllocation/Runtime_115832.csproj
This file contains hidden or 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> | ||
<DebugType>None</DebugType> | ||
<Optimize>True</Optimize> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Compile Include="$(MSBuildProjectName).cs" /> | ||
</ItemGroup> | ||
</Project> |
Oops, something went wrong.
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.
You added a description for
newLayout
in the implementation comments; please update the corresponding declaration comment inobjectalloc.h
so the header and implementation stay in sync.Copilot uses AI. Check for mistakes.