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
68 lines
3.3 KiB
LLVM
68 lines
3.3 KiB
LLVM
; RUN: llc -verify-machineinstrs -O0 -mtriple=spirv-unknown-vulkan-compute %s -o - | FileCheck %s --match-full-lines
|
|
; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv-unknown-vulkan %s -o - -filetype=obj | spirv-val %}
|
|
|
|
; CHECK-DAG: %[[#uint:]] = OpTypeInt 32 0
|
|
; CHECK-DAG: %[[#uint64:]] = OpTypeInt 64 0
|
|
; CHECK-DAG: %[[#uint_pp:]] = OpTypePointer Private %[[#uint]]
|
|
; CHECK-DAG: %[[#uint_0:]] = OpConstant %[[#uint]] 0
|
|
; CHECK-DAG: %[[#uint_1:]] = OpConstant %[[#uint]] 1
|
|
; CHECK-DAG: %[[#uint_10:]] = OpConstant %[[#uint]] 10
|
|
; CHECK-DAG: %[[#t_array:]] = OpTypeArray %[[#uint]] %[[#uint_10]]
|
|
; CHECK-DAG: %[[#t_s1:]] = OpTypeStruct %[[#t_array]]
|
|
; CHECK-DAG: %[[#t_s2_s_a_s:]] = OpTypeStruct %[[#uint]] %[[#uint]]
|
|
; CHECK-DAG: %[[#t_s2_s_a:]] = OpTypeArray %[[#t_s2_s_a_s]] %[[#uint_10]]
|
|
; CHECK-DAG: %[[#t_s2_s:]] = OpTypeStruct %[[#t_s2_s_a]]
|
|
; CHECK-DAG: %[[#t_s2:]] = OpTypeStruct %[[#t_s2_s]] %[[#uint]]
|
|
; CHECK-DAG: %[[#null_s1:]] = OpConstantNull %[[#t_s1]]
|
|
; CHECK-DAG: %[[#null_s2:]] = OpConstantNull %[[#t_s2]]
|
|
; CHECK-DAG: %[[#ptr_s1:]] = OpTypePointer Private %[[#t_s1]]
|
|
; CHECK-DAG: %[[#ptr_s2:]] = OpTypePointer Private %[[#t_s2]]
|
|
|
|
%S1 = type { [10 x i32] }
|
|
%S2 = type { { [10 x { i32, i32 } ] }, i32 }
|
|
|
|
; CHECK-DAG: %[[#global1:]] = OpVariable %[[#ptr_s1]] Private %[[#null_s1]]
|
|
@global1 = internal addrspace(10) global %S1 zeroinitializer
|
|
; CHECK-DAG: %[[#global2:]] = OpVariable %[[#ptr_s2]] Private %[[#null_s2]]
|
|
@global2 = internal addrspace(10) global %S2 zeroinitializer
|
|
|
|
define spir_func noundef i32 @foo(i64 noundef %index) local_unnamed_addr {
|
|
; CHECK: %[[#index:]] = OpFunctionParameter %[[#uint64]]
|
|
entry:
|
|
; CHECK: %[[#ptr:]] = OpInBoundsAccessChain %[[#uint_pp]] %[[#global1]] %[[#uint_0]] %[[#index]]
|
|
%ptr = getelementptr inbounds %S1, ptr addrspace(10) @global1, i64 0, i32 0, i64 %index
|
|
; CHECK: %[[#val:]] = OpLoad %[[#uint]] %[[#ptr]]
|
|
%val = load i32, ptr addrspace(10) %ptr
|
|
ret i32 %val
|
|
}
|
|
|
|
define spir_func noundef i32 @bar(i64 noundef %index) local_unnamed_addr {
|
|
; CHECK: %[[#index:]] = OpFunctionParameter %[[#uint64]]
|
|
entry:
|
|
; CHECK: %[[#ptr:]] = OpInBoundsAccessChain %[[#uint_pp]] %[[#global2]] %[[#uint_0]] %[[#uint_0]] %[[#index]] %[[#uint_1]]
|
|
%ptr = getelementptr inbounds %S2, ptr addrspace(10) @global2, i64 0, i32 0, i32 0, i64 %index, i32 1
|
|
; CHECK: %[[#val:]] = OpLoad %[[#uint]] %[[#ptr]]
|
|
%val = load i32, ptr addrspace(10) %ptr
|
|
ret i32 %val
|
|
}
|
|
|
|
define spir_func void @foos(i64 noundef %index) local_unnamed_addr {
|
|
; CHECK: %[[#index:]] = OpFunctionParameter %[[#uint64]]
|
|
entry:
|
|
; CHECK: %[[#ptr:]] = OpInBoundsAccessChain %[[#uint_pp]] %[[#global1]] %[[#uint_0]] %[[#index]]
|
|
%ptr = getelementptr inbounds %S1, ptr addrspace(10) @global1, i64 0, i32 0, i64 %index
|
|
; CHECK: OpStore %[[#ptr]] %[[#uint_0]]
|
|
store i32 0, ptr addrspace(10) %ptr
|
|
ret void
|
|
}
|
|
|
|
define spir_func void @bars(i64 noundef %index) local_unnamed_addr {
|
|
; CHECK: %[[#index:]] = OpFunctionParameter %[[#uint64]]
|
|
entry:
|
|
; CHECK: %[[#ptr:]] = OpInBoundsAccessChain %[[#uint_pp]] %[[#global2]] %[[#uint_0]] %[[#uint_0]] %[[#index]] %[[#uint_1]]
|
|
%ptr = getelementptr inbounds %S2, ptr addrspace(10) @global2, i64 0, i32 0, i32 0, i64 %index, i32 1
|
|
; CHECK: OpStore %[[#ptr]] %[[#uint_0]]
|
|
store i32 0, ptr addrspace(10) %ptr
|
|
ret void
|
|
}
|