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
876 lines
37 KiB
LLVM
876 lines
37 KiB
LLVM
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
|
; RUN: llc -mtriple=amdgcn-amd- -O0 -mcpu=gfx600 < %s | FileCheck --check-prefixes=GFX6 %s
|
|
; RUN: llc -mtriple=amdgcn-amd-amdhsa -O0 -mcpu=gfx700 < %s | FileCheck --check-prefixes=GFX7 %s
|
|
; RUN: llc -mtriple=amdgcn-amd-amdhsa -O0 -mcpu=gfx1010 < %s | FileCheck --check-prefixes=GFX10-WGP %s
|
|
; RUN: llc -mtriple=amdgcn-amd-amdhsa -O0 -mcpu=gfx1010 -mattr=+cumode < %s | FileCheck --check-prefixes=GFX10-CU %s
|
|
; RUN: llc -mtriple=amdgcn-amd-amdpal -O0 -mcpu=gfx700 -amdgcn-skip-cache-invalidations < %s | FileCheck --check-prefixes=SKIP-CACHE-INV %s
|
|
; RUN: llc -mtriple=amdgcn-amd-amdhsa -O0 -mcpu=gfx1100 < %s | FileCheck --check-prefixes=GFX11-WGP %s
|
|
; RUN: llc -mtriple=amdgcn-amd-amdhsa -O0 -mcpu=gfx1100 -mattr=+cumode < %s | FileCheck --check-prefixes=GFX11-CU %s
|
|
; RUN: llc -mtriple=amdgcn-amd-amdhsa -O0 -mcpu=gfx1200 < %s | FileCheck --check-prefixes=GFX12-WGP %s
|
|
; RUN: llc -mtriple=amdgcn-amd-amdhsa -O0 -mcpu=gfx1200 -mattr=+cumode < %s | FileCheck --check-prefixes=GFX12-CU %s
|
|
; RUN: llc -mtriple=amdgcn-amd-amdhsa -O0 -mcpu=gfx1250 < %s | FileCheck --check-prefixes=GFX1250 %s
|
|
|
|
define amdgpu_kernel void @private_volatile_load_0(
|
|
; GFX6-LABEL: private_volatile_load_0:
|
|
; GFX6: ; %bb.0: ; %entry
|
|
; GFX6-NEXT: s_mov_b32 s12, SCRATCH_RSRC_DWORD0
|
|
; GFX6-NEXT: s_mov_b32 s13, SCRATCH_RSRC_DWORD1
|
|
; GFX6-NEXT: s_mov_b32 s14, -1
|
|
; GFX6-NEXT: s_mov_b32 s15, 0xe8f000
|
|
; GFX6-NEXT: s_add_u32 s12, s12, s11
|
|
; GFX6-NEXT: s_addc_u32 s13, s13, 0
|
|
; GFX6-NEXT: s_mov_b64 s[0:1], s[4:5]
|
|
; GFX6-NEXT: s_load_dword s2, s[0:1], 0x9
|
|
; GFX6-NEXT: s_waitcnt lgkmcnt(0)
|
|
; GFX6-NEXT: s_load_dwordx2 s[2:3], s[0:1], 0xb
|
|
; GFX6-NEXT: s_load_dword s4, s[0:1], 0x9
|
|
; GFX6-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0xb
|
|
; GFX6-NEXT: s_waitcnt lgkmcnt(0)
|
|
; GFX6-NEXT: s_mov_b32 s7, s1
|
|
; GFX6-NEXT: ; kill: def $sgpr0 killed $sgpr0 killed $sgpr0_sgpr1
|
|
; GFX6-NEXT: s_mov_b32 s5, 0xf000
|
|
; GFX6-NEXT: s_mov_b32 s6, -1
|
|
; GFX6-NEXT: ; kill: def $sgpr0 killed $sgpr0 def $sgpr0_sgpr1_sgpr2_sgpr3
|
|
; GFX6-NEXT: s_mov_b32 s1, s7
|
|
; GFX6-NEXT: s_mov_b32 s2, s6
|
|
; GFX6-NEXT: s_mov_b32 s3, s5
|
|
; GFX6-NEXT: v_mov_b32_e32 v0, s4
|
|
; GFX6-NEXT: buffer_load_dword v0, v0, s[12:15], 0 offen glc
|
|
; GFX6-NEXT: s_waitcnt vmcnt(0)
|
|
; GFX6-NEXT: buffer_store_dword v0, off, s[0:3], 0
|
|
; GFX6-NEXT: s_endpgm
|
|
;
|
|
; GFX7-LABEL: private_volatile_load_0:
|
|
; GFX7: ; %bb.0: ; %entry
|
|
; GFX7-NEXT: s_mov_b32 flat_scratch_lo, s13
|
|
; GFX7-NEXT: s_add_i32 s12, s12, s17
|
|
; GFX7-NEXT: s_lshr_b32 flat_scratch_hi, s12, 8
|
|
; GFX7-NEXT: s_add_u32 s0, s0, s17
|
|
; GFX7-NEXT: s_addc_u32 s1, s1, 0
|
|
; GFX7-NEXT: s_load_dword s4, s[8:9], 0x0
|
|
; GFX7-NEXT: s_waitcnt lgkmcnt(0)
|
|
; GFX7-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x2
|
|
; GFX7-NEXT: s_load_dword s6, s[8:9], 0x0
|
|
; GFX7-NEXT: s_waitcnt lgkmcnt(0)
|
|
; GFX7-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x2
|
|
; GFX7-NEXT: v_mov_b32_e32 v0, s6
|
|
; GFX7-NEXT: buffer_load_dword v2, v0, s[0:3], 0 offen glc
|
|
; GFX7-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
|
|
; GFX7-NEXT: v_mov_b32_e32 v0, s4
|
|
; GFX7-NEXT: v_mov_b32_e32 v1, s5
|
|
; GFX7-NEXT: flat_store_dword v[0:1], v2
|
|
; GFX7-NEXT: s_endpgm
|
|
;
|
|
; GFX10-WGP-LABEL: private_volatile_load_0:
|
|
; GFX10-WGP: ; %bb.0: ; %entry
|
|
; GFX10-WGP-NEXT: s_add_u32 s0, s0, s17
|
|
; GFX10-WGP-NEXT: s_addc_u32 s1, s1, 0
|
|
; GFX10-WGP-NEXT: s_load_dword s4, s[8:9], 0x0
|
|
; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
|
|
; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x8
|
|
; GFX10-WGP-NEXT: s_load_dword s6, s[8:9], 0x0
|
|
; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
|
|
; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x8
|
|
; GFX10-WGP-NEXT: v_mov_b32_e32 v0, 0
|
|
; GFX10-WGP-NEXT: v_mov_b32_e32 v1, s6
|
|
; GFX10-WGP-NEXT: buffer_load_dword v1, v1, s[0:3], 0 offen glc dlc
|
|
; GFX10-WGP-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
|
|
; GFX10-WGP-NEXT: global_store_dword v0, v1, s[4:5]
|
|
; GFX10-WGP-NEXT: s_endpgm
|
|
;
|
|
; GFX10-CU-LABEL: private_volatile_load_0:
|
|
; GFX10-CU: ; %bb.0: ; %entry
|
|
; GFX10-CU-NEXT: s_add_u32 s0, s0, s17
|
|
; GFX10-CU-NEXT: s_addc_u32 s1, s1, 0
|
|
; GFX10-CU-NEXT: s_load_dword s4, s[8:9], 0x0
|
|
; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
|
|
; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x8
|
|
; GFX10-CU-NEXT: s_load_dword s6, s[8:9], 0x0
|
|
; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
|
|
; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x8
|
|
; GFX10-CU-NEXT: v_mov_b32_e32 v0, 0
|
|
; GFX10-CU-NEXT: v_mov_b32_e32 v1, s6
|
|
; GFX10-CU-NEXT: buffer_load_dword v1, v1, s[0:3], 0 offen glc dlc
|
|
; GFX10-CU-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
|
|
; GFX10-CU-NEXT: global_store_dword v0, v1, s[4:5]
|
|
; GFX10-CU-NEXT: s_endpgm
|
|
;
|
|
; SKIP-CACHE-INV-LABEL: private_volatile_load_0:
|
|
; SKIP-CACHE-INV: ; %bb.0: ; %entry
|
|
; SKIP-CACHE-INV-NEXT: s_getpc_b64 s[12:13]
|
|
; SKIP-CACHE-INV-NEXT: s_mov_b32 s12, s0
|
|
; SKIP-CACHE-INV-NEXT: s_load_dwordx4 s[12:15], s[12:13], 0x0
|
|
; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
|
|
; SKIP-CACHE-INV-NEXT: s_add_u32 s12, s12, s11
|
|
; SKIP-CACHE-INV-NEXT: s_addc_u32 s13, s13, 0
|
|
; SKIP-CACHE-INV-NEXT: s_mov_b64 s[0:1], s[4:5]
|
|
; SKIP-CACHE-INV-NEXT: s_load_dword s2, s[0:1], 0x0
|
|
; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
|
|
; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[2:3], s[0:1], 0x2
|
|
; SKIP-CACHE-INV-NEXT: s_load_dword s4, s[0:1], 0x0
|
|
; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x2
|
|
; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
|
|
; SKIP-CACHE-INV-NEXT: s_mov_b32 s7, s1
|
|
; SKIP-CACHE-INV-NEXT: ; kill: def $sgpr0 killed $sgpr0 killed $sgpr0_sgpr1
|
|
; SKIP-CACHE-INV-NEXT: s_mov_b32 s5, 0xf000
|
|
; SKIP-CACHE-INV-NEXT: s_mov_b32 s6, -1
|
|
; SKIP-CACHE-INV-NEXT: ; kill: def $sgpr0 killed $sgpr0 def $sgpr0_sgpr1_sgpr2_sgpr3
|
|
; SKIP-CACHE-INV-NEXT: s_mov_b32 s1, s7
|
|
; SKIP-CACHE-INV-NEXT: s_mov_b32 s2, s6
|
|
; SKIP-CACHE-INV-NEXT: s_mov_b32 s3, s5
|
|
; SKIP-CACHE-INV-NEXT: v_mov_b32_e32 v0, s4
|
|
; SKIP-CACHE-INV-NEXT: buffer_load_dword v0, v0, s[12:15], 0 offen glc
|
|
; SKIP-CACHE-INV-NEXT: s_waitcnt vmcnt(0)
|
|
; SKIP-CACHE-INV-NEXT: buffer_store_dword v0, off, s[0:3], 0
|
|
; SKIP-CACHE-INV-NEXT: s_endpgm
|
|
;
|
|
; GFX11-WGP-LABEL: private_volatile_load_0:
|
|
; GFX11-WGP: ; %bb.0: ; %entry
|
|
; GFX11-WGP-NEXT: s_load_b32 s0, s[4:5], 0x0
|
|
; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
|
|
; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x8
|
|
; GFX11-WGP-NEXT: s_load_b32 s2, s[4:5], 0x0
|
|
; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
|
|
; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x8
|
|
; GFX11-WGP-NEXT: v_mov_b32_e32 v0, 0
|
|
; GFX11-WGP-NEXT: scratch_load_b32 v1, off, s2 glc dlc
|
|
; GFX11-WGP-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
|
|
; GFX11-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
|
|
; GFX11-WGP-NEXT: s_endpgm
|
|
;
|
|
; GFX11-CU-LABEL: private_volatile_load_0:
|
|
; GFX11-CU: ; %bb.0: ; %entry
|
|
; GFX11-CU-NEXT: s_load_b32 s0, s[4:5], 0x0
|
|
; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
|
|
; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x8
|
|
; GFX11-CU-NEXT: s_load_b32 s2, s[4:5], 0x0
|
|
; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
|
|
; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x8
|
|
; GFX11-CU-NEXT: v_mov_b32_e32 v0, 0
|
|
; GFX11-CU-NEXT: scratch_load_b32 v1, off, s2 glc dlc
|
|
; GFX11-CU-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
|
|
; GFX11-CU-NEXT: global_store_b32 v0, v1, s[0:1]
|
|
; GFX11-CU-NEXT: s_endpgm
|
|
;
|
|
; GFX12-WGP-LABEL: private_volatile_load_0:
|
|
; GFX12-WGP: ; %bb.0: ; %entry
|
|
; GFX12-WGP-NEXT: s_load_b32 s0, s[4:5], 0x0
|
|
; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
|
|
; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x8
|
|
; GFX12-WGP-NEXT: s_load_b32 s2, s[4:5], 0x0
|
|
; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
|
|
; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x8
|
|
; GFX12-WGP-NEXT: v_mov_b32_e32 v0, 0
|
|
; GFX12-WGP-NEXT: scratch_load_b32 v1, off, s2 scope:SCOPE_SYS
|
|
; GFX12-WGP-NEXT: s_wait_bvhcnt 0x0
|
|
; GFX12-WGP-NEXT: s_wait_samplecnt 0x0
|
|
; GFX12-WGP-NEXT: s_wait_loadcnt 0x0
|
|
; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
|
|
; GFX12-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
|
|
; GFX12-WGP-NEXT: s_endpgm
|
|
;
|
|
; GFX12-CU-LABEL: private_volatile_load_0:
|
|
; GFX12-CU: ; %bb.0: ; %entry
|
|
; GFX12-CU-NEXT: s_load_b32 s0, s[4:5], 0x0
|
|
; GFX12-CU-NEXT: s_wait_kmcnt 0x0
|
|
; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x8
|
|
; GFX12-CU-NEXT: s_load_b32 s2, s[4:5], 0x0
|
|
; GFX12-CU-NEXT: s_wait_kmcnt 0x0
|
|
; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x8
|
|
; GFX12-CU-NEXT: v_mov_b32_e32 v0, 0
|
|
; GFX12-CU-NEXT: scratch_load_b32 v1, off, s2 scope:SCOPE_SYS
|
|
; GFX12-CU-NEXT: s_wait_bvhcnt 0x0
|
|
; GFX12-CU-NEXT: s_wait_samplecnt 0x0
|
|
; GFX12-CU-NEXT: s_wait_loadcnt 0x0
|
|
; GFX12-CU-NEXT: s_wait_kmcnt 0x0
|
|
; GFX12-CU-NEXT: global_store_b32 v0, v1, s[0:1]
|
|
; GFX12-CU-NEXT: s_endpgm
|
|
;
|
|
; GFX1250-LABEL: private_volatile_load_0:
|
|
; GFX1250: ; %bb.0: ; %entry
|
|
; GFX1250-NEXT: global_prefetch_b8 v0, s[0:1] scope:SCOPE_SE
|
|
; GFX1250-NEXT: v_nop
|
|
; GFX1250-NEXT: s_setreg_imm32_b32 hwreg(HW_REG_WAVE_MODE, 25, 1), 1 ; msbs: dst=0 src0=0 src1=0 src2=0
|
|
; GFX1250-NEXT: s_load_b32 s0, s[4:5], 0x0 nv
|
|
; GFX1250-NEXT: s_wait_kmcnt 0x0
|
|
; GFX1250-NEXT: s_load_b64 s[0:1], s[4:5], 0x8 nv
|
|
; GFX1250-NEXT: s_load_b32 s2, s[4:5], 0x0 nv
|
|
; GFX1250-NEXT: s_wait_kmcnt 0x0
|
|
; GFX1250-NEXT: s_load_b64 s[0:1], s[4:5], 0x8 nv
|
|
; GFX1250-NEXT: v_mov_b32_e32 v0, 0
|
|
; GFX1250-NEXT: s_wait_xcnt 0x0
|
|
; GFX1250-NEXT: scratch_load_b32 v1, off, s2 scope:SCOPE_SYS
|
|
; GFX1250-NEXT: s_wait_loadcnt 0x0
|
|
; GFX1250-NEXT: s_wait_kmcnt 0x0
|
|
; GFX1250-NEXT: global_store_b32 v0, v1, s[0:1]
|
|
; GFX1250-NEXT: s_endpgm
|
|
ptr addrspace(5) %in, ptr addrspace(1) %out) {
|
|
entry:
|
|
%val = load volatile i32, ptr addrspace(5) %in, align 4
|
|
store i32 %val, ptr addrspace(1) %out
|
|
ret void
|
|
}
|
|
|
|
define amdgpu_kernel void @private_volatile_load_1(
|
|
; GFX6-LABEL: private_volatile_load_1:
|
|
; GFX6: ; %bb.0: ; %entry
|
|
; GFX6-NEXT: s_mov_b32 s12, SCRATCH_RSRC_DWORD0
|
|
; GFX6-NEXT: s_mov_b32 s13, SCRATCH_RSRC_DWORD1
|
|
; GFX6-NEXT: s_mov_b32 s14, -1
|
|
; GFX6-NEXT: s_mov_b32 s15, 0xe8f000
|
|
; GFX6-NEXT: s_add_u32 s12, s12, s11
|
|
; GFX6-NEXT: s_addc_u32 s13, s13, 0
|
|
; GFX6-NEXT: s_mov_b64 s[0:1], s[4:5]
|
|
; GFX6-NEXT: s_load_dword s2, s[0:1], 0x9
|
|
; GFX6-NEXT: s_waitcnt lgkmcnt(0)
|
|
; GFX6-NEXT: s_load_dwordx2 s[2:3], s[0:1], 0xb
|
|
; GFX6-NEXT: s_load_dword s4, s[0:1], 0x9
|
|
; GFX6-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0xb
|
|
; GFX6-NEXT: s_waitcnt lgkmcnt(0)
|
|
; GFX6-NEXT: s_mov_b32 s7, s1
|
|
; GFX6-NEXT: ; kill: def $sgpr0 killed $sgpr0 killed $sgpr0_sgpr1
|
|
; GFX6-NEXT: s_mov_b32 s5, 0xf000
|
|
; GFX6-NEXT: s_mov_b32 s6, -1
|
|
; GFX6-NEXT: ; kill: def $sgpr0 killed $sgpr0 def $sgpr0_sgpr1_sgpr2_sgpr3
|
|
; GFX6-NEXT: s_mov_b32 s1, s7
|
|
; GFX6-NEXT: s_mov_b32 s2, s6
|
|
; GFX6-NEXT: s_mov_b32 s3, s5
|
|
; GFX6-NEXT: s_mov_b32 s5, 2
|
|
; GFX6-NEXT: v_lshlrev_b32_e64 v0, s5, v0
|
|
; GFX6-NEXT: v_add_i32_e64 v0, s[4:5], s4, v0
|
|
; GFX6-NEXT: buffer_load_dword v0, v0, s[12:15], 0 offen glc
|
|
; GFX6-NEXT: s_waitcnt vmcnt(0)
|
|
; GFX6-NEXT: buffer_store_dword v0, off, s[0:3], 0
|
|
; GFX6-NEXT: s_endpgm
|
|
;
|
|
; GFX7-LABEL: private_volatile_load_1:
|
|
; GFX7: ; %bb.0: ; %entry
|
|
; GFX7-NEXT: s_mov_b32 flat_scratch_lo, s13
|
|
; GFX7-NEXT: s_add_i32 s12, s12, s17
|
|
; GFX7-NEXT: s_lshr_b32 flat_scratch_hi, s12, 8
|
|
; GFX7-NEXT: s_add_u32 s0, s0, s17
|
|
; GFX7-NEXT: s_addc_u32 s1, s1, 0
|
|
; GFX7-NEXT: s_load_dword s4, s[8:9], 0x0
|
|
; GFX7-NEXT: s_waitcnt lgkmcnt(0)
|
|
; GFX7-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x2
|
|
; GFX7-NEXT: s_load_dword s6, s[8:9], 0x0
|
|
; GFX7-NEXT: s_waitcnt lgkmcnt(0)
|
|
; GFX7-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x2
|
|
; GFX7-NEXT: s_mov_b32 s7, 2
|
|
; GFX7-NEXT: v_lshlrev_b32_e64 v0, s7, v0
|
|
; GFX7-NEXT: v_add_i32_e64 v0, s[6:7], s6, v0
|
|
; GFX7-NEXT: buffer_load_dword v2, v0, s[0:3], 0 offen glc
|
|
; GFX7-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
|
|
; GFX7-NEXT: v_mov_b32_e32 v0, s4
|
|
; GFX7-NEXT: v_mov_b32_e32 v1, s5
|
|
; GFX7-NEXT: flat_store_dword v[0:1], v2
|
|
; GFX7-NEXT: s_endpgm
|
|
;
|
|
; GFX10-WGP-LABEL: private_volatile_load_1:
|
|
; GFX10-WGP: ; %bb.0: ; %entry
|
|
; GFX10-WGP-NEXT: s_add_u32 s0, s0, s17
|
|
; GFX10-WGP-NEXT: s_addc_u32 s1, s1, 0
|
|
; GFX10-WGP-NEXT: v_mov_b32_e32 v1, v0
|
|
; GFX10-WGP-NEXT: s_load_dword s4, s[8:9], 0x0
|
|
; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
|
|
; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x8
|
|
; GFX10-WGP-NEXT: s_load_dword s7, s[8:9], 0x0
|
|
; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
|
|
; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x8
|
|
; GFX10-WGP-NEXT: v_mov_b32_e32 v0, 0
|
|
; GFX10-WGP-NEXT: s_mov_b32 s6, 2
|
|
; GFX10-WGP-NEXT: v_lshl_add_u32 v1, v1, s6, s7
|
|
; GFX10-WGP-NEXT: buffer_load_dword v1, v1, s[0:3], 0 offen glc dlc
|
|
; GFX10-WGP-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
|
|
; GFX10-WGP-NEXT: global_store_dword v0, v1, s[4:5]
|
|
; GFX10-WGP-NEXT: s_endpgm
|
|
;
|
|
; GFX10-CU-LABEL: private_volatile_load_1:
|
|
; GFX10-CU: ; %bb.0: ; %entry
|
|
; GFX10-CU-NEXT: s_add_u32 s0, s0, s17
|
|
; GFX10-CU-NEXT: s_addc_u32 s1, s1, 0
|
|
; GFX10-CU-NEXT: v_mov_b32_e32 v1, v0
|
|
; GFX10-CU-NEXT: s_load_dword s4, s[8:9], 0x0
|
|
; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
|
|
; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x8
|
|
; GFX10-CU-NEXT: s_load_dword s7, s[8:9], 0x0
|
|
; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
|
|
; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x8
|
|
; GFX10-CU-NEXT: v_mov_b32_e32 v0, 0
|
|
; GFX10-CU-NEXT: s_mov_b32 s6, 2
|
|
; GFX10-CU-NEXT: v_lshl_add_u32 v1, v1, s6, s7
|
|
; GFX10-CU-NEXT: buffer_load_dword v1, v1, s[0:3], 0 offen glc dlc
|
|
; GFX10-CU-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
|
|
; GFX10-CU-NEXT: global_store_dword v0, v1, s[4:5]
|
|
; GFX10-CU-NEXT: s_endpgm
|
|
;
|
|
; SKIP-CACHE-INV-LABEL: private_volatile_load_1:
|
|
; SKIP-CACHE-INV: ; %bb.0: ; %entry
|
|
; SKIP-CACHE-INV-NEXT: s_getpc_b64 s[12:13]
|
|
; SKIP-CACHE-INV-NEXT: s_mov_b32 s12, s0
|
|
; SKIP-CACHE-INV-NEXT: s_load_dwordx4 s[12:15], s[12:13], 0x0
|
|
; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
|
|
; SKIP-CACHE-INV-NEXT: s_add_u32 s12, s12, s11
|
|
; SKIP-CACHE-INV-NEXT: s_addc_u32 s13, s13, 0
|
|
; SKIP-CACHE-INV-NEXT: s_mov_b64 s[0:1], s[4:5]
|
|
; SKIP-CACHE-INV-NEXT: s_load_dword s2, s[0:1], 0x0
|
|
; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
|
|
; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[2:3], s[0:1], 0x2
|
|
; SKIP-CACHE-INV-NEXT: s_load_dword s4, s[0:1], 0x0
|
|
; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x2
|
|
; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
|
|
; SKIP-CACHE-INV-NEXT: s_mov_b32 s7, s1
|
|
; SKIP-CACHE-INV-NEXT: ; kill: def $sgpr0 killed $sgpr0 killed $sgpr0_sgpr1
|
|
; SKIP-CACHE-INV-NEXT: s_mov_b32 s5, 0xf000
|
|
; SKIP-CACHE-INV-NEXT: s_mov_b32 s6, -1
|
|
; SKIP-CACHE-INV-NEXT: ; kill: def $sgpr0 killed $sgpr0 def $sgpr0_sgpr1_sgpr2_sgpr3
|
|
; SKIP-CACHE-INV-NEXT: s_mov_b32 s1, s7
|
|
; SKIP-CACHE-INV-NEXT: s_mov_b32 s2, s6
|
|
; SKIP-CACHE-INV-NEXT: s_mov_b32 s3, s5
|
|
; SKIP-CACHE-INV-NEXT: s_mov_b32 s5, 2
|
|
; SKIP-CACHE-INV-NEXT: v_lshlrev_b32_e64 v0, s5, v0
|
|
; SKIP-CACHE-INV-NEXT: v_add_i32_e64 v0, s[4:5], s4, v0
|
|
; SKIP-CACHE-INV-NEXT: buffer_load_dword v0, v0, s[12:15], 0 offen glc
|
|
; SKIP-CACHE-INV-NEXT: s_waitcnt vmcnt(0)
|
|
; SKIP-CACHE-INV-NEXT: buffer_store_dword v0, off, s[0:3], 0
|
|
; SKIP-CACHE-INV-NEXT: s_endpgm
|
|
;
|
|
; GFX11-WGP-LABEL: private_volatile_load_1:
|
|
; GFX11-WGP: ; %bb.0: ; %entry
|
|
; GFX11-WGP-NEXT: v_mov_b32_e32 v1, v0
|
|
; GFX11-WGP-NEXT: s_load_b32 s0, s[4:5], 0x0
|
|
; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
|
|
; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x8
|
|
; GFX11-WGP-NEXT: s_load_b32 s3, s[4:5], 0x0
|
|
; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
|
|
; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x8
|
|
; GFX11-WGP-NEXT: v_mov_b32_e32 v0, 0
|
|
; GFX11-WGP-NEXT: s_mov_b32 s2, 0x3ff
|
|
; GFX11-WGP-NEXT: v_and_b32_e64 v1, v1, s2
|
|
; GFX11-WGP-NEXT: s_mov_b32 s2, 2
|
|
; GFX11-WGP-NEXT: v_lshl_add_u32 v1, v1, s2, s3
|
|
; GFX11-WGP-NEXT: scratch_load_b32 v1, v1, off glc dlc
|
|
; GFX11-WGP-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
|
|
; GFX11-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
|
|
; GFX11-WGP-NEXT: s_endpgm
|
|
;
|
|
; GFX11-CU-LABEL: private_volatile_load_1:
|
|
; GFX11-CU: ; %bb.0: ; %entry
|
|
; GFX11-CU-NEXT: v_mov_b32_e32 v1, v0
|
|
; GFX11-CU-NEXT: s_load_b32 s0, s[4:5], 0x0
|
|
; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
|
|
; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x8
|
|
; GFX11-CU-NEXT: s_load_b32 s3, s[4:5], 0x0
|
|
; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
|
|
; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x8
|
|
; GFX11-CU-NEXT: v_mov_b32_e32 v0, 0
|
|
; GFX11-CU-NEXT: s_mov_b32 s2, 0x3ff
|
|
; GFX11-CU-NEXT: v_and_b32_e64 v1, v1, s2
|
|
; GFX11-CU-NEXT: s_mov_b32 s2, 2
|
|
; GFX11-CU-NEXT: v_lshl_add_u32 v1, v1, s2, s3
|
|
; GFX11-CU-NEXT: scratch_load_b32 v1, v1, off glc dlc
|
|
; GFX11-CU-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
|
|
; GFX11-CU-NEXT: global_store_b32 v0, v1, s[0:1]
|
|
; GFX11-CU-NEXT: s_endpgm
|
|
;
|
|
; GFX12-WGP-LABEL: private_volatile_load_1:
|
|
; GFX12-WGP: ; %bb.0: ; %entry
|
|
; GFX12-WGP-NEXT: v_mov_b32_e32 v1, v0
|
|
; GFX12-WGP-NEXT: s_load_b32 s0, s[4:5], 0x0
|
|
; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
|
|
; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x8
|
|
; GFX12-WGP-NEXT: s_load_b32 s2, s[4:5], 0x0
|
|
; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
|
|
; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x8
|
|
; GFX12-WGP-NEXT: v_mov_b32_e32 v0, 0
|
|
; GFX12-WGP-NEXT: s_mov_b32 s3, 0x3ff
|
|
; GFX12-WGP-NEXT: v_and_b32_e64 v1, v1, s3
|
|
; GFX12-WGP-NEXT: s_mov_b32 s3, 2
|
|
; GFX12-WGP-NEXT: s_wait_alu depctr_sa_sdst(0)
|
|
; GFX12-WGP-NEXT: v_lshlrev_b32_e64 v1, s3, v1
|
|
; GFX12-WGP-NEXT: scratch_load_b32 v1, v1, s2 scope:SCOPE_SYS
|
|
; GFX12-WGP-NEXT: s_wait_bvhcnt 0x0
|
|
; GFX12-WGP-NEXT: s_wait_samplecnt 0x0
|
|
; GFX12-WGP-NEXT: s_wait_loadcnt 0x0
|
|
; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
|
|
; GFX12-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
|
|
; GFX12-WGP-NEXT: s_endpgm
|
|
;
|
|
; GFX12-CU-LABEL: private_volatile_load_1:
|
|
; GFX12-CU: ; %bb.0: ; %entry
|
|
; GFX12-CU-NEXT: v_mov_b32_e32 v1, v0
|
|
; GFX12-CU-NEXT: s_load_b32 s0, s[4:5], 0x0
|
|
; GFX12-CU-NEXT: s_wait_kmcnt 0x0
|
|
; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x8
|
|
; GFX12-CU-NEXT: s_load_b32 s2, s[4:5], 0x0
|
|
; GFX12-CU-NEXT: s_wait_kmcnt 0x0
|
|
; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x8
|
|
; GFX12-CU-NEXT: v_mov_b32_e32 v0, 0
|
|
; GFX12-CU-NEXT: s_mov_b32 s3, 0x3ff
|
|
; GFX12-CU-NEXT: v_and_b32_e64 v1, v1, s3
|
|
; GFX12-CU-NEXT: s_mov_b32 s3, 2
|
|
; GFX12-CU-NEXT: s_wait_alu depctr_sa_sdst(0)
|
|
; GFX12-CU-NEXT: v_lshlrev_b32_e64 v1, s3, v1
|
|
; GFX12-CU-NEXT: scratch_load_b32 v1, v1, s2 scope:SCOPE_SYS
|
|
; GFX12-CU-NEXT: s_wait_bvhcnt 0x0
|
|
; GFX12-CU-NEXT: s_wait_samplecnt 0x0
|
|
; GFX12-CU-NEXT: s_wait_loadcnt 0x0
|
|
; GFX12-CU-NEXT: s_wait_kmcnt 0x0
|
|
; GFX12-CU-NEXT: global_store_b32 v0, v1, s[0:1]
|
|
; GFX12-CU-NEXT: s_endpgm
|
|
;
|
|
; GFX1250-LABEL: private_volatile_load_1:
|
|
; GFX1250: ; %bb.0: ; %entry
|
|
; GFX1250-NEXT: global_prefetch_b8 v0, s[0:1] scope:SCOPE_SE
|
|
; GFX1250-NEXT: v_nop
|
|
; GFX1250-NEXT: s_setreg_imm32_b32 hwreg(HW_REG_WAVE_MODE, 25, 1), 1 ; msbs: dst=0 src0=0 src1=0 src2=0
|
|
; GFX1250-NEXT: v_mov_b32_e32 v1, v0
|
|
; GFX1250-NEXT: s_load_b32 s0, s[4:5], 0x0 nv
|
|
; GFX1250-NEXT: s_wait_kmcnt 0x0
|
|
; GFX1250-NEXT: s_load_b64 s[0:1], s[4:5], 0x8 nv
|
|
; GFX1250-NEXT: s_load_b32 s2, s[4:5], 0x0 nv
|
|
; GFX1250-NEXT: s_wait_kmcnt 0x0
|
|
; GFX1250-NEXT: s_load_b64 s[0:1], s[4:5], 0x8 nv
|
|
; GFX1250-NEXT: v_mov_b32_e32 v0, 0
|
|
; GFX1250-NEXT: s_mov_b32 s3, 0x3ff
|
|
; GFX1250-NEXT: v_and_b32_e64 v1, v1, s3
|
|
; GFX1250-NEXT: s_wait_xcnt 0x0
|
|
; GFX1250-NEXT: scratch_load_b32 v1, v1, s2 scale_offset scope:SCOPE_SYS
|
|
; GFX1250-NEXT: s_wait_loadcnt 0x0
|
|
; GFX1250-NEXT: s_wait_kmcnt 0x0
|
|
; GFX1250-NEXT: global_store_b32 v0, v1, s[0:1]
|
|
; GFX1250-NEXT: s_endpgm
|
|
ptr addrspace(5) %in, ptr addrspace(1) %out) {
|
|
entry:
|
|
%tid = call i32 @llvm.amdgcn.workitem.id.x()
|
|
%val.gep = getelementptr inbounds i32, ptr addrspace(5) %in, i32 %tid
|
|
%val = load volatile i32, ptr addrspace(5) %val.gep, align 4
|
|
store i32 %val, ptr addrspace(1) %out
|
|
ret void
|
|
}
|
|
|
|
define amdgpu_kernel void @private_volatile_store_0(
|
|
; GFX6-LABEL: private_volatile_store_0:
|
|
; GFX6: ; %bb.0: ; %entry
|
|
; GFX6-NEXT: s_mov_b32 s12, SCRATCH_RSRC_DWORD0
|
|
; GFX6-NEXT: s_mov_b32 s13, SCRATCH_RSRC_DWORD1
|
|
; GFX6-NEXT: s_mov_b32 s14, -1
|
|
; GFX6-NEXT: s_mov_b32 s15, 0xe8f000
|
|
; GFX6-NEXT: s_add_u32 s12, s12, s11
|
|
; GFX6-NEXT: s_addc_u32 s13, s13, 0
|
|
; GFX6-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x9
|
|
; GFX6-NEXT: s_waitcnt lgkmcnt(0)
|
|
; GFX6-NEXT: s_load_dword s0, s[4:5], 0xb
|
|
; GFX6-NEXT: s_load_dwordx2 s[2:3], s[4:5], 0x9
|
|
; GFX6-NEXT: s_waitcnt lgkmcnt(0)
|
|
; GFX6-NEXT: s_load_dword s0, s[4:5], 0xb
|
|
; GFX6-NEXT: s_load_dword s1, s[2:3], 0x0
|
|
; GFX6-NEXT: s_waitcnt lgkmcnt(0)
|
|
; GFX6-NEXT: v_mov_b32_e32 v0, s1
|
|
; GFX6-NEXT: v_mov_b32_e32 v1, s0
|
|
; GFX6-NEXT: buffer_store_dword v0, v1, s[12:15], 0 offen
|
|
; GFX6-NEXT: s_waitcnt vmcnt(0)
|
|
; GFX6-NEXT: s_endpgm
|
|
;
|
|
; GFX7-LABEL: private_volatile_store_0:
|
|
; GFX7: ; %bb.0: ; %entry
|
|
; GFX7-NEXT: s_add_u32 s0, s0, s17
|
|
; GFX7-NEXT: s_addc_u32 s1, s1, 0
|
|
; GFX7-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
|
|
; GFX7-NEXT: s_waitcnt lgkmcnt(0)
|
|
; GFX7-NEXT: s_load_dword s4, s[8:9], 0x2
|
|
; GFX7-NEXT: s_load_dwordx2 s[6:7], s[8:9], 0x0
|
|
; GFX7-NEXT: s_waitcnt lgkmcnt(0)
|
|
; GFX7-NEXT: s_load_dword s4, s[8:9], 0x2
|
|
; GFX7-NEXT: s_load_dword s5, s[6:7], 0x0
|
|
; GFX7-NEXT: s_waitcnt lgkmcnt(0)
|
|
; GFX7-NEXT: v_mov_b32_e32 v0, s5
|
|
; GFX7-NEXT: v_mov_b32_e32 v1, s4
|
|
; GFX7-NEXT: buffer_store_dword v0, v1, s[0:3], 0 offen
|
|
; GFX7-NEXT: s_waitcnt vmcnt(0)
|
|
; GFX7-NEXT: s_endpgm
|
|
;
|
|
; GFX10-WGP-LABEL: private_volatile_store_0:
|
|
; GFX10-WGP: ; %bb.0: ; %entry
|
|
; GFX10-WGP-NEXT: s_add_u32 s0, s0, s17
|
|
; GFX10-WGP-NEXT: s_addc_u32 s1, s1, 0
|
|
; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
|
|
; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
|
|
; GFX10-WGP-NEXT: s_load_dword s4, s[8:9], 0x8
|
|
; GFX10-WGP-NEXT: s_load_dwordx2 s[6:7], s[8:9], 0x0
|
|
; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
|
|
; GFX10-WGP-NEXT: s_load_dword s4, s[8:9], 0x8
|
|
; GFX10-WGP-NEXT: s_load_dword s5, s[6:7], 0x0
|
|
; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
|
|
; GFX10-WGP-NEXT: v_mov_b32_e32 v0, s5
|
|
; GFX10-WGP-NEXT: v_mov_b32_e32 v1, s4
|
|
; GFX10-WGP-NEXT: buffer_store_dword v0, v1, s[0:3], 0 offen
|
|
; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
|
|
; GFX10-WGP-NEXT: s_endpgm
|
|
;
|
|
; GFX10-CU-LABEL: private_volatile_store_0:
|
|
; GFX10-CU: ; %bb.0: ; %entry
|
|
; GFX10-CU-NEXT: s_add_u32 s0, s0, s17
|
|
; GFX10-CU-NEXT: s_addc_u32 s1, s1, 0
|
|
; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
|
|
; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
|
|
; GFX10-CU-NEXT: s_load_dword s4, s[8:9], 0x8
|
|
; GFX10-CU-NEXT: s_load_dwordx2 s[6:7], s[8:9], 0x0
|
|
; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
|
|
; GFX10-CU-NEXT: s_load_dword s4, s[8:9], 0x8
|
|
; GFX10-CU-NEXT: s_load_dword s5, s[6:7], 0x0
|
|
; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
|
|
; GFX10-CU-NEXT: v_mov_b32_e32 v0, s5
|
|
; GFX10-CU-NEXT: v_mov_b32_e32 v1, s4
|
|
; GFX10-CU-NEXT: buffer_store_dword v0, v1, s[0:3], 0 offen
|
|
; GFX10-CU-NEXT: s_waitcnt_vscnt null, 0x0
|
|
; GFX10-CU-NEXT: s_endpgm
|
|
;
|
|
; SKIP-CACHE-INV-LABEL: private_volatile_store_0:
|
|
; SKIP-CACHE-INV: ; %bb.0: ; %entry
|
|
; SKIP-CACHE-INV-NEXT: s_getpc_b64 s[12:13]
|
|
; SKIP-CACHE-INV-NEXT: s_mov_b32 s12, s0
|
|
; SKIP-CACHE-INV-NEXT: s_load_dwordx4 s[12:15], s[12:13], 0x0
|
|
; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
|
|
; SKIP-CACHE-INV-NEXT: s_add_u32 s12, s12, s11
|
|
; SKIP-CACHE-INV-NEXT: s_addc_u32 s13, s13, 0
|
|
; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
|
|
; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
|
|
; SKIP-CACHE-INV-NEXT: s_load_dword s0, s[4:5], 0x2
|
|
; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[2:3], s[4:5], 0x0
|
|
; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
|
|
; SKIP-CACHE-INV-NEXT: s_load_dword s0, s[4:5], 0x2
|
|
; SKIP-CACHE-INV-NEXT: s_load_dword s1, s[2:3], 0x0
|
|
; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
|
|
; SKIP-CACHE-INV-NEXT: v_mov_b32_e32 v0, s1
|
|
; SKIP-CACHE-INV-NEXT: v_mov_b32_e32 v1, s0
|
|
; SKIP-CACHE-INV-NEXT: buffer_store_dword v0, v1, s[12:15], 0 offen
|
|
; SKIP-CACHE-INV-NEXT: s_waitcnt vmcnt(0)
|
|
; SKIP-CACHE-INV-NEXT: s_endpgm
|
|
;
|
|
; GFX11-WGP-LABEL: private_volatile_store_0:
|
|
; GFX11-WGP: ; %bb.0: ; %entry
|
|
; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
|
|
; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
|
|
; GFX11-WGP-NEXT: s_load_b32 s0, s[4:5], 0x8
|
|
; GFX11-WGP-NEXT: s_load_b64 s[2:3], s[4:5], 0x0
|
|
; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
|
|
; GFX11-WGP-NEXT: s_load_b32 s0, s[4:5], 0x8
|
|
; GFX11-WGP-NEXT: s_load_b32 s1, s[2:3], 0x0
|
|
; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
|
|
; GFX11-WGP-NEXT: v_mov_b32_e32 v0, s1
|
|
; GFX11-WGP-NEXT: scratch_store_b32 off, v0, s0 dlc
|
|
; GFX11-WGP-NEXT: s_waitcnt_vscnt null, 0x0
|
|
; GFX11-WGP-NEXT: s_endpgm
|
|
;
|
|
; GFX11-CU-LABEL: private_volatile_store_0:
|
|
; GFX11-CU: ; %bb.0: ; %entry
|
|
; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
|
|
; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
|
|
; GFX11-CU-NEXT: s_load_b32 s0, s[4:5], 0x8
|
|
; GFX11-CU-NEXT: s_load_b64 s[2:3], s[4:5], 0x0
|
|
; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
|
|
; GFX11-CU-NEXT: s_load_b32 s0, s[4:5], 0x8
|
|
; GFX11-CU-NEXT: s_load_b32 s1, s[2:3], 0x0
|
|
; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
|
|
; GFX11-CU-NEXT: v_mov_b32_e32 v0, s1
|
|
; GFX11-CU-NEXT: scratch_store_b32 off, v0, s0 dlc
|
|
; GFX11-CU-NEXT: s_waitcnt_vscnt null, 0x0
|
|
; GFX11-CU-NEXT: s_endpgm
|
|
;
|
|
; GFX12-WGP-LABEL: private_volatile_store_0:
|
|
; GFX12-WGP: ; %bb.0: ; %entry
|
|
; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
|
|
; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
|
|
; GFX12-WGP-NEXT: s_load_b32 s0, s[4:5], 0x8
|
|
; GFX12-WGP-NEXT: s_load_b64 s[2:3], s[4:5], 0x0
|
|
; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
|
|
; GFX12-WGP-NEXT: s_load_b32 s0, s[4:5], 0x8
|
|
; GFX12-WGP-NEXT: s_load_b32 s1, s[2:3], 0x0
|
|
; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
|
|
; GFX12-WGP-NEXT: v_mov_b32_e32 v0, s1
|
|
; GFX12-WGP-NEXT: s_wait_loadcnt 0x0
|
|
; GFX12-WGP-NEXT: s_wait_samplecnt 0x0
|
|
; GFX12-WGP-NEXT: s_wait_bvhcnt 0x0
|
|
; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
|
|
; GFX12-WGP-NEXT: s_wait_storecnt 0x0
|
|
; GFX12-WGP-NEXT: scratch_store_b32 off, v0, s0 scope:SCOPE_SYS
|
|
; GFX12-WGP-NEXT: s_wait_storecnt 0x0
|
|
; GFX12-WGP-NEXT: s_endpgm
|
|
;
|
|
; GFX12-CU-LABEL: private_volatile_store_0:
|
|
; GFX12-CU: ; %bb.0: ; %entry
|
|
; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
|
|
; GFX12-CU-NEXT: s_wait_kmcnt 0x0
|
|
; GFX12-CU-NEXT: s_load_b32 s0, s[4:5], 0x8
|
|
; GFX12-CU-NEXT: s_load_b64 s[2:3], s[4:5], 0x0
|
|
; GFX12-CU-NEXT: s_wait_kmcnt 0x0
|
|
; GFX12-CU-NEXT: s_load_b32 s0, s[4:5], 0x8
|
|
; GFX12-CU-NEXT: s_load_b32 s1, s[2:3], 0x0
|
|
; GFX12-CU-NEXT: s_wait_kmcnt 0x0
|
|
; GFX12-CU-NEXT: v_mov_b32_e32 v0, s1
|
|
; GFX12-CU-NEXT: s_wait_loadcnt 0x0
|
|
; GFX12-CU-NEXT: s_wait_samplecnt 0x0
|
|
; GFX12-CU-NEXT: s_wait_bvhcnt 0x0
|
|
; GFX12-CU-NEXT: s_wait_kmcnt 0x0
|
|
; GFX12-CU-NEXT: s_wait_storecnt 0x0
|
|
; GFX12-CU-NEXT: scratch_store_b32 off, v0, s0 scope:SCOPE_SYS
|
|
; GFX12-CU-NEXT: s_wait_storecnt 0x0
|
|
; GFX12-CU-NEXT: s_endpgm
|
|
;
|
|
; GFX1250-LABEL: private_volatile_store_0:
|
|
; GFX1250: ; %bb.0: ; %entry
|
|
; GFX1250-NEXT: global_prefetch_b8 v0, s[0:1] scope:SCOPE_SE
|
|
; GFX1250-NEXT: v_nop
|
|
; GFX1250-NEXT: s_setreg_imm32_b32 hwreg(HW_REG_WAVE_MODE, 25, 1), 1 ; msbs: dst=0 src0=0 src1=0 src2=0
|
|
; GFX1250-NEXT: s_load_b64 s[0:1], s[4:5], 0x0 nv
|
|
; GFX1250-NEXT: s_wait_kmcnt 0x0
|
|
; GFX1250-NEXT: s_load_b32 s0, s[4:5], 0x8 nv
|
|
; GFX1250-NEXT: s_load_b64 s[2:3], s[4:5], 0x0 nv
|
|
; GFX1250-NEXT: s_wait_kmcnt 0x0
|
|
; GFX1250-NEXT: s_load_b32 s0, s[4:5], 0x8 nv
|
|
; GFX1250-NEXT: s_load_b32 s1, s[2:3], 0x0
|
|
; GFX1250-NEXT: s_wait_kmcnt 0x0
|
|
; GFX1250-NEXT: v_mov_b32_e32 v0, s1
|
|
; GFX1250-NEXT: s_wait_xcnt 0x0
|
|
; GFX1250-NEXT: scratch_store_b32 off, v0, s0 scope:SCOPE_SYS
|
|
; GFX1250-NEXT: s_wait_storecnt 0x0
|
|
; GFX1250-NEXT: s_endpgm
|
|
ptr addrspace(1) %in, ptr addrspace(5) %out) {
|
|
entry:
|
|
%val = load i32, ptr addrspace(1) %in, align 4
|
|
store volatile i32 %val, ptr addrspace(5) %out
|
|
ret void
|
|
}
|
|
|
|
define amdgpu_kernel void @private_volatile_store_1(
|
|
; GFX6-LABEL: private_volatile_store_1:
|
|
; GFX6: ; %bb.0: ; %entry
|
|
; GFX6-NEXT: s_mov_b32 s12, SCRATCH_RSRC_DWORD0
|
|
; GFX6-NEXT: s_mov_b32 s13, SCRATCH_RSRC_DWORD1
|
|
; GFX6-NEXT: s_mov_b32 s14, -1
|
|
; GFX6-NEXT: s_mov_b32 s15, 0xe8f000
|
|
; GFX6-NEXT: s_add_u32 s12, s12, s11
|
|
; GFX6-NEXT: s_addc_u32 s13, s13, 0
|
|
; GFX6-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x9
|
|
; GFX6-NEXT: s_waitcnt lgkmcnt(0)
|
|
; GFX6-NEXT: s_load_dword s0, s[4:5], 0xb
|
|
; GFX6-NEXT: s_load_dwordx2 s[2:3], s[4:5], 0x9
|
|
; GFX6-NEXT: s_load_dword s1, s[4:5], 0xb
|
|
; GFX6-NEXT: s_waitcnt lgkmcnt(0)
|
|
; GFX6-NEXT: s_load_dword s0, s[2:3], 0x0
|
|
; GFX6-NEXT: s_mov_b32 s2, 2
|
|
; GFX6-NEXT: v_lshlrev_b32_e64 v0, s2, v0
|
|
; GFX6-NEXT: v_add_i32_e64 v1, s[2:3], s1, v0
|
|
; GFX6-NEXT: s_waitcnt lgkmcnt(0)
|
|
; GFX6-NEXT: v_mov_b32_e32 v0, s0
|
|
; GFX6-NEXT: buffer_store_dword v0, v1, s[12:15], 0 offen
|
|
; GFX6-NEXT: s_waitcnt vmcnt(0)
|
|
; GFX6-NEXT: s_endpgm
|
|
;
|
|
; GFX7-LABEL: private_volatile_store_1:
|
|
; GFX7: ; %bb.0: ; %entry
|
|
; GFX7-NEXT: s_add_u32 s0, s0, s17
|
|
; GFX7-NEXT: s_addc_u32 s1, s1, 0
|
|
; GFX7-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
|
|
; GFX7-NEXT: s_waitcnt lgkmcnt(0)
|
|
; GFX7-NEXT: s_load_dword s4, s[8:9], 0x2
|
|
; GFX7-NEXT: s_load_dwordx2 s[6:7], s[8:9], 0x0
|
|
; GFX7-NEXT: s_load_dword s5, s[8:9], 0x2
|
|
; GFX7-NEXT: s_waitcnt lgkmcnt(0)
|
|
; GFX7-NEXT: s_load_dword s4, s[6:7], 0x0
|
|
; GFX7-NEXT: s_mov_b32 s6, 2
|
|
; GFX7-NEXT: v_lshlrev_b32_e64 v0, s6, v0
|
|
; GFX7-NEXT: v_add_i32_e64 v1, s[6:7], s5, v0
|
|
; GFX7-NEXT: s_waitcnt lgkmcnt(0)
|
|
; GFX7-NEXT: v_mov_b32_e32 v0, s4
|
|
; GFX7-NEXT: buffer_store_dword v0, v1, s[0:3], 0 offen
|
|
; GFX7-NEXT: s_waitcnt vmcnt(0)
|
|
; GFX7-NEXT: s_endpgm
|
|
;
|
|
; GFX10-WGP-LABEL: private_volatile_store_1:
|
|
; GFX10-WGP: ; %bb.0: ; %entry
|
|
; GFX10-WGP-NEXT: s_add_u32 s0, s0, s17
|
|
; GFX10-WGP-NEXT: s_addc_u32 s1, s1, 0
|
|
; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
|
|
; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
|
|
; GFX10-WGP-NEXT: s_load_dword s4, s[8:9], 0x8
|
|
; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
|
|
; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
|
|
; GFX10-WGP-NEXT: s_load_dword s6, s[8:9], 0x8
|
|
; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
|
|
; GFX10-WGP-NEXT: s_load_dword s4, s[4:5], 0x0
|
|
; GFX10-WGP-NEXT: s_mov_b32 s5, 2
|
|
; GFX10-WGP-NEXT: v_lshl_add_u32 v1, v0, s5, s6
|
|
; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
|
|
; GFX10-WGP-NEXT: v_mov_b32_e32 v0, s4
|
|
; GFX10-WGP-NEXT: buffer_store_dword v0, v1, s[0:3], 0 offen
|
|
; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
|
|
; GFX10-WGP-NEXT: s_endpgm
|
|
;
|
|
; GFX10-CU-LABEL: private_volatile_store_1:
|
|
; GFX10-CU: ; %bb.0: ; %entry
|
|
; GFX10-CU-NEXT: s_add_u32 s0, s0, s17
|
|
; GFX10-CU-NEXT: s_addc_u32 s1, s1, 0
|
|
; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
|
|
; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
|
|
; GFX10-CU-NEXT: s_load_dword s4, s[8:9], 0x8
|
|
; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
|
|
; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
|
|
; GFX10-CU-NEXT: s_load_dword s6, s[8:9], 0x8
|
|
; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
|
|
; GFX10-CU-NEXT: s_load_dword s4, s[4:5], 0x0
|
|
; GFX10-CU-NEXT: s_mov_b32 s5, 2
|
|
; GFX10-CU-NEXT: v_lshl_add_u32 v1, v0, s5, s6
|
|
; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
|
|
; GFX10-CU-NEXT: v_mov_b32_e32 v0, s4
|
|
; GFX10-CU-NEXT: buffer_store_dword v0, v1, s[0:3], 0 offen
|
|
; GFX10-CU-NEXT: s_waitcnt_vscnt null, 0x0
|
|
; GFX10-CU-NEXT: s_endpgm
|
|
;
|
|
; SKIP-CACHE-INV-LABEL: private_volatile_store_1:
|
|
; SKIP-CACHE-INV: ; %bb.0: ; %entry
|
|
; SKIP-CACHE-INV-NEXT: s_getpc_b64 s[12:13]
|
|
; SKIP-CACHE-INV-NEXT: s_mov_b32 s12, s0
|
|
; SKIP-CACHE-INV-NEXT: s_load_dwordx4 s[12:15], s[12:13], 0x0
|
|
; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
|
|
; SKIP-CACHE-INV-NEXT: s_add_u32 s12, s12, s11
|
|
; SKIP-CACHE-INV-NEXT: s_addc_u32 s13, s13, 0
|
|
; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
|
|
; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
|
|
; SKIP-CACHE-INV-NEXT: s_load_dword s0, s[4:5], 0x2
|
|
; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[2:3], s[4:5], 0x0
|
|
; SKIP-CACHE-INV-NEXT: s_load_dword s1, s[4:5], 0x2
|
|
; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
|
|
; SKIP-CACHE-INV-NEXT: s_load_dword s0, s[2:3], 0x0
|
|
; SKIP-CACHE-INV-NEXT: s_mov_b32 s2, 2
|
|
; SKIP-CACHE-INV-NEXT: v_lshlrev_b32_e64 v0, s2, v0
|
|
; SKIP-CACHE-INV-NEXT: v_add_i32_e64 v1, s[2:3], s1, v0
|
|
; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
|
|
; SKIP-CACHE-INV-NEXT: v_mov_b32_e32 v0, s0
|
|
; SKIP-CACHE-INV-NEXT: buffer_store_dword v0, v1, s[12:15], 0 offen
|
|
; SKIP-CACHE-INV-NEXT: s_waitcnt vmcnt(0)
|
|
; SKIP-CACHE-INV-NEXT: s_endpgm
|
|
;
|
|
; GFX11-WGP-LABEL: private_volatile_store_1:
|
|
; GFX11-WGP: ; %bb.0: ; %entry
|
|
; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
|
|
; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
|
|
; GFX11-WGP-NEXT: s_load_b32 s0, s[4:5], 0x8
|
|
; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
|
|
; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
|
|
; GFX11-WGP-NEXT: s_load_b32 s2, s[4:5], 0x8
|
|
; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
|
|
; GFX11-WGP-NEXT: s_load_b32 s0, s[0:1], 0x0
|
|
; GFX11-WGP-NEXT: s_mov_b32 s1, 0x3ff
|
|
; GFX11-WGP-NEXT: v_and_b32_e64 v0, v0, s1
|
|
; GFX11-WGP-NEXT: s_mov_b32 s1, 2
|
|
; GFX11-WGP-NEXT: v_lshl_add_u32 v1, v0, s1, s2
|
|
; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
|
|
; GFX11-WGP-NEXT: v_mov_b32_e32 v0, s0
|
|
; GFX11-WGP-NEXT: scratch_store_b32 v1, v0, off dlc
|
|
; GFX11-WGP-NEXT: s_waitcnt_vscnt null, 0x0
|
|
; GFX11-WGP-NEXT: s_endpgm
|
|
;
|
|
; GFX11-CU-LABEL: private_volatile_store_1:
|
|
; GFX11-CU: ; %bb.0: ; %entry
|
|
; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
|
|
; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
|
|
; GFX11-CU-NEXT: s_load_b32 s0, s[4:5], 0x8
|
|
; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
|
|
; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
|
|
; GFX11-CU-NEXT: s_load_b32 s2, s[4:5], 0x8
|
|
; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
|
|
; GFX11-CU-NEXT: s_load_b32 s0, s[0:1], 0x0
|
|
; GFX11-CU-NEXT: s_mov_b32 s1, 0x3ff
|
|
; GFX11-CU-NEXT: v_and_b32_e64 v0, v0, s1
|
|
; GFX11-CU-NEXT: s_mov_b32 s1, 2
|
|
; GFX11-CU-NEXT: v_lshl_add_u32 v1, v0, s1, s2
|
|
; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
|
|
; GFX11-CU-NEXT: v_mov_b32_e32 v0, s0
|
|
; GFX11-CU-NEXT: scratch_store_b32 v1, v0, off dlc
|
|
; GFX11-CU-NEXT: s_waitcnt_vscnt null, 0x0
|
|
; GFX11-CU-NEXT: s_endpgm
|
|
;
|
|
; GFX12-WGP-LABEL: private_volatile_store_1:
|
|
; GFX12-WGP: ; %bb.0: ; %entry
|
|
; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
|
|
; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
|
|
; GFX12-WGP-NEXT: s_load_b32 s0, s[4:5], 0x8
|
|
; GFX12-WGP-NEXT: s_load_b64 s[2:3], s[4:5], 0x0
|
|
; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
|
|
; GFX12-WGP-NEXT: s_load_b32 s0, s[4:5], 0x8
|
|
; GFX12-WGP-NEXT: s_load_b32 s1, s[2:3], 0x0
|
|
; GFX12-WGP-NEXT: s_mov_b32 s2, 0x3ff
|
|
; GFX12-WGP-NEXT: v_and_b32_e64 v0, v0, s2
|
|
; GFX12-WGP-NEXT: s_mov_b32 s2, 2
|
|
; GFX12-WGP-NEXT: s_wait_alu depctr_sa_sdst(0)
|
|
; GFX12-WGP-NEXT: v_lshlrev_b32_e64 v1, s2, v0
|
|
; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
|
|
; GFX12-WGP-NEXT: v_mov_b32_e32 v0, s1
|
|
; GFX12-WGP-NEXT: s_wait_loadcnt 0x0
|
|
; GFX12-WGP-NEXT: s_wait_samplecnt 0x0
|
|
; GFX12-WGP-NEXT: s_wait_bvhcnt 0x0
|
|
; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
|
|
; GFX12-WGP-NEXT: s_wait_storecnt 0x0
|
|
; GFX12-WGP-NEXT: scratch_store_b32 v1, v0, s0 scope:SCOPE_SYS
|
|
; GFX12-WGP-NEXT: s_wait_storecnt 0x0
|
|
; GFX12-WGP-NEXT: s_endpgm
|
|
;
|
|
; GFX12-CU-LABEL: private_volatile_store_1:
|
|
; GFX12-CU: ; %bb.0: ; %entry
|
|
; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
|
|
; GFX12-CU-NEXT: s_wait_kmcnt 0x0
|
|
; GFX12-CU-NEXT: s_load_b32 s0, s[4:5], 0x8
|
|
; GFX12-CU-NEXT: s_load_b64 s[2:3], s[4:5], 0x0
|
|
; GFX12-CU-NEXT: s_wait_kmcnt 0x0
|
|
; GFX12-CU-NEXT: s_load_b32 s0, s[4:5], 0x8
|
|
; GFX12-CU-NEXT: s_load_b32 s1, s[2:3], 0x0
|
|
; GFX12-CU-NEXT: s_mov_b32 s2, 0x3ff
|
|
; GFX12-CU-NEXT: v_and_b32_e64 v0, v0, s2
|
|
; GFX12-CU-NEXT: s_mov_b32 s2, 2
|
|
; GFX12-CU-NEXT: s_wait_alu depctr_sa_sdst(0)
|
|
; GFX12-CU-NEXT: v_lshlrev_b32_e64 v1, s2, v0
|
|
; GFX12-CU-NEXT: s_wait_kmcnt 0x0
|
|
; GFX12-CU-NEXT: v_mov_b32_e32 v0, s1
|
|
; GFX12-CU-NEXT: s_wait_loadcnt 0x0
|
|
; GFX12-CU-NEXT: s_wait_samplecnt 0x0
|
|
; GFX12-CU-NEXT: s_wait_bvhcnt 0x0
|
|
; GFX12-CU-NEXT: s_wait_kmcnt 0x0
|
|
; GFX12-CU-NEXT: s_wait_storecnt 0x0
|
|
; GFX12-CU-NEXT: scratch_store_b32 v1, v0, s0 scope:SCOPE_SYS
|
|
; GFX12-CU-NEXT: s_wait_storecnt 0x0
|
|
; GFX12-CU-NEXT: s_endpgm
|
|
;
|
|
; GFX1250-LABEL: private_volatile_store_1:
|
|
; GFX1250: ; %bb.0: ; %entry
|
|
; GFX1250-NEXT: global_prefetch_b8 v0, s[0:1] scope:SCOPE_SE
|
|
; GFX1250-NEXT: v_nop
|
|
; GFX1250-NEXT: s_setreg_imm32_b32 hwreg(HW_REG_WAVE_MODE, 25, 1), 1 ; msbs: dst=0 src0=0 src1=0 src2=0
|
|
; GFX1250-NEXT: s_load_b64 s[0:1], s[4:5], 0x0 nv
|
|
; GFX1250-NEXT: s_wait_kmcnt 0x0
|
|
; GFX1250-NEXT: s_load_b32 s0, s[4:5], 0x8 nv
|
|
; GFX1250-NEXT: s_load_b64 s[2:3], s[4:5], 0x0 nv
|
|
; GFX1250-NEXT: s_wait_kmcnt 0x0
|
|
; GFX1250-NEXT: s_load_b32 s0, s[4:5], 0x8 nv
|
|
; GFX1250-NEXT: s_load_b32 s1, s[2:3], 0x0
|
|
; GFX1250-NEXT: s_wait_xcnt 0x0
|
|
; GFX1250-NEXT: s_mov_b32 s2, 0x3ff
|
|
; GFX1250-NEXT: v_and_b32_e64 v1, v0, s2
|
|
; GFX1250-NEXT: s_wait_kmcnt 0x0
|
|
; GFX1250-NEXT: v_mov_b32_e32 v0, s1
|
|
; GFX1250-NEXT: s_wait_xcnt 0x0
|
|
; GFX1250-NEXT: scratch_store_b32 v1, v0, s0 scale_offset scope:SCOPE_SYS
|
|
; GFX1250-NEXT: s_wait_storecnt 0x0
|
|
; GFX1250-NEXT: s_endpgm
|
|
ptr addrspace(1) %in, ptr addrspace(5) %out) {
|
|
entry:
|
|
%tid = call i32 @llvm.amdgcn.workitem.id.x()
|
|
%val = load i32, ptr addrspace(1) %in, align 4
|
|
%out.gep = getelementptr inbounds i32, ptr addrspace(5) %out, i32 %tid
|
|
store volatile i32 %val, ptr addrspace(5) %out.gep
|
|
ret void
|
|
}
|
|
|
|
declare i32 @llvm.amdgcn.workitem.id.x()
|