// RUN: %clang_cc1 -no-opaque-pointers -emit-llvm -o - -triple amdgcn--amdhsa %s | FileCheck --check-prefix=AMDGCN %s
// RUN: %clang_cc1 -no-opaque-pointers -emit-llvm -o - -triple spir-unknown-unknown %s | FileCheck --check-prefix=SPIR %s
#ifdef __AMDGCN__
constant int* convert {
// AMDGCN: bitcast %opencl.image2d_ro_t addrspace* %img to i32 addrspace*
return __builtin_astype;
}
#else
global int* convert {
// SPIR: bitcast %opencl.image2d_ro_t addrspace* %img to i32 addrspace*
return __builtin_astype;
}
#endif