This issue was discovered during some downstream work around Vulkan CTS tests, specifically `dEQP-VK.subgroups.arithmetic.compute.subgroupadd_float` --------- Co-authored-by: Matt Arsenault <arsenm2@gmail.com>
24 lines
1.1 KiB
LLVM
24 lines
1.1 KiB
LLVM
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 6
|
|
; RUN: llc -mtriple=amdgcn -mcpu=gfx1200 -mattr=+wavefrontsize64 -amdgpu-atomic-optimizer-strategy=Iterative < %s | FileCheck -enable-var-scope -check-prefixes=GFX12 %s
|
|
|
|
; Check that no optimization is generated for single lane execution.
|
|
|
|
define amdgpu_kernel void @add_i32_constant(ptr addrspace(1) %out, ptr addrspace(8) %inout) "amdgpu-flat-work-group-size"="1,1" "amdgpu-no-wwm" {
|
|
; GFX12-LABEL: add_i32_constant:
|
|
; GFX12: ; %bb.0: ; %entry
|
|
; GFX12-NEXT: s_load_b128 s[0:3], s[4:5], 0x34
|
|
; GFX12-NEXT: v_mov_b32_e32 v0, 5
|
|
; GFX12-NEXT: v_mov_b32_e32 v1, 0
|
|
; GFX12-NEXT: s_wait_kmcnt 0x0
|
|
; GFX12-NEXT: buffer_atomic_add_u32 v0, off, s[0:3], null th:TH_ATOMIC_RETURN
|
|
; GFX12-NEXT: s_load_b64 s[0:1], s[4:5], 0x24
|
|
; GFX12-NEXT: s_wait_loadcnt 0x0
|
|
; GFX12-NEXT: s_wait_kmcnt 0x0
|
|
; GFX12-NEXT: global_store_b32 v1, v0, s[0:1]
|
|
; GFX12-NEXT: s_endpgm
|
|
entry:
|
|
%old = call i32 @llvm.amdgcn.raw.ptr.buffer.atomic.add(i32 5, ptr addrspace(8) %inout, i32 0, i32 0, i32 0)
|
|
store i32 %old, ptr addrspace(1) %out
|
|
ret void
|
|
}
|