-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Ensure that we add the broadcast and mask flags prior to computing the instruction size #105757
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
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
46 changes: 46 additions & 0 deletions
46
src/tests/JIT/Regression/JitBlue/Runtime_105693/Runtime_105693.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,46 @@ | ||
| // 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-07-29 22:32:33 | ||
| // Run on X64 Linux | ||
| // Seed: 1257362736509498015-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 29.1 KiB to 0.6 KiB in 00:00:26 | ||
| // Hits JIT assert in Release: | ||
| // Assertion failed 'estimatedSize >= actualSize' in 'Program:Main(Fuzzlyn.ExecutionServer.IRuntime)' during 'Emit code' (IL size 59; hash 0xade6b36b; FullOpts) | ||
| // | ||
| // File: /__w/1/s/src/coreclr/jit/emit.cpp Line: 4361 | ||
| // | ||
|
|
||
| public class Runtime_105693 | ||
| { | ||
| public static int s_2; | ||
|
|
||
| [Fact] | ||
| public static void TestEntryPoint() | ||
| { | ||
| if (Avx2.IsSupported) | ||
| { | ||
| var vr5 = Vector128.Create<int>(1); | ||
| var vr6 = Avx2.BroadcastScalarToVector256(vr5); | ||
| var vr7 = Avx2.Abs(vr6); | ||
| var vr8 = Vector256.CreateScalar(1U); | ||
| if (Avx.TestZ(vr7, vr8)) | ||
| { | ||
| var vr9 = Vector128.CreateScalar(1f); | ||
| s_2 = Sse.ConvertToInt32(vr9); | ||
| } | ||
| else | ||
| { | ||
| s_2 = 1; | ||
| } | ||
| Assert.Equal(1, s_2); | ||
| } | ||
| } | ||
| } |
8 changes: 8 additions & 0 deletions
8
src/tests/JIT/Regression/JitBlue/Runtime_105693/Runtime_105693.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> |
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.
We have 37 instances where we
SetEvexinformation, and this is the only place where it was happening in the wrong spot and is what was causing the size misprediction