1; RUN: llc -mtriple=amdgcn-amd-amdhsa -filetype=obj -o - < %s | llvm-readelf --notes - | FileCheck %s
2
3; CHECK:        - .args:
4; CHECK-NEXT:       - .access:         read_only
5; CHECK-NEXT:         .address_space:  global
6; CHECK-NEXT:         .is_const:       true
7; CHECK-NEXT:         .is_restrict:    true
8; CHECK-NEXT:         .name:           in
9; CHECK-NEXT:         .offset:         0
10; CHECK-NEXT:         .size:           8
11; CHECK-NEXT:         .type_name:      'float*'
12; CHECK-NEXT:         .value_kind:     global_buffer
13; CHECK-NEXT:       - .address_space:  global
14; CHECK-NEXT:         .name:           out
15; CHECK-NEXT:         .offset:         8
16; CHECK-NEXT:         .size:           8
17; CHECK-NEXT:         .type_name:      'float*'
18; CHECK-NEXT:         .value_kind:     global_buffer
19; CHECK:          .name:           test_ro_arg
20; CHECK:          .symbol:         test_ro_arg.kd
21
22define amdgpu_kernel void @test_ro_arg(float addrspace(1)* noalias readonly %in, float addrspace(1)* %out)
23    !kernel_arg_addr_space !0 !kernel_arg_access_qual !1 !kernel_arg_type !2
24    !kernel_arg_base_type !2 !kernel_arg_type_qual !3 {
25  ret void
26}
27
28!0 = !{i32 1, i32 1}
29!1 = !{!"none", !"none"}
30!2 = !{!"float*", !"float*"}
31!3 = !{!"const restrict", !""}
32