// RUN: mlir-translate -test-spirv-roundtrip -split-input-file %s | FileCheck %s spv.module Logical GLSL450 requires #spv.vce { // CHECK-LABEL: @atomic_compare_exchange_weak spv.func @atomic_compare_exchange_weak(%ptr: !spv.ptr, %value: i32, %comparator: i32) -> i32 "None" { // CHECK: spv.AtomicCompareExchangeWeak "Workgroup" "Release" "Acquire" %{{.*}}, %{{.*}}, %{{.*}} : !spv.ptr %0 = spv.AtomicCompareExchangeWeak "Workgroup" "Release" "Acquire" %ptr, %value, %comparator: !spv.ptr // CHECK: spv.AtomicAnd "Device" "None" %{{.*}}, %{{.*}} : !spv.ptr %1 = spv.AtomicAnd "Device" "None" %ptr, %value : !spv.ptr // CHECK: spv.AtomicIAdd "Workgroup" "Acquire" %{{.*}}, %{{.*}} : !spv.ptr %2 = spv.AtomicIAdd "Workgroup" "Acquire" %ptr, %value : !spv.ptr // CHECK: spv.AtomicIDecrement "Workgroup" "Acquire" %{{.*}} : !spv.ptr %3 = spv.AtomicIDecrement "Workgroup" "Acquire" %ptr : !spv.ptr // CHECK: spv.AtomicIIncrement "Device" "Release" %{{.*}} : !spv.ptr %4 = spv.AtomicIIncrement "Device" "Release" %ptr : !spv.ptr // CHECK: spv.AtomicISub "Workgroup" "Acquire" %{{.*}}, %{{.*}} : !spv.ptr %5 = spv.AtomicISub "Workgroup" "Acquire" %ptr, %value : !spv.ptr // CHECK: spv.AtomicOr "Workgroup" "AcquireRelease" %{{.*}}, %{{.*}} : !spv.ptr %6 = spv.AtomicOr "Workgroup" "AcquireRelease" %ptr, %value : !spv.ptr // CHECK: spv.AtomicSMax "Subgroup" "None" %{{.*}}, %{{.*}} : !spv.ptr %7 = spv.AtomicSMax "Subgroup" "None" %ptr, %value : !spv.ptr // CHECK: spv.AtomicSMin "Device" "Release" %{{.*}}, %{{.*}} : !spv.ptr %8 = spv.AtomicSMin "Device" "Release" %ptr, %value : !spv.ptr // CHECK: spv.AtomicUMax "Subgroup" "None" %{{.*}}, %{{.*}} : !spv.ptr %9 = spv.AtomicUMax "Subgroup" "None" %ptr, %value : !spv.ptr // CHECK: spv.AtomicUMin "Device" "Release" %{{.*}}, %{{.*}} : !spv.ptr %10 = spv.AtomicUMin "Device" "Release" %ptr, %value : !spv.ptr // CHECK: spv.AtomicXor "Workgroup" "AcquireRelease" %{{.*}}, %{{.*}} : !spv.ptr %11 = spv.AtomicXor "Workgroup" "AcquireRelease" %ptr, %value : !spv.ptr spv.ReturnValue %0: i32 } }