Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/coreclr/jit/fgehopt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1037,9 +1037,13 @@ PhaseStatus Compiler::fgRemoveEmptyTryCatchOrTryFault()
//
fgRemoveEHTableEntry(XTnum);

// (6) The old try entry no longer needs special protection.
// (6) The old try entry may no longer need special protection.
// (it may still be an entry of an enclosing try)
//
firstTryBlock->RemoveFlags(BBF_DONT_REMOVE);
if (!bbIsTryBeg(firstTryBlock))
{
firstTryBlock->RemoveFlags(BBF_DONT_REMOVE);
}

// Another one bites the dust...
emptyCount++;
Expand Down
80 changes: 80 additions & 0 deletions src/tests/JIT/Regression/JitBlue/Runtime_110958/Runtime_110985.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

// Found by Antigen
// Reduced from 17.57 KB to 2.06 KB.

using System.Collections.Generic;
using System.Runtime.Intrinsics.Arm;
using Xunit;

public class Runtime_110958
{
long long_30 = 5;
ulong ulong_36 = 0;
SveMaskPattern SveMaskPattern_37 = SveMaskPattern.VectorCount1;
private static List<string> toPrint = new List<string>();
private void Method0()
{
unchecked
{
ulong ulong_77 = 2;
SveMaskPattern SveMaskPattern_78 = SveMaskPattern_37;
try
{
try
{
ulong_36 -= ulong_77;
}
catch (System.FieldAccessException)
{ }
catch (System.ExecutionEngineException)
{ }
}
catch (System.RankException)
{
}
catch (System.MemberAccessException)
{
do
{
try
{
switch ((15 << 4) * long_30)
{
case -1:
{
break;
}
default:
{
break;
}
}
}
catch (System.InvalidProgramException)
{
}
catch (System.InvalidCastException)
{
}
}
while (15 < 4);
}
catch (System.AggregateException)
{
}
finally
{
}
return;
}
}

[Fact]
public static void Problem0()
{
new Runtime_110958().Method0();
}
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Optimize>True</Optimize>
<!-- Needed for CLRTestEnvironmentVariable -->
<RequiresProcessIsolation>true</RequiresProcessIsolation>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(MSBuildProjectName).cs" />

<CLRTestEnvironmentVariable Include="DOTNET_TieredCompilation" Value="0" />
<CLRTestEnvironmentVariable Include="DOTNET_JitStress" Value="2" />
<CLRTestEnvironmentVariable Include="DOTNET_JitRandomEdgeCounts" Value="1" />
Comment thread
AndyAyersMS marked this conversation as resolved.
</ItemGroup>
</Project>