Files
TheRock/compiler/amd-llvm/llvm/test/CodeGen/AMDGPU/wqm-gfx11.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

63 lines
2.8 KiB
LLVM

; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc -mtriple=amdgcn -mcpu=gfx1100 < %s | FileCheck -check-prefixes=CHECK %s
; Test that s_wqm is executed before lds.param.load.
define amdgpu_ps <3 x float> @test_param_load(i32 inreg %attr, <3 x float> %to_add) {
; CHECK-LABEL: test_param_load:
; CHECK: ; %bb.0: ; %main_body
; CHECK-NEXT: s_mov_b32 m0, s0
; CHECK-NEXT: s_mov_b32 s0, exec_lo
; CHECK-NEXT: s_wqm_b32 exec_lo, exec_lo
; CHECK-NEXT: lds_param_load v3, attr0.x wait_vdst:15
; CHECK-NEXT: lds_param_load v4, attr0.y wait_vdst:15
; CHECK-NEXT: lds_param_load v5, attr0.z wait_vdst:15
; CHECK-NEXT: s_mov_b32 exec_lo, s0
; CHECK-NEXT: s_waitcnt expcnt(1)
; CHECK-NEXT: v_dual_add_f32 v0, v3, v0 :: v_dual_add_f32 v1, v4, v1
; CHECK-NEXT: s_waitcnt expcnt(0)
; CHECK-NEXT: v_add_f32_e32 v2, v5, v2
; CHECK-NEXT: ; return to shader part epilog
main_body:
%a = call float @llvm.amdgcn.lds.param.load(i32 0, i32 0, i32 %attr) #1
%b = call float @llvm.amdgcn.lds.param.load(i32 1, i32 0, i32 %attr) #1
%c = call float @llvm.amdgcn.lds.param.load(i32 2, i32 0, i32 %attr) #1
%tmp_0 = insertelement <3 x float> poison, float %a, i32 0
%tmp_1 = insertelement <3 x float> %tmp_0, float %b, i32 1
%tmp_2 = insertelement <3 x float> %tmp_1, float %c, i32 2
%res = fadd <3 x float> %tmp_2, %to_add
ret <3 x float> %res
}
; Test that s_wqm is executed before lds.direct.load.
define amdgpu_ps <3 x float> @test_direct_load(i32 inreg %arg_0, i32 inreg %arg_1, i32 inreg %arg_2, <3 x float> %to_add) {
; CHECK-LABEL: test_direct_load:
; CHECK: ; %bb.0: ; %main_body
; CHECK-NEXT: s_mov_b32 m0, s0
; CHECK-NEXT: s_mov_b32 s0, exec_lo
; CHECK-NEXT: s_wqm_b32 exec_lo, exec_lo
; CHECK-NEXT: lds_direct_load v3 wait_vdst:15
; CHECK-NEXT: s_mov_b32 m0, s1
; CHECK-NEXT: lds_direct_load v4 wait_vdst:15
; CHECK-NEXT: s_mov_b32 m0, s2
; CHECK-NEXT: lds_direct_load v5 wait_vdst:15
; CHECK-NEXT: s_mov_b32 exec_lo, s0
; CHECK-NEXT: s_waitcnt expcnt(1)
; CHECK-NEXT: v_dual_add_f32 v0, v3, v0 :: v_dual_add_f32 v1, v4, v1
; CHECK-NEXT: s_waitcnt expcnt(0)
; CHECK-NEXT: v_add_f32_e32 v2, v5, v2
; CHECK-NEXT: ; return to shader part epilog
main_body:
%a = call float @llvm.amdgcn.lds.direct.load(i32 %arg_0) #1
%b = call float @llvm.amdgcn.lds.direct.load(i32 %arg_1) #1
%c = call float @llvm.amdgcn.lds.direct.load(i32 %arg_2) #1
%tmp_0 = insertelement <3 x float> poison, float %a, i32 0
%tmp_1 = insertelement <3 x float> %tmp_0, float %b, i32 1
%tmp_2 = insertelement <3 x float> %tmp_1, float %c, i32 2
%res = fadd <3 x float> %tmp_2, %to_add
ret <3 x float> %res
}
attributes #1 = { nounwind readnone speculatable willreturn }
declare float @llvm.amdgcn.lds.param.load(i32 immarg, i32 immarg, i32) #1
declare float @llvm.amdgcn.lds.direct.load(i32) #1