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
70 lines
2.6 KiB
C
70 lines
2.6 KiB
C
// RUN: %clang_cc1 -triple aarch64-none-linux-android21 -fclangir -emit-cir %s -o %t.cir
|
|
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
|
|
// RUN: %clang_cc1 -triple aarch64-none-linux-android21 -fclangir -emit-llvm %s -o %t-cir.ll
|
|
// RUN: FileCheck --check-prefix=LLVM --input-file=%t-cir.ll %s
|
|
// RUN: %clang_cc1 -triple aarch64-none-linux-android21 -emit-llvm %s -o %t.ll
|
|
// RUN: FileCheck --check-prefix=OGCG --input-file=%t.ll %s
|
|
|
|
char g_str[] = "1234";
|
|
|
|
// CIR: cir.global external @g_str = #cir.const_array<"1234" : !cir.array<!s8i x 4>, trailing_zeros> : !cir.array<!s8i x 5>
|
|
|
|
char g_oversized[100] = "123";
|
|
|
|
// CIR: cir.global external @g_oversized = #cir.const_array<"123" : !cir.array<!s8i x 3>, trailing_zeros> : !cir.array<!s8i x 100>
|
|
|
|
char g_exact[4] = "123";
|
|
|
|
// CIR: cir.global external @g_exact = #cir.const_array<"123" : !cir.array<!s8i x 3>, trailing_zeros> : !cir.array<!s8i x 4>
|
|
|
|
// CIR: cir.global "private" constant cir_private dso_local @[[STR1_GLOBAL:.*]] = #cir.const_array<"1" : !cir.array<!s8i x 1>, trailing_zeros> : !cir.array<!s8i x 2>
|
|
// CIR: cir.global "private" constant cir_private dso_local @[[STR2_GLOBAL:.*]] = #cir.zero : !cir.array<!s8i x 1>
|
|
// CIR: cir.global "private" constant cir_private dso_local @[[STR3_GLOBAL:.*]] = #cir.zero : !cir.array<!s8i x 2>
|
|
|
|
// LLVM: @[[STR1_GLOBAL:.*]] = private constant [2 x i8] c"1\00"
|
|
// LLVM: @[[STR2_GLOBAL:.*]] = private constant [1 x i8] zeroinitializer
|
|
// LLVM: @[[STR3_GLOBAL:.*]] = private constant [2 x i8] zeroinitializer
|
|
|
|
// OGCG: @[[STR1_GLOBAL:.*]] = private unnamed_addr constant [2 x i8] c"1\00"
|
|
// OGCG: @[[STR2_GLOBAL:.*]] = private unnamed_addr constant [1 x i8] zeroinitializer
|
|
// OGCG: @[[STR3_GLOBAL:.*]] = private unnamed_addr constant [2 x i8] zeroinitializer
|
|
|
|
char *f1() {
|
|
return "1";
|
|
}
|
|
|
|
// CIR: cir.func{{.*}} @f1()
|
|
// CIR: %[[STR:.*]] = cir.get_global @[[STR1_GLOBAL]] : !cir.ptr<!cir.array<!s8i x 2>>
|
|
|
|
// LLVM: define{{.*}} ptr @f1()
|
|
// LLVM: store ptr @[[STR1_GLOBAL]], ptr {{.*}}
|
|
|
|
// OGCG: define {{.*}}ptr @f1()
|
|
// OGCG: ret ptr @[[STR1_GLOBAL]]
|
|
|
|
char *f2() {
|
|
return "";
|
|
}
|
|
|
|
// CIR: cir.func{{.*}} @f2()
|
|
// CIR: %[[STR2:.*]] = cir.get_global @[[STR2_GLOBAL]] : !cir.ptr<!cir.array<!s8i x 1>>
|
|
|
|
// LLVM: define{{.*}} ptr @f2()
|
|
// LLVM: store ptr @[[STR2_GLOBAL]], ptr {{.*}}
|
|
|
|
// OGCG: define{{.*}} ptr @f2()
|
|
// OGCG: ret ptr @[[STR2_GLOBAL]]
|
|
|
|
char *f3() {
|
|
return "\00";
|
|
}
|
|
|
|
// CIR: cir.func{{.*}} @f3()
|
|
// CIR: %[[STR3:.*]] = cir.get_global @[[STR3_GLOBAL]] : !cir.ptr<!cir.array<!s8i x 2>>
|
|
|
|
// LLVM: define{{.*}} ptr @f3()
|
|
// LLVM: store ptr @[[STR3_GLOBAL]], ptr {{.*}}
|
|
|
|
// OGCG: define{{.*}} ptr @f3()
|
|
// OGCG: ret ptr @[[STR3_GLOBAL]]
|