-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[clang][FMV][AArch64] Improve streaming mode compatibility. #100181
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 all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
6799eb8
[clang][FMV][AArch64] Improve streaming mode compatibility.
labrinea 9b24b8d
Changes from last revision:
labrinea c581a92
Changes from last revision:
labrinea ab08651
Changes fro last revision:
labrinea 4ff212d
Changes from last revision:
labrinea 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sme -emit-llvm -o - %s | FileCheck %s | ||
|
||
|
||
// CHECK-LABEL: define {{[^@]+}}@n_callee._Msve | ||
// CHECK-SAME: () #[[ATTR0:[0-9]+]] { | ||
// | ||
// CHECK-LABEL: define {{[^@]+}}@n_callee._Msimd | ||
// CHECK-SAME: () #[[ATTR1:[0-9]+]] { | ||
// | ||
__arm_locally_streaming __attribute__((target_clones("sve", "simd"))) void n_callee(void) {} | ||
// CHECK-LABEL: define {{[^@]+}}@n_callee._Msme2 | ||
// CHECK-SAME: () #[[ATTR2:[0-9]+]] { | ||
// | ||
__attribute__((target_version("sme2"))) void n_callee(void) {} | ||
// CHECK-LABEL: define {{[^@]+}}@n_callee.default | ||
// CHECK-SAME: () #[[ATTR3:[0-9]+]] { | ||
// | ||
__attribute__((target_version("default"))) void n_callee(void) {} | ||
|
||
|
||
// CHECK-LABEL: define {{[^@]+}}@s_callee._Msve | ||
// CHECK-SAME: () #[[ATTR4:[0-9]+]] { | ||
// | ||
// CHECK-LABEL: define {{[^@]+}}@s_callee._Msimd | ||
// CHECK-SAME: () #[[ATTR5:[0-9]+]] { | ||
// | ||
__attribute__((target_clones("sve", "simd"))) void s_callee(void) __arm_streaming {} | ||
// CHECK-LABEL: define {{[^@]+}}@s_callee._Msme2 | ||
// CHECK-SAME: () #[[ATTR6:[0-9]+]] { | ||
// | ||
__arm_locally_streaming __attribute__((target_version("sme2"))) void s_callee(void) __arm_streaming {} | ||
// CHECK-LABEL: define {{[^@]+}}@s_callee.default | ||
// CHECK-SAME: () #[[ATTR7:[0-9]+]] { | ||
// | ||
__attribute__((target_version("default"))) void s_callee(void) __arm_streaming {} | ||
|
||
|
||
// CHECK-LABEL: define {{[^@]+}}@sc_callee._Msve | ||
// CHECK-SAME: () #[[ATTR8:[0-9]+]] { | ||
// | ||
// CHECK-LABEL: define {{[^@]+}}@sc_callee._Msimd | ||
// CHECK-SAME: () #[[ATTR9:[0-9]+]] { | ||
// | ||
__attribute__((target_clones("sve", "simd"))) void sc_callee(void) __arm_streaming_compatible {} | ||
// CHECK-LABEL: define {{[^@]+}}@sc_callee._Msme2 | ||
// CHECK-SAME: () #[[ATTR10:[0-9]+]] { | ||
// | ||
__arm_locally_streaming __attribute__((target_version("sme2"))) void sc_callee(void) __arm_streaming_compatible {} | ||
// CHECK-LABEL: define {{[^@]+}}@sc_callee.default | ||
// CHECK-SAME: () #[[ATTR11:[0-9]+]] { | ||
// | ||
__attribute__((target_version("default"))) void sc_callee(void) __arm_streaming_compatible {} | ||
|
||
|
||
// CHECK-LABEL: define {{[^@]+}}@n_caller | ||
// CHECK-SAME: () #[[ATTR3:[0-9]+]] { | ||
// CHECK: call void @n_callee() | ||
// CHECK: call void @s_callee() #[[ATTR12:[0-9]+]] | ||
// CHECK: call void @sc_callee() #[[ATTR13:[0-9]+]] | ||
// | ||
void n_caller(void) { | ||
n_callee(); | ||
s_callee(); | ||
sc_callee(); | ||
} | ||
|
||
|
||
// CHECK-LABEL: define {{[^@]+}}@s_caller | ||
// CHECK-SAME: () #[[ATTR7:[0-9]+]] { | ||
// CHECK: call void @n_callee() | ||
// CHECK: call void @s_callee() #[[ATTR12]] | ||
// CHECK: call void @sc_callee() #[[ATTR13]] | ||
// | ||
void s_caller(void) __arm_streaming { | ||
n_callee(); | ||
s_callee(); | ||
sc_callee(); | ||
} | ||
|
||
|
||
// CHECK-LABEL: define {{[^@]+}}@sc_caller | ||
// CHECK-SAME: () #[[ATTR11:[0-9]+]] { | ||
// CHECK: call void @n_callee() | ||
// CHECK: call void @s_callee() #[[ATTR12]] | ||
// CHECK: call void @sc_callee() #[[ATTR13]] | ||
// | ||
void sc_caller(void) __arm_streaming_compatible { | ||
n_callee(); | ||
s_callee(); | ||
sc_callee(); | ||
} | ||
|
||
|
||
// CHECK: attributes #[[ATTR0:[0-9]+]] = {{.*}} "aarch64_pstate_sm_body" | ||
// CHECK: attributes #[[ATTR1:[0-9]+]] = {{.*}} "aarch64_pstate_sm_body" | ||
// CHECK: attributes #[[ATTR2:[0-9]+]] = {{.*}} | ||
// CHECK: attributes #[[ATTR3]] = {{.*}} | ||
// CHECK: attributes #[[ATTR4:[0-9]+]] = {{.*}} "aarch64_pstate_sm_enabled" | ||
// CHECK: attributes #[[ATTR5:[0-9]+]] = {{.*}} "aarch64_pstate_sm_enabled" | ||
// CHECK: attributes #[[ATTR6:[0-9]+]] = {{.*}} "aarch64_pstate_sm_body" "aarch64_pstate_sm_enabled" | ||
// CHECK: attributes #[[ATTR7]] = {{.*}} "aarch64_pstate_sm_enabled" | ||
// CHECK: attributes #[[ATTR8:[0-9]+]] = {{.*}} "aarch64_pstate_sm_compatible" | ||
// CHECK: attributes #[[ATTR9:[0-9]+]] = {{.*}} "aarch64_pstate_sm_compatible" | ||
// CHECK: attributes #[[ATTR10]] = {{.*}} "aarch64_pstate_sm_body" "aarch64_pstate_sm_compatible" | ||
// CHECK: attributes #[[ATTR11]] = {{.*}} "aarch64_pstate_sm_compatible" | ||
// CHECK: attributes #[[ATTR12]] = {{.*}} "aarch64_pstate_sm_enabled" | ||
// CHECK: attributes #[[ATTR13]] = {{.*}} "aarch64_pstate_sm_compatible" |
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,46 @@ | ||
// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sme -Waarch64-sme-attributes -fsyntax-only -verify %s | ||
// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sme -Waarch64-sme-attributes -fsyntax-only -verify=expected-cpp -x c++ %s | ||
|
||
__attribute__((target_clones("sve", "simd"))) void ok_arm_streaming(void) __arm_streaming {} | ||
__arm_locally_streaming __attribute__((target_version("sme2"))) void ok_arm_streaming(void) __arm_streaming {} | ||
__attribute__((target_version("default"))) void ok_arm_streaming(void) __arm_streaming {} | ||
|
||
__attribute__((target_clones("sve", "simd"))) void ok_arm_streaming_compatible(void) __arm_streaming_compatible {} | ||
__arm_locally_streaming __attribute__((target_version("sme2"))) void ok_arm_streaming_compatible(void) __arm_streaming_compatible {} | ||
__attribute__((target_version("default"))) void ok_arm_streaming_compatible(void) __arm_streaming_compatible {} | ||
|
||
__arm_locally_streaming __attribute__((target_clones("sve", "simd"))) void ok_no_streaming(void) {} | ||
__attribute__((target_version("sme2"))) void ok_no_streaming(void) {} | ||
__attribute__((target_version("default"))) void ok_no_streaming(void) {} | ||
|
||
__attribute__((target_clones("sve", "simd"))) void bad_mixed_streaming(void) {} | ||
// expected-cpp-error@+2 {{multiversioned function declaration has a different calling convention}} | ||
// expected-error@+1 {{multiversioned function declaration has a different calling convention}} | ||
__attribute__((target_version("sme2"))) void bad_mixed_streaming(void) __arm_streaming {} | ||
// expected-cpp-error@+2 {{multiversioned function declaration has a different calling convention}} | ||
// expected-error@+1 {{multiversioned function declaration has a different calling convention}} | ||
__attribute__((target_version("default"))) void bad_mixed_streaming(void) __arm_streaming_compatible {} | ||
// expected-cpp-error@+2 {{multiversioned function declaration has a different calling convention}} | ||
// expected-error@+1 {{multiversioned function declaration has a different calling convention}} | ||
__arm_locally_streaming __attribute__((target_version("dotprod"))) void bad_mixed_streaming(void) __arm_streaming {} | ||
|
||
void n_caller(void) { | ||
ok_arm_streaming(); | ||
ok_arm_streaming_compatible(); | ||
ok_no_streaming(); | ||
bad_mixed_streaming(); | ||
} | ||
|
||
void s_caller(void) __arm_streaming { | ||
ok_arm_streaming(); | ||
ok_arm_streaming_compatible(); | ||
ok_no_streaming(); | ||
bad_mixed_streaming(); | ||
} | ||
|
||
void sc_caller(void) __arm_streaming_compatible { | ||
ok_arm_streaming(); | ||
ok_arm_streaming_compatible(); | ||
ok_no_streaming(); | ||
bad_mixed_streaming(); | ||
} |
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.