[InstCombine] Signed saturation patterns
[llvm-complete.git] / test / CodeGen / AMDGPU / hsa-metadata-images-v3.ll
blobec048c2d02dba7de37e4f6fe9b34094a8ce4a3a4
1 ; 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
2 ; 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
3 ; 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
5 %opencl.image1d_t = type opaque
6 %opencl.image1d_array_t = type opaque
7 %opencl.image1d_buffer_t = type opaque
8 %opencl.image2d_t = type opaque
9 %opencl.image2d_array_t = type opaque
10 %opencl.image2d_array_depth_t = type opaque
11 %opencl.image2d_array_msaa_t = type opaque
12 %opencl.image2d_array_msaa_depth_t = type opaque
13 %opencl.image2d_depth_t = type opaque
14 %opencl.image2d_msaa_t = type opaque
15 %opencl.image2d_msaa_depth_t = type opaque
16 %opencl.image3d_t = type opaque
18 ; CHECK:         ---
19 ; CHECK: amdhsa.kernels:  
20 ; CHECK:   - .args:           
21 ; CHECK:       - .address_space:  global
22 ; CHECK:         .name:           a
23 ; CHECK:         .offset:         0
24 ; CHECK:         .size:           8
25 ; CHECK:         .type_name:      image1d_t
26 ; CHECK:         .value_kind:     image
27 ; CHECK:         .value_type:     struct
28 ; CHECK:       - .address_space:  global
29 ; CHECK:         .name:           b
30 ; CHECK:         .offset:         8
31 ; CHECK:         .size:           8
32 ; CHECK:         .type_name:      image1d_array_t
33 ; CHECK:         .value_kind:     image
34 ; CHECK:         .value_type:     struct
35 ; CHECK:       - .address_space:  global
36 ; CHECK:         .name:           c
37 ; CHECK:         .offset:         16
38 ; CHECK:         .size:           8
39 ; CHECK:         .type_name:      image1d_buffer_t
40 ; CHECK:         .value_kind:     image
41 ; CHECK:         .value_type:     struct
42 ; CHECK:       - .address_space:  global
43 ; CHECK:         .name:           d
44 ; CHECK:         .offset:         24
45 ; CHECK:         .size:           8
46 ; CHECK:         .type_name:      image2d_t
47 ; CHECK:         .value_kind:     image
48 ; CHECK:         .value_type:     struct
49 ; CHECK:       - .address_space:  global
50 ; CHECK:         .name:           e
51 ; CHECK:         .offset:         32
52 ; CHECK:         .size:           8
53 ; CHECK:         .type_name:      image2d_array_t
54 ; CHECK:         .value_kind:     image
55 ; CHECK:         .value_type:     struct
56 ; CHECK:       - .address_space:  global
57 ; CHECK:         .name:           f
58 ; CHECK:         .offset:         40
59 ; CHECK:         .size:           8
60 ; CHECK:         .type_name:      image2d_array_depth_t
61 ; CHECK:         .value_kind:     image
62 ; CHECK:         .value_type:     struct
63 ; CHECK:       - .address_space:  global
64 ; CHECK:         .name:           g
65 ; CHECK:         .offset:         48
66 ; CHECK:         .size:           8
67 ; CHECK:         .type_name:      image2d_array_msaa_t
68 ; CHECK:         .value_kind:     image
69 ; CHECK:         .value_type:     struct
70 ; CHECK:       - .address_space:  global
71 ; CHECK:         .name:           h
72 ; CHECK:         .offset:         56
73 ; CHECK:         .size:           8
74 ; CHECK:         .type_name:      image2d_array_msaa_depth_t
75 ; CHECK:         .value_kind:     image
76 ; CHECK:         .value_type:     struct
77 ; CHECK:       - .address_space:  global
78 ; CHECK:         .name:           i
79 ; CHECK:         .offset:         64
80 ; CHECK:         .size:           8
81 ; CHECK:         .type_name:      image2d_depth_t
82 ; CHECK:         .value_kind:     image
83 ; CHECK:         .value_type:     struct
84 ; CHECK:       - .address_space:  global
85 ; CHECK:         .name:           j
86 ; CHECK:         .offset:         72
87 ; CHECK:         .size:           8
88 ; CHECK:         .type_name:      image2d_msaa_t
89 ; CHECK:         .value_kind:     image
90 ; CHECK:         .value_type:     struct
91 ; CHECK:       - .address_space:  global
92 ; CHECK:         .name:           k
93 ; CHECK:         .offset:         80
94 ; CHECK:         .size:           8
95 ; CHECK:         .type_name:      image2d_msaa_depth_t
96 ; CHECK:         .value_kind:     image
97 ; CHECK:         .value_type:     struct
98 ; CHECK:       - .address_space:  global
99 ; CHECK:         .name:           l
100 ; CHECK:         .offset:         88
101 ; CHECK:         .size:           8
102 ; CHECK:         .type_name:      image3d_t
103 ; CHECK:         .value_kind:     image
104 ; CHECK:         .value_type:     struct
105 define amdgpu_kernel void @test(%opencl.image1d_t addrspace(1)* %a,
106                                 %opencl.image1d_array_t addrspace(1)* %b,
107                                 %opencl.image1d_buffer_t addrspace(1)* %c,
108                                 %opencl.image2d_t addrspace(1)* %d,
109                                 %opencl.image2d_array_t addrspace(1)* %e,
110                                 %opencl.image2d_array_depth_t addrspace(1)* %f,
111                                 %opencl.image2d_array_msaa_t addrspace(1)* %g,
112                                 %opencl.image2d_array_msaa_depth_t addrspace(1)* %h,
113                                 %opencl.image2d_depth_t addrspace(1)* %i,
114                                 %opencl.image2d_msaa_t addrspace(1)* %j,
115                                 %opencl.image2d_msaa_depth_t addrspace(1)* %k,
116                                 %opencl.image3d_t addrspace(1)* %l)
117     !kernel_arg_type !1 !kernel_arg_base_type !1 {
118   ret void
121 ; CHECK:  amdhsa.version:
122 ; CHECK-NEXT: - 1
123 ; CHECK-NEXT: - 0
125 !1 = !{!"image1d_t", !"image1d_array_t", !"image1d_buffer_t",
126        !"image2d_t", !"image2d_array_t", !"image2d_array_depth_t",
127        !"image2d_array_msaa_t", !"image2d_array_msaa_depth_t",
128        !"image2d_depth_t", !"image2d_msaa_t", !"image2d_msaa_depth_t",
129        !"image3d_t"}