Files
TheRock/compiler/amd-llvm/llvm/test/CodeGen/AMDGPU/issue139317-bad-opsel-reg-sequence-fold.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

68 lines
3.0 KiB
LLVM

; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx942 < %s | FileCheck -check-prefix=GFX942 %s
; Check for correct folding of the constants produced by the
; stepvector into the fadd. The value should not get lost when folding
; through subregister extracts of reg_sequence.
define amdgpu_kernel void @stepper_test_kernel_DType_I6A6AcB6A6AsA6A6A_68a5362b97a102776ef47f0e8e894a38(ptr addrspace(1) readonly captures(none) %.global, ptr addrspace(1) writeonly captures(none) %.global1, i32 %arg2) {
; GFX942-LABEL: stepper_test_kernel_DType_I6A6AcB6A6AsA6A6A_68a5362b97a102776ef47f0e8e894a38:
; GFX942: ; %bb.0: ; %bb
; GFX942-NEXT: s_load_dword s6, s[4:5], 0x10
; GFX942-NEXT: s_mov_b32 s7, 0
; GFX942-NEXT: s_waitcnt lgkmcnt(0)
; GFX942-NEXT: s_cmp_eq_u32 s6, 0
; GFX942-NEXT: s_cbranch_scc1 .LBB0_3
; GFX942-NEXT: ; %bb.1: ; %.lr.ph.preheader
; GFX942-NEXT: s_load_dwordx4 s[0:3], s[4:5], 0x0
; GFX942-NEXT: s_mov_b32 s8, 0x47004600
; GFX942-NEXT: s_mov_b32 s9, 0x45004400
; GFX942-NEXT: s_mov_b32 s10, 0x42004000
; GFX942-NEXT: s_mov_b64 s[4:5], 0
; GFX942-NEXT: v_mov_b32_e32 v2, 0
; GFX942-NEXT: v_mov_b64_e32 v[0:1], s[6:7]
; GFX942-NEXT: .LBB0_2: ; %.lr.ph
; GFX942-NEXT: ; =>This Inner Loop Header: Depth=1
; GFX942-NEXT: s_waitcnt lgkmcnt(0)
; GFX942-NEXT: global_load_dwordx4 v[4:7], v2, s[2:3]
; GFX942-NEXT: s_add_u32 s4, s4, 8
; GFX942-NEXT: s_addc_u32 s5, s5, 0
; GFX942-NEXT: v_cmp_lt_u64_e32 vcc, s[4:5], v[0:1]
; GFX942-NEXT: s_waitcnt vmcnt(0)
; GFX942-NEXT: v_pk_add_f16 v7, v7, s8
; GFX942-NEXT: v_pk_add_f16 v6, v6, s9
; GFX942-NEXT: v_pk_add_f16 v5, v5, s10
; GFX942-NEXT: v_pk_add_f16 v4, v4, 1.0 op_sel:[0,1] op_sel_hi:[1,0]
; GFX942-NEXT: global_store_dwordx4 v2, v[4:7], s[0:1]
; GFX942-NEXT: s_add_u32 s0, s0, 16
; GFX942-NEXT: s_addc_u32 s1, s1, 0
; GFX942-NEXT: s_add_u32 s2, s2, 16
; GFX942-NEXT: s_addc_u32 s3, s3, 0
; GFX942-NEXT: s_cbranch_vccnz .LBB0_2
; GFX942-NEXT: .LBB0_3: ; %._crit_edge
; GFX942-NEXT: s_endpgm
bb:
%i = tail call <8 x i32> @llvm.stepvector.v8i32()
%i3 = sitofp <8 x i32> %i to <8 x half>
%i4 = zext i32 %arg2 to i64
%.not = icmp eq i32 %arg2, 0
br i1 %.not, label %._crit_edge, label %.lr.ph
.lr.ph: ; preds = %.lr.ph, %bb
%i5 = phi i64 [ %i6, %.lr.ph ], [ 0, %bb ]
%i6 = add nuw nsw i64 %i5, 8
%i7 = getelementptr inbounds nuw half, ptr addrspace(1) %.global1, i64 %i5
%i8 = load <8 x half>, ptr addrspace(1) %i7, align 2
%i9 = fadd <8 x half> %i8, %i3
%i10 = getelementptr inbounds nuw half, ptr addrspace(1) %.global, i64 %i5
store <8 x half> %i9, ptr addrspace(1) %i10, align 2
%i11 = icmp samesign ult i64 %i6, %i4
br i1 %i11, label %.lr.ph, label %._crit_edge
._crit_edge: ; preds = %.lr.ph, %bb
ret void
}
declare <8 x i32> @llvm.stepvector.v8i32() #0
attributes #0 = { nocallback nofree nosync nounwind willreturn memory(none) }