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
64 lines
2.2 KiB
LLVM
64 lines
2.2 KiB
LLVM
; RUN: opt -S -dxil-op-lower %s | FileCheck %s
|
|
|
|
target triple = "dxil-pc-shadermodel6.6-compute"
|
|
|
|
declare void @f32_user(float)
|
|
declare void @f64_user(double)
|
|
declare void @f16_user(half)
|
|
|
|
; CHECK-LABEL: define void @loadf32
|
|
define void @loadf32() {
|
|
%buffer = call target("dx.CBuffer", <{ float }>)
|
|
@llvm.dx.resource.handlefrombinding(i32 0, i32 0, i32 1, i32 0, ptr null)
|
|
|
|
; CHECK: [[DATA:%.*]] = call %dx.types.CBufRet.f32 @dx.op.cbufferLoadLegacy.f32(i32 59, %dx.types.Handle %{{.*}}, i32 0)
|
|
%load = call {float, float, float, float} @llvm.dx.resource.load.cbufferrow.4(
|
|
target("dx.CBuffer", <{ float }>) %buffer,
|
|
i32 0)
|
|
%data = extractvalue {float, float, float, float} %load, 0
|
|
|
|
; CHECK: [[VAL:%.*]] = extractvalue %dx.types.CBufRet.f32 [[DATA]], 0
|
|
; CHECK: call void @f32_user(float [[VAL]])
|
|
call void @f32_user(float %data)
|
|
|
|
ret void
|
|
}
|
|
|
|
; CHECK-LABEL: define void @loadf64
|
|
define void @loadf64() {
|
|
%buffer = call
|
|
target("dx.CBuffer", <{ <4 x double> }>)
|
|
@llvm.dx.resource.handlefrombinding(i32 0, i32 0, i32 1, i32 0, ptr null)
|
|
|
|
; CHECK: [[DATA:%.*]] = call %dx.types.CBufRet.f64 @dx.op.cbufferLoadLegacy.f64(i32 59, %dx.types.Handle %{{.*}}, i32 1)
|
|
%load = call {double, double} @llvm.dx.resource.load.cbufferrow.2(
|
|
target("dx.CBuffer", <{ <4 x double> }>) %buffer,
|
|
i32 1)
|
|
%data = extractvalue {double, double} %load, 1
|
|
|
|
; CHECK: [[VAL:%.*]] = extractvalue %dx.types.CBufRet.f64 [[DATA]], 1
|
|
; CHECK: call void @f64_user(double [[VAL]])
|
|
call void @f64_user(double %data)
|
|
|
|
ret void
|
|
}
|
|
|
|
; CHECK-LABEL: define void @loadf16
|
|
define void @loadf16() {
|
|
%buffer = call
|
|
target("dx.CBuffer", <{ half }>)
|
|
@llvm.dx.resource.handlefrombinding(i32 0, i32 0, i32 1, i32 0, ptr null)
|
|
|
|
; CHECK: [[DATA:%.*]] = call %dx.types.CBufRet.f16.8 @dx.op.cbufferLoadLegacy.f16(i32 59, %dx.types.Handle %{{.*}}, i32 0)
|
|
%load = call {half, half, half, half, half, half, half, half} @llvm.dx.resource.load.cbufferrow.8(
|
|
target("dx.CBuffer", <{ half }>) %buffer,
|
|
i32 0)
|
|
%data = extractvalue {half, half, half, half, half, half, half, half} %load, 0
|
|
|
|
; CHECK: [[VAL:%.*]] = extractvalue %dx.types.CBufRet.f16.8 [[DATA]], 0
|
|
; CHECK: call void @f16_user(half [[VAL]])
|
|
call void @f16_user(half %data)
|
|
|
|
ret void
|
|
}
|