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
33 lines
1.5 KiB
LLVM
33 lines
1.5 KiB
LLVM
; Verify that volatile atomic load/store are accepted and produce
|
|
; OpAtomicLoad/OpAtomicStore. On non-Vulkan targets the volatile qualifier
|
|
; is silently dropped; on Vulkan the Volatile memory semantics bit is set.
|
|
|
|
; Non-Vulkan: no Volatile memory semantics.
|
|
; RUN: llc -O0 -mtriple=spirv64-unknown-unknown %s -o - | FileCheck %s --check-prefix=NONVK
|
|
; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv64-unknown-unknown %s -o - -filetype=obj | spirv-val %}
|
|
|
|
; Vulkan: Volatile memory semantics (0x8000) ORed into the semantics operand.
|
|
; RUN: llc -O0 -mtriple=spirv-unknown-vulkan1.3-compute %s -o - | FileCheck %s --check-prefix=VULKAN
|
|
|
|
; NONVK-DAG: %[[#C514:]] = OpConstant %[[#]] 514
|
|
; NONVK-DAG: %[[#C516:]] = OpConstant %[[#]] 516
|
|
; NONVK: OpAtomicLoad %[[#]] %[[#]] %[[#]] %[[#C514]]
|
|
; NONVK: OpAtomicStore %[[#]] %[[#]] %[[#C516]] %[[#]]
|
|
|
|
; 0x8000 | 0x2 (Acquire) | 0x200 (CrossWorkgroupMemory) = 33282
|
|
; 0x8000 | 0x4 (Release) | 0x200 (CrossWorkgroupMemory) = 33284
|
|
; VULKAN-DAG: %[[#VA:]] = OpConstant %[[#]] 33282
|
|
; VULKAN-DAG: %[[#VR:]] = OpConstant %[[#]] 33284
|
|
; VULKAN: OpAtomicLoad %[[#]] %[[#]] %[[#]] %[[#VA]]
|
|
; VULKAN: OpAtomicStore %[[#]] %[[#]] %[[#VR]] %[[#]]
|
|
|
|
define i32 @load_volatile(ptr addrspace(1) %ptr) {
|
|
%val = load atomic volatile i32, ptr addrspace(1) %ptr syncscope("device") acquire, align 4
|
|
ret i32 %val
|
|
}
|
|
|
|
define void @store_volatile(ptr addrspace(1) %ptr, i32 %val) {
|
|
store atomic volatile i32 %val, ptr addrspace(1) %ptr syncscope("device") release, align 4
|
|
ret void
|
|
}
|