103 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 52; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx942 < %s | FileCheck -check-prefixes=GCN %s3 4define amdgpu_kernel void @copy_to_vreg_1(i32 %0) {5; GCN-LABEL: copy_to_vreg_1:6; GCN: ; %bb.0: ; %._crit_edge7; GCN-NEXT: s_load_dword s4, s[4:5], 0x08; GCN-NEXT: s_mov_b32 s5, 09; GCN-NEXT: v_and_b32_e32 v0, 0x3ff, v010; GCN-NEXT: v_mov_b32_e32 v2, 011; GCN-NEXT: s_waitcnt lgkmcnt(0)12; GCN-NEXT: s_sub_i32 s6, 1, s413; GCN-NEXT: s_cmp_lt_u32 s4, 214; GCN-NEXT: s_cselect_b64 s[0:1], -1, 015; GCN-NEXT: s_and_b64 s[2:3], s[0:1], exec16; GCN-NEXT: s_cselect_b32 s2, s6, 117; GCN-NEXT: s_cmp_lg_u64 s[0:1], 018; GCN-NEXT: v_cndmask_b32_e64 v1, 0, 1, s[0:1]19; GCN-NEXT: s_addc_u32 s0, 1, 020; GCN-NEXT: s_cmp_ge_u32 s2, s421; GCN-NEXT: v_readfirstlane_b32 s1, v122; GCN-NEXT: s_cselect_b32 s4, s0, s123; GCN-NEXT: v_mov_b32_e32 v1, s524; GCN-NEXT: s_cmp_lg_u64 0, 025; GCN-NEXT: s_mov_b64 s[0:1], 026; GCN-NEXT: v_cmp_ne_u64_e32 vcc, 0, v[0:1]27; GCN-NEXT: s_cselect_b64 s[2:3], -1, 028; GCN-NEXT: v_mov_b64_e32 v[0:1], 029; GCN-NEXT: s_branch .LBB0_330; GCN-NEXT: .LBB0_1: ; %Flow31; GCN-NEXT: ; in Loop: Header=BB0_3 Depth=132; GCN-NEXT: s_or_b64 exec, exec, s[6:7]33; GCN-NEXT: s_xor_b64 s[8:9], exec, -134; GCN-NEXT: .LBB0_2: ; %Flow335; GCN-NEXT: ; in Loop: Header=BB0_3 Depth=136; GCN-NEXT: s_or_b64 exec, exec, s[4:5]37; GCN-NEXT: s_and_b64 s[4:5], exec, s[8:9]38; GCN-NEXT: s_or_b64 s[0:1], s[4:5], s[0:1]39; GCN-NEXT: s_mov_b32 s4, 040; GCN-NEXT: s_andn2_b64 exec, exec, s[0:1]41; GCN-NEXT: s_cbranch_execz .LBB0_842; GCN-NEXT: .LBB0_3: ; %.lr.ph2743; GCN-NEXT: ; =>This Inner Loop Header: Depth=144; GCN-NEXT: s_cmp_lg_u32 s4, 045; GCN-NEXT: s_cselect_b64 s[4:5], -1, 046; GCN-NEXT: s_or_b64 s[8:9], vcc, s[4:5]47; GCN-NEXT: s_xor_b64 s[6:7], s[8:9], -148; GCN-NEXT: s_and_saveexec_b64 s[4:5], s[8:9]49; GCN-NEXT: s_cbranch_execz .LBB0_550; GCN-NEXT: ; %bb.4: ; %pred.store.if51; GCN-NEXT: ; in Loop: Header=BB0_3 Depth=152; GCN-NEXT: s_or_b64 s[6:7], s[6:7], exec53; GCN-NEXT: global_store_byte v[0:1], v2, off54; GCN-NEXT: .LBB0_5: ; %Flow255; GCN-NEXT: ; in Loop: Header=BB0_3 Depth=156; GCN-NEXT: s_or_b64 exec, exec, s[4:5]57; GCN-NEXT: s_mov_b64 s[8:9], -158; GCN-NEXT: s_and_saveexec_b64 s[4:5], s[6:7]59; GCN-NEXT: s_cbranch_execz .LBB0_260; GCN-NEXT: ; %bb.6: ; %pred.store.continue61; GCN-NEXT: ; in Loop: Header=BB0_3 Depth=162; GCN-NEXT: s_and_saveexec_b64 s[6:7], s[2:3]63; GCN-NEXT: s_xor_b64 s[6:7], exec, s[6:7]64; GCN-NEXT: s_cbranch_execz .LBB0_165; GCN-NEXT: ; %bb.7: ; %pred.store.if4166; GCN-NEXT: ; in Loop: Header=BB0_3 Depth=167; GCN-NEXT: global_store_byte v[0:1], v2, off68; GCN-NEXT: s_branch .LBB0_169; GCN-NEXT: .LBB0_8: ; %DummyReturnBlock70; GCN-NEXT: s_endpgm71._crit_edge:72 %id.x = tail call i32 @llvm.amdgcn.workitem.id.x()73 %div = udiv i32 1, %074 br label %.lr.ph2775 76.lr.ph27: ; preds = %pred.store.if41, %pred.store.continue, %._crit_edge77 %iv = phi i32 [ %div, %._crit_edge ], [ 0, %pred.store.if41 ], [ 0, %pred.store.continue ]78 %cmp = icmp ugt i32 %iv, 079 %broadcast.splatinsert37 = insertelement <4 x i1> zeroinitializer, i1 %cmp, i64 080 %.zext = zext i32 %id.x to i6481 %broadcast.splatinsert39 = insertelement <4 x i64> zeroinitializer, i64 %.zext, i64 082 %cmp.1 = icmp uge <4 x i64> %broadcast.splatinsert39, splat (i64 1)83 %or = or <4 x i1> %cmp.1, %broadcast.splatinsert3784 %extract = extractelement <4 x i1> %or, i64 085 br i1 %extract, label %pred.store.if, label %pred.store.continue86 87pred.store.if: ; preds = %.lr.ph2788 store i8 0, ptr addrspace(1) null, align 6489 br label %pred.store.continue90 91pred.store.continue: ; preds = %pred.store.if, %.lr.ph2792 %extract.1 = extractelement <4 x i1> %or, i64 193 br i1 %extract.1, label %pred.store.if41, label %.lr.ph2794 95pred.store.if41: ; preds = %pred.store.continue96 store i8 0, ptr addrspace(1) null, align 6497 br label %.lr.ph2798}99 100declare noundef range(i32 0, 1024) i32 @llvm.amdgcn.workitem.id.x() #0101 102attributes #0 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }103