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
70 lines
2.9 KiB
LLVM
70 lines
2.9 KiB
LLVM
; RUN: opt -S -dxil-op-lower < %s | FileCheck %s
|
|
|
|
; Make sure dxil operation function calls for round are generated for float and half.
|
|
; CHECK:call half @dx.op.tertiary.f16(i32 46, half %{{.*}}, half %{{.*}}, half %{{.*}})
|
|
; CHECK:call float @dx.op.tertiary.f32(i32 46, float %{{.*}}, float %{{.*}}, float %{{.*}})
|
|
; CHECK:call double @dx.op.tertiary.f64(i32 46, double %{{.*}}, double %{{.*}}, double %{{.*}})
|
|
|
|
; CHECK: declare half @dx.op.tertiary.f16(i32, half, half, half) #[[#ATTR0:]]
|
|
; CHECK: attributes #[[#ATTR0]] = { nounwind memory(none) }
|
|
|
|
target datalayout = "e-m:e-p:32:32-i1:32-i8:8-i16:16-i32:32-i64:64-f16:16-f32:32-f64:64-n8:16:32:64"
|
|
target triple = "dxil-pc-shadermodel6.7-library"
|
|
|
|
; Function Attrs: noinline nounwind optnone
|
|
define noundef half @fmad_half(half noundef %p0, half noundef %p1, half noundef %p2) #0 {
|
|
entry:
|
|
%p2.addr = alloca half, align 2
|
|
%p1.addr = alloca half, align 2
|
|
%p0.addr = alloca half, align 2
|
|
store half %p2, ptr %p2.addr, align 2
|
|
store half %p1, ptr %p1.addr, align 2
|
|
store half %p0, ptr %p0.addr, align 2
|
|
%0 = load half, ptr %p0.addr, align 2
|
|
%1 = load half, ptr %p1.addr, align 2
|
|
%2 = load half, ptr %p2.addr, align 2
|
|
%hlsl.fmad = call half @llvm.fmuladd.f16(half %0, half %1, half %2)
|
|
ret half %hlsl.fmad
|
|
}
|
|
|
|
; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
|
|
declare half @llvm.fmuladd.f16(half, half, half) #2
|
|
|
|
; Function Attrs: noinline nounwind optnone
|
|
define noundef float @fmad_float(float noundef %p0, float noundef %p1, float noundef %p2) #0 {
|
|
entry:
|
|
%p2.addr = alloca float, align 4
|
|
%p1.addr = alloca float, align 4
|
|
%p0.addr = alloca float, align 4
|
|
store float %p2, ptr %p2.addr, align 4
|
|
store float %p1, ptr %p1.addr, align 4
|
|
store float %p0, ptr %p0.addr, align 4
|
|
%0 = load float, ptr %p0.addr, align 4
|
|
%1 = load float, ptr %p1.addr, align 4
|
|
%2 = load float, ptr %p2.addr, align 4
|
|
%hlsl.fmad = call float @llvm.fmuladd.f32(float %0, float %1, float %2)
|
|
ret float %hlsl.fmad
|
|
}
|
|
|
|
; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
|
|
declare float @llvm.fmuladd.f32(float, float, float) #2
|
|
|
|
; Function Attrs: noinline nounwind optnone
|
|
define noundef double @fmad_double(double noundef %p0, double noundef %p1, double noundef %p2) #0 {
|
|
entry:
|
|
%p2.addr = alloca double, align 8
|
|
%p1.addr = alloca double, align 8
|
|
%p0.addr = alloca double, align 8
|
|
store double %p2, ptr %p2.addr, align 8
|
|
store double %p1, ptr %p1.addr, align 8
|
|
store double %p0, ptr %p0.addr, align 8
|
|
%0 = load double, ptr %p0.addr, align 8
|
|
%1 = load double, ptr %p1.addr, align 8
|
|
%2 = load double, ptr %p2.addr, align 8
|
|
%hlsl.fmad = call double @llvm.fmuladd.f64(double %0, double %1, double %2)
|
|
ret double %hlsl.fmad
|
|
}
|
|
|
|
; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
|
|
declare double @llvm.fmuladd.f64(double, double, double) #2
|