1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 2
2 ; RUN: llc -mtriple=amdgcn -mcpu=gfx1010 -amdgpu-atomic-optimizer-strategy=None -verify-machineinstrs < %s | FileCheck %s -check-prefix=GCN
4 define amdgpu_cs void @should_not_hoist_set_inactive(<4 x i32> inreg %i14, i32 inreg %v, i32 %lane, i32 %f, i32 %f2) #0 {
5 ; GCN-LABEL: should_not_hoist_set_inactive:
6 ; GCN: ; %bb.0: ; %.entry
7 ; GCN-NEXT: v_cmp_gt_i32_e32 vcc_lo, 3, v1
8 ; GCN-NEXT: v_cmp_eq_u32_e64 s5, 0, v0
9 ; GCN-NEXT: v_cmp_ne_u32_e64 s6, 0, v2
10 ; GCN-NEXT: s_mov_b32 s7, 0
11 ; GCN-NEXT: s_branch .LBB0_2
12 ; GCN-NEXT: .LBB0_1: ; %bb4
13 ; GCN-NEXT: ; in Loop: Header=BB0_2 Depth=1
14 ; GCN-NEXT: s_waitcnt_depctr 0xffe3
15 ; GCN-NEXT: s_or_b32 exec_lo, exec_lo, s8
16 ; GCN-NEXT: s_and_b32 s8, exec_lo, s6
17 ; GCN-NEXT: s_or_b32 s7, s8, s7
18 ; GCN-NEXT: s_andn2_b32 exec_lo, exec_lo, s7
19 ; GCN-NEXT: s_cbranch_execz .LBB0_5
20 ; GCN-NEXT: .LBB0_2: ; %bb
21 ; GCN-NEXT: ; =>This Inner Loop Header: Depth=1
22 ; GCN-NEXT: s_and_saveexec_b32 s8, vcc_lo
23 ; GCN-NEXT: s_cbranch_execz .LBB0_1
24 ; GCN-NEXT: ; %bb.3: ; %bb1
25 ; GCN-NEXT: ; in Loop: Header=BB0_2 Depth=1
26 ; GCN-NEXT: v_mov_b32_e32 v3, s4
27 ; GCN-NEXT: s_not_b32 exec_lo, exec_lo
28 ; GCN-NEXT: v_mov_b32_e32 v3, 0
29 ; GCN-NEXT: s_not_b32 exec_lo, exec_lo
30 ; GCN-NEXT: s_or_saveexec_b32 s9, -1
31 ; GCN-NEXT: v_mov_b32_e32 v4, 0
32 ; GCN-NEXT: v_mov_b32_dpp v4, v3 row_xmask:1 row_mask:0xf bank_mask:0xf
33 ; GCN-NEXT: s_mov_b32 exec_lo, s9
34 ; GCN-NEXT: v_mov_b32_e32 v0, v4
35 ; GCN-NEXT: s_and_b32 exec_lo, exec_lo, s5
36 ; GCN-NEXT: s_cbranch_execz .LBB0_1
37 ; GCN-NEXT: ; %bb.4: ; %bb2
38 ; GCN-NEXT: ; in Loop: Header=BB0_2 Depth=1
39 ; GCN-NEXT: buffer_atomic_add v0, off, s[0:3], 0
40 ; GCN-NEXT: s_branch .LBB0_1
41 ; GCN-NEXT: .LBB0_5: ; %bb5
47 %i17 = icmp slt i32 %f, 3
48 br i1 %i17, label %bb1, label %bb4
51 %i25 = call i32 @llvm.amdgcn.set.inactive.i32(i32 %v, i32 0)
52 %i26 = call i32 @llvm.amdgcn.update.dpp.i32(i32 0, i32 %i25, i32 353, i32 15, i32 15, i1 false)
53 %i38 = call i32 @llvm.amdgcn.strict.wwm.i32(i32 %i26)
54 %i39 = icmp eq i32 %lane, 0
55 br i1 %i39, label %bb2, label %bb3
58 %i41 = call i32 @llvm.amdgcn.raw.buffer.atomic.add.i32(i32 %i38, <4 x i32> %i14, i32 0, i32 0, i32 0)
65 %exit = icmp eq i32 %f2, 0
66 br i1 %exit, label %bb, label %bb5
72 declare i32 @llvm.amdgcn.set.inactive.i32(i32, i32)
73 declare i32 @llvm.amdgcn.update.dpp.i32(i32, i32, i32 immarg, i32 immarg, i32 immarg, i1 immarg)
74 declare i32 @llvm.amdgcn.strict.wwm.i32(i32)
75 declare i32 @llvm.amdgcn.raw.buffer.atomic.add.i32(i32, <4 x i32>, i32, i32, i32 immarg)