Files
TheRock/compiler/amd-llvm/llvm/test/CodeGen/AMDGPU/release-vgprs-spill.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

48 lines
2.0 KiB
LLVM

; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 6
; RUN: opt -mtriple=amdgcn -passes=amdgpu-attributor < %s | llc -mtriple=amdgcn -mcpu=gfx1100 | FileCheck %s
; This function uses scratch_store to spill some values to the stack. While
; these stores are potentially outstanding it should not send the DEALLOC_VGPRS
; message.
define amdgpu_kernel void @f(ptr %ptr, i32 %arg) "amdgpu-flat-work-group-size"="64,64" {
; CHECK-LABEL: f:
; CHECK: ; %bb.0:
; CHECK-NEXT: s_load_b64 s[2:3], s[0:1], 0x24
; CHECK-NEXT: v_lshlrev_b32_e32 v0, 2, v0
; CHECK-NEXT: s_load_b32 s0, s[0:1], 0x2c
; CHECK-NEXT: scratch_store_b32 off, v0, off offset:4 ; 4-byte Folded Spill
; CHECK-NEXT: s_waitcnt lgkmcnt(0)
; CHECK-NEXT: global_load_b32 v0, v0, s[2:3]
; CHECK-NEXT: s_bitcmp0_b32 s0, 0
; CHECK-NEXT: s_waitcnt vmcnt(0)
; CHECK-NEXT: scratch_store_b32 off, v0, off ; 4-byte Folded Spill
; CHECK-NEXT: ;;#ASMSTART
; CHECK-NEXT: ; clobber
; CHECK-NEXT: ;;#ASMEND
; CHECK-NEXT: s_cbranch_scc1 .LBB0_2
; CHECK-NEXT: ; %bb.1: ; %true
; CHECK-NEXT: s_clause 0x1 ; 8-byte Folded Reload
; CHECK-NEXT: scratch_load_b32 v0, off, off offset:4
; CHECK-NEXT: scratch_load_b32 v2, off, off
; CHECK-NEXT: s_waitcnt vmcnt(1)
; CHECK-NEXT: v_add_co_u32 v0, s0, s2, v0
; CHECK-NEXT: s_delay_alu instid0(VALU_DEP_1)
; CHECK-NEXT: v_add_co_ci_u32_e64 v1, null, s3, 0, s0
; CHECK-NEXT: s_waitcnt vmcnt(0)
; CHECK-NEXT: global_store_b32 v[0:1], v2, off
; CHECK-NEXT: .LBB0_2: ; %false
; CHECK-NEXT: s_endpgm
%tid = call i32 @llvm.amdgcn.workitem.id.x()
%gep = getelementptr i32, ptr %ptr, i32 %tid
%val = load i32, ptr %gep
call void asm "; clobber", "~{v[0:31]},~{v[32:63]},~{v[64:95]},~{v[96:127]},~{v[128:159]},~{v[160:191]},~{v[192:223]},~{v[224:255]},~{memory}" ()
%cond = trunc i32 %arg to i1
br i1 %cond, label %true, label %false
true:
store i32 %val, ptr %gep
br label %false
false:
ret void
}