forked from dotnet/runtime
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Arm: Include BBJ_ALWAYS blocks in dominance calculation (dotnet#59376)
* Include BBJ_ALWAYS in inverse post ordering for computing reachability * Add test case * Add BBJ_ALWAYS in fgAlways list * jit format
- Loading branch information
1 parent
4590efe
commit e4a842e
Showing
5 changed files
with
102 additions
and
23 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
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
66 changes: 66 additions & 0 deletions
66
src/tests/JIT/Regression/JitBlue/Runtime_59298/Runtime_59298.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,66 @@ | ||
using System.Runtime.CompilerServices; | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
// | ||
// Note: In below test case, we do not iterate over BBJ_ALWAYS blocks while computing the | ||
// reachability leading to assert | ||
public class Runtime_59298 | ||
{ | ||
public struct S2 | ||
{ | ||
public struct S2_D1_F1 | ||
{ | ||
public double double_1; | ||
} | ||
} | ||
static int s_int_6 = -2; | ||
static S2 s_s2_16 = new S2(); | ||
int int_6 = -2; | ||
|
||
[MethodImpl(MethodImplOptions.NoInlining)] | ||
public int LeafMethod6() | ||
{ | ||
return 1; | ||
} | ||
|
||
[MethodImpl(MethodImplOptions.NoInlining)] | ||
public S2 Method0(out short p_short_1) | ||
{ | ||
long long_7 = -1; | ||
p_short_1 = 0; | ||
switch (long_7) | ||
{ | ||
case -5: | ||
{ | ||
do | ||
{ | ||
try | ||
{ | ||
int_6 ^= int_6; | ||
} | ||
finally | ||
{ | ||
// The expression doesn't matter, it just has to be long enough | ||
// to have few extra blocks which we don't walk when doing inverse | ||
// post order while computing dominance information. | ||
long_7 &= long_7; | ||
int_6 &= (int_6 /= (int_6 -= LeafMethod6() - int_6) + 69) / ((int_6 << (int_6 - int_6)) + (int_6 |= LeafMethod6()) + (LeafMethod6() >> s_int_6) + 62); | ||
} | ||
} | ||
while (long_7 == 8); | ||
break; | ||
} | ||
default: | ||
{ | ||
break; | ||
} | ||
} | ||
return s_s2_16; | ||
} | ||
|
||
public static int Main(string[] args) | ||
{ | ||
new Runtime_59298().Method0(out short s); | ||
return s + 100; | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
src/tests/JIT/Regression/JitBlue/Runtime_59298/Runtime_59298.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> |