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

103 lines
4.0 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 %}
; DISABLED-CHECK-DAG: OpName [[FNEG:%.+]] "scalar_fneg"
; CHECK-DAG: OpName [[FADD:%.+]] "test_fadd"
; CHECK-DAG: OpName [[FSUB:%.+]] "test_fsub"
; CHECK-DAG: OpName [[FMUL:%.+]] "test_fmul"
; CHECK-DAG: OpName [[FDIV:%.+]] "test_fdiv"
; CHECK-DAG: OpName [[FREM:%.+]] "test_frem"
; CHECK-DAG: OpName [[FMA:%.+]] "test_fma"
; CHECK: OpDecorate [[FADD]] LinkageAttributes "test_fadd" Export
; CHECK-NEXT: OpDecorate [[FADD_RES:%.+]] FPFastMathMode NotNaN|NotInf{{$}}
; CHECK: OpDecorate [[FSUB]] LinkageAttributes "test_fsub" Export
; CHECK-NEXT: OpDecorate [[FSUB_RES:%.+]] FPFastMathMode NotNaN|NotInf|NSZ|AllowRecip|Fast{{$}}
; CHECK: OpDecorate [[FMUL]] LinkageAttributes "test_fmul" Export
; CHECK-NOT: FPFastMathMode
; CHECK: OpDecorate [[FDIV]] LinkageAttributes "test_fdiv" Export
; CHECK-NEXT: OpDecorate [[FDIV_RES:%.+]] FPFastMathMode NSZ|AllowRecip{{$}}
; CHECK: OpDecorate [[FREM]] LinkageAttributes "test_frem" Export
; CHECK-NEXT: OpDecorate [[FREM_RES:%.+]] FPFastMathMode NSZ{{$}}
; CHECK: OpDecorate [[FMA]] LinkageAttributes "test_fma" Export
; CHECK-NEXT: OpDecorate [[FMA_RES:%.+]] FPFastMathMode NotNaN|NotInf|NSZ|AllowRecip|Fast{{$}}
; CHECK: [[F32Ty:%.+]] = OpTypeFloat 32
; CHECK-DAG: [[FNTy:%.+]] = OpTypeFunction [[F32Ty]] [[F32Ty]] [[F32Ty]]
; CHECK: [[FADD]] = OpFunction [[F32Ty]] None [[FNTy]]
; CHECK-NEXT: [[A:%.+]] = OpFunctionParameter [[F32Ty]]
; CHECK-NEXT: [[B:%.+]] = OpFunctionParameter [[F32Ty]]
; CHECK-NEXT: OpLabel
; CHECK-NEXT: [[FADD_RES]] = OpFAdd [[F32Ty]] [[A]] [[B]]
; CHECK-NEXT: OpReturnValue [[FADD_RES]]
; CHECK-NEXT: OpFunctionEnd
define float @test_fadd(float %a, float %b) {
%c = fadd nnan ninf float %a, %b
ret float %c
}
; CHECK: [[FSUB]] = OpFunction [[F32Ty]] None [[FNTy]]
; CHECK-NEXT: [[A:%.+]] = OpFunctionParameter [[F32Ty]]
; CHECK-NEXT: [[B:%.+]] = OpFunctionParameter [[F32Ty]]
; CHECK-NEXT: OpLabel
; CHECK-NEXT: [[FSUB_RES]] = OpFSub [[F32Ty]] [[A]] [[B]]
; CHECK-NEXT: OpReturnValue [[FSUB_RES]]
; CHECK-NEXT: OpFunctionEnd
define float @test_fsub(float %a, float %b) {
%c = fsub fast float %a, %b
ret float %c
}
; CHECK: [[FMUL]] = OpFunction [[F32Ty]] None [[FNTy]]
; CHECK-NEXT: [[A:%.+]] = OpFunctionParameter [[F32Ty]]
; CHECK-NEXT: [[B:%.+]] = OpFunctionParameter [[F32Ty]]
; CHECK-NEXT: OpLabel
; CHECK-NEXT: [[FMUL_RES:%.+]] = OpFMul [[F32Ty]] [[A]] [[B]]
; CHECK-NEXT: OpReturnValue [[FMUL_RES]]
; CHECK-NEXT: OpFunctionEnd
define float @test_fmul(float %a, float %b) {
%c = fmul contract float %a, %b
ret float %c
}
; CHECK: [[FDIV]] = OpFunction [[F32Ty]] None [[FNTy]]
; CHECK-NEXT: [[A:%.+]] = OpFunctionParameter [[F32Ty]]
; CHECK-NEXT: [[B:%.+]] = OpFunctionParameter [[F32Ty]]
; CHECK-NEXT: OpLabel
; CHECK-NEXT: [[FDIV_RES]] = OpFDiv [[F32Ty]] [[A]] [[B]]
; CHECK-NEXT: OpReturnValue [[FDIV_RES]]
; CHECK-NEXT: OpFunctionEnd
define float @test_fdiv(float %a, float %b) {
%c = fdiv arcp nsz float %a, %b
ret float %c
}
; CHECK: [[FREM]] = OpFunction [[F32Ty]] None [[FNTy]]
; CHECK-NEXT: [[A:%.+]] = OpFunctionParameter [[F32Ty]]
; CHECK-NEXT: [[B:%.+]] = OpFunctionParameter [[F32Ty]]
; CHECK-NEXT: OpLabel
; CHECK-NEXT: [[FREM_RES]] = OpFRem [[F32Ty]] [[A]] [[B]]
; CHECK-NEXT: OpReturnValue [[FREM_RES]]
; CHECK-NEXT: OpFunctionEnd
define float @test_frem(float %a, float %b) {
%c = frem nsz float %a, %b
ret float %c
}
declare float @llvm.fma.f32(float, float, float)
; CHECK: [[FMA]] = OpFunction
; CHECK-NEXT: [[A:%.+]] = OpFunctionParameter [[F32Ty]]
; CHECK-NEXT: [[B:%.+]] = OpFunctionParameter [[F32Ty]]
; CHECK-NEXT: [[C:%.+]] = OpFunctionParameter [[F32Ty]]
; CHECK-NEXT: OpLabel
; CHECK-NEXT: [[FMA_RES]] = OpExtInst [[F32Ty]] {{%.+}} fma [[A]] [[B]] [[C]]
; CHECK-NEXT: OpReturnValue [[FMA_RES]]
; CHECK-NEXT: OpFunctionEnd
define float @test_fma(float %a, float %b, float %c) {
%r = call fast float @llvm.fma.f32(float %a, float %b, float %c)
ret float %r
}