• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1target datalayout = "e-p:32:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64"
2
3%opencl.image2d_t = type opaque
4%opencl.image3d_t = type opaque
5
6declare i32 @llvm.OpenCL.image.get.resource.id.2d(
7  %opencl.image2d_t addrspace(1)*) nounwind readnone
8declare i32 @llvm.OpenCL.image.get.resource.id.3d(
9  %opencl.image3d_t addrspace(1)*) nounwind readnone
10
11declare [3 x i32] @llvm.OpenCL.image.get.size.2d(
12  %opencl.image2d_t addrspace(1)*) nounwind readnone
13declare [3 x i32] @llvm.OpenCL.image.get.size.3d(
14  %opencl.image3d_t addrspace(1)*) nounwind readnone
15
16declare [2 x i32] @llvm.OpenCL.image.get.format.2d(
17  %opencl.image2d_t addrspace(1)*) nounwind readnone
18declare [2 x i32] @llvm.OpenCL.image.get.format.3d(
19  %opencl.image3d_t addrspace(1)*) nounwind readnone
20
21define i32 @__clc_get_image_width_2d(
22                          %opencl.image2d_t addrspace(1)* nocapture %img) #0 {
23  %1 = tail call [3 x i32] @llvm.OpenCL.image.get.size.2d(
24    %opencl.image2d_t addrspace(1)* %img)
25  %2 = extractvalue [3 x i32] %1, 0
26  ret i32 %2
27}
28define i32 @__clc_get_image_width_3d(
29                          %opencl.image3d_t addrspace(1)* nocapture %img) #0 {
30  %1 = tail call [3 x i32] @llvm.OpenCL.image.get.size.3d(
31    %opencl.image3d_t addrspace(1)* %img)
32  %2 = extractvalue [3 x i32] %1, 0
33  ret i32 %2
34}
35
36define i32 @__clc_get_image_height_2d(
37                          %opencl.image2d_t addrspace(1)* nocapture %img) #0 {
38  %1 = tail call [3 x i32] @llvm.OpenCL.image.get.size.2d(
39    %opencl.image2d_t addrspace(1)* %img)
40  %2 = extractvalue [3 x i32] %1, 1
41  ret i32 %2
42}
43define i32 @__clc_get_image_height_3d(
44                          %opencl.image3d_t addrspace(1)* nocapture %img) #0 {
45  %1 = tail call [3 x i32] @llvm.OpenCL.image.get.size.3d(
46    %opencl.image3d_t addrspace(1)* %img)
47  %2 = extractvalue [3 x i32] %1, 1
48  ret i32 %2
49}
50
51define i32 @__clc_get_image_depth_3d(
52                          %opencl.image3d_t addrspace(1)* nocapture %img) #0 {
53  %1 = tail call [3 x i32] @llvm.OpenCL.image.get.size.3d(
54    %opencl.image3d_t addrspace(1)* %img)
55  %2 = extractvalue [3 x i32] %1, 2
56  ret i32 %2
57}
58
59define i32 @__clc_get_image_channel_data_type_2d(
60                          %opencl.image2d_t addrspace(1)* nocapture %img) #0 {
61  %1 = tail call [2 x i32] @llvm.OpenCL.image.get.format.2d(
62    %opencl.image2d_t addrspace(1)* %img)
63  %2 = extractvalue [2 x i32] %1, 0
64  ret i32 %2
65}
66define i32 @__clc_get_image_channel_data_type_3d(
67                          %opencl.image3d_t addrspace(1)* nocapture %img) #0 {
68  %1 = tail call [2 x i32] @llvm.OpenCL.image.get.format.3d(
69    %opencl.image3d_t addrspace(1)* %img)
70  %2 = extractvalue [2 x i32] %1, 0
71  ret i32 %2
72}
73
74define i32 @__clc_get_image_channel_order_2d(
75                          %opencl.image2d_t addrspace(1)* nocapture %img) #0 {
76  %1 = tail call [2 x i32] @llvm.OpenCL.image.get.format.2d(
77    %opencl.image2d_t addrspace(1)* %img)
78  %2 = extractvalue [2 x i32] %1, 1
79  ret i32 %2
80}
81define i32 @__clc_get_image_channel_order_3d(
82                          %opencl.image3d_t addrspace(1)* nocapture %img) #0 {
83  %1 = tail call [2 x i32] @llvm.OpenCL.image.get.format.3d(
84    %opencl.image3d_t addrspace(1)* %img)
85  %2 = extractvalue [2 x i32] %1, 1
86  ret i32 %2
87}
88
89attributes #0 = { nounwind readnone alwaysinline }
90