-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not nop-out SSA definitions in block morphing (#92786)
SSA definitions cannot be deleted.
- Loading branch information
1 parent
38fd485
commit f401263
Showing
4 changed files
with
90 additions
and
3 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
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
69 changes: 69 additions & 0 deletions
69
src/tests/JIT/Regression/JitBlue/Runtime_91839/Runtime_91839.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,69 @@ | ||
// 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 Xunit; | ||
|
||
public class Runtime_91839 | ||
{ | ||
public static I0[] s_1; | ||
public static I2 s_5; | ||
|
||
[Fact] | ||
public static void TestEntryPoint() | ||
{ | ||
S1 vr2 = new S1(new S0(0)); | ||
if (vr2.F5) | ||
{ | ||
s_5 = s_5; | ||
} | ||
|
||
S1 vr3 = vr2; | ||
vr3.F4 = vr3.F4; | ||
for (int vr4 = 0; vr4 < 1; vr4++) | ||
{ | ||
var vr5 = vr3.F4; | ||
M2(vr5); | ||
} | ||
|
||
Assert.True(vr3.F4.F2 == 0); | ||
} | ||
|
||
private static void M2(S0 arg0) | ||
{ | ||
s_1 = new I0[] { new C0() }; | ||
} | ||
|
||
public interface I0 | ||
{ | ||
} | ||
|
||
public interface I2 | ||
{ | ||
} | ||
|
||
public struct S0 | ||
{ | ||
public ulong F0; | ||
public long F2; | ||
public short F3; | ||
public S0(long f2) : this() | ||
{ | ||
F2 = f2; | ||
} | ||
} | ||
|
||
public class C0 : I0 | ||
{ | ||
} | ||
|
||
public struct S1 | ||
{ | ||
public S0 F4; | ||
public bool F5; | ||
public S1(S0 f4) : this() | ||
{ | ||
F4 = f4; | ||
} | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
src/tests/JIT/Regression/JitBlue/Runtime_91839/Runtime_91839.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> | ||
<Optimize>True</Optimize> | ||
|
||
<!-- Needed for CLRTestEnvironmentVariable --> | ||
<RequiresProcessIsolation>true</RequiresProcessIsolation> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Compile Include="$(MSBuildProjectName).cs" /> | ||
<CLRTestEnvironmentVariable Include="DOTNET_JitStressModeNames" Value="STRESS_NO_OLD_PROMOTION" /> | ||
</ItemGroup> | ||
</Project> |