CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
44 lines
1.9 KiB
Plaintext
44 lines
1.9 KiB
Plaintext
// RUN: %clang_cc1 %s -triple spir-unknown-unknown -O0 -emit-llvm -o - | FileCheck %s -check-prefixes=COMMON,PTR
|
|
// RUN: %clang_cc1 %s -triple spir-unknown-unknown -O0 -emit-llvm -o - -DREF | FileCheck %s -check-prefixes=COMMON,REF
|
|
|
|
#ifdef REF
|
|
#define PTR &
|
|
#define ADR(x) x
|
|
#else
|
|
#define PTR *
|
|
#define ADR(x) &x
|
|
#endif
|
|
|
|
//COMMON: @glob ={{.*}} addrspace(1) global i32
|
|
int glob;
|
|
//PTR: @glob_p ={{.*}} addrspace(1) global ptr addrspace(4) addrspacecast (ptr addrspace(1) @glob to ptr addrspace(4))
|
|
//REF: @glob_p ={{.*}} addrspace(1) constant ptr addrspace(4) addrspacecast (ptr addrspace(1) @glob to ptr addrspace(4))
|
|
int PTR glob_p = ADR(glob);
|
|
|
|
//COMMON: @_ZZ3fooi{{P|R}}U3AS4iE6loc_st = internal addrspace(1) global i32
|
|
//PTR: @_ZZ3fooiPU3AS4iE8loc_st_p = internal addrspace(1) global ptr addrspace(4) addrspacecast (ptr addrspace(1) @_ZZ3fooiPU3AS4iE6loc_st to ptr addrspace(4))
|
|
//REF: @_ZZ3fooiRU3AS4iE8loc_st_p = internal addrspace(1) constant ptr addrspace(4) addrspacecast (ptr addrspace(1) @_ZZ3fooiRU3AS4iE6loc_st to ptr addrspace(4))
|
|
//COMMON: @loc_ext_p = external addrspace(1) {{global|constant}} ptr addrspace(4)
|
|
//COMMON: @loc_ext = external addrspace(1) global i32
|
|
|
|
//COMMON: define{{.*}} spir_func noundef i32 @_Z3fooi{{P|R}}U3AS4i(i32 noundef %par, ptr addrspace(4){{.*}} %par_p)
|
|
int foo(int par, int PTR par_p){
|
|
//COMMON: %loc = alloca i32
|
|
int loc;
|
|
//COMMON: %loc_p = alloca ptr addrspace(4)
|
|
//COMMON: %loc_p_const = alloca ptr
|
|
//COMMON: [[GAS:%[._a-z0-9]*]] ={{.*}} addrspacecast ptr %loc to ptr addrspace(4)
|
|
//COMMON: store ptr addrspace(4) [[GAS]], ptr %loc_p
|
|
int PTR loc_p = ADR(loc);
|
|
//COMMON: store ptr %loc, ptr %loc_p_const
|
|
const __private int PTR loc_p_const = ADR(loc);
|
|
|
|
// CHECK directives for the following code are located above.
|
|
static int loc_st;
|
|
static int PTR loc_st_p = ADR(loc_st);
|
|
extern int loc_ext;
|
|
extern int PTR loc_ext_p;
|
|
(void)loc_ext_p;
|
|
return loc_ext;
|
|
}
|