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
47 lines
2.3 KiB
LLVM
47 lines
2.3 KiB
LLVM
; Test for SPIR-V constructor/destructor lowering pass at IR level.
|
|
; RUN: llc -mtriple=spirv64-intel-unknown --spirv-ext=+SPV_INTEL_function_pointers %s -o /dev/null -print-after=spirv-lower-ctor-dtor 2>&1 | FileCheck %s
|
|
; RUN: opt -S -passes=spirv-lower-ctor-dtor -mtriple=spirv64-intel-unknown < %s | FileCheck %s
|
|
|
|
; This test verifies that:
|
|
; 1. The init/fini kernels are created.
|
|
; 2. Symbol mangling includes function name, hash, and priority.
|
|
; 3. Array boundary globals are created.
|
|
; 4. The pass only runs when offload metadata is present.
|
|
|
|
define void @high_priority() addrspace(9) {
|
|
entry:
|
|
ret void
|
|
}
|
|
|
|
define void @low_priority() addrspace(9) {
|
|
entry:
|
|
ret void
|
|
}
|
|
|
|
@llvm.global_ctors = appending global [2 x { i32, ptr addrspace(9), ptr addrspace(9) }] [
|
|
{ i32, ptr addrspace(9), ptr addrspace(9) } { i32 100, ptr addrspace(9) @high_priority, ptr addrspace(9) null },
|
|
{ i32, ptr addrspace(9), ptr addrspace(9) } { i32 50, ptr addrspace(9) @low_priority, ptr addrspace(9) null }
|
|
]
|
|
|
|
@llvm.global_dtors = appending global [2 x { i32, ptr addrspace(9), ptr addrspace(9) }] [
|
|
{ i32, ptr addrspace(9), ptr addrspace(9) } { i32 100, ptr addrspace(9) @high_priority, ptr addrspace(9) null },
|
|
{ i32, ptr addrspace(9), ptr addrspace(9) } { i32 50, ptr addrspace(9) @low_priority, ptr addrspace(9) null }
|
|
]
|
|
|
|
; Mark this as an offload module (OpenMP target device).
|
|
!llvm.module.flags = !{!0}
|
|
!0 = !{i32 7, !"openmp-device", i32 50}
|
|
|
|
; CHECK: @__init_array_object_high_priority_{{[a-f0-9]+}}_100 = protected addrspace(1) constant ptr addrspace(9) @high_priority
|
|
; CHECK: @__init_array_object_low_priority_{{[a-f0-9]+}}_50 = protected addrspace(1) constant ptr addrspace(9) @low_priority
|
|
; CHECK: @__init_array_start = weak protected addrspace(1) global ptr null
|
|
; CHECK: @__init_array_end = weak protected addrspace(1) global ptr null
|
|
|
|
; CHECK: @__fini_array_object_high_priority_{{[a-f0-9]+}}_100 = protected addrspace(1) constant ptr addrspace(9) @high_priority
|
|
; CHECK: @__fini_array_object_low_priority_{{[a-f0-9]+}}_50 = protected addrspace(1) constant ptr addrspace(9) @low_priority
|
|
; CHECK: @__fini_array_start = weak protected addrspace(1) global ptr null
|
|
; CHECK: @__fini_array_end = weak protected addrspace(1) global ptr null
|
|
|
|
; CHECK: define weak_odr spir_kernel void @"spirv$device$init"()
|
|
; CHECK: define weak_odr spir_kernel void @"spirv$device$fini"()
|