@@ -9,64 +9,64 @@ declare hidden i32 @strnlen(ptr nocapture, i32) #1
99declare hidden i32 @strcmp (ptr nocapture , ptr nocapture ) #1
1010
1111
12- ; ERROR: error: <unknown>:0:0: in function test_memcmp void (ptr addrspace(1), ptr addrspace(1), ptr): unsupported call to function memcmp
12+ ; ERROR: error: <unknown>:0:0: in function test_memcmp void (ptr addrspace(1), ptr addrspace(1), ptr, ptr addrspace(1) ): unsupported call to function memcmp
1313
1414; GCN: s_add_u32 s{{[0-9]+}}, s{{[0-9]+}}, memcmp@rel32@lo+4
1515; GCN: s_addc_u32 s{{[0-9]+}}, s{{[0-9]+}}, memcmp@rel32@hi+12
16- define amdgpu_kernel void @test_memcmp (ptr addrspace (1 ) %x , ptr addrspace (1 ) %y , ptr nocapture %p ) #0 {
16+ define amdgpu_kernel void @test_memcmp (ptr addrspace (1 ) %x , ptr addrspace (1 ) %y , ptr nocapture %p , ptr addrspace ( 1 ) %out ) #0 {
1717entry:
1818 %cmp = tail call i32 @memcmp (ptr addrspace (1 ) %x , ptr addrspace (1 ) %y , i64 2 )
19- store volatile i32 %cmp , ptr addrspace (1 ) undef
19+ store i32 %cmp , ptr addrspace (1 ) %out
2020 ret void
2121}
2222
23- ; ERROR: error: <unknown>:0:0: in function test_memchr void (ptr addrspace(1), i32, i64): unsupported call to function memchr
23+ ; ERROR: error: <unknown>:0:0: in function test_memchr void (ptr addrspace(1), i32, i64, ptr addrspace(1) ): unsupported call to function memchr
2424
2525; GCN: s_add_u32 s{{[0-9]+}}, s{{[0-9]+}}, memchr@rel32@lo+4
2626; GCN: s_addc_u32 s{{[0-9]+}}, s{{[0-9]+}}, memchr@rel32@hi+12
27- define amdgpu_kernel void @test_memchr (ptr addrspace (1 ) %src , i32 %char , i64 %len ) #0 {
27+ define amdgpu_kernel void @test_memchr (ptr addrspace (1 ) %src , i32 %char , i64 %len , ptr addrspace ( 1 ) %out ) #0 {
2828 %res = call ptr addrspace (1 ) @memchr (ptr addrspace (1 ) %src , i32 %char , i64 %len )
29- store volatile ptr addrspace (1 ) %res , ptr addrspace (1 ) undef
29+ store ptr addrspace (1 ) %res , ptr addrspace (1 ) %out
3030 ret void
3131}
3232
33- ; ERROR: error: <unknown>:0:0: in function test_strcpy void (ptr, ptr): unsupported call to function strcpy
33+ ; ERROR: error: <unknown>:0:0: in function test_strcpy void (ptr, ptr, ptr addrspace(1) ): unsupported call to function strcpy
3434
3535; GCN: s_add_u32 s{{[0-9]+}}, s{{[0-9]+}}, strcpy@rel32@lo+4
3636; GCN: s_addc_u32 s{{[0-9]+}}, s{{[0-9]+}}, strcpy@rel32@hi+12
37- define amdgpu_kernel void @test_strcpy (ptr %dst , ptr %src ) #0 {
37+ define amdgpu_kernel void @test_strcpy (ptr %dst , ptr %src , ptr addrspace ( 1 ) %out ) #0 {
3838 %res = call ptr @strcpy (ptr %dst , ptr %src )
39- store volatile ptr %res , ptr addrspace (1 ) undef
39+ store ptr %res , ptr addrspace (1 ) %out
4040 ret void
4141}
4242
43- ; ERROR: error: <unknown>:0:0: in function test_strcmp void (ptr, ptr): unsupported call to function strcmp
43+ ; ERROR: error: <unknown>:0:0: in function test_strcmp void (ptr, ptr, ptr addrspace(1) ): unsupported call to function strcmp
4444
4545; GCN: s_add_u32 s{{[0-9]+}}, s{{[0-9]+}}, strcmp@rel32@lo+4
4646; GCN: s_addc_u32 s{{[0-9]+}}, s{{[0-9]+}}, strcmp@rel32@hi+12
47- define amdgpu_kernel void @test_strcmp (ptr %src0 , ptr %src1 ) #0 {
47+ define amdgpu_kernel void @test_strcmp (ptr %src0 , ptr %src1 , ptr addrspace ( 1 ) %out ) #0 {
4848 %res = call i32 @strcmp (ptr %src0 , ptr %src1 )
49- store volatile i32 %res , ptr addrspace (1 ) undef
49+ store i32 %res , ptr addrspace (1 ) %out
5050 ret void
5151}
5252
53- ; ERROR: error: <unknown>:0:0: in function test_strlen void (ptr): unsupported call to function strlen
53+ ; ERROR: error: <unknown>:0:0: in function test_strlen void (ptr, ptr addrspace(1) ): unsupported call to function strlen
5454
5555; GCN: s_add_u32 s{{[0-9]+}}, s{{[0-9]+}}, strlen@rel32@lo+4
5656; GCN: s_addc_u32 s{{[0-9]+}}, s{{[0-9]+}}, strlen@rel32@hi+12
57- define amdgpu_kernel void @test_strlen (ptr %src ) #0 {
57+ define amdgpu_kernel void @test_strlen (ptr %src , ptr addrspace ( 1 ) %out ) #0 {
5858 %res = call i32 @strlen (ptr %src )
59- store volatile i32 %res , ptr addrspace (1 ) undef
59+ store i32 %res , ptr addrspace (1 ) %out
6060 ret void
6161}
6262
63- ; ERROR: error: <unknown>:0:0: in function test_strnlen void (ptr, i32): unsupported call to function strnlen
63+ ; ERROR: error: <unknown>:0:0: in function test_strnlen void (ptr, i32, ptr addrspace(1) ): unsupported call to function strnlen
6464
6565; GCN: s_add_u32 s{{[0-9]+}}, s{{[0-9]+}}, strnlen@rel32@lo+4
6666; GCN: s_addc_u32 s{{[0-9]+}}, s{{[0-9]+}}, strnlen@rel32@hi+12
67- define amdgpu_kernel void @test_strnlen (ptr %src , i32 %size ) #0 {
67+ define amdgpu_kernel void @test_strnlen (ptr %src , i32 %size , ptr addrspace ( 1 ) %out ) #0 {
6868 %res = call i32 @strnlen (ptr %src , i32 %size )
69- store volatile i32 %res , ptr addrspace (1 ) undef
69+ store i32 %res , ptr addrspace (1 ) %out
7070 ret void
7171}
7272
0 commit comments