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
95 lines
3.4 KiB
LLVM
95 lines
3.4 KiB
LLVM
; RUN: llc -verify-machineinstrs -O0 -mtriple=spirv32-unknown-unknown %s -o - | FileCheck %s
|
|
; RUN: llc -verify-machineinstrs -O0 -mtriple=spirv64-unknown-unknown %s -o - | FileCheck %s
|
|
; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv32-unknown-unknown %s -o - -filetype=obj | spirv-val %}
|
|
; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv64-unknown-unknown %s -o - -filetype=obj | spirv-val %}
|
|
|
|
; CHECK-DAG: OpName [[FOOBAR:%.+]] "foobar"
|
|
; CHECK-DAG: OpName [[PRODUCER:%.+]] "producer"
|
|
; CHECK-DAG: OpName [[CONSUMER:%.+]] "consumer"
|
|
; CHECK-DAG: OpName [[SNEAKY:%.+]] "sneaky"
|
|
; CHECK-DAG: OpName [[ARR_RET:%.+]] "arr_ret"
|
|
|
|
; CHECK-NOT: DAG-FENCE
|
|
|
|
%ty1 = type {i16, i32}
|
|
%ty2 = type {%ty1, i64}
|
|
%ty3 = type {ptr addrspace(4), ptr addrspace(4), [8 x i8]}
|
|
|
|
; CHECK-DAG: [[I16:%.+]] = OpTypeInt 16
|
|
; CHECK-DAG: [[I32:%.+]] = OpTypeInt 32
|
|
; CHECK-DAG: [[I64:%.+]] = OpTypeInt 64
|
|
; CHECK-DAG: [[TY1:%.+]] = OpTypeStruct [[I16]] [[I32]]
|
|
; CHECK-DAG: [[TY2:%.+]] = OpTypeStruct [[TY1]] [[I64]]
|
|
; CHECK-DAG: [[UNDEF_I16:%.+]] = OpUndef [[I16]]
|
|
; CHECK-DAG: [[UNDEF_I64:%.+]] = OpUndef [[I64]]
|
|
; CHECK-DAG: [[UNDEF_TY2:%.+]] = OpUndef [[TY2]]
|
|
; CHECK-DAG: [[CST_42:%.+]] = OpConstant [[I32]] 42
|
|
; CHECK-DAG: [[I8:%.+]] = OpTypeInt 8 0
|
|
; CHECK-DAG: [[PTR:%.+]] = OpTypePointer Generic [[I8]]
|
|
; CHECK-DAG: [[CST_8:%.+]] = OpConstant [[I32]] 8
|
|
; CHECK-DAG: [[ARR:%.+]] = OpTypeArray [[I8]] [[CST_8]]
|
|
; CHECK-DAG: [[TY3:%.+]] = OpTypeStruct [[PTR]] [[PTR]] [[ARR]]
|
|
; CHECK-DAG: [[PTR_ARR:%.+]] = OpTypePointer Generic [[ARR]]
|
|
|
|
; CHECK-NOT: DAG-FENCE
|
|
|
|
define i32 @foobar() {
|
|
%agg = call %ty2 @producer(i16 undef, i32 42, i64 undef)
|
|
%ret = call i32 @consumer(%ty2 %agg)
|
|
ret i32 %ret
|
|
}
|
|
|
|
; CHECK: [[FOOBAR]] = OpFunction
|
|
; CHECK: [[AGG:%.+]] = OpFunctionCall [[TY2]] [[PRODUCER]] [[UNDEF_I16]] [[CST_42]] [[UNDEF_I64]]
|
|
; CHECK: [[RET:%.+]] = OpFunctionCall [[I32]] [[CONSUMER]] [[AGG]]
|
|
; CHECK: OpReturnValue [[RET]]
|
|
; CHECK: OpFunctionEnd
|
|
|
|
|
|
define %ty2 @producer(i16 %a, i32 %b, i64 %c) {
|
|
%agg1 = insertvalue %ty2 undef, i16 %a, 0, 0
|
|
%agg2 = insertvalue %ty2 %agg1, i32 %b, 0, 1
|
|
%agg3 = insertvalue %ty2 %agg2, i64 %c, 1
|
|
ret %ty2 %agg3
|
|
}
|
|
|
|
; CHECK: [[PRODUCER]] = OpFunction
|
|
; CHECK: [[A:%.+]] = OpFunctionParameter [[I16]]
|
|
; CHECK: [[B:%.+]] = OpFunctionParameter [[I32]]
|
|
; CHECK: [[C:%.+]] = OpFunctionParameter [[I64]]
|
|
; CHECK: [[AGG1:%.+]] = OpCompositeInsert [[TY2]] [[A]] [[UNDEF_TY2]] 0 0
|
|
; CHECK: [[AGG2:%.+]] = OpCompositeInsert [[TY2]] [[B]] [[AGG1]] 0 1
|
|
; CHECK: [[AGG3:%.+]] = OpCompositeInsert [[TY2]] [[C]] [[AGG2]] 1
|
|
; CHECK: OpReturnValue [[AGG3]]
|
|
; CHECK: OpFunctionEnd
|
|
|
|
|
|
define i32 @consumer(%ty2 %agg) {
|
|
%ret = extractvalue %ty2 %agg, 0, 1
|
|
ret i32 %ret
|
|
}
|
|
|
|
; CHECK: [[CONSUMER]] = OpFunction
|
|
; CHECK: [[AGG:%.+]] = OpFunctionParameter [[TY2]]
|
|
; CHECK: [[RET:%.+]] = OpCompositeExtract [[I32]] [[AGG]] 0 1
|
|
; CHECK: OpReturnValue [[RET]]
|
|
; CHECK: OpFunctionEnd
|
|
|
|
declare %ty3 @arr_ret()
|
|
|
|
define void @sneaky(ptr addrspace(4) %p, [8 x i8] %a) {
|
|
%1 = call spir_func %ty3 @arr_ret()
|
|
%2 = getelementptr inbounds nuw %ty3, ptr addrspace(4) %p, i32 0, i32 2
|
|
%3 = extractvalue %ty3 %1, 2
|
|
store [8 x i8] %3, ptr addrspace(4) %2, align 8
|
|
ret void
|
|
}
|
|
|
|
; CHECK: [[SNEAKY]] = OpFunction
|
|
; CHECK: [[PTR_AGG:%.+]] = OpFunctionParameter
|
|
; CHECK: [[A:%.+]] = OpFunctionParameter [[ARR]]
|
|
; CHECK: [[AGG_RET:%.+]] = OpFunctionCall [[TY3]]
|
|
; CHECK: [[GEP:%.+]] = OpInBoundsPtrAccessChain [[PTR_ARR]] [[PTR_AGG]]
|
|
; CHECK: [[EXTRACTV:%.+]] = OpCompositeExtract [[ARR]] [[AGG_RET]] 2
|
|
; CHECK: OpStore [[GEP]] [[EXTRACTV]]
|