-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure we aren't containing nodes that shouldn't be contained (#105993)
* Ensure we aren't containing nodes that shouldn't be contained * Adding regression tests for the other resolved issues * Ensure the tests use the right `Isa.IsSupported` checks
- Loading branch information
1 parent
7dd55a0
commit 5fb42a4
Showing
7 changed files
with
198 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
58 changes: 58 additions & 0 deletions
58
src/tests/JIT/Regression/JitBlue/Runtime_105967/Runtime_105967.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,58 @@ | ||
// 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.Numerics; | ||
using System.Runtime.Intrinsics; | ||
using System.Runtime.Intrinsics.X86; | ||
using Xunit; | ||
|
||
// Generated by Fuzzlyn v2.2 on 2024-08-04 16:04:50 | ||
// Run on X64 Linux | ||
// Seed: 2207552216055442248-vectort,vector128,vector256,vector512,x86aes,x86avx,x86avx2,x86avx512bw,x86avx512bwvl,x86avx512cd,x86avx512cdvl,x86avx512dq,x86avx512dqvl,x86avx512f,x86avx512fvl,x86avx512fx64,x86avx512vbmi,x86avx512vbmivl,x86bmi1,x86bmi1x64,x86bmi2,x86bmi2x64,x86fma,x86lzcnt,x86lzcntx64,x86pclmulqdq,x86popcnt,x86popcntx64,x86sse,x86ssex64,x86sse2,x86sse2x64,x86sse3,x86sse41,x86sse41x64,x86sse42,x86sse42x64,x86ssse3,x86x86base | ||
// Reduced from 138.4 KiB to 0.8 KiB in 00:07:16 | ||
// Hits JIT assert in Release: | ||
// Assertion failed 'varDsc->GetRegNum() == REG_STK' in 'Program:Main(Fuzzlyn.ExecutionServer.IRuntime)' during 'Generate code' (IL size 62; hash 0xade6b36b; FullOpts) | ||
// | ||
// File: /__w/1/s/src/coreclr/jit/codegenlinear.cpp Line: 1655 | ||
// | ||
|
||
public class C0 | ||
{ | ||
public float F3; | ||
} | ||
|
||
public class C2 | ||
{ | ||
public C0 F4; | ||
} | ||
|
||
public class Runtime_105967 | ||
{ | ||
[Fact] | ||
public static void TestEntryPoint() | ||
{ | ||
if (Avx512F.IsSupported) | ||
{ | ||
var vr26 = new C2(); | ||
vr26.F4 = new C0(); | ||
var vr29 = vr26.F4.F3; | ||
var vr30 = Vector512.Create<float>(vr29); | ||
var vr31 = Vector512.CreateScalar(-193.44424f); | ||
var vr32 = M17(); | ||
var vr33 = Avx512F.Fixup(vr30, vr31, vr32, 0); | ||
M16(vr33, new long[] { 1 }); | ||
} | ||
} | ||
|
||
private static void M16(Vector512<float> arg0, long[] arg2) | ||
{ | ||
Assert.Equal(Vector512.Create(4286578687), arg0.AsUInt32()); | ||
} | ||
|
||
private static Vector512<int> M17() | ||
{ | ||
return Vector512.Create<int>(-1); | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
src/tests/JIT/Regression/JitBlue/Runtime_105967/Runtime_105967.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> |
43 changes: 43 additions & 0 deletions
43
src/tests/JIT/Regression/JitBlue/Runtime_105968/Runtime_105968.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,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.Numerics; | ||
using System.Runtime.Intrinsics; | ||
using System.Runtime.Intrinsics.X86; | ||
using Xunit; | ||
|
||
// Generated by Fuzzlyn v2.2 on 2024-08-04 16:05:19 | ||
// Run on X64 Linux | ||
// Seed: 7664329391183577492-vectort,vector128,vector256,vector512,x86aes,x86avx,x86avx2,x86avx512bw,x86avx512bwvl,x86avx512cd,x86avx512cdvl,x86avx512dq,x86avx512dqvl,x86avx512f,x86avx512fvl,x86avx512fx64,x86avx512vbmi,x86avx512vbmivl,x86bmi1,x86bmi1x64,x86bmi2,x86bmi2x64,x86fma,x86lzcnt,x86lzcntx64,x86pclmulqdq,x86popcnt,x86popcntx64,x86sse,x86ssex64,x86sse2,x86sse2x64,x86sse3,x86sse41,x86sse41x64,x86sse42,x86sse42x64,x86ssse3,x86x86base | ||
// Reduced from 35.1 KiB to 0.9 KiB in 00:00:35 | ||
// Hits JIT assert in Release: | ||
// Assertion failed 'childNode->canBeContained()' in 'Program:Main(Fuzzlyn.ExecutionServer.IRuntime)' during 'Lowering nodeinfo' (IL size 134; hash 0xade6b36b; FullOpts) | ||
// | ||
// File: /__w/1/s/src/coreclr/jit/lower.cpp Line: 42 | ||
// | ||
|
||
public class Runtime_105968 | ||
{ | ||
[Fact] | ||
public static void TestEntryPoint() | ||
{ | ||
if (Avx512F.IsSupported) | ||
{ | ||
var vr11 = (double)0; | ||
var vr12 = Vector128.CreateScalar(vr11); | ||
var vr13 = Vector128.Create<double>(0); | ||
Vector128<double> vr23 = default(Vector128<double>); | ||
var vr15 = Vector128.CreateScalar(0d); | ||
var vr16 = Avx512F.RoundScaleScalar(vr23, vr15, 0); | ||
var vr17 = Sse2.DivideScalar(vr13, vr16); | ||
var vr18 = (double)0; | ||
var vr19 = Vector128.CreateScalar(vr18); | ||
var vr20 = Vector128.CreateScalar(-1829879552908856156L); | ||
var vr21 = Avx512F.FixupScalar(vr17, vr19, vr20, 0); | ||
bool vr22 = Sse2.CompareScalarUnorderedLessThanOrEqual(vr12, vr21); | ||
Assert.False(vr22); | ||
} | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
src/tests/JIT/Regression/JitBlue/Runtime_105968/Runtime_105968.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> |
42 changes: 42 additions & 0 deletions
42
src/tests/JIT/Regression/JitBlue/Runtime_105970/Runtime_105970.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,42 @@ | ||
// 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.Numerics; | ||
using System.Runtime.Intrinsics; | ||
using System.Runtime.Intrinsics.X86; | ||
using Xunit; | ||
|
||
// Generated by Fuzzlyn v2.2 on 2024-08-04 15:50:24 | ||
// Run on X64 Windows | ||
// Seed: 5477057901617732479-vectort,vector128,vector256,x86aes,x86avx,x86avx2,x86avx512bw,x86avx512bwvl,x86avx512cd,x86avx512cdvl,x86avx512dq,x86avx512dqvl,x86avx512f,x86avx512fvl,x86avx512fx64,x86bmi1,x86bmi1x64,x86bmi2,x86bmi2x64,x86fma,x86lzcnt,x86lzcntx64,x86pclmulqdq,x86popcnt,x86popcntx64,x86sse,x86ssex64,x86sse2,x86sse2x64,x86sse3,x86sse41,x86sse41x64,x86sse42,x86sse42x64,x86ssse3,x86x86base | ||
// Reduced from 32.6 KiB to 0.8 KiB in 00:01:15 | ||
// Hits JIT assert in Release: | ||
// Assertion failed 'numArgs == 2' in 'Program:Main(Fuzzlyn.ExecutionServer.IRuntime)' during 'Linear scan register alloc' (IL size 107; hash 0xade6b36b; FullOpts) | ||
// | ||
// File: D:\a\_work\1\s\src\coreclr\jit\lsrabuild.cpp Line: 3701 | ||
// | ||
|
||
public class Runtime_105970 | ||
{ | ||
public static Vector256<double> s_1; | ||
|
||
[Fact] | ||
public static void TestEntryPoint() | ||
{ | ||
if (Avx512F.VL.IsSupported) | ||
{ | ||
var vr9 = Vector256.CreateScalar(1.7976931348623157E+308d); | ||
var vr10 = Vector256.CreateScalar(1.7976931348623157E+308d); | ||
Vector256<long> vr18 = default(Vector256<long>); | ||
var vr12 = Avx512F.VL.Fixup(vr9, vr10, vr18, 0); | ||
var vr13 = Vector256.CreateScalar(-1627.749979702826d); | ||
var vr15 = Vector256.Create<long>(-1); | ||
var vr16 = Avx512F.VL.Fixup(vr12, vr13, vr15, 0); | ||
Vector256<double> vr17 = Avx512F.VL.Shuffle2x128(vr16, s_1, 0); | ||
Vector256<ulong> expected = Vector256.Create(18442240474082181119, 18442240474082181119, 0, 0); | ||
Assert.Equal(expected, vr17.AsUInt64()); | ||
} | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
src/tests/JIT/Regression/JitBlue/Runtime_105970/Runtime_105970.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> |