-
Notifications
You must be signed in to change notification settings - Fork 5.4k
ARM64-SVE: Delay free all ops within conditional select #107036
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
19 commits
Select commit
Hold shift + click to select a range
5e6c6a9
ARM64-SVE: Delay free all ops within conditional select
a74nh 23fe687
Fix comment
a74nh 62a2ce6
Add test header
a74nh a730062
don't delay prefUseOpNum
a74nh 472b40a
Fix FMA
a74nh 851b66d
Add assert checks for delay free
a74nh 7455bc0
Merge embedded op build code
a74nh 06cbe55
fix formatting
a74nh c99f44f
simplify assert
a74nh c6b58c3
simplify FMA code
a74nh e21db13
Add tests for 106867
a74nh c0e4603
ARM64-SVE: Allow op inside conditionselect to be non HWintrinsic
a74nh 64a671d
Add Sve.IsSupported to tests
a74nh 5f16fa6
Merge main
a74nh 3e6f109
Add Sve.IsSupported to test
a74nh d27ebe2
fix formatting
a74nh fe6080f
Revert "ARM64-SVE: Allow op inside conditionselect to be non HWintrin…
a74nh 97e528b
Revert "ARM64-SVE: Allow op inside conditionselect to be non HWintrin…
a74nh 1044604
Revert "ARM64-SVE: Allow op inside conditionselect to be non HWintrin…
a74nh 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
40 changes: 40 additions & 0 deletions
40
src/tests/JIT/Regression/JitBlue/Runtime_106864/Runtime_106864.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,40 @@ | ||
| // Licensed to the .NET Foundation under one or more agreements. | ||
| // The .NET Foundation licenses this file to you under the MIT license. | ||
|
|
||
| using Xunit; | ||
|
|
||
| // Generated by Fuzzlyn v2.3 on 2024-08-23 09:12:06 | ||
| // Run on Arm64 Windows | ||
| // Seed: 9639718980642677114-vectort,vector64,vector128,armsve | ||
| // Reduced from 52.6 KiB to 0.4 KiB in 00:00:26 | ||
| // Hits JIT assert in Release: | ||
| // Assertion failed 'targetReg != embMaskOp2Reg' in 'Program:Main(Fuzzlyn.ExecutionServer.IRuntime)' during 'Generate code' (IL size 32; hash 0xade6b36b; FullOpts) | ||
| // | ||
| // File: C:\dev\dotnet\runtime2\src\coreclr\jit\hwintrinsiccodegenarm64.cpp Line: 818 | ||
| // | ||
| using System; | ||
| using System.Numerics; | ||
| using System.Runtime.Intrinsics; | ||
| using System.Runtime.Intrinsics.Arm; | ||
|
|
||
| public class C1 | ||
| { | ||
| public Vector<short> F1; | ||
| } | ||
|
|
||
| public class Runtime_106864 | ||
| { | ||
| public static C1 s_2 = new C1(); | ||
|
|
||
| [Fact] | ||
| public static void TestEntryPoint() | ||
| { | ||
| if (Sve.IsSupported) | ||
| { | ||
| C1 vr2 = s_2; | ||
| var vr3 = vr2.F1; | ||
| var vr4 = vr2.F1; | ||
| vr2.F1 = Sve.Max(vr3, vr4); | ||
| } | ||
| } | ||
| } | ||
9 changes: 9 additions & 0 deletions
9
src/tests/JIT/Regression/JitBlue/Runtime_106864/Runtime_106864.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,9 @@ | ||
| <Project Sdk="Microsoft.NET.Sdk"> | ||
| <PropertyGroup> | ||
| <Optimize>True</Optimize> | ||
| <NoWarn>$(NoWarn),SYSLIB5003</NoWarn> | ||
| </PropertyGroup> | ||
| <ItemGroup> | ||
| <Compile Include="$(MSBuildProjectName).cs" /> | ||
| </ItemGroup> | ||
| </Project> |
54 changes: 54 additions & 0 deletions
54
src/tests/JIT/Regression/JitBlue/Runtime_106867/Runtime_106867.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,54 @@ | ||
| // Licensed to the .NET Foundation under one or more agreements. | ||
| // The .NET Foundation licenses this file to you under the MIT license. | ||
|
|
||
| using Xunit; | ||
|
|
||
| // Generated by Fuzzlyn v2.3 on 2024-08-23 10:10:06 | ||
| // Run on Arm64 Windows | ||
| // Seed: 13584223539078280353-vectort,vector64,vector128,armsve | ||
| // Reduced from 87.4 KiB to 0.8 KiB in 00:00:52 | ||
| // Hits JIT assert in Release: | ||
| // Assertion failed 'secondId->idReg1() != secondId->idReg4()' in 'S0:M6(ubyte,double):this' during 'Emit code' (IL size 81; hash 0x596acd7c; FullOpts) | ||
| // | ||
| // File: C:\dev\dotnet\runtime2\src\coreclr\jit\emitarm64sve.cpp Line: 18601 | ||
| // | ||
| using System; | ||
| using System.Numerics; | ||
| using System.Runtime.Intrinsics; | ||
| using System.Runtime.Intrinsics.Arm; | ||
|
|
||
| public struct S0 | ||
| { | ||
| public void M6(byte arg0, double arg1) | ||
| { | ||
| var vr0 = Vector128.CreateScalar(119.12962f).AsVector(); | ||
|
a74nh marked this conversation as resolved.
|
||
| var vr3 = Runtime_106867.s_2; | ||
| var vr4 = Vector128.CreateScalar(1f).AsVector(); | ||
| var vr5 = Runtime_106867.s_2; | ||
| var vr2 = Sve.FusedMultiplySubtractNegated(vr3, vr4, vr5); | ||
| if ((Sve.ConditionalExtractLastActiveElement(vr0, 0, vr2) < 0)) | ||
| { | ||
| this = this; | ||
| } | ||
| } | ||
| } | ||
|
|
||
| public class Runtime_106867 | ||
| { | ||
| public static Vector<float> s_2; | ||
| public static double[] s_5 = new double[] | ||
| { | ||
| 0 | ||
| }; | ||
| public static byte s_16; | ||
|
|
||
| [Fact] | ||
| public static void TestEntryPoint() | ||
| { | ||
| if (Sve.IsSupported) | ||
| { | ||
| var vr6 = s_5[0]; | ||
| new S0().M6(s_16, vr6); | ||
| } | ||
| } | ||
| } | ||
9 changes: 9 additions & 0 deletions
9
src/tests/JIT/Regression/JitBlue/Runtime_106867/Runtime_106867.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,9 @@ | ||
| <Project Sdk="Microsoft.NET.Sdk"> | ||
| <PropertyGroup> | ||
| <Optimize>True</Optimize> | ||
| <NoWarn>$(NoWarn),SYSLIB5003</NoWarn> | ||
| </PropertyGroup> | ||
| <ItemGroup> | ||
| <Compile Include="$(MSBuildProjectName).cs" /> | ||
| </ItemGroup> | ||
| </Project> |
42 changes: 42 additions & 0 deletions
42
src/tests/JIT/Regression/JitBlue/Runtime_106867/Runtime_106867_1.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,42 @@ | ||
| // Licensed to the .NET Foundation under one or more agreements. | ||
| // The .NET Foundation licenses this file to you under the MIT license. | ||
|
|
||
| using Xunit; | ||
| using System.Runtime.CompilerServices; | ||
|
|
||
| // Generated by Fuzzlyn v2.3 on 2024-08-23 10:12:51 | ||
| // Run on Arm64 Windows | ||
| // Seed: 4576767951799510057-vectort,vector64,vector128,armsve | ||
| // Reduced from 32.2 KiB to 0.5 KiB in 00:00:25 | ||
| // Hits JIT assert in Release: | ||
| // Assertion failed 'secondId->idReg1() != secondId->idReg3()' in 'Program:Main(Fuzzlyn.ExecutionServer.IRuntime)' during 'Emit code' (IL size 55; hash 0xade6b36b; FullOpts) | ||
| // | ||
| // File: C:\dev\dotnet\runtime2\src\coreclr\jit\emitarm64sve.cpp Line: 18600 | ||
| // | ||
| using System; | ||
| using System.Numerics; | ||
| using System.Runtime.Intrinsics; | ||
| using System.Runtime.Intrinsics.Arm; | ||
|
|
||
| public class Runtime_106866_2 | ||
| { | ||
| [Fact] | ||
| public static void TestEntryPoint() | ||
| { | ||
| if (Sve.IsSupported) | ||
| { | ||
| Vector<short> vr4 = default(Vector<short>); | ||
| vr4 = Sve.MultiplyAdd(vr4, vr4, vr4); | ||
| var vr5 = (short)0; | ||
| var vr6 = Vector128.CreateScalar(vr5).AsVector(); | ||
| var vr7 = (short)0; | ||
| var vr8 = Sve.ConditionalExtractLastActiveElement(vr6, vr7, vr4); | ||
| Consume(vr8); | ||
| } | ||
| } | ||
|
|
||
| [MethodImpl(MethodImplOptions.NoInlining)] | ||
| static void Consume<T>(T val) | ||
| { | ||
| } | ||
| } |
9 changes: 9 additions & 0 deletions
9
src/tests/JIT/Regression/JitBlue/Runtime_106867/Runtime_106867_1.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,9 @@ | ||
| <Project Sdk="Microsoft.NET.Sdk"> | ||
| <PropertyGroup> | ||
| <Optimize>True</Optimize> | ||
| <NoWarn>$(NoWarn),SYSLIB5003</NoWarn> | ||
| </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.
Uh oh!
There was an error while loading. Please reload this page.