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
92 lines
4.6 KiB
LLVM
92 lines
4.6 KiB
LLVM
; RUN: llc -verify-machineinstrs -O0 -mtriple=spirv1.6-unknown-vulkan1.3-compute %s -o - | FileCheck %s
|
|
; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv1.6-unknown-vulkan1.3-compute %s -o - -filetype=obj | spirv-val --target-env vulkan1.3 %}
|
|
|
|
; CHECK-DAG: OpDecorate [[bool_const:%[0-9]+]] SpecId 1
|
|
; CHECK-DAG: OpDecorate [[short_const:%[0-9]+]] SpecId 2
|
|
; CHECK-DAG: OpDecorate [[int_const:%[0-9]+]] SpecId 3
|
|
; CHECK-DAG: OpDecorate [[long_const:%[0-9]+]] SpecId 4
|
|
; CHECK-DAG: OpDecorate [[float_const:%[0-9]+]] SpecId 8
|
|
; CHECK-DAG: OpDecorate [[double_const:%[0-9]+]] SpecId 9
|
|
; CHECK-DAG: OpDecorate [[enum_const:%[0-9]+]] SpecId 10
|
|
; CHECK-DAG: OpDecorate [[named_bool_const_true:%[0-9]+]] SpecId 11
|
|
; CHECK-DAG: OpDecorate [[named_bool_const_false:%[0-9]+]] SpecId 12
|
|
|
|
; CHECK-DAG: [[bool_const]] = OpSpecConstantTrue {{%[0-9]+}}
|
|
; CHECK-DAG: [[short_const]] = OpSpecConstant {{%[0-9]+}} 4
|
|
; CHECK-DAG: [[int_const]] = OpSpecConstant {{%[0-9]+}} 5
|
|
; CHECK-DAG: [[long_const]] = OpSpecConstant {{%[0-9]+}} 8
|
|
; CHECK-DAG: [[float_const]] = OpSpecConstant {{%[0-9]+}} 1112014848
|
|
; CHECK-DAG: [[double_const]] = OpSpecConstant {{%[0-9]+}} 0 1079574528
|
|
; CHECK-DAG: [[enum_const]] = OpSpecConstant {{%[0-9]+}} 30
|
|
; CHECK-DAG: [[named_bool_const_true:%[0-9]+]] = OpSpecConstantTrue {{%[0-9]+}}
|
|
; CHECK-DAG: [[named_bool_const_false:%[0-9]+]] = OpSpecConstantFalse {{%[0-9]+}}
|
|
|
|
@_ZL10bool_const = internal addrspace(10) global i32 0, align 4
|
|
@_ZL11short_const = internal addrspace(10) global i16 0, align 2
|
|
@_ZL9int_const = internal addrspace(10) global i32 0, align 4
|
|
@_ZL10long_const = internal addrspace(10) global i64 0, align 8
|
|
@_ZL11float_const = internal addrspace(10) global float 0.000000e+00, align 4
|
|
@_ZL12double_const = internal addrspace(10) global double 0.000000e+00, align 8
|
|
@_ZL10enum_const = internal addrspace(10) global i32 0, align 4
|
|
|
|
; Function Attrs: mustprogress nofree noinline norecurse nosync nounwind willreturn memory(readwrite, argmem: none, inaccessiblemem: none)
|
|
define void @main() local_unnamed_addr #0 {
|
|
entry:
|
|
; CHECK: [[b:%[0-9]+]] = OpSelect {{%[0-9]+}} [[bool_const]]
|
|
; CHECK: OpStore {{%[0-9]+}} [[b]]
|
|
%0 = tail call spir_func i1 @_Z20__spirv_SpecConstantib(i32 1, i1 true)
|
|
%storedv.i.i = zext i1 %0 to i32
|
|
store i32 %storedv.i.i, ptr addrspace(10) @_ZL10bool_const, align 4
|
|
|
|
; CHECK: OpStore {{%[0-9]+}} [[short_const]]
|
|
%2 = tail call spir_func i16 @_Z20__spirv_SpecConstantis(i32 2, i16 4)
|
|
store i16 %2, ptr addrspace(10) @_ZL11short_const, align 2
|
|
|
|
; CHECK: OpStore {{%[0-9]+}} [[int_const]]
|
|
%4 = tail call spir_func i32 @_Z20__spirv_SpecConstantii(i32 3, i32 5)
|
|
store i32 %4, ptr addrspace(10) @_ZL9int_const, align 4
|
|
|
|
|
|
; CHECK: OpStore {{%[0-9]+}} [[long_const]]
|
|
%6 = tail call spir_func i64 @_Z20__spirv_SpecConstantix(i32 4, i64 8)
|
|
store i64 %6, ptr addrspace(10) @_ZL10long_const, align 8
|
|
|
|
; CHECK: OpStore {{%[0-9]+}} [[float_const]]
|
|
%14 = tail call reassoc nnan ninf nsz arcp afn spir_func float @_Z20__spirv_SpecConstantif(i32 8, float 5.000000e+01)
|
|
store float %14, ptr addrspace(10) @_ZL11float_const, align 4
|
|
|
|
; CHECK: OpStore {{%[0-9]+}} [[double_const]]
|
|
%16 = tail call reassoc nnan ninf nsz arcp afn spir_func double @_Z20__spirv_SpecConstantid(i32 9, double 1.000000e+02)
|
|
store double %16, ptr addrspace(10) @_ZL12double_const, align 8
|
|
|
|
; CHECK: OpStore {{%[0-9]+}} [[enum_const]]
|
|
%18 = tail call spir_func i32 @_Z20__spirv_SpecConstantii(i32 10, i32 30)
|
|
store i32 %18, ptr addrspace(10) @_ZL10enum_const, align 4
|
|
|
|
; CHECK: [[bt:%[0-9]+]] = OpSelect {{%[0-9]+}} [[named_bool_const_true]]
|
|
; CHECK: OpStore {{%[0-9]+}} [[bt]]
|
|
%19 = tail call spir_func i1 @llvm.spv.named.boolean.spec.constant(i32 11, i1 true, metadata !{})
|
|
%zext_0 = zext i1 %19 to i32
|
|
store i32 %zext_0, ptr addrspace(10) @_ZL10bool_const, align 4
|
|
|
|
; CHECK: [[bf:%[0-9]+]] = OpSelect {{%[0-9]+}} [[named_bool_const_false]]
|
|
; CHECK: OpStore {{%[0-9]+}} [[bf]]
|
|
%20 = tail call spir_func i1 @llvm.spv.named.boolean.spec.constant(i32 12, i1 false, metadata !{})
|
|
%zext_1 = zext i1 %20 to i32
|
|
store i32 %zext_1, ptr addrspace(10) @_ZL10bool_const, align 4
|
|
ret void
|
|
}
|
|
|
|
|
|
declare i1 @_Z20__spirv_SpecConstantib(i32, i1)
|
|
declare i8 @_Z20__spirv_SpecConstantia(i32, i8)
|
|
declare i16 @_Z20__spirv_SpecConstantis(i32, i16)
|
|
declare i32 @_Z20__spirv_SpecConstantii(i32, i32)
|
|
declare i64 @_Z20__spirv_SpecConstantix(i32, i64)
|
|
declare float @_Z20__spirv_SpecConstantif(i32, float)
|
|
declare double @_Z20__spirv_SpecConstantid(i32, double)
|
|
declare i1 @llvm.spv.named.boolean.spec.constant(i32, i1, metadata)
|
|
|
|
attributes #0 = { "hlsl.numthreads"="1,1,1" "hlsl.shader"="compute" }
|
|
|
|
!0 = !{ !"" } |