@@ -88,11 +88,11 @@ void usages() {
8888
8989void usages2 () {
9090 __attribute__ ((address_space (0 ))) int *PRIV_NUM;
91- // CHECK-DAG: [[PRIV_NUM:%[a-zA-Z0-9_]+]] = alloca i32 addrspace(5) *
92- __attribute__ ((address_space (5 ))) int *PRIV_NUM2;
93- // CHECK-DAG: [[PRIV_NUM2:%[a-zA-Z0-9_]+]] = alloca i32 addrspace(5) *
91+ // CHECK-DAG: [[PRIV_NUM:%[a-zA-Z0-9_]+]] = alloca i32*
92+ __attribute__ ((address_space (0 ))) int *PRIV_NUM2;
93+ // CHECK-DAG: [[PRIV_NUM2:%[a-zA-Z0-9_]+]] = alloca i32*
9494 __private int *PRIV;
95- // CHECK-DAG: [[PRIV:%[a-zA-Z0-9_]+]] = alloca i32 addrspace(5) *
95+ // CHECK-DAG: [[PRIV:%[a-zA-Z0-9_]+]] = alloca i32*
9696 __attribute__ ((address_space (1 ))) int *GLOB_NUM;
9797 // CHECK-DAG: [[GLOB_NUM:%[a-zA-Z0-9_]+]] = alloca i32 addrspace(1)*
9898 __global int *GLOB;
@@ -107,17 +107,14 @@ void usages2() {
107107 // CHECK-DAG: [[LOCAL:%[a-zA-Z0-9_]+]] = alloca i32 addrspace(3)*
108108
109109 bar (*PRIV_NUM);
110- // CHECK-DAG: [[PRIV_NUM_LOAD:%[a-zA-Z0-9]+]] = load i32 addrspace(5)*, i32 addrspace(5)** [[PRIV_NUM]]
111- // CHECK-DAG: [[PRIV_NUM_CAST:%[a-zA-Z0-9]+]] = addrspacecast i32 addrspace(5)* [[PRIV_NUM_LOAD]] to i32 addrspace(4)*
112- // CHECK-DAG: call spir_func void @new.[[RAW_REF]](i32 addrspace(4)* [[PRIV_NUM_CAST]])
110+ // CHECK-DAG: [[PRIV_NUM_LOAD:%[a-zA-Z0-9]+]] = load i32*, i32** [[PRIV_NUM]]
111+ // CHECK-DAG: call spir_func void @[[RAW_REF]](i32* dereferenceable(4) [[PRIV_NUM_LOAD]])
113112 bar (*PRIV_NUM2);
114- // CHECK-DAG: [[PRIV_NUM2_LOAD:%[a-zA-Z0-9]+]] = load i32 addrspace(5)*, i32 addrspace(5)** [[PRIV_NUM2]]
115- // CHECK-DAG: [[PRIV_NUM2_CAST:%[a-zA-Z0-9]+]] = addrspacecast i32 addrspace(5)* [[PRIV_NUM2_LOAD]] to i32 addrspace(4)*
116- // CHECK-DAG: call spir_func void @new.[[RAW_REF]](i32 addrspace(4)* [[PRIV_NUM2_CAST]])
113+ // CHECK-DAG: [[PRIV_NUM2_LOAD:%[a-zA-Z0-9]+]] = load i32*, i32** [[PRIV_NUM2]]
114+ // CHECK-DAG: call spir_func void @[[RAW_REF]](i32* dereferenceable(4) [[PRIV_NUM2_LOAD]])
117115 bar (*PRIV);
118- // CHECK-DAG: [[PRIV_LOAD:%[a-zA-Z0-9]+]] = load i32 addrspace(5)*, i32 addrspace(5)** [[PRIV]]
119- // CHECK-DAG: [[PRIV_CAST:%[a-zA-Z0-9]+]] = addrspacecast i32 addrspace(5)* [[PRIV_LOAD]] to i32 addrspace(4)*
120- // CHECK-DAG: call spir_func void @new.[[RAW_REF]](i32 addrspace(4)* [[PRIV_CAST]])
116+ // CHECK-DAG: [[PRIV_LOAD:%[a-zA-Z0-9]+]] = load i32*, i32** [[PRIV]]
117+ // CHECK-DAG: call spir_func void @[[RAW_REF]](i32* dereferenceable(4) [[PRIV_LOAD]])
121118 bar (*GLOB_NUM);
122119 // CHECK-DAG: [[GLOB_NUM_LOAD:%[a-zA-Z0-9]+]] = load i32 addrspace(1)*, i32 addrspace(1)** [[GLOB_NUM]]
123120 // CHECK-DAG: [[GLOB_NUM_CAST:%[a-zA-Z0-9]+]] = addrspacecast i32 addrspace(1)* [[GLOB_NUM_LOAD]] to i32 addrspace(4)*
0 commit comments