Revert "[llvm] Improve llvm.objectsize computation by computing GEP, alloca and mallo...
[llvm-project.git] / clang / test / CodeGenOpenCL / cast_image.cl
blob0579dc2d651e5ae5cddc110fe44dae3c76ad1f00
1 // RUN: %clang_cc1 -emit-llvm -o - -triple amdgcn--amdhsa %s | FileCheck --check-prefix=AMDGCN %s
2 // RUN: %clang_cc1 -emit-llvm -o - -triple x86_64-unknown-unknown %s | FileCheck --check-prefix=X86 %s
4 #ifdef __AMDGCN__
6 constant int* convert(image2d_t img) {
7 // AMDGCN: ret ptr addrspace(4) %img
8 return __builtin_astype(img, constant int*);
11 #else
13 global int* convert(image2d_t img) {
14 // X86: ret ptr %img
15 return __builtin_astype(img, global int*);
18 #endif