reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced
    1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
   20
   21
   22
   23
   24
   25
   26
   27
   28
   29
   30
   31
   32
   33
   34
   35
   36
   37
   38
   39
   40
   41
   42
   43
   44
   45
   46
   47
   48
   49
   50
   51
   52
   53
   54
   55
   56
   57
   58
   59
   60
   61
   62
   63
   64
   65
   66
   67
   68
   69
   70
   71
   72
   73
   74
   75
   76
   77
   78
   79
   80
   81
   82
   83
   84
   85
   86
   87
   88
   89
   90
   91
   92
   93
   94
   95
   96
   97
   98
   99
  100
  101
  102
  103
  104
  105
  106
  107
  108
  109
  110
  111
  112
  113
  114
  115
  116
  117
  118
  119
  120
  121
  122
  123
  124
  125
  126
  127
  128
  129
; RUN: llc -mattr=+code-object-v3 -mtriple=amdgcn-amd-amdhsa -mcpu=gfx700 -filetype=obj -o - < %s | llvm-readelf --notes | FileCheck --check-prefix=CHECK --check-prefix=GFX700 --check-prefix=NOTES %s
; RUN: llc -mattr=+code-object-v3 -mtriple=amdgcn-amd-amdhsa -mcpu=gfx802 -filetype=obj -o - < %s | llvm-readelf --notes | FileCheck --check-prefix=CHECK --check-prefix=GFX802 --check-prefix=NOTES %s
; RUN: llc -mattr=+code-object-v3 -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 -filetype=obj -o - < %s | llvm-readelf --notes | FileCheck --check-prefix=CHECK --check-prefix=GFX900 --check-prefix=NOTES %s

%opencl.image1d_t = type opaque
%opencl.image1d_array_t = type opaque
%opencl.image1d_buffer_t = type opaque
%opencl.image2d_t = type opaque
%opencl.image2d_array_t = type opaque
%opencl.image2d_array_depth_t = type opaque
%opencl.image2d_array_msaa_t = type opaque
%opencl.image2d_array_msaa_depth_t = type opaque
%opencl.image2d_depth_t = type opaque
%opencl.image2d_msaa_t = type opaque
%opencl.image2d_msaa_depth_t = type opaque
%opencl.image3d_t = type opaque

; CHECK:         ---
; CHECK: amdhsa.kernels:  
; CHECK:   - .args:           
; CHECK:       - .address_space:  global
; CHECK:         .name:           a
; CHECK:         .offset:         0
; CHECK:         .size:           8
; CHECK:         .type_name:      image1d_t
; CHECK:         .value_kind:     image
; CHECK:         .value_type:     struct
; CHECK:       - .address_space:  global
; CHECK:         .name:           b
; CHECK:         .offset:         8
; CHECK:         .size:           8
; CHECK:         .type_name:      image1d_array_t
; CHECK:         .value_kind:     image
; CHECK:         .value_type:     struct
; CHECK:       - .address_space:  global
; CHECK:         .name:           c
; CHECK:         .offset:         16
; CHECK:         .size:           8
; CHECK:         .type_name:      image1d_buffer_t
; CHECK:         .value_kind:     image
; CHECK:         .value_type:     struct
; CHECK:       - .address_space:  global
; CHECK:         .name:           d
; CHECK:         .offset:         24
; CHECK:         .size:           8
; CHECK:         .type_name:      image2d_t
; CHECK:         .value_kind:     image
; CHECK:         .value_type:     struct
; CHECK:       - .address_space:  global
; CHECK:         .name:           e
; CHECK:         .offset:         32
; CHECK:         .size:           8
; CHECK:         .type_name:      image2d_array_t
; CHECK:         .value_kind:     image
; CHECK:         .value_type:     struct
; CHECK:       - .address_space:  global
; CHECK:         .name:           f
; CHECK:         .offset:         40
; CHECK:         .size:           8
; CHECK:         .type_name:      image2d_array_depth_t
; CHECK:         .value_kind:     image
; CHECK:         .value_type:     struct
; CHECK:       - .address_space:  global
; CHECK:         .name:           g
; CHECK:         .offset:         48
; CHECK:         .size:           8
; CHECK:         .type_name:      image2d_array_msaa_t
; CHECK:         .value_kind:     image
; CHECK:         .value_type:     struct
; CHECK:       - .address_space:  global
; CHECK:         .name:           h
; CHECK:         .offset:         56
; CHECK:         .size:           8
; CHECK:         .type_name:      image2d_array_msaa_depth_t
; CHECK:         .value_kind:     image
; CHECK:         .value_type:     struct
; CHECK:       - .address_space:  global
; CHECK:         .name:           i
; CHECK:         .offset:         64
; CHECK:         .size:           8
; CHECK:         .type_name:      image2d_depth_t
; CHECK:         .value_kind:     image
; CHECK:         .value_type:     struct
; CHECK:       - .address_space:  global
; CHECK:         .name:           j
; CHECK:         .offset:         72
; CHECK:         .size:           8
; CHECK:         .type_name:      image2d_msaa_t
; CHECK:         .value_kind:     image
; CHECK:         .value_type:     struct
; CHECK:       - .address_space:  global
; CHECK:         .name:           k
; CHECK:         .offset:         80
; CHECK:         .size:           8
; CHECK:         .type_name:      image2d_msaa_depth_t
; CHECK:         .value_kind:     image
; CHECK:         .value_type:     struct
; CHECK:       - .address_space:  global
; CHECK:         .name:           l
; CHECK:         .offset:         88
; CHECK:         .size:           8
; CHECK:         .type_name:      image3d_t
; CHECK:         .value_kind:     image
; CHECK:         .value_type:     struct
define amdgpu_kernel void @test(%opencl.image1d_t addrspace(1)* %a,
                                %opencl.image1d_array_t addrspace(1)* %b,
                                %opencl.image1d_buffer_t addrspace(1)* %c,
                                %opencl.image2d_t addrspace(1)* %d,
                                %opencl.image2d_array_t addrspace(1)* %e,
                                %opencl.image2d_array_depth_t addrspace(1)* %f,
                                %opencl.image2d_array_msaa_t addrspace(1)* %g,
                                %opencl.image2d_array_msaa_depth_t addrspace(1)* %h,
                                %opencl.image2d_depth_t addrspace(1)* %i,
                                %opencl.image2d_msaa_t addrspace(1)* %j,
                                %opencl.image2d_msaa_depth_t addrspace(1)* %k,
                                %opencl.image3d_t addrspace(1)* %l)
    !kernel_arg_type !1 !kernel_arg_base_type !1 {
  ret void
}

; CHECK:  amdhsa.version:
; CHECK-NEXT: - 1
; CHECK-NEXT: - 0

!1 = !{!"image1d_t", !"image1d_array_t", !"image1d_buffer_t",
       !"image2d_t", !"image2d_array_t", !"image2d_array_depth_t",
       !"image2d_array_msaa_t", !"image2d_array_msaa_depth_t",
       !"image2d_depth_t", !"image2d_msaa_t", !"image2d_msaa_depth_t",
       !"image3d_t"}