-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Fixes #106142. #106369
Merged
Merged
Fixes #106142. #106369
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
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 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
68 changes: 68 additions & 0 deletions
68
src/tests/JIT/Regression/JitBlue/Runtime_106142/Runtime_106142.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,68 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
// Avx512FRotateLeftTest() | ||
// Generated by Fuzzlyn v2.2 on 2024-08-06 15:26:23 | ||
// Run on X86 Windows | ||
// Seed: 17786759086488605032-vectort,vector128,vector256,x86aes,x86avx,x86avx2,x86avx512bw,x86avx512bwvl,x86avx512cd,x86avx512cdvl,x86avx512dq,x86avx512dqvl,x86avx512f,x86avx512fvl,x86bmi1,x86bmi2,x86fma,x86lzcnt,x86pclmulqdq,x86popcnt,x86sse,x86sse2,x86sse3,x86sse41,x86sse42,x86ssse3,x86x86base | ||
// Reduced from 186.1 KiB to 0.4 KiB in 00:13:36 | ||
// Debug: Outputs <4611686018427387904, 0, 0, 0> | ||
// Release: Outputs <0, 0, 0, 0> | ||
|
||
|
||
// Avx512FRotateRightTest() | ||
// Generated by Fuzzlyn v2.2 on 2024-08-06 15:23:25 | ||
// Run on X86 Windows | ||
// Seed: 4121896490095390139-vectort,vector128,vector256,x86aes,x86avx,x86avx2,x86avx512bw,x86avx512bwvl,x86avx512cd,x86avx512cdvl,x86avx512dq,x86avx512dqvl,x86avx512f,x86avx512fvl,x86bmi1,x86bmi2,x86fma,x86lzcnt,x86pclmulqdq,x86popcnt,x86sse,x86sse2,x86sse3,x86sse41,x86sse42,x86ssse3,x86x86base | ||
// Reduced from 31.4 KiB to 0.4 KiB in 00:01:15 | ||
// Debug: Outputs <9007199254740992, 1, 1, 1> | ||
// Release: Outputs <0, 1, 1, 1> | ||
|
||
using System; | ||
using System.Runtime.CompilerServices; | ||
using System.Runtime.Intrinsics; | ||
using System.Runtime.Intrinsics.X86; | ||
using Xunit; | ||
|
||
public class Runtime_106142 | ||
{ | ||
[Fact] | ||
public static void TestEntryPoint() | ||
{ | ||
if (Avx512F.IsSupported) | ||
{ | ||
Avx512FRotateLeftTest(); | ||
Avx512FRotateRightTest(); | ||
} | ||
} | ||
|
||
[MethodImpl(MethodImplOptions.NoInlining)] | ||
private static void ShiftRightLogicalTest() | ||
{ | ||
var vr17 = Vector128.CreateScalar(2558356441U); | ||
var vr18 = Vector128.Create(0, 3113514718U, 0, 0); | ||
var vr19 = Sse2.ShiftRightLogical(vr17, vr18); | ||
if (Sse2.ConvertToUInt32(vr19) != 0) | ||
throw new InvalidOperationException(); | ||
} | ||
|
||
[MethodImpl(MethodImplOptions.NoInlining)] | ||
private static void Avx512FRotateLeftTest() | ||
{ | ||
var vr7 = Vector256.Create(1, 0, 0, 0); | ||
var vr8 = Vector256.CreateScalar(18446744073709551614UL); | ||
Vector256<long> vr9 = Avx512F.VL.RotateLeftVariable(vr7, vr8); | ||
if (vr9.GetElement(0) != 4611686018427387904) | ||
throw new InvalidOperationException(); | ||
} | ||
|
||
[MethodImpl(MethodImplOptions.NoInlining)] | ||
private static void Avx512FRotateRightTest() | ||
{ | ||
var vr2 = Vector256.Create<long>(1); | ||
var vr3 = Vector256.CreateScalar(9945469575827037067UL); | ||
Vector256<long> vr4 = Avx512F.VL.RotateRightVariable(vr2, vr3); | ||
if (vr4.GetElement(0) != 9007199254740992) | ||
throw new InvalidOperationException(); | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
src/tests/JIT/Regression/JitBlue/Runtime_106142/Runtime_106142.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> |
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.
Was the behavioral difference for negative inputs, since
%=
is remainder of truncating division and so handles signed values differently?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.
Yep. It was different for negative inputs. For eg. one of the test case has the rotate count show up as -2 in here.