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
188 lines
8.1 KiB
LLVM
188 lines
8.1 KiB
LLVM
; RUN: llc -O0 -verify-machineinstrs -mtriple=spirv-unknown-vulkan %s -o - | FileCheck %s --check-prefixes=CHECK,CHECK-HLSL
|
|
; RUN: llc -O0 -verify-machineinstrs -mtriple=spirv32-unknown-unknown %s -o - | FileCheck %s --check-prefixes=CHECK,CHECK-OCL
|
|
; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv-unknown-vulkan %s -o - -filetype=obj | spirv-val %}
|
|
; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv32-unknown-unknown %s -o - -filetype=obj | spirv-val %}
|
|
; Make sure spirv operation function calls for all are generated.
|
|
|
|
; CHECK-HLSL-DAG: OpMemoryModel Logical GLSL450
|
|
; CHECK-OCL-DAG: OpMemoryModel Physical32 OpenCL
|
|
; CHECK-DAG: OpName %[[#all_bool_arg:]] "a"
|
|
; CHECK-DAG: %[[#int_64:]] = OpTypeInt 64 0
|
|
; CHECK-DAG: %[[#bool:]] = OpTypeBool
|
|
; CHECK-DAG: %[[#int_32:]] = OpTypeInt 32 0
|
|
; CHECK-DAG: %[[#int_16:]] = OpTypeInt 16 0
|
|
; CHECK-DAG: %[[#float_64:]] = OpTypeFloat 64
|
|
; CHECK-DAG: %[[#float_32:]] = OpTypeFloat 32
|
|
; CHECK-DAG: %[[#float_16:]] = OpTypeFloat 16
|
|
; CHECK-DAG: %[[#vec4_bool:]] = OpTypeVector %[[#bool]] 4
|
|
; CHECK-DAG: %[[#vec4_16:]] = OpTypeVector %[[#int_16]] 4
|
|
; CHECK-DAG: %[[#vec4_32:]] = OpTypeVector %[[#int_32]] 4
|
|
; CHECK-DAG: %[[#vec4_64:]] = OpTypeVector %[[#int_64]] 4
|
|
; CHECK-DAG: %[[#vec4_float_16:]] = OpTypeVector %[[#float_16]] 4
|
|
; CHECK-DAG: %[[#vec4_float_32:]] = OpTypeVector %[[#float_32]] 4
|
|
; CHECK-DAG: %[[#vec4_float_64:]] = OpTypeVector %[[#float_64]] 4
|
|
|
|
; CHECK-HLSL-DAG: %[[#const_i64_0:]] = OpConstant %[[#int_64]] 0
|
|
; CHECK-HLSL-DAG: %[[#const_i32_0:]] = OpConstant %[[#int_32]] 0
|
|
; CHECK-HLSL-DAG: %[[#const_i16_0:]] = OpConstant %[[#int_16]] 0
|
|
; CHECK-HLSL-DAG: %[[#const_f64_0:]] = OpConstant %[[#float_64]] 0
|
|
; CHECK-HLSL-DAG: %[[#const_f32_0:]] = OpConstant %[[#float_32]] 0
|
|
; CHECK-HLSL-DAG: %[[#const_f16_0:]] = OpConstant %[[#float_16]] 0
|
|
; CHECK-HLSL-DAG: %[[#vec4_const_zeros_i16:]] = OpConstantComposite %[[#vec4_16]] %[[#const_i16_0]] %[[#const_i16_0]] %[[#const_i16_0]] %[[#const_i16_0]]
|
|
; CHECK-HLSL-DAG: %[[#vec4_const_zeros_i32:]] = OpConstantComposite %[[#vec4_32]] %[[#const_i32_0]] %[[#const_i32_0]] %[[#const_i32_0]] %[[#const_i32_0]]
|
|
; CHECK-HLSL-DAG: %[[#vec4_const_zeros_i64:]] = OpConstantComposite %[[#vec4_64]] %[[#const_i64_0]] %[[#const_i64_0]] %[[#const_i64_0]] %[[#const_i64_0]]
|
|
; CHECK-HLSL-DAG: %[[#vec4_const_zeros_f16:]] = OpConstantComposite %[[#vec4_float_16]] %[[#const_f16_0]] %[[#const_f16_0]] %[[#const_f16_0]] %[[#const_f16_0]]
|
|
; CHECK-HLSL-DAG: %[[#vec4_const_zeros_f32:]] = OpConstantComposite %[[#vec4_float_32]] %[[#const_f32_0]] %[[#const_f32_0]] %[[#const_f32_0]] %[[#const_f32_0]]
|
|
; CHECK-HLSL-DAG: %[[#vec4_const_zeros_f64:]] = OpConstantComposite %[[#vec4_float_64]] %[[#const_f64_0]] %[[#const_f64_0]] %[[#const_f64_0]] %[[#const_f64_0]]
|
|
|
|
; CHECK-OCL-DAG: %[[#const_i64_0:]] = OpConstantNull %[[#int_64]]
|
|
; CHECK-OCL-DAG: %[[#const_i32_0:]] = OpConstantNull %[[#int_32]]
|
|
; CHECK-OCL-DAG: %[[#const_i16_0:]] = OpConstantNull %[[#int_16]]
|
|
; CHECK-OCL-DAG: %[[#const_f64_0:]] = OpConstantNull %[[#float_64]]
|
|
; CHECK-OCL-DAG: %[[#const_f32_0:]] = OpConstantNull %[[#float_32]]
|
|
; CHECK-OCL-DAG: %[[#const_f16_0:]] = OpConstantNull %[[#float_16]]
|
|
; CHECK-OCL-DAG: %[[#vec4_const_zeros_i16:]] = OpConstantNull %[[#vec4_16]]
|
|
; CHECK-OCL-DAG: %[[#vec4_const_zeros_i32:]] = OpConstantNull %[[#vec4_32]]
|
|
; CHECK-OCL-DAG: %[[#vec4_const_zeros_i64:]] = OpConstantNull %[[#vec4_64]]
|
|
; CHECK-OCL-DAG: %[[#vec4_const_zeros_f16:]] = OpConstantNull %[[#vec4_float_16]]
|
|
; CHECK-OCL-DAG: %[[#vec4_const_zeros_f32:]] = OpConstantNull %[[#vec4_float_32]]
|
|
; CHECK-OCL-DAG: %[[#vec4_const_zeros_f64:]] = OpConstantNull %[[#vec4_float_64]]
|
|
|
|
define noundef i1 @all_int64_t(i64 noundef %p0) {
|
|
entry:
|
|
; CHECK: %[[#arg0:]] = OpFunctionParameter %[[#]]
|
|
; CHECK: %[[#]] = OpINotEqual %[[#bool]] %[[#arg0]] %[[#const_i64_0]]
|
|
%hlsl.all = call i1 @llvm.spv.all.i64(i64 %p0)
|
|
ret i1 %hlsl.all
|
|
}
|
|
|
|
|
|
define noundef i1 @all_int(i32 noundef %p0) {
|
|
entry:
|
|
; CHECK: %[[#arg0:]] = OpFunctionParameter %[[#]]
|
|
; CHECK: %[[#]] = OpINotEqual %[[#bool]] %[[#arg0]] %[[#const_i32_0]]
|
|
%hlsl.all = call i1 @llvm.spv.all.i32(i32 %p0)
|
|
ret i1 %hlsl.all
|
|
}
|
|
|
|
|
|
define noundef i1 @all_int16_t(i16 noundef %p0) {
|
|
entry:
|
|
; CHECK: %[[#arg0:]] = OpFunctionParameter %[[#]]
|
|
; CHECK: %[[#]] = OpINotEqual %[[#bool]] %[[#arg0]] %[[#const_i16_0]]
|
|
%hlsl.all = call i1 @llvm.spv.all.i16(i16 %p0)
|
|
ret i1 %hlsl.all
|
|
}
|
|
|
|
define noundef i1 @all_double(double noundef %p0) {
|
|
entry:
|
|
; CHECK: %[[#arg0:]] = OpFunctionParameter %[[#]]
|
|
; CHECK: %[[#]] = OpFOrdNotEqual %[[#bool]] %[[#arg0]] %[[#const_f64_0]]
|
|
%hlsl.all = call i1 @llvm.spv.all.f64(double %p0)
|
|
ret i1 %hlsl.all
|
|
}
|
|
|
|
|
|
define noundef i1 @all_float(float noundef %p0) {
|
|
entry:
|
|
; CHECK: %[[#arg0:]] = OpFunctionParameter %[[#]]
|
|
; CHECK: %[[#]] = OpFOrdNotEqual %[[#bool]] %[[#arg0]] %[[#const_f32_0]]
|
|
%hlsl.all = call i1 @llvm.spv.all.f32(float %p0)
|
|
ret i1 %hlsl.all
|
|
}
|
|
|
|
|
|
define noundef i1 @all_half(half noundef %p0) {
|
|
entry:
|
|
; CHECK: %[[#arg0:]] = OpFunctionParameter %[[#]]
|
|
; CHECK: %[[#]] = OpFOrdNotEqual %[[#bool]] %[[#arg0]] %[[#const_f16_0]]
|
|
%hlsl.all = call i1 @llvm.spv.all.f16(half %p0)
|
|
ret i1 %hlsl.all
|
|
}
|
|
|
|
|
|
define noundef i1 @all_bool4(<4 x i1> noundef %p0) {
|
|
entry:
|
|
; CHECK: %[[#arg0:]] = OpFunctionParameter %[[#vec4_bool]]
|
|
; CHECK: %[[#]] = OpAll %[[#bool]] %[[#arg0]]
|
|
%hlsl.all = call i1 @llvm.spv.all.v4i1(<4 x i1> %p0)
|
|
ret i1 %hlsl.all
|
|
}
|
|
|
|
define noundef i1 @all_short4(<4 x i16> noundef %p0) {
|
|
entry:
|
|
; CHECK: %[[#arg0:]] = OpFunctionParameter %[[#]]
|
|
; CHECK: %[[#shortVecNotEq:]] = OpINotEqual %[[#vec4_bool]] %[[#arg0]] %[[#vec4_const_zeros_i16]]
|
|
; CHECK: %[[#]] = OpAll %[[#bool]] %[[#shortVecNotEq]]
|
|
%hlsl.all = call i1 @llvm.spv.all.v4i16(<4 x i16> %p0)
|
|
ret i1 %hlsl.all
|
|
}
|
|
|
|
define noundef i1 @all_int4(<4 x i32> noundef %p0) {
|
|
entry:
|
|
; CHECK: %[[#arg0:]] = OpFunctionParameter %[[#]]
|
|
; CHECK: %[[#i32VecNotEq:]] = OpINotEqual %[[#vec4_bool]] %[[#arg0]] %[[#vec4_const_zeros_i32]]
|
|
; CHECK: %[[#]] = OpAll %[[#bool]] %[[#i32VecNotEq]]
|
|
%hlsl.all = call i1 @llvm.spv.all.v4i32(<4 x i32> %p0)
|
|
ret i1 %hlsl.all
|
|
}
|
|
|
|
define noundef i1 @all_int64_t4(<4 x i64> noundef %p0) {
|
|
entry:
|
|
; CHECK: %[[#arg0:]] = OpFunctionParameter %[[#]]
|
|
; CHECK: %[[#i64VecNotEq:]] = OpINotEqual %[[#vec4_bool]] %[[#arg0]] %[[#vec4_const_zeros_i64]]
|
|
; CHECK: %[[#]] = OpAll %[[#bool]] %[[#i64VecNotEq]]
|
|
%hlsl.all = call i1 @llvm.spv.all.v4i64(<4 x i64> %p0)
|
|
ret i1 %hlsl.all
|
|
}
|
|
|
|
define noundef i1 @all_half4(<4 x half> noundef %p0) {
|
|
entry:
|
|
; CHECK: %[[#arg0:]] = OpFunctionParameter %[[#]]
|
|
; CHECK: %[[#f16VecNotEq:]] = OpFOrdNotEqual %[[#vec4_bool]] %[[#arg0]] %[[#vec4_const_zeros_f16]]
|
|
; CHECK: %[[#]] = OpAll %[[#bool]] %[[#f16VecNotEq]]
|
|
%hlsl.all = call i1 @llvm.spv.all.v4f16(<4 x half> %p0)
|
|
ret i1 %hlsl.all
|
|
}
|
|
|
|
define noundef i1 @all_float4(<4 x float> noundef %p0) {
|
|
entry:
|
|
; CHECK: %[[#arg0:]] = OpFunctionParameter %[[#]]
|
|
; CHECK: %[[#f32VecNotEq:]] = OpFOrdNotEqual %[[#vec4_bool]] %[[#arg0]] %[[#vec4_const_zeros_f32]]
|
|
; CHECK: %[[#]] = OpAll %[[#bool]] %[[#f32VecNotEq]]
|
|
%hlsl.all = call i1 @llvm.spv.all.v4f32(<4 x float> %p0)
|
|
ret i1 %hlsl.all
|
|
}
|
|
|
|
define noundef i1 @all_double4(<4 x double> noundef %p0) {
|
|
entry:
|
|
; CHECK: %[[#arg0:]] = OpFunctionParameter %[[#]]
|
|
; CHECK: %[[#f64VecNotEq:]] = OpFOrdNotEqual %[[#vec4_bool]] %[[#arg0]] %[[#vec4_const_zeros_f64]]
|
|
; CHECK: %[[#]] = OpAll %[[#bool]] %[[#f64VecNotEq]]
|
|
%hlsl.all = call i1 @llvm.spv.all.v4f64(<4 x double> %p0)
|
|
ret i1 %hlsl.all
|
|
}
|
|
|
|
define noundef i1 @all_bool(i1 noundef %a) {
|
|
entry:
|
|
; CHECK: %[[#all_bool_arg:]] = OpFunctionParameter %[[#bool]]
|
|
; CHECK: OpReturnValue %[[#all_bool_arg]]
|
|
%hlsl.all = call i1 @llvm.spv.all.i1(i1 %a)
|
|
ret i1 %hlsl.all
|
|
}
|
|
|
|
declare i1 @llvm.spv.all.v4f16(<4 x half>)
|
|
declare i1 @llvm.spv.all.v4f32(<4 x float>)
|
|
declare i1 @llvm.spv.all.v4f64(<4 x double>)
|
|
declare i1 @llvm.spv.all.v4i1(<4 x i1>)
|
|
declare i1 @llvm.spv.all.v4i16(<4 x i16>)
|
|
declare i1 @llvm.spv.all.v4i32(<4 x i32>)
|
|
declare i1 @llvm.spv.all.v4i64(<4 x i64>)
|
|
declare i1 @llvm.spv.all.i1(i1)
|
|
declare i1 @llvm.spv.all.i16(i16)
|
|
declare i1 @llvm.spv.all.i32(i32)
|
|
declare i1 @llvm.spv.all.i64(i64)
|
|
declare i1 @llvm.spv.all.f16(half)
|
|
declare i1 @llvm.spv.all.f32(float)
|
|
declare i1 @llvm.spv.all.f64(double)
|