Files
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

126 lines
4.2 KiB
LLVM

; RUN: llc -verify-machineinstrs -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: OpName [[VECTOR_FNEG:%.+]] "vector_fneg"
; CHECK-DAG: OpName [[VECTOR_FADD:%.+]] "vector_fadd"
; CHECK-DAG: OpName [[VECTOR_FSUB:%.+]] "vector_fsub"
; CHECK-DAG: OpName [[VECTOR_FMUL:%.+]] "vector_fmul"
; CHECK-DAG: OpName [[VECTOR_FDIV:%.+]] "vector_fdiv"
; CHECK-DAG: OpName [[VECTOR_FREM:%.+]] "vector_frem"
; CHECK-DAG: OpName [[VECTOR_FMOD:%.+]] "vector_fmod"
; CHECK-NOT: DAG-FENCE
; CHECK-DAG: [[FP16:%.+]] = OpTypeFloat 16
; CHECK-DAG: [[VECTOR:%.+]] = OpTypeVector [[FP16]]
; CHECK-DAG: [[VECTOR_FN:%.+]] = OpTypeFunction [[VECTOR]] [[VECTOR]] [[VECTOR]]
; CHECK-NOT: DAG-FENCE
;; Test fneg on vector:
define <2 x half> @vector_fneg(<2 x half> %a, <2 x half> %unused) {
%c = fneg <2 x half> %a
ret <2 x half> %c
}
; CHECK: [[VECTOR_FNEG]] = OpFunction [[VECTOR]] None [[VECTOR_FN]]
; CHECK-NEXT: [[A:%.+]] = OpFunctionParameter [[VECTOR]]
; CHECK-NEXT: [[B:%.+]] = OpFunctionParameter [[VECTOR]]
; CHECK: OpLabel
; CHECK: [[C:%.+]] = OpFNegate [[VECTOR]] [[A]]
; CHECK: OpReturnValue [[C]]
; CHECK-NEXT: OpFunctionEnd
;; Test fadd on vector:
define <2 x half> @vector_fadd(<2 x half> %a, <2 x half> %b) {
%c = fadd <2 x half> %a, %b
ret <2 x half> %c
}
; CHECK: [[VECTOR_FADD]] = OpFunction [[VECTOR]] None [[VECTOR_FN]]
; CHECK-NEXT: [[A:%.+]] = OpFunctionParameter [[VECTOR]]
; CHECK-NEXT: [[B:%.+]] = OpFunctionParameter [[VECTOR]]
; CHECK: OpLabel
; CHECK: [[C:%.+]] = OpFAdd [[VECTOR]] [[A]] [[B]]
; CHECK: OpReturnValue [[C]]
; CHECK-NEXT: OpFunctionEnd
;; Test fsub on vector:
define <2 x half> @vector_fsub(<2 x half> %a, <2 x half> %b) {
%c = fsub <2 x half> %a, %b
ret <2 x half> %c
}
; CHECK: [[VECTOR_FSUB]] = OpFunction [[VECTOR]] None [[VECTOR_FN]]
; CHECK-NEXT: [[A:%.+]] = OpFunctionParameter [[VECTOR]]
; CHECK-NEXT: [[B:%.+]] = OpFunctionParameter [[VECTOR]]
; CHECK: OpLabel
; CHECK: [[C:%.+]] = OpFSub [[VECTOR]] [[A]] [[B]]
; CHECK: OpReturnValue [[C]]
; CHECK-NEXT: OpFunctionEnd
;; Test fmul on vector:
define <2 x half> @vector_fmul(<2 x half> %a, <2 x half> %b) {
%c = fmul <2 x half> %a, %b
ret <2 x half> %c
}
; CHECK: [[VECTOR_FMUL]] = OpFunction [[VECTOR]] None [[VECTOR_FN]]
; CHECK-NEXT: [[A:%.+]] = OpFunctionParameter [[VECTOR]]
; CHECK-NEXT: [[B:%.+]] = OpFunctionParameter [[VECTOR]]
; CHECK: OpLabel
; CHECK: [[C:%.+]] = OpFMul [[VECTOR]] [[A]] [[B]]
; CHECK: OpReturnValue [[C]]
; CHECK-NEXT: OpFunctionEnd
;; Test fdiv on vector:
define <2 x half> @vector_fdiv(<2 x half> %a, <2 x half> %b) {
%c = fdiv <2 x half> %a, %b
ret <2 x half> %c
}
; CHECK: [[VECTOR_FDIV]] = OpFunction [[VECTOR]] None [[VECTOR_FN]]
; CHECK-NEXT: [[A:%.+]] = OpFunctionParameter [[VECTOR]]
; CHECK-NEXT: [[B:%.+]] = OpFunctionParameter [[VECTOR]]
; CHECK: OpLabel
; CHECK: [[C:%.+]] = OpFDiv [[VECTOR]] [[A]] [[B]]
; CHECK: OpReturnValue [[C]]
; CHECK-NEXT: OpFunctionEnd
;; Test frem on vector:
define <2 x half> @vector_frem(<2 x half> %a, <2 x half> %b) {
%c = frem <2 x half> %a, %b
ret <2 x half> %c
}
; CHECK: [[VECTOR_FREM]] = OpFunction [[VECTOR]] None [[VECTOR_FN]]
; CHECK-NEXT: [[A:%.+]] = OpFunctionParameter [[VECTOR]]
; CHECK-NEXT: [[B:%.+]] = OpFunctionParameter [[VECTOR]]
; CHECK: OpLabel
; CHECK: [[C:%.+]] = OpFRem [[VECTOR]] [[A]] [[B]]
; CHECK: OpReturnValue [[C]]
; CHECK-NEXT: OpFunctionEnd
;; Test fmod on vector:
define spir_func <2 x half> @vector_fmod(<2 x half> %a, <2 x half> %b) {
%c = call spir_func <2 x half> @_Z12__spirv_FModDv2_DhS_(<2 x half> %a, <2 x half> %b)
ret <2 x half> %c
}
declare spir_func <2 x half> @_Z12__spirv_FModDv2_DhS_(<2 x half>, <2 x half>)
; CHECK: [[VECTOR_FMOD]] = OpFunction [[VECTOR]] None [[VECTOR_FN]]
; CHECK-NEXT: [[A:%.+]] = OpFunctionParameter [[VECTOR]]
; CHECK-NEXT: [[B:%.+]] = OpFunctionParameter [[VECTOR]]
; CHECK: OpLabel
; CHECK: [[C:%.+]] = OpFMod [[VECTOR]] [[A]] [[B]]
; CHECK: OpReturnValue [[C]]
; CHECK-NEXT: OpFunctionEnd