Files
TheRock/compiler/amd-llvm/llvm/test/CodeGen/AMDGPU/huge-private-buffer.ll
T
derek.holloway 7502bf64a4
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
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

98 lines
4.2 KiB
LLVM

; RUN: llc -mtriple=amdgcn-amd-amdhsa < %s | FileCheck -check-prefixes=GCN,SCRATCH128K %s
; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1010 -mattr=+wavefrontsize64 < %s | FileCheck -check-prefixes=GCN,SCRATCH128K %s
; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1010 < %s | FileCheck -check-prefixes=GCN,SCRATCH256K %s
; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1100 -mattr=+wavefrontsize64 -amdgpu-enable-vopd=0 < %s | FileCheck -check-prefixes=GCN,SCRATCH128K %s
; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1100 -amdgpu-enable-vopd=0 < %s | FileCheck -check-prefixes=GCN,SCRATCH256K %s
; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1200 -mattr=+wavefrontsize64 -amdgpu-enable-vopd=0 < %s | FileCheck -check-prefixes=GCN,SCRATCH1024K %s
; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1200 -amdgpu-enable-vopd=0 < %s | FileCheck -check-prefixes=GCN,SCRATCH2048K %s
; GCN-LABEL: {{^}}scratch_buffer_known_high_masklo16:
; GCN: s_mov_b32 [[FI:s[0-9]+]], 0{{$}}
; GCN: s_and_b32 s{{[0-9]+}}, [[FI]], 0xfffc
; GCN: v_mov_b32_e32 [[VFI:v[0-9]+]], [[FI]]{{$}}
; GCN: {{flat|global}}_store_{{dword|b32}} v[{{[0-9]+:[0-9]+}}], [[VFI]]
define amdgpu_kernel void @scratch_buffer_known_high_masklo16() {
%alloca = alloca i32, align 4, addrspace(5)
store volatile i32 15, ptr addrspace(5) %alloca
%toint = ptrtoint ptr addrspace(5) %alloca to i32
%masked = and i32 %toint, 65535
store volatile i32 %masked, ptr addrspace(1) poison
ret void
}
; GCN-LABEL: {{^}}scratch_buffer_known_high_masklo17:
; SCRATCH256K: s_mov_b32 [[FI:s[0-9]+]], 0{{$}}
; SCRATCH256K: s_and_b32 s{{[0-9]+}}, [[FI]], 0x1fffc
; SCRATCH1024K: s_mov_b32 [[FI:s[0-9]+]], 0{{$}}
; SCRATCH1024K: s_and_b32 s{{[0-9]+}}, [[FI]], 0x1fffc
; SCRATCH2048K: s_mov_b32 [[FI:s[0-9]+]], 0{{$}}
; SCRATCH2048K: s_and_b32 s{{[0-9]+}}, [[FI]], 0x1fffc
; GCN: {{flat|global}}_store_{{dword|b32}} v[{{[0-9]+:[0-9]+}}],
define amdgpu_kernel void @scratch_buffer_known_high_masklo17() {
%alloca = alloca i32, align 4, addrspace(5)
store volatile i32 15, ptr addrspace(5) %alloca
%toint = ptrtoint ptr addrspace(5) %alloca to i32
%masked = and i32 %toint, 131071
store volatile i32 %masked, ptr addrspace(1) poison
ret void
}
; GCN-LABEL: {{^}}scratch_buffer_known_high_masklo18:
; SCRATCH128K: v_mov_b32_e32 [[FI:v[0-9]+]], 0{{$}}
; SCRATCH256K: v_mov_b32_e32 [[FI:v[0-9]+]], 0{{$}}
; SCRATCH128K-NOT: and_b32
; SCRATCH256K-NOT: and_b32
; SCRATCH1024K: s_mov_b32 [[FI:s[0-9]+]], 0{{$}}
; SCRATCH1024K: s_and_b32 s{{[0-9]+}}, [[FI]], 0x3fffc
; SCRATCH2048K: s_mov_b32 [[FI:s[0-9]+]], 0{{$}}
; SCRATCH2048K: s_and_b32 s{{[0-9]+}}, [[FI]], 0x3fffc
; GCN: {{flat|global}}_store_{{dword|b32}} v[{{[0-9]+:[0-9]+}}],
define amdgpu_kernel void @scratch_buffer_known_high_masklo18() {
%alloca = alloca i32, align 4, addrspace(5)
store volatile i32 15, ptr addrspace(5) %alloca
%toint = ptrtoint ptr addrspace(5) %alloca to i32
%masked = and i32 %toint, 262143
store volatile i32 %masked, ptr addrspace(1) poison
ret void
}
; GCN-LABEL: {{^}}scratch_buffer_known_high_masklo20:
; SCRATCH128K: v_mov_b32_e32 [[FI:v[0-9]+]], 0{{$}}
; SCRATCH256K: v_mov_b32_e32 [[FI:v[0-9]+]], 0{{$}}
; SCRATCH1024K: v_mov_b32_e32 [[FI:v[0-9]+]], 0{{$}}
; SCRATCH128K-NOT: and_b32
; SCRATCH256K-NOT: and_b32
; SCRATCH1024K-NOT: and_b32
; SCRATCH2048K: s_mov_b32 [[FI:s[0-9]+]], 0{{$}}
; SCRATCH2048K: s_and_b32 s{{[0-9]+}}, [[FI]], 0xffffc
; GCN: {{flat|global}}_store_{{dword|b32}} v[{{[0-9]+:[0-9]+}}],
define amdgpu_kernel void @scratch_buffer_known_high_masklo20() {
%alloca = alloca i32, align 4, addrspace(5)
store volatile i32 15, ptr addrspace(5) %alloca
%toint = ptrtoint ptr addrspace(5) %alloca to i32
%masked = and i32 %toint, 1048575
store volatile i32 %masked, ptr addrspace(1) poison
ret void
}
; GCN-LABEL: {{^}}scratch_buffer_known_high_masklo21:
; GCN: v_mov_b32_e32 [[FI:v[0-9]+]], 0{{$}}
; GCN-NOT: and_b32
; GCN: {{flat|global}}_store_{{dword|b32}} v[{{[0-9]+:[0-9]+}}],
define amdgpu_kernel void @scratch_buffer_known_high_masklo21() {
%alloca = alloca i32, align 4, addrspace(5)
store volatile i32 15, ptr addrspace(5) %alloca
%toint = ptrtoint ptr addrspace(5) %alloca to i32
%masked = and i32 %toint, 2097151
store volatile i32 %masked, ptr addrspace(1) poison
ret void
}