Files
TheRock/compiler/amd-llvm/llvm/test/CodeGen/SPIRV/ExecutionMode.ll
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

118 lines
4.3 KiB
LLVM

; RUN: llc -O0 -mtriple=spirv32-unknown-unknown %s -o - | FileCheck %s
; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv32-unknown-unknown %s -o - -filetype=obj | spirv-val %}
; CHECK-DAG: %[[#VOID:]] = OpTypeVoid
; CHECK-DAG: OpEntryPoint Kernel %[[#WORKER:]] "worker"
; CHECK-DAG: OpEntryPoint Kernel %[[#INIT:]] "_SPIRV_GLOBAL__I_45b04794_Test_attr.cl"
; CHECK-DAG: OpEntryPoint Kernel %[[#FIN:]] "_SPIRV_GLOBAL__D_45b04794_Test_attr.cl"
; CHECK-DAG: OpExecutionMode %[[#WORKER]] LocalSize 10 10 10
; CHECK-DAG: OpExecutionMode %[[#WORKER]] LocalSizeHint 12 10 1
; CHECK-DAG: OpExecutionMode %[[#WORKER]] VecTypeHint 262149
; CHECK-DAG: OpExecutionMode %[[#WORKER]] SubgroupsPerWorkgroup 4
; CHECK-DAG: OpExecutionMode %[[#INIT]] LocalSize 1 1 1
; CHECK-DAG: OpExecutionMode %[[#INIT]] Initializer
; CHECK-DAG: OpExecutionMode %[[#FIN]] LocalSize 1 1 1
; CHECK-DAG: OpExecutionMode %[[#FIN]] Finalizer
%struct.global_ctor_dtor = type { i32 }
@g = addrspace(1) global %struct.global_ctor_dtor zeroinitializer, align 4
define internal spir_func void @__cxx_global_var_init() {
entry:
call spir_func void @_ZNU3AS416global_ctor_dtorC1Ei(ptr addrspace(4) addrspacecast (ptr addrspace(1) @g to ptr addrspace(4)), i32 12)
ret void
}
define linkonce_odr spir_func void @_ZNU3AS416global_ctor_dtorC1Ei(ptr addrspace(4) %this, i32 %i) unnamed_addr align 2 {
entry:
%this.addr = alloca ptr addrspace(4), align 4
%i.addr = alloca i32, align 4
store ptr addrspace(4) %this, ptr %this.addr, align 4
store i32 %i, ptr %i.addr, align 4
%this1 = load ptr addrspace(4), ptr %this.addr
%0 = load i32, ptr %i.addr, align 4
call spir_func void @_ZNU3AS416global_ctor_dtorC2Ei(ptr addrspace(4) %this1, i32 %0)
ret void
}
define linkonce_odr spir_func void @_ZNU3AS416global_ctor_dtorD1Ev(ptr addrspace(4) %this) unnamed_addr align 2 {
entry:
%this.addr = alloca ptr addrspace(4), align 4
store ptr addrspace(4) %this, ptr %this.addr, align 4
%this1 = load ptr addrspace(4), ptr %this.addr
call spir_func void @_ZNU3AS416global_ctor_dtorD2Ev(ptr addrspace(4) %this1)
ret void
}
define internal spir_func void @__dtor_g() {
entry:
call spir_func void @_ZNU3AS416global_ctor_dtorD1Ev(ptr addrspace(4) addrspacecast (ptr addrspace(1) @g to ptr addrspace(4)))
ret void
}
; CHECK: %[[#WORKER]] = OpFunction %[[#VOID]]
define spir_kernel void @worker() {
entry:
ret void
}
define linkonce_odr spir_func void @_ZNU3AS416global_ctor_dtorD2Ev(ptr addrspace(4) %this) unnamed_addr align 2 {
entry:
%this.addr = alloca ptr addrspace(4), align 4
store ptr addrspace(4) %this, ptr %this.addr, align 4
%this1 = load ptr addrspace(4), ptr %this.addr
%a = getelementptr inbounds %struct.global_ctor_dtor, ptr addrspace(4) %this1, i32 0, i32 0
store i32 0, ptr addrspace(4) %a, align 4
ret void
}
define linkonce_odr spir_func void @_ZNU3AS416global_ctor_dtorC2Ei(ptr addrspace(4) %this, i32 %i) unnamed_addr align 2 {
entry:
%this.addr = alloca ptr addrspace(4), align 4
%i.addr = alloca i32, align 4
store ptr addrspace(4) %this, ptr %this.addr, align 4
store i32 %i, ptr %i.addr, align 4
%this1 = load ptr addrspace(4), ptr %this.addr
%0 = load i32, ptr %i.addr, align 4
%a = getelementptr inbounds %struct.global_ctor_dtor, ptr addrspace(4) %this1, i32 0, i32 0
store i32 %0, ptr addrspace(4) %a, align 4
ret void
}
define internal spir_func void @_GLOBAL__sub_I_Test_attr.cl() {
entry:
call spir_func void @__cxx_global_var_init()
ret void
}
; CHECK: %[[#INIT]] = OpFunction %[[#VOID]]
define spir_kernel void @_SPIRV_GLOBAL__I_45b04794_Test_attr.cl() {
entry:
call spir_func void @_GLOBAL__sub_I_Test_attr.cl()
ret void
}
; CHECK: %[[#FIN]] = OpFunction %[[#VOID]]
define spir_kernel void @_SPIRV_GLOBAL__D_45b04794_Test_attr.cl() {
entry:
call spir_func void @__dtor_g()
ret void
}
!spirv.ExecutionMode = !{!0, !1, !2, !3, !4, !5, !6, !7}
!0 = !{ptr @worker, i32 30, i32 262149}
!1 = !{ptr @worker, i32 18, i32 12, i32 10, i32 1}
!2 = !{ptr @worker, i32 17, i32 10, i32 10, i32 10}
!3 = !{ptr @worker, i32 36, i32 4}
!4 = !{ptr @_SPIRV_GLOBAL__I_45b04794_Test_attr.cl, i32 33}
!5 = !{ptr @_SPIRV_GLOBAL__I_45b04794_Test_attr.cl, i32 17, i32 1, i32 1, i32 1}
!6 = !{ptr @_SPIRV_GLOBAL__D_45b04794_Test_attr.cl, i32 34}
!7 = !{ptr @_SPIRV_GLOBAL__D_45b04794_Test_attr.cl, i32 17, i32 1, i32 1, i32 1}