-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Undo struct promotion on "RetInd" code path #58582
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 1 commit
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
9ef80ba
TOREVERT: small repro case
kunalspathak 577020d
Fix the undone struct promotion for return
kunalspathak 03f0db1
Display lclVar number
kunalspathak 961aced
Revert "TOREVERT: small repro case"
kunalspathak 32632ce
Add test case
kunalspathak 90ac6eb
jit format
kunalspathak 67fed19
Combine the condition
kunalspathak af3faa2
Add an assert to catch the missing places
kunalspathak 1fe3bdc
Remove unneeded variable setting from csproj
kunalspathak 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
Add test case
- Loading branch information
commit 32632ce48a647fb8434c77b79156a3a9416b87ff
There are no files selected for viewing
43 changes: 43 additions & 0 deletions
43
src/tests/JIT/Regression/JitBlue/Runtime_57912/Runtime_57912.cs
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,43 @@ | ||
| // 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; | ||
| using System.Runtime.InteropServices; | ||
|
|
||
| [StructLayout(LayoutKind.Sequential)] | ||
| internal struct AA | ||
| { | ||
| public short tmp1; | ||
| public short q; | ||
|
|
||
| public ushort tmp2; | ||
| public int tmp3; | ||
|
|
||
| public AA(short qq) | ||
| { | ||
| tmp1 = 106; | ||
| tmp2 = 107; | ||
| tmp3 = 108; | ||
| q = qq; | ||
| } | ||
|
|
||
| // The test verifies that we accurately update the byref variable that is a field of struct. | ||
| public static short call_target_ref(ref short arg) { arg = 100; return arg; } | ||
| } | ||
|
|
||
|
|
||
| public class Runtime_57912 | ||
| { | ||
|
|
||
| public static int Main() | ||
| { | ||
| return (int)test_0_17(100, new AA(100), new AA(0)); | ||
| } | ||
|
|
||
| [MethodImpl(MethodImplOptions.NoInlining)] | ||
| static short test_0_17(int num, AA init, AA zero) | ||
| { | ||
| return AA.call_target_ref(ref init.q); | ||
| } | ||
| } |
20 changes: 20 additions & 0 deletions
20
src/tests/JIT/Regression/JitBlue/Runtime_57912/Runtime_57912.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,20 @@ | ||
| <Project Sdk="Microsoft.NET.Sdk"> | ||
| <PropertyGroup> | ||
| <OutputType>Exe</OutputType> | ||
| <Optimize>True</Optimize> | ||
| <DebugType>None</DebugType> | ||
| </PropertyGroup> | ||
| <ItemGroup> | ||
| <Compile Include="$(MSBuildProjectName).cs" /> | ||
| </ItemGroup> | ||
| <PropertyGroup> | ||
| <CLRTestBatchPreCommands><![CDATA[ | ||
| $(CLRTestBatchPreCommands) | ||
| set DOTNET_JitEnableFinallyCloning=0 | ||
| ]]></CLRTestBatchPreCommands> | ||
| <BashCLRTestPreCommands><![CDATA[ | ||
| $(BashCLRTestPreCommands) | ||
| export DOTNET_JitEnableFinallyCloning=0 | ||
| ]]></BashCLRTestPreCommands> | ||
| </PropertyGroup> | ||
| </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.
Uh oh!
There was an error while loading. Please reload this page.