-
Notifications
You must be signed in to change notification settings - Fork 5k
Ensure VN produces correctly initialized simdmask_t #115227
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
f525796
Ensure VN produces correctly initialized simdmask_t
tannergooding da11d89
Fix test and add documentation for new parameter
tannergooding 78e108b
Apply formatting patch
tannergooding 2b02ad1
Ensure that the relevant Isa.IsSupported check exists in the test
tannergooding File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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
76 changes: 76 additions & 0 deletions
76
src/tests/JIT/Regression/JitBlue/Runtime_114978/Runtime_114978.cs
This file contains hidden or 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,76 @@ | ||
// Generated by Fuzzlyn v2.7 on 2025-04-23 21:44:41 | ||
// Run on X64 Windows | ||
// Seed: 3309115426102150651-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 179.3 KiB to 1.4 KiB in 00:01:49 | ||
// Debug: Outputs <255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255> | ||
// Release: Outputs <255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0> | ||
|
||
using System.Runtime.Intrinsics; | ||
using System.Runtime.Intrinsics.X86; | ||
using Xunit; | ||
|
||
public class C0 | ||
{ | ||
} | ||
|
||
public class C1 | ||
{ | ||
public Vector512<short> F4; | ||
} | ||
|
||
public class C2 | ||
{ | ||
public Vector128<sbyte> F6; | ||
} | ||
|
||
public class Runtime_114978 | ||
{ | ||
public static IRuntime s_rt; | ||
|
||
[Fact] | ||
public static void Problem() | ||
{ | ||
if (Avx512BW.VL.IsSupported) | ||
{ | ||
s_rt = new Runtime(); | ||
var vr14 = new C1(); | ||
var vr16 = new C1(); | ||
var vr17 = (byte)0; | ||
var vr18 = Vector512.CreateScalar(vr17); | ||
var vr19 = new C2(); | ||
var vr20 = new C0(); | ||
var vr21 = M10(vr14, vr18, vr19, vr20); | ||
s_rt.AssertEqual(Vector512<byte>.AllBitsSet, vr21); | ||
var vr22 = new C2(); | ||
var vr23 = new C0(); | ||
var vr24 = M10(vr16, vr21, vr22, vr23); | ||
s_rt.AssertEqual(Vector512<byte>.AllBitsSet, vr24); | ||
} | ||
} | ||
|
||
public static Vector512<byte> M10(C1 argThis, Vector512<byte> arg0, C2 arg1, C0 arg2) | ||
{ | ||
var vr3 = arg1.F6; | ||
var vr6 = arg1.F6; | ||
var vr0 = Avx512BW.VL.CompareLessThanOrEqual(vr3, vr6); | ||
var vr10 = (sbyte)1; | ||
var vr9 = Vector128.CreateScalar(vr10); | ||
if (Sse41.TestZ(vr0, vr9)) | ||
{ | ||
s_rt.AssertEqual(Vector512<short>.Zero, argThis.F4); | ||
} | ||
|
||
return Avx512BW.CompareEqual(arg0, arg0); | ||
} | ||
} | ||
|
||
public interface IRuntime | ||
{ | ||
void AssertEqual<T>(Vector512<T> value1, Vector512<T> value2); | ||
} | ||
|
||
public class Runtime : IRuntime | ||
{ | ||
public void AssertEqual<T>(Vector512<T> value1, Vector512<T> value2) | ||
=> Assert.Equal(value1, value2); | ||
} |
8 changes: 8 additions & 0 deletions
8
src/tests/JIT/Regression/JitBlue/Runtime_114978/Runtime_114978.csproj
This file contains hidden or 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> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Document
elementCount
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
I added a description for it matching the existing format since none of the other methods in here are following the more "standard" method documentation format.
It might be desirable to normalize that later, but I went for consistency now.