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
47 lines
2.0 KiB
LLVM
47 lines
2.0 KiB
LLVM
; RUN: llc -mtriple=amdgcn--amdpal -mcpu=gfx1200 < %s | FileCheck %s
|
|
|
|
; CHECK-LABEL: .shader_functions:
|
|
|
|
; Make sure that .vgpr_count doesn't include the %inactive.vgpr registers.
|
|
; CHECK-LABEL: leaf_shader:
|
|
; CHECK: .vgpr_count: 0xc{{$}}
|
|
|
|
; Function without calls.
|
|
define amdgpu_cs_chain void @_leaf_shader(ptr %output.ptr, i32 inreg %input.value,
|
|
i32 %active.vgpr1, i32 %active.vgpr2,
|
|
i32 %inactive.vgpr1, i32 %inactive.vgpr2, i32 %inactive.vgpr3,
|
|
i32 %inactive.vgpr4, i32 %inactive.vgpr5, i32 %inactive.vgpr6)
|
|
local_unnamed_addr {
|
|
entry:
|
|
%dead.val = call i32 @llvm.amdgcn.dead.i32()
|
|
%is.whole.wave = call i1 @llvm.amdgcn.init.whole.wave()
|
|
br i1 %is.whole.wave, label %compute, label %merge
|
|
|
|
compute:
|
|
; Perform a more complex computation using active VGPRs
|
|
%square = mul i32 %active.vgpr1, %active.vgpr1
|
|
%product = mul i32 %square, %active.vgpr2
|
|
%sum = add i32 %product, %input.value
|
|
%result = add i32 %sum, 42
|
|
br label %merge
|
|
|
|
merge:
|
|
%final.result = phi i32 [ 0, %entry ], [ %result, %compute ]
|
|
%final.inactive1 = phi i32 [ %inactive.vgpr1, %entry ], [ %dead.val, %compute ]
|
|
%final.inactive2 = phi i32 [ %inactive.vgpr2, %entry ], [ %dead.val, %compute ]
|
|
%final.inactive3 = phi i32 [ %inactive.vgpr3, %entry ], [ %dead.val, %compute ]
|
|
%final.inactive4 = phi i32 [ %inactive.vgpr4, %entry ], [ %dead.val, %compute ]
|
|
%final.inactive5 = phi i32 [ %inactive.vgpr5, %entry ], [ %dead.val, %compute ]
|
|
%final.inactive6 = phi i32 [ %inactive.vgpr6, %entry ], [ %dead.val, %compute ]
|
|
|
|
store i32 %final.result, ptr %output.ptr, align 4
|
|
|
|
ret void
|
|
}
|
|
|
|
declare i32 @llvm.amdgcn.dead.i32()
|
|
declare i1 @llvm.amdgcn.init.whole.wave()
|
|
declare void @llvm.amdgcn.cs.chain.p0.i32.v4i32.sl_i32i32i32i32i32i32i32i32i32i32i32i32s(ptr, i32, <4 x i32>, { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }, i32 immarg, ...)
|
|
|
|
declare amdgpu_cs_chain void @retry_vgpr_alloc.v4i32(<4 x i32> inreg)
|