-
Notifications
You must be signed in to change notification settings - Fork 5.1k
ARM64 - Always morph GT_MOD #68885
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
ARM64 - Always morph GT_MOD #68885
Changes from all commits
Commits
Show all changes
46 commits
Select commit
Hold shift + click to select a range
f1e7232
Always morph GT_MOD for ARM64. Added lowering optimization for a full…
TIHan 8205969
Remove space
TIHan 98a4350
Match cases with mod 2 and long types
TIHan dd8556f
Minor tweak
TIHan b3c967e
Minor tweak
TIHan 9b35e79
Minor tweak
TIHan 2517c60
Do not add overflow/throwdivzero to the block if the second operand i…
TIHan c0b8b1a
Lets not modify whether or not we should have overflow/throwdivzero e…
TIHan e19661c
Merge branch 'main' into mod-opt-fix
TIHan d989b10
Perform the transformation in pre-order rationalization
TIHan 44065c0
Merge branch 'mod-opt-fix' of github.com:TIHan/runtime into mod-opt-fix
TIHan 7c43a37
Fix cns equality check
TIHan 9c03bc6
Fixing build
TIHan 6b3b7e5
Fixing build
TIHan 574c17d
Fixing build
TIHan 068bb7f
Merge remote-tracking branch 'upstream/main' into mod-opt-fix
TIHan 7628c7b
Merge remote-tracking branch 'upstream/main' into mod-opt-fix
TIHan 9d06be0
Merge branch 'mod-opt-fix' of github.com:TIHan/runtime into mod-opt-fix
TIHan e334dcf
Formatting
TIHan 5400acc
Use correct cns
TIHan b10a443
Use correct cns
TIHan 79d943a
Formatting
TIHan b3a6608
Moving to PostorderVisit
TIHan ca8c836
Moving to simple lowering and checking if node is closed
TIHan d2057b9
Merging
TIHan c3531f3
Fixing build
TIHan fe7e590
Added comment
TIHan 6f6c1b1
Update flowgraph.cpp
TIHan 611dc66
Merge remote-tracking branch 'upstream/main' into mod-opt-fix
TIHan 26784cc
Merge branch 'mod-opt-fix' of github.com:TIHan/runtime into mod-opt-fix
TIHan d78e4b5
Merge remote-tracking branch 'upstream/main' into mod-opt-fix
TIHan 51bd85b
Merging. Moving back to pre-order. Added regression test.
TIHan c2052ea
Do not need to check reverse ops as we just look for vars and constants
TIHan 9501ae3
Remove extra var
TIHan cde3705
Renamed regression test. Added license header
TIHan 4785bd9
Some tweaks
TIHan 6ccee6f
Fixing build
TIHan fcf9517
Fixing build
TIHan 68d8df9
Merge remote-tracking branch 'upstream/main' into mod-opt-fix
TIHan e9d332f
Merge remote-tracking branch 'upstream/main' into mod-opt-fix
TIHan 0452912
Added GT_CNEG_LT for ARM64 LIR to handle mod 2
TIHan 80635b0
Added GT_CMP case for checking valid imm
TIHan edeb5b1
Formatting
TIHan 61204af
Revert "Added GT_CMP case for checking valid imm"
TIHan 61c3f81
Reverting
TIHan 6038298
Do not bail on reverse
TIHan 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
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
37 changes: 37 additions & 0 deletions
37
src/tests/JIT/Regression/JitBlue/Runtime_68136/Runtime_68136.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,37 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
public class Program | ||
{ | ||
public static IRuntime s_rt; | ||
public static ulong s_1; | ||
public static int Main() | ||
{ | ||
try | ||
{ | ||
var vr1 = (uint)((int)M2(ref s_1, 0) % (long)1); | ||
M2(ref s_1, vr1); | ||
} | ||
catch (System.Exception) | ||
{ | ||
} | ||
|
||
return 100; | ||
} | ||
|
||
public static byte M2(ref ulong arg0, uint arg1) | ||
{ | ||
s_rt.WriteLine(arg0); | ||
return 0; | ||
} | ||
} | ||
|
||
public interface IRuntime | ||
{ | ||
void WriteLine<T>(T value); | ||
} | ||
|
||
public class Runtime : IRuntime | ||
{ | ||
public void WriteLine<T>(T value) => System.Console.WriteLine(value); | ||
} |
11 changes: 11 additions & 0 deletions
11
src/tests/JIT/Regression/JitBlue/Runtime_68136/Runtime_68136.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,11 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
</PropertyGroup> | ||
<PropertyGroup> | ||
<Optimize>True</Optimize> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Compile Include="Runtime_68136.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.
Are these changes necessary or should they be done in the new PR too?
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.
Sort of? I got rid of the
use
. New PR extends this path anyway with the new instruction.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.
But this is unrelated to the fix, right?
I am fine with leaving it to avoid more churn on this PR.
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.
It is unrelated, been trying different ways to shape this function. The next PR is the shape and impl I'm happy with.