-
Notifications
You must be signed in to change notification settings - Fork 13.6k
[llvm][AArch64] apple-m4 is armv9.2-a #98267
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 2 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
2ca4c25
[llvm][AArch64] apple-m4 is armv9.2-a
jroelofs 7253170
clang-format
jroelofs f8df80a
FEAT_MEC is optional in v9.2, FEAT_RME is optional in v9.1
jroelofs 220d26c
clang-format
jroelofs 4b98185
clang-format some more. the bot's version must be different than mine
jroelofs da1225d
Merge branch 'main' into jroelofs/apple-m4-is-v9p2
jroelofs 70c44ea
rme and mec are optional, fix tests
jroelofs 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
Oops, something went wrong.
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.
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.
IIUC, the idea here is that we don't want to add the architecture's default extensions to the CPU, because they are not mandatory, and there's no way to disable them for a CPU that chooses not to implement. This is why all the CPUs have had their list of features expanded.
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.
Yes, and that idea is the problem: automatically adding default extensions kinda works for extensions that the compiler doesn't generate automatically where their use is driven by intrinsics, but as soon as you have something like SVE in the list you get incompatible codegen left and right.
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.
This choice also makes
-march=
meaningless, so @ahmedbougacha and I are considering making that an error at least on Darwin platforms.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.
Not sure I follow... Do you mean
-march=
has no effect if you specify-mcpu
? That should probably be at least a warning.Uh oh!
There was an error while loading. Please reload this page.
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.
I mean that code built with
-march=armv9.2a
may use SVE instructions becauseFeatureSVE
is in the default list forv9.0
, but this will crash on an M4 iPad.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.
for example: https://clang.godbolt.org/z/4jW8nqK41