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.
Don't fold relops with side effects that are used in jumps (dotnet#10…
…3903) * Don't fold relops with side effects that are used in jumps * Reorder comparisons
- Loading branch information
1 parent
b79c57e
commit e6a0fd6
Showing
5 changed files
with
75 additions
and
0 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
File renamed without changes.
File renamed without changes.
59 changes: 59 additions & 0 deletions
59
src/tests/JIT/Regression/JitBlue/Runtime_103888/Runtime_103888.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,59 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
using System.Runtime.CompilerServices; | ||
using Xunit; | ||
|
||
public class Runtime_103888_A | ||
{ | ||
// Generated by Fuzzlyn v1.6 on 2024-06-23 16:50:17 | ||
// Run on X64 Windows | ||
// Seed: 14337630088129483600 | ||
// Reduced from 13.5 KiB to 0.3 KiB in 00:01:04 | ||
// Hits JIT assert in Release: | ||
// Assertion failed 'block->bbPreorderNum == preorderNum' in 'Program:Main(Fuzzlyn.ExecutionServer.IRuntime)' during 'Early Value Propagation' (IL size 47; hash 0xade6b36b; FullOpts) | ||
// | ||
// File: D:\a\_work\1\s\src\coreclr\jit\fgdiagnostic.cpp Line: 4750 | ||
// | ||
|
||
public class C0 | ||
{ | ||
public uint F0; | ||
public int F1; | ||
} | ||
|
||
[Fact] | ||
public static void TestEntryPoint() | ||
{ | ||
C0 vr0 = new C0(); | ||
if (!((ulong)(0 << vr0.F1) <= vr0.F0)) | ||
{ | ||
vr0.F1 ^= vr0.F1; | ||
} | ||
} | ||
} | ||
|
||
public class Runtime_103888_B | ||
{ | ||
public static ushort[, ] s_69 = new ushort[1,1]; | ||
|
||
[Fact] | ||
public static void TestEntryPoint() | ||
{ | ||
try | ||
{ | ||
var vr2 = new int[][, ][]{new int[, ][]{{new int[]{0}}}}; | ||
} | ||
finally | ||
{ | ||
if (0UL > s_69[0, 0]) | ||
{ | ||
var vr3 = new byte[, ]{{0}}; | ||
} | ||
else | ||
{ | ||
uint[, ] vr4 = new uint[, ]{{0}}; | ||
} | ||
} | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
src/tests/JIT/Regression/JitBlue/Runtime_103888/Runtime_103888.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,8 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<Optimize>True</Optimize> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Compile Include="$(MSBuildProjectName).cs" /> | ||
</ItemGroup> | ||
</Project> |