1 // RUN: %clang_cc1 %s -triple spir-unknown-unknown -cl-std=clc++ -emit-llvm -O0 -o - | FileCheck %s
3 void test_reinterpret_cast(){
5 __private
float& y
= x
;
6 // We don't need bitcast to cast pointer type and
7 // address space at the same time.
8 //CHECK: addrspacecast ptr %x to ptr addrspace(4)
9 //CHECK: [[REG:%[0-9]+]] = load ptr, ptr %y
10 //CHECK: addrspacecast ptr [[REG]] to ptr addrspace(4)
12 __generic
int& rc1
= reinterpret_cast<__generic
int&>(x
);
13 __generic
int& rc2
= reinterpret_cast<__generic
int&>(y
);