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
42 lines
1.7 KiB
HLSL
42 lines
1.7 KiB
HLSL
// RUN: %clang_cc1 -finclude-default-header -emit-llvm -disable-llvm-passes \
|
|
// RUN: -triple dxil-pc-shadermodel6.3-library %s -o - | FileCheck %s
|
|
|
|
// Test groupshared vector element store for uint.
|
|
// CHECK-LABEL: test_uint4
|
|
// CHECK: [[VAL:%.*]] = load i32, ptr %Val.addr, align 4
|
|
// CHECK: [[IDX:%.*]] = load i32, ptr %Idx.addr, align 4
|
|
// CHECK: [[PTR:%.*]] = getelementptr <4 x i32>, ptr addrspace(3) @SMem, i32 0, i32 [[IDX]]
|
|
// CHECK: store i32 [[VAL]], ptr addrspace(3) [[PTR]], align 4
|
|
// CHECK-: ret void
|
|
groupshared uint4 SMem;
|
|
void test_uint4(uint Idx, uint Val) {
|
|
SMem[Idx] = Val;
|
|
}
|
|
|
|
// Test local vector element store for bool.
|
|
// CHECK: [[COND1:%.*]] = load i32, ptr addrspace(3) @Cond, align 4
|
|
// CHECK: [[COND2:%.*]] = icmp ne i32 [[COND1]], 0
|
|
// CHECK: [[IDX:%.*]] = load i32, ptr %Idx.addr, align 4
|
|
// CHECK: [[COND3:%.*]] = zext i1 [[COND2]] to i32
|
|
// CHECK: [[PTR:%.*]] = getelementptr <3 x i32>, ptr %Val, i32 0, i32 [[IDX]]
|
|
// CHECK: store i32 [[COND3]], ptr [[PTR]], align 4
|
|
// CHECK: ret
|
|
groupshared bool Cond;
|
|
bool3 test_bool(uint Idx) {
|
|
bool3 Val = { false, false, false};
|
|
Val[Idx] = Cond;
|
|
return Val;
|
|
}
|
|
|
|
// Test resource vector element store for float.
|
|
// CHECK: [[VAL:%.*]] = load float, ptr %Val.addr, align 4
|
|
// CHECK: [[RES_PTR:%.*]] = call {{.*}} ptr @_ZNK4hlsl18RWStructuredBufferIDv4_fEixEj(ptr {{.*}} @_ZL3Buf, i32 noundef 0)
|
|
// CHECK: [[IDX:%.*]] = load i32, ptr %Idx.addr, align 4
|
|
// CHECK: [[PTR:%.*]] = getelementptr <4 x float>, ptr [[RES_PTR]], i32 0, i32 [[IDX]]
|
|
// CHECK: store float [[VAL]], ptr [[PTR]], align 4
|
|
// CHECK: ret void
|
|
RWStructuredBuffer<float4> Buf : register(u0);
|
|
void test_float(uint Idx, float Val) {
|
|
Buf[0][Idx] = Val;
|
|
}
|