Skip to content
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

[AArch64] Add FeatureFuseAdrpAdd for Ampere1/1A #81293

Conversation

ptomsich
Copy link
Contributor

@ptomsich ptomsich commented Feb 9, 2024

Both Ampere1 and Ampere1A support fusion of ADRP+ADD.
This adds the missing feature to enable fusion-aware scheduling for this case.

@llvmbot
Copy link
Collaborator

llvmbot commented Feb 9, 2024

@llvm/pr-subscribers-backend-aarch64

Author: Philipp Tomsich (ptomsich)

Changes

Both Ampere1 and Ampere1A support fusion of ADRP+ADD.
This adds the missing feature to enable fusion-aware scheduling for this case.


Full diff: https://github.com/llvm/llvm-project/pull/81293.diff

1 Files Affected:

  • (modified) llvm/lib/Target/AArch64/AArch64.td (+2)
diff --git a/llvm/lib/Target/AArch64/AArch64.td b/llvm/lib/Target/AArch64/AArch64.td
index 02fb01caf7e80..155edaf7e194b 100644
--- a/llvm/lib/Target/AArch64/AArch64.td
+++ b/llvm/lib/Target/AArch64/AArch64.td
@@ -1349,6 +1349,7 @@ def TuneAmpere1 : SubtargetFeature<"ampere1", "ARMProcFamily", "Ampere1",
                                    "Ampere Computing Ampere-1 processors", [
                                    FeaturePostRAScheduler,
                                    FeatureFuseAES,
+                                   FeatureFuseAdrpAdd,
                                    FeatureAddrLSLFast,
                                    FeatureALULSLFast,
                                    FeatureAggressiveFMA,
@@ -1364,6 +1365,7 @@ def TuneAmpere1A : SubtargetFeature<"ampere1a", "ARMProcFamily", "Ampere1A",
                                     "Ampere Computing Ampere-1A processors", [
                                     FeaturePostRAScheduler,
                                     FeatureFuseAES,
+                                    FeatureFuseAdrpAdd,
                                     FeatureAddrLSLFast,
                                     FeatureALULSLFast,
                                     FeatureAggressiveFMA,

Copy link
Contributor

@jthackray jthackray left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ptomsich ptomsich merged commit ff2e878 into llvm:main Feb 9, 2024
6 checks passed
@ptomsich ptomsich deleted the ptomsich/main/pull-requests/ampere-1a/FeatureFuseAdrpAdd branch February 9, 2024 23:31
@davemgreen
Copy link
Collaborator

As with the others, changes like this are ideally accompanied by a test case. Otherwise people might refactor in the future and not realize that things are not as they were.

Hopefully that is as simple as adding an extra run line to llvm/test/CodeGen/AArch64/misched-fusion-addadrp.ll?

ptomsich added a commit to ptomsich/llvm-project that referenced this pull request Feb 14, 2024
As commented on the PR llvm#81293, the Ampere1-family does not have test
cases for the common fusion cases it implements.  This adds the
Ampere1 targets to the relevant misched-fusion testcases:
 * addadrp
 * addr
 * aes
ptomsich added a commit that referenced this pull request Feb 14, 2024
As commented on the PR #81293, the Ampere1-family does not have test
cases for the common fusion cases it implements. This adds the Ampere1
targets to the relevant misched-fusion testcases:
 * addadrp
 * addr
 * aes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants