66
77#include <arm_sme.h>
88
9- // CHECK-LABEL: @test_in_streaming_mode (
9+ // CHECK-LABEL: @test_in_streaming_mode_streaming_compatible (
1010// CHECK-NEXT: entry:
11- // CHECK-NEXT: [[TMP0:%.*]] = tail call aarch64_sme_preservemost_from_x2 { i64, i64 } @__arm_sme_state() #[[ATTR3:[0-9]+]]
12- // CHECK-NEXT: [[TMP1:%.*]] = extractvalue { i64, i64 } [[TMP0]], 0
13- // CHECK-NEXT: [[AND_I:%.*]] = and i64 [[TMP1]], 1
14- // CHECK-NEXT: [[TOBOOL_I:%.*]] = icmp ne i64 [[AND_I]], 0
15- // CHECK-NEXT: ret i1 [[TOBOOL_I]]
11+ // CHECK-NEXT: [[TMP0:%.*]] = tail call i1 @llvm.aarch64.sme.in.streaming.mode()
12+ // CHECK-NEXT: ret i1 [[TMP0]]
1613//
17- // CPP-CHECK-LABEL: @_Z22test_in_streaming_modev (
14+ // CPP-CHECK-LABEL: @_Z43test_in_streaming_mode_streaming_compatiblev (
1815// CPP-CHECK-NEXT: entry:
19- // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call aarch64_sme_preservemost_from_x2 { i64, i64 } @__arm_sme_state() #[[ATTR3:[0-9]+]]
20- // CPP-CHECK-NEXT: [[TMP1:%.*]] = extractvalue { i64, i64 } [[TMP0]], 0
21- // CPP-CHECK-NEXT: [[AND_I:%.*]] = and i64 [[TMP1]], 1
22- // CPP-CHECK-NEXT: [[TOBOOL_I:%.*]] = icmp ne i64 [[AND_I]], 0
23- // CPP-CHECK-NEXT: ret i1 [[TOBOOL_I]]
16+ // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i1 @llvm.aarch64.sme.in.streaming.mode()
17+ // CPP-CHECK-NEXT: ret i1 [[TMP0]]
18+ //
19+ bool test_in_streaming_mode_streaming_compatible (void ) __arm_streaming_compatible {
20+ return __arm_in_streaming_mode ();
21+ }
22+
23+ // CHECK-LABEL: @test_in_streaming_mode_streaming(
24+ // CHECK-NEXT: entry:
25+ // CHECK-NEXT: ret i1 true
26+ //
27+ // CPP-CHECK-LABEL: @_Z32test_in_streaming_mode_streamingv(
28+ // CPP-CHECK-NEXT: entry:
29+ // CPP-CHECK-NEXT: ret i1 true
30+ //
31+ bool test_in_streaming_mode_streaming (void ) __arm_streaming {
32+ //
33+ return __arm_in_streaming_mode ();
34+ }
35+
36+ // CHECK-LABEL: @test_in_streaming_mode_non_streaming(
37+ // CHECK-NEXT: entry:
38+ // CHECK-NEXT: ret i1 false
39+ //
40+ // CPP-CHECK-LABEL: @_Z36test_in_streaming_mode_non_streamingv(
41+ // CPP-CHECK-NEXT: entry:
42+ // CPP-CHECK-NEXT: ret i1 false
2443//
25- bool test_in_streaming_mode (void ) __arm_streaming_compatible {
44+ bool test_in_streaming_mode_non_streaming (void ) {
2645 return __arm_in_streaming_mode ();
2746}
2847
2948// CHECK-LABEL: @test_za_disable(
3049// CHECK-NEXT: entry:
31- // CHECK-NEXT: tail call void @__arm_za_disable() #[[ATTR3 ]]
50+ // CHECK-NEXT: tail call void @__arm_za_disable() #[[ATTR7:[0-9]+ ]]
3251// CHECK-NEXT: ret void
3352//
3453// CPP-CHECK-LABEL: @_Z15test_za_disablev(
3554// CPP-CHECK-NEXT: entry:
36- // CPP-CHECK-NEXT: tail call void @__arm_za_disable() #[[ATTR3 ]]
55+ // CPP-CHECK-NEXT: tail call void @__arm_za_disable() #[[ATTR7:[0-9]+ ]]
3756// CPP-CHECK-NEXT: ret void
3857//
3958void test_za_disable (void ) __arm_streaming_compatible {
@@ -42,14 +61,14 @@ void test_za_disable(void) __arm_streaming_compatible {
4261
4362// CHECK-LABEL: @test_has_sme(
4463// CHECK-NEXT: entry:
45- // CHECK-NEXT: [[TMP0:%.*]] = tail call aarch64_sme_preservemost_from_x2 { i64, i64 } @__arm_sme_state() #[[ATTR3 ]]
64+ // CHECK-NEXT: [[TMP0:%.*]] = tail call aarch64_sme_preservemost_from_x2 { i64, i64 } @__arm_sme_state() #[[ATTR7 ]]
4665// CHECK-NEXT: [[TMP1:%.*]] = extractvalue { i64, i64 } [[TMP0]], 0
4766// CHECK-NEXT: [[TOBOOL_I:%.*]] = icmp slt i64 [[TMP1]], 0
4867// CHECK-NEXT: ret i1 [[TOBOOL_I]]
4968//
5069// CPP-CHECK-LABEL: @_Z12test_has_smev(
5170// CPP-CHECK-NEXT: entry:
52- // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call aarch64_sme_preservemost_from_x2 { i64, i64 } @__arm_sme_state() #[[ATTR3 ]]
71+ // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call aarch64_sme_preservemost_from_x2 { i64, i64 } @__arm_sme_state() #[[ATTR7 ]]
5372// CPP-CHECK-NEXT: [[TMP1:%.*]] = extractvalue { i64, i64 } [[TMP0]], 0
5473// CPP-CHECK-NEXT: [[TOBOOL_I:%.*]] = icmp slt i64 [[TMP1]], 0
5574// CPP-CHECK-NEXT: ret i1 [[TOBOOL_I]]
@@ -72,12 +91,12 @@ void test_svundef_za(void) __arm_streaming_compatible __arm_out("za") {
7291
7392// CHECK-LABEL: @test_sc_memcpy(
7493// CHECK-NEXT: entry:
75- // CHECK-NEXT: [[CALL:%.*]] = tail call ptr @__arm_sc_memcpy(ptr noundef [[DEST:%.*]], ptr noundef [[SRC:%.*]], i64 noundef [[N:%.*]]) #[[ATTR3 ]]
94+ // CHECK-NEXT: [[CALL:%.*]] = tail call ptr @__arm_sc_memcpy(ptr noundef [[DEST:%.*]], ptr noundef [[SRC:%.*]], i64 noundef [[N:%.*]]) #[[ATTR7 ]]
7695// CHECK-NEXT: ret ptr [[CALL]]
7796//
7897// CPP-CHECK-LABEL: @_Z14test_sc_memcpyPvPKvm(
7998// CPP-CHECK-NEXT: entry:
80- // CPP-CHECK-NEXT: [[CALL:%.*]] = tail call ptr @__arm_sc_memcpy(ptr noundef [[DEST:%.*]], ptr noundef [[SRC:%.*]], i64 noundef [[N:%.*]]) #[[ATTR3 ]]
99+ // CPP-CHECK-NEXT: [[CALL:%.*]] = tail call ptr @__arm_sc_memcpy(ptr noundef [[DEST:%.*]], ptr noundef [[SRC:%.*]], i64 noundef [[N:%.*]]) #[[ATTR7 ]]
81100// CPP-CHECK-NEXT: ret ptr [[CALL]]
82101//
83102void * test_sc_memcpy (void * dest , const void * src , size_t n ) __arm_streaming_compatible {
@@ -86,12 +105,12 @@ void *test_sc_memcpy(void *dest, const void *src, size_t n) __arm_streaming_comp
86105
87106// CHECK-LABEL: @test_sc_memmove(
88107// CHECK-NEXT: entry:
89- // CHECK-NEXT: [[CALL:%.*]] = tail call ptr @__arm_sc_memmove(ptr noundef [[DEST:%.*]], ptr noundef [[SRC:%.*]], i64 noundef [[N:%.*]]) #[[ATTR3 ]]
108+ // CHECK-NEXT: [[CALL:%.*]] = tail call ptr @__arm_sc_memmove(ptr noundef [[DEST:%.*]], ptr noundef [[SRC:%.*]], i64 noundef [[N:%.*]]) #[[ATTR7 ]]
90109// CHECK-NEXT: ret ptr [[CALL]]
91110//
92111// CPP-CHECK-LABEL: @_Z15test_sc_memmovePvPKvm(
93112// CPP-CHECK-NEXT: entry:
94- // CPP-CHECK-NEXT: [[CALL:%.*]] = tail call ptr @__arm_sc_memmove(ptr noundef [[DEST:%.*]], ptr noundef [[SRC:%.*]], i64 noundef [[N:%.*]]) #[[ATTR3 ]]
113+ // CPP-CHECK-NEXT: [[CALL:%.*]] = tail call ptr @__arm_sc_memmove(ptr noundef [[DEST:%.*]], ptr noundef [[SRC:%.*]], i64 noundef [[N:%.*]]) #[[ATTR7 ]]
95114// CPP-CHECK-NEXT: ret ptr [[CALL]]
96115//
97116void * test_sc_memmove (void * dest , const void * src , size_t n ) __arm_streaming_compatible {
@@ -100,12 +119,12 @@ void *test_sc_memmove(void *dest, const void *src, size_t n) __arm_streaming_com
100119
101120// CHECK-LABEL: @test_sc_memset(
102121// CHECK-NEXT: entry:
103- // CHECK-NEXT: [[CALL:%.*]] = tail call ptr @__arm_sc_memset(ptr noundef [[S:%.*]], i32 noundef [[C:%.*]], i64 noundef [[N:%.*]]) #[[ATTR3 ]]
122+ // CHECK-NEXT: [[CALL:%.*]] = tail call ptr @__arm_sc_memset(ptr noundef [[S:%.*]], i32 noundef [[C:%.*]], i64 noundef [[N:%.*]]) #[[ATTR7 ]]
104123// CHECK-NEXT: ret ptr [[CALL]]
105124//
106125// CPP-CHECK-LABEL: @_Z14test_sc_memsetPvim(
107126// CPP-CHECK-NEXT: entry:
108- // CPP-CHECK-NEXT: [[CALL:%.*]] = tail call ptr @__arm_sc_memset(ptr noundef [[S:%.*]], i32 noundef [[C:%.*]], i64 noundef [[N:%.*]]) #[[ATTR3 ]]
127+ // CPP-CHECK-NEXT: [[CALL:%.*]] = tail call ptr @__arm_sc_memset(ptr noundef [[S:%.*]], i32 noundef [[C:%.*]], i64 noundef [[N:%.*]]) #[[ATTR7 ]]
109128// CPP-CHECK-NEXT: ret ptr [[CALL]]
110129//
111130void * test_sc_memset (void * s , int c , size_t n ) __arm_streaming_compatible {
@@ -114,12 +133,12 @@ void *test_sc_memset(void *s, int c, size_t n) __arm_streaming_compatible {
114133
115134// CHECK-LABEL: @test_sc_memchr(
116135// CHECK-NEXT: entry:
117- // CHECK-NEXT: [[CALL:%.*]] = tail call ptr @__arm_sc_memchr(ptr noundef [[S:%.*]], i32 noundef [[C:%.*]], i64 noundef [[N:%.*]]) #[[ATTR3 ]]
136+ // CHECK-NEXT: [[CALL:%.*]] = tail call ptr @__arm_sc_memchr(ptr noundef [[S:%.*]], i32 noundef [[C:%.*]], i64 noundef [[N:%.*]]) #[[ATTR7 ]]
118137// CHECK-NEXT: ret ptr [[CALL]]
119138//
120139// CPP-CHECK-LABEL: @_Z14test_sc_memchrPvim(
121140// CPP-CHECK-NEXT: entry:
122- // CPP-CHECK-NEXT: [[CALL:%.*]] = tail call ptr @__arm_sc_memchr(ptr noundef [[S:%.*]], i32 noundef [[C:%.*]], i64 noundef [[N:%.*]]) #[[ATTR3 ]]
141+ // CPP-CHECK-NEXT: [[CALL:%.*]] = tail call ptr @__arm_sc_memchr(ptr noundef [[S:%.*]], i32 noundef [[C:%.*]], i64 noundef [[N:%.*]]) #[[ATTR7 ]]
123142// CPP-CHECK-NEXT: ret ptr [[CALL]]
124143//
125144void * test_sc_memchr (void * s , int c , size_t n ) __arm_streaming_compatible {
0 commit comments