-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Arm64: keep SP in base operand for large-offset adds #130467
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
+229
−7
Merged
Changes from all commits
Commits
Show all changes
3 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 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
14 changes: 14 additions & 0 deletions
14
src/tests/JIT/Regression/JitBlue/GitHub_130437/GitHub_130437.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,14 @@ | ||
| <Project Sdk="Microsoft.NET.Sdk.IL"> | ||
| <PropertyGroup> | ||
| <LanguageTargets>$(RepoRoot)src/coreclr/.nuget/Microsoft.NET.Sdk.IL/Microsoft.NET.Sdk.IL.targets.template</LanguageTargets> | ||
| <Optimize>True</Optimize> | ||
| <RequiresProcessIsolation>true</RequiresProcessIsolation> | ||
| <CLRTestTargetUnsupported Condition="'$(TargetArchitecture)' != 'arm64'">true</CLRTestTargetUnsupported> | ||
| </PropertyGroup> | ||
| <ItemGroup> | ||
| <Compile Include="$(MSBuildProjectName).il" /> | ||
| <CLRTestEnvironmentVariable Include="DOTNET_TieredCompilation" Value="0" /> | ||
| <CLRTestEnvironmentVariable Include="DOTNET_JitStressModeNames" Value="STRESS_LCL_FLDS" /> | ||
| <CLRTestEnvironmentVariable Include="DOTNET_JitSaveFpLrWithCalleeSavedRegisters" Value="2" /> | ||
| </ItemGroup> | ||
| </Project> |
207 changes: 207 additions & 0 deletions
207
src/tests/JIT/Regression/JitBlue/GitHub_130437/GitHub_130437.il
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,207 @@ | ||
| // Licensed to the .NET Foundation under one or more agreements. | ||
| // The .NET Foundation licenses this file to you under the MIT license. | ||
|
|
||
| .assembly extern mscorlib {} | ||
| .assembly extern System.Numerics.Vectors {} | ||
| .assembly extern System.Runtime.Intrinsics {} | ||
|
|
||
| .assembly GitHub_130437 {} | ||
| .module GitHub_130437.dll | ||
|
|
||
| .class private explicit ansi sealed beforefieldinit LargeFrame | ||
| extends [mscorlib]System.ValueType | ||
| { | ||
| .pack 1 | ||
| .size 8192 | ||
| } | ||
|
|
||
| .class private auto ansi beforefieldinit GitHub_130437 | ||
| extends [mscorlib]System.Object | ||
| { | ||
| .method public hidebysig static int32 | ||
| Main() cil managed | ||
| { | ||
| .entrypoint | ||
| .maxstack 2 | ||
|
|
||
| call bool [System.Runtime.Intrinsics]System.Runtime.Intrinsics.Arm.Sve2::get_IsSupported() | ||
| brtrue.s SVE_SUPPORTED | ||
|
|
||
| ldc.i4.s 100 | ||
| ret | ||
|
|
||
| SVE_SUPPORTED: | ||
| call int64 GitHub_130437::RunBasicScenario_UnsafeRead() | ||
| ldc.i4.s 44 | ||
| conv.i8 | ||
| ceq | ||
| brfalse.s FAIL | ||
|
|
||
| ldc.i4.s 100 | ||
| ret | ||
|
|
||
| FAIL: | ||
| ldc.i4.m1 | ||
| ret | ||
| } | ||
|
|
||
| .method private hidebysig static int64 | ||
| RunBasicScenario_UnsafeRead() cil managed noinlining | ||
| { | ||
| .maxstack 4 | ||
| .locals init ( | ||
| // The mask local must be allocated above the large frame local so the | ||
| // SP-based predicate spill/reload uses a large positive offset. | ||
| [0] valuetype [System.Numerics.Vectors]System.Numerics.Vector`1<int64> mask, | ||
| [1] valuetype LargeFrame largeFrame, | ||
| [2] uint32[] baseArray, | ||
| [3] int64[] maskArray, | ||
| [4] int64[] offsetsArray, | ||
| [5] uint32* pinned basePinned, | ||
| [6] int64* pinned maskPinned, | ||
| [7] int64* pinned offsetsPinned, | ||
| [8] valuetype [System.Numerics.Vectors]System.Numerics.Vector`1<int64> result1, | ||
| [9] valuetype [System.Numerics.Vectors]System.Numerics.Vector`1<int64> result2, | ||
| [10] int32 index) | ||
|
|
||
| ldc.i4 1024 | ||
| newarr [mscorlib]System.UInt32 | ||
| stloc.2 | ||
|
|
||
| ldloc.2 | ||
| ldc.i4.0 | ||
| ldc.i4.s 20 | ||
| stelem.i4 | ||
|
|
||
| ldc.i4.s 64 | ||
| newarr [mscorlib]System.Int64 | ||
| stloc.3 | ||
|
|
||
| ldc.i4.0 | ||
| stloc.s index | ||
|
|
||
| FILL_MASK: | ||
| ldloc.s index | ||
| ldc.i4.s 64 | ||
| bge.s FILL_MASK_DONE | ||
|
|
||
| ldloc.3 | ||
| ldloc.s index | ||
| ldc.i4.1 | ||
| conv.i8 | ||
| stelem.i8 | ||
|
|
||
| ldloc.s index | ||
| ldc.i4.1 | ||
| add | ||
| stloc.s index | ||
| br.s FILL_MASK | ||
|
|
||
| FILL_MASK_DONE: | ||
| ldc.i4.s 64 | ||
| newarr [mscorlib]System.Int64 | ||
| stloc.s offsetsArray | ||
|
|
||
| ldloc.2 | ||
| ldc.i4.0 | ||
| ldelema [mscorlib]System.UInt32 | ||
| stloc.s basePinned | ||
|
|
||
| ldloc.3 | ||
| ldc.i4.0 | ||
| ldelema [mscorlib]System.Int64 | ||
| stloc.s maskPinned | ||
|
|
||
| ldloc.s offsetsArray | ||
| ldc.i4.0 | ||
| ldelema [mscorlib]System.Int64 | ||
| stloc.s offsetsPinned | ||
|
|
||
| ldloc.s maskPinned | ||
| ldobj valuetype [System.Numerics.Vectors]System.Numerics.Vector`1<int64> | ||
| stloc.0 | ||
|
|
||
| ldloca.s largeFrame | ||
| call void GitHub_130437::TouchLargeFrame(valuetype LargeFrame&) | ||
|
|
||
| ldloc.0 | ||
| ldloc.s basePinned | ||
| ldloc.s offsetsPinned | ||
| ldobj valuetype [System.Numerics.Vectors]System.Numerics.Vector`1<int64> | ||
| call valuetype [System.Numerics.Vectors]System.Numerics.Vector`1<int64> [System.Runtime.Intrinsics]System.Runtime.Intrinsics.Arm.Sve2::GatherVectorUInt32WithByteOffsetsZeroExtendNonTemporal(valuetype [System.Numerics.Vectors]System.Numerics.Vector`1<int64>, uint32*, valuetype [System.Numerics.Vectors]System.Numerics.Vector`1<int64>) | ||
| stloc.s result1 | ||
|
|
||
| ldloc.0 | ||
| ldloc.s basePinned | ||
| ldloc.s offsetsPinned | ||
| ldobj valuetype [System.Numerics.Vectors]System.Numerics.Vector`1<int64> | ||
| call valuetype [System.Numerics.Vectors]System.Numerics.Vector`1<int64> [System.Runtime.Intrinsics]System.Runtime.Intrinsics.Arm.Sve2::GatherVectorUInt32WithByteOffsetsZeroExtendNonTemporal(valuetype [System.Numerics.Vectors]System.Numerics.Vector`1<int64>, uint32*, valuetype [System.Numerics.Vectors]System.Numerics.Vector`1<int64>) | ||
| stloc.s result2 | ||
|
|
||
| ldloca.s result1 | ||
| ldc.i4.0 | ||
| call instance !0 valuetype [System.Numerics.Vectors]System.Numerics.Vector`1<int64>::get_Item(int32) | ||
|
|
||
| ldloca.s result2 | ||
| ldc.i4.0 | ||
| call instance !0 valuetype [System.Numerics.Vectors]System.Numerics.Vector`1<int64>::get_Item(int32) | ||
| add | ||
|
|
||
| ldloca.s largeFrame | ||
| call int64 GitHub_130437::SumLargeFrame(valuetype LargeFrame&) | ||
| add | ||
| ret | ||
| } | ||
|
|
||
| .method private hidebysig static void | ||
| TouchLargeFrame(valuetype LargeFrame& frame) cil managed noinlining | ||
| { | ||
| .maxstack 3 | ||
|
|
||
| ldarg.0 | ||
| conv.u | ||
| ldc.i4.0 | ||
| add | ||
| ldc.i4.1 | ||
| stind.i1 | ||
|
|
||
| ldarg.0 | ||
| conv.u | ||
| ldc.i4 4096 | ||
| add | ||
| ldc.i4.2 | ||
| stind.i1 | ||
|
|
||
| ldarg.0 | ||
| conv.u | ||
| ldc.i4 8191 | ||
| add | ||
| ldc.i4.3 | ||
| stind.i1 | ||
|
|
||
| ret | ||
| } | ||
|
|
||
| .method private hidebysig static int64 | ||
| SumLargeFrame(valuetype LargeFrame& frame) cil managed noinlining | ||
| { | ||
| .maxstack 3 | ||
|
|
||
| ldarg.0 | ||
| conv.u | ||
| ldc.i4.0 | ||
| add | ||
| ldind.u1 | ||
| conv.i8 | ||
|
|
||
| ldarg.0 | ||
| conv.u | ||
| ldc.i4 8191 | ||
| add | ||
| ldind.u1 | ||
| conv.i8 | ||
| add | ||
|
|
||
| ret | ||
| } | ||
| } |
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.
Uh oh!
There was an error while loading. Please reload this page.