File tree Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change 1+ //@ add-core-stubs
2+ //@ compile-flags: --target aarch64-unknown-linux-gnu -Zinline-mir=no -C no-prepopulate-passes
3+ //@ needs-llvm-components: aarch64
4+
5+ #![ crate_type = "lib" ]
6+ #![ feature( no_core, lang_items, target_feature_inline_always) ]
7+ #![ no_core]
8+
9+ extern crate minicore;
10+ use minicore:: * ;
11+
12+ #[ inline( always) ]
13+ #[ target_feature( enable = "neon" ) ]
14+ #[ no_mangle]
15+ pub fn single_target_feature ( ) -> i32 {
16+ 42
17+ }
18+
19+ #[ inline( always) ]
20+ #[ target_feature( enable = "neon,i8mm" ) ]
21+ #[ no_mangle]
22+ // CHECK: define noundef i32 @multiple_target_features() unnamed_addr #1 {
23+ pub fn multiple_target_features ( ) -> i32 {
24+ // CHECK: %_0 = call noundef i32 @single_target_feature() #3
25+ single_target_feature ( )
26+ }
27+
28+ #[ no_mangle]
29+ // CHECK: define noundef i32 @inherits_from_global() unnamed_addr #2 {
30+ pub fn inherits_from_global ( ) -> i32 {
31+ unsafe {
32+ // CHECK: %_0 = call noundef i32 @single_target_feature() #3
33+ single_target_feature ( )
34+ }
35+ }
36+
37+ // CHECK: attributes #3 = { nounwind }
You can’t perform that action at this time.
0 commit comments