75 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 32; RUN: llc -global-isel -mtriple=amdgcn-amd-amdpal -mcpu=gfx1010 -new-reg-bank-select < %s | FileCheck -check-prefix=GFX10 %s3 4define void @temporal_divergent_i32(float %val, ptr %addr) {5; GFX10-LABEL: temporal_divergent_i32:6; GFX10: ; %bb.0: ; %entry7; GFX10-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)8; GFX10-NEXT: s_mov_b32 s5, -19; GFX10-NEXT: s_mov_b32 s4, 010; GFX10-NEXT: .LBB0_1: ; %loop11; GFX10-NEXT: ; =>This Inner Loop Header: Depth=112; GFX10-NEXT: s_add_i32 s5, s5, 113; GFX10-NEXT: v_cvt_f32_u32_e32 v3, s514; GFX10-NEXT: v_cmp_gt_f32_e32 vcc_lo, v3, v015; GFX10-NEXT: v_mov_b32_e32 v3, s516; GFX10-NEXT: s_or_b32 s4, vcc_lo, s417; GFX10-NEXT: s_andn2_b32 exec_lo, exec_lo, s418; GFX10-NEXT: s_cbranch_execnz .LBB0_119; GFX10-NEXT: ; %bb.2: ; %exit20; GFX10-NEXT: s_or_b32 exec_lo, exec_lo, s421; GFX10-NEXT: flat_store_dword v[1:2], v322; GFX10-NEXT: s_waitcnt lgkmcnt(0)23; GFX10-NEXT: s_setpc_b64 s[30:31]24entry:25 br label %loop26 27loop:28 %counter = phi i32 [ 0, %entry ], [ %counter.plus.1, %loop ]29 %f.counter = uitofp i32 %counter to float30 %cond = fcmp ogt float %f.counter, %val31 %counter.plus.1 = add i32 %counter, 132 br i1 %cond, label %exit, label %loop33 34exit:35 store i32 %counter, ptr %addr36 ret void37}38 39define void @temporal_divergent_i32_multiple_use(float %val, ptr %addr, ptr %addr2) {40; GFX10-LABEL: temporal_divergent_i32_multiple_use:41; GFX10: ; %bb.0: ; %entry42; GFX10-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)43; GFX10-NEXT: s_mov_b32 s5, -144; GFX10-NEXT: s_mov_b32 s4, 045; GFX10-NEXT: .LBB1_1: ; %loop46; GFX10-NEXT: ; =>This Inner Loop Header: Depth=147; GFX10-NEXT: s_add_i32 s5, s5, 148; GFX10-NEXT: v_cvt_f32_u32_e32 v5, s549; GFX10-NEXT: v_cmp_gt_f32_e32 vcc_lo, v5, v050; GFX10-NEXT: v_mov_b32_e32 v5, s551; GFX10-NEXT: s_or_b32 s4, vcc_lo, s452; GFX10-NEXT: s_andn2_b32 exec_lo, exec_lo, s453; GFX10-NEXT: s_cbranch_execnz .LBB1_154; GFX10-NEXT: ; %bb.2: ; %exit55; GFX10-NEXT: s_or_b32 exec_lo, exec_lo, s456; GFX10-NEXT: flat_store_dword v[1:2], v557; GFX10-NEXT: flat_store_dword v[3:4], v558; GFX10-NEXT: s_waitcnt lgkmcnt(0)59; GFX10-NEXT: s_setpc_b64 s[30:31]60entry:61 br label %loop62 63loop:64 %counter = phi i32 [ 0, %entry ], [ %counter.plus.1, %loop ]65 %f.counter = uitofp i32 %counter to float66 %cond = fcmp ogt float %f.counter, %val67 %counter.plus.1 = add i32 %counter, 168 br i1 %cond, label %exit, label %loop69 70exit:71 store i32 %counter, ptr %addr72 store i32 %counter, ptr %addr273 ret void74}75