-
Notifications
You must be signed in to change notification settings - Fork 15.3k
[AArch64] Update zero latency instructions in Neoverse scheduling tables #165690
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 6 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
90fdc60
[AArch64] Update zero latency instructions in scheduling tables for N…
simonwallis2 695b27d
[AArch64] Update zero latency instructions in scheduling tables for N…
simonwallis2 9cebca2
[AArch64] Update zero latency instructions in Neoverse scheduling tables
simonwallis2 824b640
[AArch64] Update zero latency instructions in Neoverse scheduling tables
simonwallis2 f2d0a29
[AArch64] Update zero latency instructions in Neoverse scheduling tables
simonwallis2 684ad3e
[AArch64] Update zero latency instructions in Neoverse scheduling tables
simonwallis2 54fc6b5
[AArch64] Update zero latency instructions in Neoverse scheduling tables
simonwallis2 f0c2a71
Merge branch 'main' into sched-zero-latency
simonwallis2 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -75,7 +75,7 @@ def : WriteRes<WriteHint, []> { let Latency = 1; } | |
|
|
||
| def N3Write_0c : SchedWriteRes<[]> { | ||
| let Latency = 0; | ||
| let NumMicroOps = 0; | ||
| let NumMicroOps = 1; | ||
| } | ||
|
|
||
| def N3Write_4c : SchedWriteRes<[]> { | ||
|
|
@@ -553,6 +553,26 @@ def N3Write_16c_16V0 : SchedWriteRes<[N3UnitV0, N3UnitV0, N3UnitV0, N3UnitV0, | |
| let NumMicroOps = 16; | ||
| } | ||
|
|
||
|
|
||
| //===----------------------------------------------------------------------===// | ||
| // Define predicate-controlled types | ||
|
|
||
| def N3Write_0or1c_1I : SchedWriteVariant<[ | ||
| SchedVar<NeoverseZeroMove, [N3Write_0c]>, | ||
| SchedVar<NoSchedPred, [N3Write_1c_1I]>]>; | ||
|
|
||
| def N3Write_0or2c_1V : SchedWriteVariant<[ | ||
| SchedVar<NeoverseZeroMove, [N3Write_0c]>, | ||
| SchedVar<NoSchedPred, [N3Write_2c_1V]>]>; | ||
|
|
||
| def N3Write_0or2c_1M : SchedWriteVariant<[ | ||
| SchedVar<NeoverseAllElement, [N3Write_0c]>, | ||
| SchedVar<NoSchedPred, [N3Write_2c_1M]>]>; | ||
|
|
||
| def N3Write_0or3c_1M0 : SchedWriteVariant<[ | ||
| SchedVar<NeoverseZeroMove, [N3Write_0c]>, | ||
| SchedVar<NoSchedPred, [N3Write_3c_1M0]>]>; | ||
|
|
||
| // Miscellaneous | ||
| // ----------------------------------------------------------------------------- | ||
|
|
||
|
|
@@ -581,6 +601,7 @@ def : InstRW<[N3Write_1c_1B_1S], (instrs BL, BLR)>; | |
| // Conditional compare | ||
| // Conditional select | ||
| def : SchedAlias<WriteI, N3Write_1c_1I>; | ||
| def : InstRW<[N3Write_0or1c_1I], (instregex "^MOVZ[WX]i$")>; | ||
|
|
||
| // ALU, extend and shift | ||
| def : SchedAlias<WriteIEReg, N3Write_2c_1M>; | ||
|
|
@@ -610,7 +631,8 @@ def : InstRW<[N3Write_1c_1I], (instrs GMI, SUBP, SUBPS)>; | |
|
|
||
| // Logical, shift, no flagset | ||
| def : InstRW<[N3Write_1c_1I], | ||
| (instregex "^(AND|BIC|EON|EOR|ORN|ORR)[WX]rs$")>; | ||
| (instregex "^(AND|BIC|EON|EOR|ORN)[WX]rs$")>; | ||
| def : InstRW<[N3Write_0or1c_1I], (instregex "^ORR[WX]rs$")>; | ||
|
|
||
| // Logical, shift, flagset | ||
| def : InstRW<[N3Write_2c_1M], (instregex "^(AND|BIC)S[WX]rs$")>; | ||
|
|
@@ -855,10 +877,11 @@ def : SchedAlias<WriteFCvt, N3Write_3c_1V0>; | |
| def : SchedAlias<WriteFImm, N3Write_2c_1V>; | ||
|
|
||
| // FP move, register | ||
| def : InstRW<[N3Write_2c_1V], (instrs FMOVHr, FMOVSr, FMOVDr)>; | ||
| def : InstRW<[N3Write_2c_1V], (instrs FMOVHr)>; | ||
| def : InstRW<[N3Write_0c], (instrs FMOVSr, FMOVDr)>; | ||
rj-jesus marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| // FP transfer, from gen to low half of vec reg | ||
| def : InstRW<[N3Write_3c_1M0], (instrs FMOVWHr, FMOVXHr, FMOVWSr, FMOVXDr)>; | ||
| def : InstRW<[N3Write_0or3c_1M0], (instrs FMOVWHr, FMOVXHr, FMOVWSr, FMOVXDr)>; | ||
|
|
||
| // FP transfer, from gen to high half of vec reg | ||
| def : InstRW<[N3Write_5c_1M0_1V], (instrs FMOVXDHighr)>; | ||
|
|
@@ -962,6 +985,8 @@ def : InstRW<[WriteAdr, N3Write_2c_1L01_1V_1I], (instregex "^STP[SDQ](post|pre)$ | |
| // ASIMD compare | ||
| // ASIMD logical | ||
| // ASIMD max/min, basic and pair-wise | ||
| def : InstRW<[N3Write_0or2c_1V], (instregex "^ORRv16i8", "^ORRv8i8")>; | ||
rj-jesus marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| def : SchedAlias<WriteVd, N3Write_2c_1V>; | ||
| def : SchedAlias<WriteVq, N3Write_2c_1V>; | ||
|
|
||
|
|
@@ -1186,6 +1211,7 @@ def : InstRW<[N3Write_3c_1V0], (instrs BFCVT)>; | |
| // ASIMD transpose | ||
| // ASIMD unzip/zip | ||
| // Covered by WriteV[dq] | ||
| def : InstRW<[N3Write_0or2c_1V], (instrs MOVID, MOVIv2d_ns)>; | ||
|
|
||
| // ASIMD duplicate, gen reg | ||
| def : InstRW<[N3Write_3c_1M0], (instregex "^DUPv.+gpr")>; | ||
|
|
@@ -1564,10 +1590,11 @@ def : InstRW<[N3Write_2c_1M], (instregex "^REV_PP_[BHSD]")>; | |
| def : InstRW<[N3Write_1c_1M], (instrs SEL_PPPP)>; | ||
|
|
||
| // Predicate set | ||
| def : InstRW<[N3Write_2c_1M], (instregex "^PFALSE", "^PTRUE_[BHSD]")>; | ||
| def : InstRW<[N3Write_0c], (instregex "^PFALSE")>; | ||
rj-jesus marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| def : InstRW<[N3Write_0or2c_1M], (instregex "^PTRUE_[BHSD]")>; | ||
|
|
||
| // Predicate set/initialize, set flags | ||
| def : InstRW<[N3Write_2c_1M], (instregex "^PTRUES_[BHSD]")>; | ||
| def : InstRW<[N3Write_0or2c_1M], (instregex "^PTRUES_[BHSD]")>; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. PTRUES isn't listed in Section 4.11, but it is mentioned in Table 2-23, so I'll assume the latter to be correct (matching what you've implemented). |
||
|
|
||
| // Predicate find first/next | ||
| def : InstRW<[N3Write_2c_1M], (instregex "^PFIRST_B$", "^PNEXT_[BHSD]$")>; | ||
|
|
@@ -1790,10 +1817,11 @@ def : InstRW<[N3Write_5c_1M0_1V], (instregex "^INDEX_(IR|RI|RR)_D$")>; | |
| // Logical | ||
| def : InstRW<[N3Write_2c_1V], | ||
| (instregex "^(AND|EOR|ORR)_ZI", | ||
| "^(AND|BIC|EOR|ORR)_ZZZ", | ||
| "^(AND|BIC|EOR)_ZZZ", | ||
| "^EOR(BT|TB)_ZZZ_[BHSD]", | ||
| "^(AND|BIC|EOR|NOT|ORR)_(ZPmZ|ZPZZ)_[BHSD]", | ||
| "^NOT_ZPmZ_[BHSD]")>; | ||
| def : InstRW<[N3Write_0or2c_1V], (instregex "^ORR_ZZZ")>; | ||
rj-jesus marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| // Max/min, basic and pairwise | ||
| def : InstRW<[N3Write_2c_1V], (instregex "^[SU](MAX|MIN)_ZI_[BHSD]", | ||
|
|
||
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
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.