Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / llvm / test / CodeGen / AMDGPU / hsa-metadata-images-v3.ll
blobb7f58bbb51bb29d88d1072a71b06188ad3ee9734
1 ; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx700 -filetype=obj -o - < %s | llvm-readelf --notes - | FileCheck --check-prefix=CHECK %s
2 ; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx802 -filetype=obj -o - < %s | llvm-readelf --notes - | FileCheck --check-prefix=CHECK %s
3 ; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 -filetype=obj -o - < %s | llvm-readelf --notes - | FileCheck --check-prefix=CHECK %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:       - .name:           a
22 ; CHECK:         .offset:         0
23 ; CHECK:         .size:           8
24 ; CHECK:         .type_name:      image1d_t
25 ; CHECK:         .value_kind:     image
26 ; CHECK:       - .name:           b
27 ; CHECK:         .offset:         8
28 ; CHECK:         .size:           8
29 ; CHECK:         .type_name:      image1d_array_t
30 ; CHECK:         .value_kind:     image
31 ; CHECK:       - .name:           c
32 ; CHECK:         .offset:         16
33 ; CHECK:         .size:           8
34 ; CHECK:         .type_name:      image1d_buffer_t
35 ; CHECK:         .value_kind:     image
36 ; CHECK:       - .name:           d
37 ; CHECK:         .offset:         24
38 ; CHECK:         .size:           8
39 ; CHECK:         .type_name:      image2d_t
40 ; CHECK:         .value_kind:     image
41 ; CHECK:       - .name:           e
42 ; CHECK:         .offset:         32
43 ; CHECK:         .size:           8
44 ; CHECK:         .type_name:      image2d_array_t
45 ; CHECK:         .value_kind:     image
46 ; CHECK:       - .name:           f
47 ; CHECK:         .offset:         40
48 ; CHECK:         .size:           8
49 ; CHECK:         .type_name:      image2d_array_depth_t
50 ; CHECK:         .value_kind:     image
51 ; CHECK:       - .name:           g
52 ; CHECK:         .offset:         48
53 ; CHECK:         .size:           8
54 ; CHECK:         .type_name:      image2d_array_msaa_t
55 ; CHECK:         .value_kind:     image
56 ; CHECK:       - .name:           h
57 ; CHECK:         .offset:         56
58 ; CHECK:         .size:           8
59 ; CHECK:         .type_name:      image2d_array_msaa_depth_t
60 ; CHECK:         .value_kind:     image
61 ; CHECK:       - .name:           i
62 ; CHECK:         .offset:         64
63 ; CHECK:         .size:           8
64 ; CHECK:         .type_name:      image2d_depth_t
65 ; CHECK:         .value_kind:     image
66 ; CHECK:       - .name:           j
67 ; CHECK:         .offset:         72
68 ; CHECK:         .size:           8
69 ; CHECK:         .type_name:      image2d_msaa_t
70 ; CHECK:         .value_kind:     image
71 ; CHECK:       - .name:           k
72 ; CHECK:         .offset:         80
73 ; CHECK:         .size:           8
74 ; CHECK:         .type_name:      image2d_msaa_depth_t
75 ; CHECK:         .value_kind:     image
76 ; CHECK:       - .name:           l
77 ; CHECK:         .offset:         88
78 ; CHECK:         .size:           8
79 ; CHECK:         .type_name:      image3d_t
80 ; CHECK:         .value_kind:     image
81 define amdgpu_kernel void @test(ptr addrspace(1) %a,
82                                 ptr addrspace(1) %b,
83                                 ptr addrspace(1) %c,
84                                 ptr addrspace(1) %d,
85                                 ptr addrspace(1) %e,
86                                 ptr addrspace(1) %f,
87                                 ptr addrspace(1) %g,
88                                 ptr addrspace(1) %h,
89                                 ptr addrspace(1) %i,
90                                 ptr addrspace(1) %j,
91                                 ptr addrspace(1) %k,
92                                 ptr addrspace(1) %l)
93     !kernel_arg_type !1 !kernel_arg_base_type !1 {
94   ret void
97 ; CHECK:  amdhsa.version:
98 ; CHECK-NEXT: - 1
99 ; CHECK-NEXT: - 0
101 !llvm.module.flags = !{!0}
102 !0 = !{i32 1, !"amdgpu_code_object_version", i32 300}
104 !1 = !{!"image1d_t", !"image1d_array_t", !"image1d_buffer_t",
105        !"image2d_t", !"image2d_array_t", !"image2d_array_depth_t",
106        !"image2d_array_msaa_t", !"image2d_array_msaa_depth_t",
107        !"image2d_depth_t", !"image2d_msaa_t", !"image2d_msaa_depth_t",
108        !"image3d_t"}