Files
TheRock/compiler/amd-llvm/clang/test/OpenMP/align_clause_global_codegen.cpp
T
derek.holloway 7502bf64a4
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
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

62 lines
1.9 KiB
C++

// RUN: %clang_cc1 -emit-llvm -o - -fopenmp \
// RUN: -triple i386-unknown-unknown %s \
// RUN: | FileCheck %s --check-prefixes=CHECK,CHECK-32
// RUN: %clang_cc1 -emit-llvm -o - -fopenmp \
// RUN: -triple x86_64-unknown-linux-gnu %s \
// RUN: | FileCheck %s --check-prefixes=CHECK,CHECK-64
typedef enum omp_allocator_handle_t {
omp_null_allocator = 0,
omp_default_mem_alloc = 1,
omp_large_cap_mem_alloc = 2,
omp_const_mem_alloc = 3,
omp_high_bw_mem_alloc = 4,
omp_low_lat_mem_alloc = 5,
omp_cgroup_mem_alloc = 6,
omp_pteam_mem_alloc = 7,
omp_thread_mem_alloc = 8,
KMP_ALLOCATOR_MAX_HANDLE = __UINTPTR_MAX__
} omp_allocator_handle_t;
//
// Should allow larger alignment.
//
// CHECK: @foo_global1 = global float 0.000000e+00, align 16
float foo_global1;
#pragma omp allocate(foo_global1) align(16)
// CHECK: @foo_global2 = global float 0.000000e+00, align 16
float foo_global2;
#pragma omp allocate(foo_global2) allocator(omp_default_mem_alloc) align(16)
// CHECK: @foo_global3 = global float 0.000000e+00, align 16
float foo_global3;
#pragma omp allocate(foo_global3) allocator(omp_large_cap_mem_alloc) align(16)
// CHECK: @foop_global1 = global ptr null, align 16
int *foop_global1;
#pragma omp allocate(foop_global1) align(16)
//
// Should use natural alignment when alignment specified is too small.
//
// CHECK: @foo_global4 = global float 0.000000e+00, align 4
float foo_global4;
#pragma omp allocate(foo_global4) align(2)
// CHECK: @foo_global5 = global float 0.000000e+00, align 4
float foo_global5;
#pragma omp allocate(foo_global5) allocator(omp_default_mem_alloc) align(2)
// CHECK: @foo_global6 = global float 0.000000e+00, align 4
float foo_global6;
#pragma omp allocate(foo_global6) allocator(omp_large_cap_mem_alloc) align(2)
// CHECK-32: @foop_global2 = global ptr null, align 4
// CHECK-64: @foop_global2 = global ptr null, align 8
int *foop_global2;
#pragma omp allocate(foop_global2) align(2)