;
; GFX8-LABEL: add_i32_varying_vdata:
; GFX8: ; %bb.0: ; %entry
-; GFX8-NEXT: v_mbcnt_lo_u32_b32 v1, exec_lo, 0
; GFX8-NEXT: s_mov_b64 s[2:3], exec
; GFX8-NEXT: s_mov_b32 s4, 0
-; GFX8-NEXT: v_mbcnt_hi_u32_b32 v2, exec_hi, v1
; GFX8-NEXT: ; implicit-def: $vgpr1
; GFX8-NEXT: .LBB2_1: ; %ComputeLoop
; GFX8-NEXT: ; =>This Inner Loop Header: Depth=1
; GFX8-NEXT: s_cmp_lg_u64 s[2:3], 0
; GFX8-NEXT: s_cbranch_scc1 .LBB2_1
; GFX8-NEXT: ; %bb.2: ; %ComputeEnd
-; GFX8-NEXT: v_cmp_eq_u32_e32 vcc, 0, v2
+; GFX8-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX8-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
+; GFX8-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
; GFX8-NEXT: ; implicit-def: $vgpr0
; GFX8-NEXT: s_and_saveexec_b64 s[2:3], vcc
; GFX8-NEXT: s_xor_b64 s[2:3], exec, s[2:3]
;
; GFX9-LABEL: add_i32_varying_vdata:
; GFX9: ; %bb.0: ; %entry
-; GFX9-NEXT: v_mbcnt_lo_u32_b32 v1, exec_lo, 0
; GFX9-NEXT: s_mov_b64 s[2:3], exec
; GFX9-NEXT: s_mov_b32 s4, 0
-; GFX9-NEXT: v_mbcnt_hi_u32_b32 v2, exec_hi, v1
; GFX9-NEXT: ; implicit-def: $vgpr1
; GFX9-NEXT: .LBB2_1: ; %ComputeLoop
; GFX9-NEXT: ; =>This Inner Loop Header: Depth=1
; GFX9-NEXT: s_cmp_lg_u64 s[2:3], 0
; GFX9-NEXT: s_cbranch_scc1 .LBB2_1
; GFX9-NEXT: ; %bb.2: ; %ComputeEnd
-; GFX9-NEXT: v_cmp_eq_u32_e32 vcc, 0, v2
+; GFX9-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX9-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
+; GFX9-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
; GFX9-NEXT: ; implicit-def: $vgpr0
; GFX9-NEXT: s_and_saveexec_b64 s[2:3], vcc
; GFX9-NEXT: s_xor_b64 s[2:3], exec, s[2:3]
;
; GFX10W64-LABEL: add_i32_varying_vdata:
; GFX10W64: ; %bb.0: ; %entry
-; GFX10W64-NEXT: v_mbcnt_lo_u32_b32 v1, exec_lo, 0
; GFX10W64-NEXT: s_mov_b64 s[2:3], exec
; GFX10W64-NEXT: s_mov_b32 s4, 0
-; GFX10W64-NEXT: v_mbcnt_hi_u32_b32 v2, exec_hi, v1
; GFX10W64-NEXT: ; implicit-def: $vgpr1
; GFX10W64-NEXT: .LBB2_1: ; %ComputeLoop
; GFX10W64-NEXT: ; =>This Inner Loop Header: Depth=1
; GFX10W64-NEXT: s_cmp_lg_u64 s[2:3], 0
; GFX10W64-NEXT: s_cbranch_scc1 .LBB2_1
; GFX10W64-NEXT: ; %bb.2: ; %ComputeEnd
-; GFX10W64-NEXT: v_cmp_eq_u32_e32 vcc, 0, v2
+; GFX10W64-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX10W64-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
+; GFX10W64-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
; GFX10W64-NEXT: ; implicit-def: $vgpr0
; GFX10W64-NEXT: s_and_saveexec_b64 s[2:3], vcc
; GFX10W64-NEXT: s_xor_b64 s[2:3], exec, s[2:3]
;
; GFX10W32-LABEL: add_i32_varying_vdata:
; GFX10W32: ; %bb.0: ; %entry
-; GFX10W32-NEXT: v_mbcnt_lo_u32_b32 v2, exec_lo, 0
; GFX10W32-NEXT: s_mov_b32 s3, exec_lo
; GFX10W32-NEXT: s_mov_b32 s2, 0
; GFX10W32-NEXT: ; implicit-def: $vgpr1
; GFX10W32-NEXT: s_cmp_lg_u32 s3, 0
; GFX10W32-NEXT: s_cbranch_scc1 .LBB2_1
; GFX10W32-NEXT: ; %bb.2: ; %ComputeEnd
-; GFX10W32-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v2
+; GFX10W32-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX10W32-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v0
; GFX10W32-NEXT: ; implicit-def: $vgpr0
; GFX10W32-NEXT: s_and_saveexec_b32 s3, vcc_lo
; GFX10W32-NEXT: s_xor_b32 s3, exec_lo, s3
;
; GFX11W64-LABEL: add_i32_varying_vdata:
; GFX11W64: ; %bb.0: ; %entry
-; GFX11W64-NEXT: v_mbcnt_lo_u32_b32 v1, exec_lo, 0
; GFX11W64-NEXT: s_mov_b64 s[2:3], exec
; GFX11W64-NEXT: s_mov_b32 s4, 0
-; GFX11W64-NEXT: s_delay_alu instid0(VALU_DEP_1)
-; GFX11W64-NEXT: v_mbcnt_hi_u32_b32 v2, exec_hi, v1
; GFX11W64-NEXT: ; implicit-def: $vgpr1
; GFX11W64-NEXT: .LBB2_1: ; %ComputeLoop
; GFX11W64-NEXT: ; =>This Inner Loop Header: Depth=1
; GFX11W64-NEXT: s_cmp_lg_u64 s[2:3], 0
; GFX11W64-NEXT: s_cbranch_scc1 .LBB2_1
; GFX11W64-NEXT: ; %bb.2: ; %ComputeEnd
-; GFX11W64-NEXT: s_mov_b64 s[2:3], exec
+; GFX11W64-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX11W64-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
+; GFX11W64-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
+; GFX11W64-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
; GFX11W64-NEXT: ; implicit-def: $vgpr0
-; GFX11W64-NEXT: v_cmpx_eq_u32_e32 0, v2
+; GFX11W64-NEXT: s_and_saveexec_b64 s[2:3], vcc
+; GFX11W64-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
; GFX11W64-NEXT: s_xor_b64 s[2:3], exec, s[2:3]
; GFX11W64-NEXT: s_cbranch_execz .LBB2_4
; GFX11W64-NEXT: ; %bb.3:
;
; GFX11W32-LABEL: add_i32_varying_vdata:
; GFX11W32: ; %bb.0: ; %entry
-; GFX11W32-NEXT: v_mbcnt_lo_u32_b32 v2, exec_lo, 0
; GFX11W32-NEXT: s_mov_b32 s3, exec_lo
; GFX11W32-NEXT: s_mov_b32 s2, 0
; GFX11W32-NEXT: ; implicit-def: $vgpr1
; GFX11W32-NEXT: s_cmp_lg_u32 s3, 0
; GFX11W32-NEXT: s_cbranch_scc1 .LBB2_1
; GFX11W32-NEXT: ; %bb.2: ; %ComputeEnd
-; GFX11W32-NEXT: s_mov_b32 s3, exec_lo
+; GFX11W32-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX11W32-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(SALU_CYCLE_1)
+; GFX11W32-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v0
; GFX11W32-NEXT: ; implicit-def: $vgpr0
-; GFX11W32-NEXT: v_cmpx_eq_u32_e32 0, v2
+; GFX11W32-NEXT: s_and_saveexec_b32 s3, vcc_lo
; GFX11W32-NEXT: s_xor_b32 s3, exec_lo, s3
; GFX11W32-NEXT: s_cbranch_execz .LBB2_4
; GFX11W32-NEXT: ; %bb.3:
;
; GFX8-LABEL: struct_add_i32_varying_vdata:
; GFX8: ; %bb.0: ; %entry
-; GFX8-NEXT: v_mbcnt_lo_u32_b32 v1, exec_lo, 0
; GFX8-NEXT: s_mov_b64 s[2:3], exec
; GFX8-NEXT: s_mov_b32 s4, 0
-; GFX8-NEXT: v_mbcnt_hi_u32_b32 v2, exec_hi, v1
; GFX8-NEXT: ; implicit-def: $vgpr1
; GFX8-NEXT: .LBB3_1: ; %ComputeLoop
; GFX8-NEXT: ; =>This Inner Loop Header: Depth=1
; GFX8-NEXT: s_cmp_lg_u64 s[2:3], 0
; GFX8-NEXT: s_cbranch_scc1 .LBB3_1
; GFX8-NEXT: ; %bb.2: ; %ComputeEnd
-; GFX8-NEXT: v_cmp_eq_u32_e32 vcc, 0, v2
+; GFX8-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX8-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
+; GFX8-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
; GFX8-NEXT: ; implicit-def: $vgpr0
; GFX8-NEXT: s_and_saveexec_b64 s[2:3], vcc
; GFX8-NEXT: s_xor_b64 s[2:3], exec, s[2:3]
;
; GFX9-LABEL: struct_add_i32_varying_vdata:
; GFX9: ; %bb.0: ; %entry
-; GFX9-NEXT: v_mbcnt_lo_u32_b32 v1, exec_lo, 0
; GFX9-NEXT: s_mov_b64 s[2:3], exec
; GFX9-NEXT: s_mov_b32 s4, 0
-; GFX9-NEXT: v_mbcnt_hi_u32_b32 v2, exec_hi, v1
; GFX9-NEXT: ; implicit-def: $vgpr1
; GFX9-NEXT: .LBB3_1: ; %ComputeLoop
; GFX9-NEXT: ; =>This Inner Loop Header: Depth=1
; GFX9-NEXT: s_cmp_lg_u64 s[2:3], 0
; GFX9-NEXT: s_cbranch_scc1 .LBB3_1
; GFX9-NEXT: ; %bb.2: ; %ComputeEnd
-; GFX9-NEXT: v_cmp_eq_u32_e32 vcc, 0, v2
+; GFX9-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX9-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
+; GFX9-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
; GFX9-NEXT: ; implicit-def: $vgpr0
; GFX9-NEXT: s_and_saveexec_b64 s[2:3], vcc
; GFX9-NEXT: s_xor_b64 s[2:3], exec, s[2:3]
;
; GFX10W64-LABEL: struct_add_i32_varying_vdata:
; GFX10W64: ; %bb.0: ; %entry
-; GFX10W64-NEXT: v_mbcnt_lo_u32_b32 v1, exec_lo, 0
; GFX10W64-NEXT: s_mov_b64 s[2:3], exec
; GFX10W64-NEXT: s_mov_b32 s4, 0
-; GFX10W64-NEXT: v_mbcnt_hi_u32_b32 v2, exec_hi, v1
; GFX10W64-NEXT: ; implicit-def: $vgpr1
; GFX10W64-NEXT: .LBB3_1: ; %ComputeLoop
; GFX10W64-NEXT: ; =>This Inner Loop Header: Depth=1
; GFX10W64-NEXT: s_cmp_lg_u64 s[2:3], 0
; GFX10W64-NEXT: s_cbranch_scc1 .LBB3_1
; GFX10W64-NEXT: ; %bb.2: ; %ComputeEnd
-; GFX10W64-NEXT: v_cmp_eq_u32_e32 vcc, 0, v2
+; GFX10W64-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX10W64-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
+; GFX10W64-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
; GFX10W64-NEXT: ; implicit-def: $vgpr0
; GFX10W64-NEXT: s_and_saveexec_b64 s[2:3], vcc
; GFX10W64-NEXT: s_xor_b64 s[2:3], exec, s[2:3]
;
; GFX10W32-LABEL: struct_add_i32_varying_vdata:
; GFX10W32: ; %bb.0: ; %entry
-; GFX10W32-NEXT: v_mbcnt_lo_u32_b32 v2, exec_lo, 0
; GFX10W32-NEXT: s_mov_b32 s3, exec_lo
; GFX10W32-NEXT: s_mov_b32 s2, 0
; GFX10W32-NEXT: ; implicit-def: $vgpr1
; GFX10W32-NEXT: s_cmp_lg_u32 s3, 0
; GFX10W32-NEXT: s_cbranch_scc1 .LBB3_1
; GFX10W32-NEXT: ; %bb.2: ; %ComputeEnd
-; GFX10W32-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v2
+; GFX10W32-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX10W32-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v0
; GFX10W32-NEXT: ; implicit-def: $vgpr0
; GFX10W32-NEXT: s_and_saveexec_b32 s3, vcc_lo
; GFX10W32-NEXT: s_xor_b32 s3, exec_lo, s3
;
; GFX11W64-LABEL: struct_add_i32_varying_vdata:
; GFX11W64: ; %bb.0: ; %entry
-; GFX11W64-NEXT: v_mbcnt_lo_u32_b32 v1, exec_lo, 0
; GFX11W64-NEXT: s_mov_b64 s[2:3], exec
; GFX11W64-NEXT: s_mov_b32 s4, 0
-; GFX11W64-NEXT: s_delay_alu instid0(VALU_DEP_1)
-; GFX11W64-NEXT: v_mbcnt_hi_u32_b32 v2, exec_hi, v1
; GFX11W64-NEXT: ; implicit-def: $vgpr1
; GFX11W64-NEXT: .LBB3_1: ; %ComputeLoop
; GFX11W64-NEXT: ; =>This Inner Loop Header: Depth=1
; GFX11W64-NEXT: s_cmp_lg_u64 s[2:3], 0
; GFX11W64-NEXT: s_cbranch_scc1 .LBB3_1
; GFX11W64-NEXT: ; %bb.2: ; %ComputeEnd
-; GFX11W64-NEXT: s_mov_b64 s[2:3], exec
+; GFX11W64-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX11W64-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
+; GFX11W64-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
+; GFX11W64-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
; GFX11W64-NEXT: ; implicit-def: $vgpr0
-; GFX11W64-NEXT: v_cmpx_eq_u32_e32 0, v2
+; GFX11W64-NEXT: s_and_saveexec_b64 s[2:3], vcc
+; GFX11W64-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
; GFX11W64-NEXT: s_xor_b64 s[2:3], exec, s[2:3]
; GFX11W64-NEXT: s_cbranch_execz .LBB3_4
; GFX11W64-NEXT: ; %bb.3:
;
; GFX11W32-LABEL: struct_add_i32_varying_vdata:
; GFX11W32: ; %bb.0: ; %entry
-; GFX11W32-NEXT: v_mbcnt_lo_u32_b32 v2, exec_lo, 0
; GFX11W32-NEXT: s_mov_b32 s3, exec_lo
; GFX11W32-NEXT: s_mov_b32 s2, 0
; GFX11W32-NEXT: ; implicit-def: $vgpr1
; GFX11W32-NEXT: s_cmp_lg_u32 s3, 0
; GFX11W32-NEXT: s_cbranch_scc1 .LBB3_1
; GFX11W32-NEXT: ; %bb.2: ; %ComputeEnd
-; GFX11W32-NEXT: s_mov_b32 s3, exec_lo
+; GFX11W32-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX11W32-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(SALU_CYCLE_1)
+; GFX11W32-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v0
; GFX11W32-NEXT: ; implicit-def: $vgpr0
-; GFX11W32-NEXT: v_cmpx_eq_u32_e32 0, v2
+; GFX11W32-NEXT: s_and_saveexec_b32 s3, vcc_lo
; GFX11W32-NEXT: s_xor_b32 s3, exec_lo, s3
; GFX11W32-NEXT: s_cbranch_execz .LBB3_4
; GFX11W32-NEXT: ; %bb.3:
;
; GFX8-LABEL: sub_i32_varying_vdata:
; GFX8: ; %bb.0: ; %entry
-; GFX8-NEXT: v_mbcnt_lo_u32_b32 v1, exec_lo, 0
; GFX8-NEXT: s_mov_b64 s[2:3], exec
; GFX8-NEXT: s_mov_b32 s4, 0
-; GFX8-NEXT: v_mbcnt_hi_u32_b32 v2, exec_hi, v1
; GFX8-NEXT: ; implicit-def: $vgpr1
; GFX8-NEXT: .LBB7_1: ; %ComputeLoop
; GFX8-NEXT: ; =>This Inner Loop Header: Depth=1
; GFX8-NEXT: s_cmp_lg_u64 s[2:3], 0
; GFX8-NEXT: s_cbranch_scc1 .LBB7_1
; GFX8-NEXT: ; %bb.2: ; %ComputeEnd
-; GFX8-NEXT: v_cmp_eq_u32_e32 vcc, 0, v2
+; GFX8-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX8-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
+; GFX8-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
; GFX8-NEXT: ; implicit-def: $vgpr0
; GFX8-NEXT: s_and_saveexec_b64 s[2:3], vcc
; GFX8-NEXT: s_xor_b64 s[2:3], exec, s[2:3]
;
; GFX9-LABEL: sub_i32_varying_vdata:
; GFX9: ; %bb.0: ; %entry
-; GFX9-NEXT: v_mbcnt_lo_u32_b32 v1, exec_lo, 0
; GFX9-NEXT: s_mov_b64 s[2:3], exec
; GFX9-NEXT: s_mov_b32 s4, 0
-; GFX9-NEXT: v_mbcnt_hi_u32_b32 v2, exec_hi, v1
; GFX9-NEXT: ; implicit-def: $vgpr1
; GFX9-NEXT: .LBB7_1: ; %ComputeLoop
; GFX9-NEXT: ; =>This Inner Loop Header: Depth=1
; GFX9-NEXT: s_cmp_lg_u64 s[2:3], 0
; GFX9-NEXT: s_cbranch_scc1 .LBB7_1
; GFX9-NEXT: ; %bb.2: ; %ComputeEnd
-; GFX9-NEXT: v_cmp_eq_u32_e32 vcc, 0, v2
+; GFX9-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX9-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
+; GFX9-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
; GFX9-NEXT: ; implicit-def: $vgpr0
; GFX9-NEXT: s_and_saveexec_b64 s[2:3], vcc
; GFX9-NEXT: s_xor_b64 s[2:3], exec, s[2:3]
;
; GFX10W64-LABEL: sub_i32_varying_vdata:
; GFX10W64: ; %bb.0: ; %entry
-; GFX10W64-NEXT: v_mbcnt_lo_u32_b32 v1, exec_lo, 0
; GFX10W64-NEXT: s_mov_b64 s[2:3], exec
; GFX10W64-NEXT: s_mov_b32 s4, 0
-; GFX10W64-NEXT: v_mbcnt_hi_u32_b32 v2, exec_hi, v1
; GFX10W64-NEXT: ; implicit-def: $vgpr1
; GFX10W64-NEXT: .LBB7_1: ; %ComputeLoop
; GFX10W64-NEXT: ; =>This Inner Loop Header: Depth=1
; GFX10W64-NEXT: s_cmp_lg_u64 s[2:3], 0
; GFX10W64-NEXT: s_cbranch_scc1 .LBB7_1
; GFX10W64-NEXT: ; %bb.2: ; %ComputeEnd
-; GFX10W64-NEXT: v_cmp_eq_u32_e32 vcc, 0, v2
+; GFX10W64-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX10W64-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
+; GFX10W64-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
; GFX10W64-NEXT: ; implicit-def: $vgpr0
; GFX10W64-NEXT: s_and_saveexec_b64 s[2:3], vcc
; GFX10W64-NEXT: s_xor_b64 s[2:3], exec, s[2:3]
;
; GFX10W32-LABEL: sub_i32_varying_vdata:
; GFX10W32: ; %bb.0: ; %entry
-; GFX10W32-NEXT: v_mbcnt_lo_u32_b32 v2, exec_lo, 0
; GFX10W32-NEXT: s_mov_b32 s3, exec_lo
; GFX10W32-NEXT: s_mov_b32 s2, 0
; GFX10W32-NEXT: ; implicit-def: $vgpr1
; GFX10W32-NEXT: s_cmp_lg_u32 s3, 0
; GFX10W32-NEXT: s_cbranch_scc1 .LBB7_1
; GFX10W32-NEXT: ; %bb.2: ; %ComputeEnd
-; GFX10W32-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v2
+; GFX10W32-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX10W32-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v0
; GFX10W32-NEXT: ; implicit-def: $vgpr0
; GFX10W32-NEXT: s_and_saveexec_b32 s3, vcc_lo
; GFX10W32-NEXT: s_xor_b32 s3, exec_lo, s3
;
; GFX11W64-LABEL: sub_i32_varying_vdata:
; GFX11W64: ; %bb.0: ; %entry
-; GFX11W64-NEXT: v_mbcnt_lo_u32_b32 v1, exec_lo, 0
; GFX11W64-NEXT: s_mov_b64 s[2:3], exec
; GFX11W64-NEXT: s_mov_b32 s4, 0
-; GFX11W64-NEXT: s_delay_alu instid0(VALU_DEP_1)
-; GFX11W64-NEXT: v_mbcnt_hi_u32_b32 v2, exec_hi, v1
; GFX11W64-NEXT: ; implicit-def: $vgpr1
; GFX11W64-NEXT: .LBB7_1: ; %ComputeLoop
; GFX11W64-NEXT: ; =>This Inner Loop Header: Depth=1
; GFX11W64-NEXT: s_cmp_lg_u64 s[2:3], 0
; GFX11W64-NEXT: s_cbranch_scc1 .LBB7_1
; GFX11W64-NEXT: ; %bb.2: ; %ComputeEnd
-; GFX11W64-NEXT: s_mov_b64 s[2:3], exec
+; GFX11W64-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX11W64-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
+; GFX11W64-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
+; GFX11W64-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
; GFX11W64-NEXT: ; implicit-def: $vgpr0
-; GFX11W64-NEXT: v_cmpx_eq_u32_e32 0, v2
+; GFX11W64-NEXT: s_and_saveexec_b64 s[2:3], vcc
+; GFX11W64-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
; GFX11W64-NEXT: s_xor_b64 s[2:3], exec, s[2:3]
; GFX11W64-NEXT: s_cbranch_execz .LBB7_4
; GFX11W64-NEXT: ; %bb.3:
;
; GFX11W32-LABEL: sub_i32_varying_vdata:
; GFX11W32: ; %bb.0: ; %entry
-; GFX11W32-NEXT: v_mbcnt_lo_u32_b32 v2, exec_lo, 0
; GFX11W32-NEXT: s_mov_b32 s3, exec_lo
; GFX11W32-NEXT: s_mov_b32 s2, 0
; GFX11W32-NEXT: ; implicit-def: $vgpr1
; GFX11W32-NEXT: s_cmp_lg_u32 s3, 0
; GFX11W32-NEXT: s_cbranch_scc1 .LBB7_1
; GFX11W32-NEXT: ; %bb.2: ; %ComputeEnd
-; GFX11W32-NEXT: s_mov_b32 s3, exec_lo
+; GFX11W32-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX11W32-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(SALU_CYCLE_1)
+; GFX11W32-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v0
; GFX11W32-NEXT: ; implicit-def: $vgpr0
-; GFX11W32-NEXT: v_cmpx_eq_u32_e32 0, v2
+; GFX11W32-NEXT: s_and_saveexec_b32 s3, vcc_lo
; GFX11W32-NEXT: s_xor_b32 s3, exec_lo, s3
; GFX11W32-NEXT: s_cbranch_execz .LBB7_4
; GFX11W32-NEXT: ; %bb.3:
;
; GFX8-LABEL: add_i32_varying:
; GFX8: ; %bb.0: ; %entry
-; GFX8-NEXT: v_mbcnt_lo_u32_b32 v1, exec_lo, 0
; GFX8-NEXT: s_mov_b64 s[2:3], exec
; GFX8-NEXT: s_mov_b32 s4, 0
-; GFX8-NEXT: v_mbcnt_hi_u32_b32 v2, exec_hi, v1
; GFX8-NEXT: ; implicit-def: $vgpr1
; GFX8-NEXT: .LBB2_1: ; %ComputeLoop
; GFX8-NEXT: ; =>This Inner Loop Header: Depth=1
; GFX8-NEXT: s_cmp_lg_u64 s[2:3], 0
; GFX8-NEXT: s_cbranch_scc1 .LBB2_1
; GFX8-NEXT: ; %bb.2: ; %ComputeEnd
-; GFX8-NEXT: v_cmp_eq_u32_e32 vcc, 0, v2
+; GFX8-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX8-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
+; GFX8-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
; GFX8-NEXT: ; implicit-def: $vgpr0
; GFX8-NEXT: s_and_saveexec_b64 s[2:3], vcc
; GFX8-NEXT: s_xor_b64 s[2:3], exec, s[2:3]
;
; GFX9-LABEL: add_i32_varying:
; GFX9: ; %bb.0: ; %entry
-; GFX9-NEXT: v_mbcnt_lo_u32_b32 v1, exec_lo, 0
; GFX9-NEXT: s_mov_b64 s[2:3], exec
; GFX9-NEXT: s_mov_b32 s4, 0
-; GFX9-NEXT: v_mbcnt_hi_u32_b32 v2, exec_hi, v1
; GFX9-NEXT: ; implicit-def: $vgpr1
; GFX9-NEXT: .LBB2_1: ; %ComputeLoop
; GFX9-NEXT: ; =>This Inner Loop Header: Depth=1
; GFX9-NEXT: s_cmp_lg_u64 s[2:3], 0
; GFX9-NEXT: s_cbranch_scc1 .LBB2_1
; GFX9-NEXT: ; %bb.2: ; %ComputeEnd
-; GFX9-NEXT: v_cmp_eq_u32_e32 vcc, 0, v2
+; GFX9-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX9-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
+; GFX9-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
; GFX9-NEXT: ; implicit-def: $vgpr0
; GFX9-NEXT: s_and_saveexec_b64 s[2:3], vcc
; GFX9-NEXT: s_xor_b64 s[2:3], exec, s[2:3]
;
; GFX1064-LABEL: add_i32_varying:
; GFX1064: ; %bb.0: ; %entry
-; GFX1064-NEXT: v_mbcnt_lo_u32_b32 v1, exec_lo, 0
; GFX1064-NEXT: s_mov_b64 s[2:3], exec
; GFX1064-NEXT: s_mov_b32 s4, 0
-; GFX1064-NEXT: v_mbcnt_hi_u32_b32 v2, exec_hi, v1
; GFX1064-NEXT: ; implicit-def: $vgpr1
; GFX1064-NEXT: .LBB2_1: ; %ComputeLoop
; GFX1064-NEXT: ; =>This Inner Loop Header: Depth=1
; GFX1064-NEXT: s_cmp_lg_u64 s[2:3], 0
; GFX1064-NEXT: s_cbranch_scc1 .LBB2_1
; GFX1064-NEXT: ; %bb.2: ; %ComputeEnd
-; GFX1064-NEXT: v_cmp_eq_u32_e32 vcc, 0, v2
+; GFX1064-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX1064-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
+; GFX1064-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
; GFX1064-NEXT: ; implicit-def: $vgpr0
; GFX1064-NEXT: s_and_saveexec_b64 s[2:3], vcc
; GFX1064-NEXT: s_xor_b64 s[2:3], exec, s[2:3]
;
; GFX1032-LABEL: add_i32_varying:
; GFX1032: ; %bb.0: ; %entry
-; GFX1032-NEXT: v_mbcnt_lo_u32_b32 v2, exec_lo, 0
; GFX1032-NEXT: s_mov_b32 s3, exec_lo
; GFX1032-NEXT: s_mov_b32 s2, 0
; GFX1032-NEXT: ; implicit-def: $vgpr1
; GFX1032-NEXT: s_cmp_lg_u32 s3, 0
; GFX1032-NEXT: s_cbranch_scc1 .LBB2_1
; GFX1032-NEXT: ; %bb.2: ; %ComputeEnd
-; GFX1032-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v2
+; GFX1032-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX1032-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v0
; GFX1032-NEXT: ; implicit-def: $vgpr0
; GFX1032-NEXT: s_and_saveexec_b32 s3, vcc_lo
; GFX1032-NEXT: s_xor_b32 s3, exec_lo, s3
;
; GFX1164-LABEL: add_i32_varying:
; GFX1164: ; %bb.0: ; %entry
-; GFX1164-NEXT: v_mbcnt_lo_u32_b32 v1, exec_lo, 0
; GFX1164-NEXT: s_mov_b64 s[2:3], exec
; GFX1164-NEXT: s_mov_b32 s4, 0
-; GFX1164-NEXT: s_delay_alu instid0(VALU_DEP_1)
-; GFX1164-NEXT: v_mbcnt_hi_u32_b32 v2, exec_hi, v1
; GFX1164-NEXT: ; implicit-def: $vgpr1
; GFX1164-NEXT: .LBB2_1: ; %ComputeLoop
; GFX1164-NEXT: ; =>This Inner Loop Header: Depth=1
; GFX1164-NEXT: s_cmp_lg_u64 s[2:3], 0
; GFX1164-NEXT: s_cbranch_scc1 .LBB2_1
; GFX1164-NEXT: ; %bb.2: ; %ComputeEnd
-; GFX1164-NEXT: s_mov_b64 s[2:3], exec
+; GFX1164-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX1164-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
+; GFX1164-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
+; GFX1164-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
; GFX1164-NEXT: ; implicit-def: $vgpr0
-; GFX1164-NEXT: v_cmpx_eq_u32_e32 0, v2
+; GFX1164-NEXT: s_and_saveexec_b64 s[2:3], vcc
+; GFX1164-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
; GFX1164-NEXT: s_xor_b64 s[2:3], exec, s[2:3]
; GFX1164-NEXT: s_cbranch_execz .LBB2_4
; GFX1164-NEXT: ; %bb.3:
;
; GFX1132-LABEL: add_i32_varying:
; GFX1132: ; %bb.0: ; %entry
-; GFX1132-NEXT: v_mbcnt_lo_u32_b32 v2, exec_lo, 0
; GFX1132-NEXT: s_mov_b32 s3, exec_lo
; GFX1132-NEXT: s_mov_b32 s2, 0
; GFX1132-NEXT: ; implicit-def: $vgpr1
; GFX1132-NEXT: s_cmp_lg_u32 s3, 0
; GFX1132-NEXT: s_cbranch_scc1 .LBB2_1
; GFX1132-NEXT: ; %bb.2: ; %ComputeEnd
-; GFX1132-NEXT: s_mov_b32 s3, exec_lo
+; GFX1132-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX1132-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(SALU_CYCLE_1)
+; GFX1132-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v0
; GFX1132-NEXT: ; implicit-def: $vgpr0
-; GFX1132-NEXT: v_cmpx_eq_u32_e32 0, v2
+; GFX1132-NEXT: s_and_saveexec_b32 s3, vcc_lo
; GFX1132-NEXT: s_xor_b32 s3, exec_lo, s3
; GFX1132-NEXT: s_cbranch_execz .LBB2_4
; GFX1132-NEXT: ; %bb.3:
;
; GFX8-LABEL: add_i32_varying_nouse:
; GFX8: ; %bb.0: ; %entry
-; GFX8-NEXT: v_mbcnt_lo_u32_b32 v1, exec_lo, 0
; GFX8-NEXT: s_mov_b64 s[0:1], exec
; GFX8-NEXT: s_mov_b32 s2, 0
-; GFX8-NEXT: v_mbcnt_hi_u32_b32 v1, exec_hi, v1
; GFX8-NEXT: .LBB3_1: ; %ComputeLoop
; GFX8-NEXT: ; =>This Inner Loop Header: Depth=1
; GFX8-NEXT: s_ff1_i32_b32 s3, s1
; GFX8-NEXT: s_cmp_lg_u64 s[0:1], 0
; GFX8-NEXT: s_cbranch_scc1 .LBB3_1
; GFX8-NEXT: ; %bb.2: ; %ComputeEnd
-; GFX8-NEXT: v_cmp_eq_u32_e32 vcc, 0, v1
+; GFX8-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX8-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
+; GFX8-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
; GFX8-NEXT: s_and_saveexec_b64 s[0:1], vcc
; GFX8-NEXT: s_xor_b64 s[0:1], exec, s[0:1]
; GFX8-NEXT: s_cbranch_execz .LBB3_4
;
; GFX9-LABEL: add_i32_varying_nouse:
; GFX9: ; %bb.0: ; %entry
-; GFX9-NEXT: v_mbcnt_lo_u32_b32 v1, exec_lo, 0
; GFX9-NEXT: s_mov_b64 s[0:1], exec
; GFX9-NEXT: s_mov_b32 s2, 0
-; GFX9-NEXT: v_mbcnt_hi_u32_b32 v1, exec_hi, v1
; GFX9-NEXT: .LBB3_1: ; %ComputeLoop
; GFX9-NEXT: ; =>This Inner Loop Header: Depth=1
; GFX9-NEXT: s_ff1_i32_b32 s3, s1
; GFX9-NEXT: s_cmp_lg_u64 s[0:1], 0
; GFX9-NEXT: s_cbranch_scc1 .LBB3_1
; GFX9-NEXT: ; %bb.2: ; %ComputeEnd
-; GFX9-NEXT: v_cmp_eq_u32_e32 vcc, 0, v1
+; GFX9-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX9-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
+; GFX9-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
; GFX9-NEXT: s_and_saveexec_b64 s[0:1], vcc
; GFX9-NEXT: s_xor_b64 s[0:1], exec, s[0:1]
; GFX9-NEXT: s_cbranch_execz .LBB3_4
;
; GFX1064-LABEL: add_i32_varying_nouse:
; GFX1064: ; %bb.0: ; %entry
-; GFX1064-NEXT: v_mbcnt_lo_u32_b32 v1, exec_lo, 0
; GFX1064-NEXT: s_mov_b64 s[0:1], exec
; GFX1064-NEXT: s_mov_b32 s2, 0
-; GFX1064-NEXT: v_mbcnt_hi_u32_b32 v1, exec_hi, v1
; GFX1064-NEXT: .LBB3_1: ; %ComputeLoop
; GFX1064-NEXT: ; =>This Inner Loop Header: Depth=1
; GFX1064-NEXT: s_ff1_i32_b32 s3, s1
; GFX1064-NEXT: s_cmp_lg_u64 s[0:1], 0
; GFX1064-NEXT: s_cbranch_scc1 .LBB3_1
; GFX1064-NEXT: ; %bb.2: ; %ComputeEnd
-; GFX1064-NEXT: v_cmp_eq_u32_e32 vcc, 0, v1
+; GFX1064-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX1064-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
+; GFX1064-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
; GFX1064-NEXT: s_and_saveexec_b64 s[0:1], vcc
; GFX1064-NEXT: s_xor_b64 s[0:1], exec, s[0:1]
; GFX1064-NEXT: s_cbranch_execz .LBB3_4
;
; GFX1032-LABEL: add_i32_varying_nouse:
; GFX1032: ; %bb.0: ; %entry
-; GFX1032-NEXT: v_mbcnt_lo_u32_b32 v1, exec_lo, 0
; GFX1032-NEXT: s_mov_b32 s1, exec_lo
; GFX1032-NEXT: s_mov_b32 s0, 0
; GFX1032-NEXT: .LBB3_1: ; %ComputeLoop
; GFX1032-NEXT: s_cmp_lg_u32 s1, 0
; GFX1032-NEXT: s_cbranch_scc1 .LBB3_1
; GFX1032-NEXT: ; %bb.2: ; %ComputeEnd
-; GFX1032-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v1
+; GFX1032-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX1032-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v0
; GFX1032-NEXT: s_and_saveexec_b32 s1, vcc_lo
; GFX1032-NEXT: s_xor_b32 s1, exec_lo, s1
; GFX1032-NEXT: s_cbranch_execz .LBB3_4
;
; GFX1164-LABEL: add_i32_varying_nouse:
; GFX1164: ; %bb.0: ; %entry
-; GFX1164-NEXT: v_mbcnt_lo_u32_b32 v1, exec_lo, 0
; GFX1164-NEXT: s_mov_b64 s[0:1], exec
; GFX1164-NEXT: s_mov_b32 s2, 0
-; GFX1164-NEXT: s_delay_alu instid0(VALU_DEP_1)
-; GFX1164-NEXT: v_mbcnt_hi_u32_b32 v1, exec_hi, v1
; GFX1164-NEXT: .LBB3_1: ; %ComputeLoop
; GFX1164-NEXT: ; =>This Inner Loop Header: Depth=1
; GFX1164-NEXT: s_ctz_i32_b32 s3, s1
; GFX1164-NEXT: s_cmp_lg_u64 s[0:1], 0
; GFX1164-NEXT: s_cbranch_scc1 .LBB3_1
; GFX1164-NEXT: ; %bb.2: ; %ComputeEnd
+; GFX1164-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
; GFX1164-NEXT: s_mov_b64 s[0:1], exec
-; GFX1164-NEXT: v_cmpx_eq_u32_e32 0, v1
+; GFX1164-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
+; GFX1164-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
+; GFX1164-NEXT: v_cmpx_eq_u32_e32 0, v0
; GFX1164-NEXT: s_xor_b64 s[0:1], exec, s[0:1]
; GFX1164-NEXT: s_cbranch_execz .LBB3_4
; GFX1164-NEXT: ; %bb.3:
;
; GFX1132-LABEL: add_i32_varying_nouse:
; GFX1132: ; %bb.0: ; %entry
-; GFX1132-NEXT: v_mbcnt_lo_u32_b32 v1, exec_lo, 0
; GFX1132-NEXT: s_mov_b32 s1, exec_lo
; GFX1132-NEXT: s_mov_b32 s0, 0
; GFX1132-NEXT: .LBB3_1: ; %ComputeLoop
; GFX1132-NEXT: s_cmp_lg_u32 s1, 0
; GFX1132-NEXT: s_cbranch_scc1 .LBB3_1
; GFX1132-NEXT: ; %bb.2: ; %ComputeEnd
+; GFX1132-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
; GFX1132-NEXT: s_mov_b32 s1, exec_lo
-; GFX1132-NEXT: v_cmpx_eq_u32_e32 0, v1
+; GFX1132-NEXT: s_delay_alu instid0(VALU_DEP_1)
+; GFX1132-NEXT: v_cmpx_eq_u32_e32 0, v0
; GFX1132-NEXT: s_xor_b32 s1, exec_lo, s1
; GFX1132-NEXT: s_cbranch_execz .LBB3_4
; GFX1132-NEXT: ; %bb.3:
;
; GFX8-LABEL: sub_i32_varying:
; GFX8: ; %bb.0: ; %entry
-; GFX8-NEXT: v_mbcnt_lo_u32_b32 v1, exec_lo, 0
; GFX8-NEXT: s_mov_b64 s[2:3], exec
; GFX8-NEXT: s_mov_b32 s4, 0
-; GFX8-NEXT: v_mbcnt_hi_u32_b32 v2, exec_hi, v1
; GFX8-NEXT: ; implicit-def: $vgpr1
; GFX8-NEXT: .LBB9_1: ; %ComputeLoop
; GFX8-NEXT: ; =>This Inner Loop Header: Depth=1
; GFX8-NEXT: s_cmp_lg_u64 s[2:3], 0
; GFX8-NEXT: s_cbranch_scc1 .LBB9_1
; GFX8-NEXT: ; %bb.2: ; %ComputeEnd
-; GFX8-NEXT: v_cmp_eq_u32_e32 vcc, 0, v2
+; GFX8-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX8-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
+; GFX8-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
; GFX8-NEXT: ; implicit-def: $vgpr0
; GFX8-NEXT: s_and_saveexec_b64 s[2:3], vcc
; GFX8-NEXT: s_xor_b64 s[2:3], exec, s[2:3]
;
; GFX9-LABEL: sub_i32_varying:
; GFX9: ; %bb.0: ; %entry
-; GFX9-NEXT: v_mbcnt_lo_u32_b32 v1, exec_lo, 0
; GFX9-NEXT: s_mov_b64 s[2:3], exec
; GFX9-NEXT: s_mov_b32 s4, 0
-; GFX9-NEXT: v_mbcnt_hi_u32_b32 v2, exec_hi, v1
; GFX9-NEXT: ; implicit-def: $vgpr1
; GFX9-NEXT: .LBB9_1: ; %ComputeLoop
; GFX9-NEXT: ; =>This Inner Loop Header: Depth=1
; GFX9-NEXT: s_cmp_lg_u64 s[2:3], 0
; GFX9-NEXT: s_cbranch_scc1 .LBB9_1
; GFX9-NEXT: ; %bb.2: ; %ComputeEnd
-; GFX9-NEXT: v_cmp_eq_u32_e32 vcc, 0, v2
+; GFX9-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX9-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
+; GFX9-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
; GFX9-NEXT: ; implicit-def: $vgpr0
; GFX9-NEXT: s_and_saveexec_b64 s[2:3], vcc
; GFX9-NEXT: s_xor_b64 s[2:3], exec, s[2:3]
;
; GFX1064-LABEL: sub_i32_varying:
; GFX1064: ; %bb.0: ; %entry
-; GFX1064-NEXT: v_mbcnt_lo_u32_b32 v1, exec_lo, 0
; GFX1064-NEXT: s_mov_b64 s[2:3], exec
; GFX1064-NEXT: s_mov_b32 s4, 0
-; GFX1064-NEXT: v_mbcnt_hi_u32_b32 v2, exec_hi, v1
; GFX1064-NEXT: ; implicit-def: $vgpr1
; GFX1064-NEXT: .LBB9_1: ; %ComputeLoop
; GFX1064-NEXT: ; =>This Inner Loop Header: Depth=1
; GFX1064-NEXT: s_cmp_lg_u64 s[2:3], 0
; GFX1064-NEXT: s_cbranch_scc1 .LBB9_1
; GFX1064-NEXT: ; %bb.2: ; %ComputeEnd
-; GFX1064-NEXT: v_cmp_eq_u32_e32 vcc, 0, v2
+; GFX1064-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX1064-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
+; GFX1064-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
; GFX1064-NEXT: ; implicit-def: $vgpr0
; GFX1064-NEXT: s_and_saveexec_b64 s[2:3], vcc
; GFX1064-NEXT: s_xor_b64 s[2:3], exec, s[2:3]
;
; GFX1032-LABEL: sub_i32_varying:
; GFX1032: ; %bb.0: ; %entry
-; GFX1032-NEXT: v_mbcnt_lo_u32_b32 v2, exec_lo, 0
; GFX1032-NEXT: s_mov_b32 s3, exec_lo
; GFX1032-NEXT: s_mov_b32 s2, 0
; GFX1032-NEXT: ; implicit-def: $vgpr1
; GFX1032-NEXT: s_cmp_lg_u32 s3, 0
; GFX1032-NEXT: s_cbranch_scc1 .LBB9_1
; GFX1032-NEXT: ; %bb.2: ; %ComputeEnd
-; GFX1032-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v2
+; GFX1032-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX1032-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v0
; GFX1032-NEXT: ; implicit-def: $vgpr0
; GFX1032-NEXT: s_and_saveexec_b32 s3, vcc_lo
; GFX1032-NEXT: s_xor_b32 s3, exec_lo, s3
;
; GFX1164-LABEL: sub_i32_varying:
; GFX1164: ; %bb.0: ; %entry
-; GFX1164-NEXT: v_mbcnt_lo_u32_b32 v1, exec_lo, 0
; GFX1164-NEXT: s_mov_b64 s[2:3], exec
; GFX1164-NEXT: s_mov_b32 s4, 0
-; GFX1164-NEXT: s_delay_alu instid0(VALU_DEP_1)
-; GFX1164-NEXT: v_mbcnt_hi_u32_b32 v2, exec_hi, v1
; GFX1164-NEXT: ; implicit-def: $vgpr1
; GFX1164-NEXT: .LBB9_1: ; %ComputeLoop
; GFX1164-NEXT: ; =>This Inner Loop Header: Depth=1
; GFX1164-NEXT: s_cmp_lg_u64 s[2:3], 0
; GFX1164-NEXT: s_cbranch_scc1 .LBB9_1
; GFX1164-NEXT: ; %bb.2: ; %ComputeEnd
-; GFX1164-NEXT: s_mov_b64 s[2:3], exec
+; GFX1164-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX1164-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
+; GFX1164-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
+; GFX1164-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
; GFX1164-NEXT: ; implicit-def: $vgpr0
-; GFX1164-NEXT: v_cmpx_eq_u32_e32 0, v2
+; GFX1164-NEXT: s_and_saveexec_b64 s[2:3], vcc
+; GFX1164-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
; GFX1164-NEXT: s_xor_b64 s[2:3], exec, s[2:3]
; GFX1164-NEXT: s_cbranch_execz .LBB9_4
; GFX1164-NEXT: ; %bb.3:
;
; GFX1132-LABEL: sub_i32_varying:
; GFX1132: ; %bb.0: ; %entry
-; GFX1132-NEXT: v_mbcnt_lo_u32_b32 v2, exec_lo, 0
; GFX1132-NEXT: s_mov_b32 s3, exec_lo
; GFX1132-NEXT: s_mov_b32 s2, 0
; GFX1132-NEXT: ; implicit-def: $vgpr1
; GFX1132-NEXT: s_cmp_lg_u32 s3, 0
; GFX1132-NEXT: s_cbranch_scc1 .LBB9_1
; GFX1132-NEXT: ; %bb.2: ; %ComputeEnd
-; GFX1132-NEXT: s_mov_b32 s3, exec_lo
+; GFX1132-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX1132-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(SALU_CYCLE_1)
+; GFX1132-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v0
; GFX1132-NEXT: ; implicit-def: $vgpr0
-; GFX1132-NEXT: v_cmpx_eq_u32_e32 0, v2
+; GFX1132-NEXT: s_and_saveexec_b32 s3, vcc_lo
; GFX1132-NEXT: s_xor_b32 s3, exec_lo, s3
; GFX1132-NEXT: s_cbranch_execz .LBB9_4
; GFX1132-NEXT: ; %bb.3:
;
; GFX8-LABEL: sub_i32_varying_nouse:
; GFX8: ; %bb.0: ; %entry
-; GFX8-NEXT: v_mbcnt_lo_u32_b32 v1, exec_lo, 0
; GFX8-NEXT: s_mov_b64 s[0:1], exec
; GFX8-NEXT: s_mov_b32 s2, 0
-; GFX8-NEXT: v_mbcnt_hi_u32_b32 v1, exec_hi, v1
; GFX8-NEXT: .LBB10_1: ; %ComputeLoop
; GFX8-NEXT: ; =>This Inner Loop Header: Depth=1
; GFX8-NEXT: s_ff1_i32_b32 s3, s1
; GFX8-NEXT: s_cmp_lg_u64 s[0:1], 0
; GFX8-NEXT: s_cbranch_scc1 .LBB10_1
; GFX8-NEXT: ; %bb.2: ; %ComputeEnd
-; GFX8-NEXT: v_cmp_eq_u32_e32 vcc, 0, v1
+; GFX8-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX8-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
+; GFX8-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
; GFX8-NEXT: s_and_saveexec_b64 s[0:1], vcc
; GFX8-NEXT: s_xor_b64 s[0:1], exec, s[0:1]
; GFX8-NEXT: s_cbranch_execz .LBB10_4
;
; GFX9-LABEL: sub_i32_varying_nouse:
; GFX9: ; %bb.0: ; %entry
-; GFX9-NEXT: v_mbcnt_lo_u32_b32 v1, exec_lo, 0
; GFX9-NEXT: s_mov_b64 s[0:1], exec
; GFX9-NEXT: s_mov_b32 s2, 0
-; GFX9-NEXT: v_mbcnt_hi_u32_b32 v1, exec_hi, v1
; GFX9-NEXT: .LBB10_1: ; %ComputeLoop
; GFX9-NEXT: ; =>This Inner Loop Header: Depth=1
; GFX9-NEXT: s_ff1_i32_b32 s3, s1
; GFX9-NEXT: s_cmp_lg_u64 s[0:1], 0
; GFX9-NEXT: s_cbranch_scc1 .LBB10_1
; GFX9-NEXT: ; %bb.2: ; %ComputeEnd
-; GFX9-NEXT: v_cmp_eq_u32_e32 vcc, 0, v1
+; GFX9-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX9-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
+; GFX9-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
; GFX9-NEXT: s_and_saveexec_b64 s[0:1], vcc
; GFX9-NEXT: s_xor_b64 s[0:1], exec, s[0:1]
; GFX9-NEXT: s_cbranch_execz .LBB10_4
;
; GFX1064-LABEL: sub_i32_varying_nouse:
; GFX1064: ; %bb.0: ; %entry
-; GFX1064-NEXT: v_mbcnt_lo_u32_b32 v1, exec_lo, 0
; GFX1064-NEXT: s_mov_b64 s[0:1], exec
; GFX1064-NEXT: s_mov_b32 s2, 0
-; GFX1064-NEXT: v_mbcnt_hi_u32_b32 v1, exec_hi, v1
; GFX1064-NEXT: .LBB10_1: ; %ComputeLoop
; GFX1064-NEXT: ; =>This Inner Loop Header: Depth=1
; GFX1064-NEXT: s_ff1_i32_b32 s3, s1
; GFX1064-NEXT: s_cmp_lg_u64 s[0:1], 0
; GFX1064-NEXT: s_cbranch_scc1 .LBB10_1
; GFX1064-NEXT: ; %bb.2: ; %ComputeEnd
-; GFX1064-NEXT: v_cmp_eq_u32_e32 vcc, 0, v1
+; GFX1064-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX1064-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
+; GFX1064-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
; GFX1064-NEXT: s_and_saveexec_b64 s[0:1], vcc
; GFX1064-NEXT: s_xor_b64 s[0:1], exec, s[0:1]
; GFX1064-NEXT: s_cbranch_execz .LBB10_4
;
; GFX1032-LABEL: sub_i32_varying_nouse:
; GFX1032: ; %bb.0: ; %entry
-; GFX1032-NEXT: v_mbcnt_lo_u32_b32 v1, exec_lo, 0
; GFX1032-NEXT: s_mov_b32 s1, exec_lo
; GFX1032-NEXT: s_mov_b32 s0, 0
; GFX1032-NEXT: .LBB10_1: ; %ComputeLoop
; GFX1032-NEXT: s_cmp_lg_u32 s1, 0
; GFX1032-NEXT: s_cbranch_scc1 .LBB10_1
; GFX1032-NEXT: ; %bb.2: ; %ComputeEnd
-; GFX1032-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v1
+; GFX1032-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX1032-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v0
; GFX1032-NEXT: s_and_saveexec_b32 s1, vcc_lo
; GFX1032-NEXT: s_xor_b32 s1, exec_lo, s1
; GFX1032-NEXT: s_cbranch_execz .LBB10_4
;
; GFX1164-LABEL: sub_i32_varying_nouse:
; GFX1164: ; %bb.0: ; %entry
-; GFX1164-NEXT: v_mbcnt_lo_u32_b32 v1, exec_lo, 0
; GFX1164-NEXT: s_mov_b64 s[0:1], exec
; GFX1164-NEXT: s_mov_b32 s2, 0
-; GFX1164-NEXT: s_delay_alu instid0(VALU_DEP_1)
-; GFX1164-NEXT: v_mbcnt_hi_u32_b32 v1, exec_hi, v1
; GFX1164-NEXT: .LBB10_1: ; %ComputeLoop
; GFX1164-NEXT: ; =>This Inner Loop Header: Depth=1
; GFX1164-NEXT: s_ctz_i32_b32 s3, s1
; GFX1164-NEXT: s_cmp_lg_u64 s[0:1], 0
; GFX1164-NEXT: s_cbranch_scc1 .LBB10_1
; GFX1164-NEXT: ; %bb.2: ; %ComputeEnd
+; GFX1164-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
; GFX1164-NEXT: s_mov_b64 s[0:1], exec
-; GFX1164-NEXT: v_cmpx_eq_u32_e32 0, v1
+; GFX1164-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
+; GFX1164-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
+; GFX1164-NEXT: v_cmpx_eq_u32_e32 0, v0
; GFX1164-NEXT: s_xor_b64 s[0:1], exec, s[0:1]
; GFX1164-NEXT: s_cbranch_execz .LBB10_4
; GFX1164-NEXT: ; %bb.3:
;
; GFX1132-LABEL: sub_i32_varying_nouse:
; GFX1132: ; %bb.0: ; %entry
-; GFX1132-NEXT: v_mbcnt_lo_u32_b32 v1, exec_lo, 0
; GFX1132-NEXT: s_mov_b32 s1, exec_lo
; GFX1132-NEXT: s_mov_b32 s0, 0
; GFX1132-NEXT: .LBB10_1: ; %ComputeLoop
; GFX1132-NEXT: s_cmp_lg_u32 s1, 0
; GFX1132-NEXT: s_cbranch_scc1 .LBB10_1
; GFX1132-NEXT: ; %bb.2: ; %ComputeEnd
+; GFX1132-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
; GFX1132-NEXT: s_mov_b32 s1, exec_lo
-; GFX1132-NEXT: v_cmpx_eq_u32_e32 0, v1
+; GFX1132-NEXT: s_delay_alu instid0(VALU_DEP_1)
+; GFX1132-NEXT: v_cmpx_eq_u32_e32 0, v0
; GFX1132-NEXT: s_xor_b32 s1, exec_lo, s1
; GFX1132-NEXT: s_cbranch_execz .LBB10_4
; GFX1132-NEXT: ; %bb.3:
;
; GFX8-LABEL: and_i32_varying:
; GFX8: ; %bb.0: ; %entry
-; GFX8-NEXT: v_mbcnt_lo_u32_b32 v1, exec_lo, 0
; GFX8-NEXT: s_mov_b64 s[2:3], exec
-; GFX8-NEXT: v_mbcnt_hi_u32_b32 v2, exec_hi, v1
; GFX8-NEXT: s_mov_b32 s4, -1
; GFX8-NEXT: ; implicit-def: $vgpr1
; GFX8-NEXT: .LBB14_1: ; %ComputeLoop
; GFX8-NEXT: s_cmp_lg_u64 s[2:3], 0
; GFX8-NEXT: s_cbranch_scc1 .LBB14_1
; GFX8-NEXT: ; %bb.2: ; %ComputeEnd
-; GFX8-NEXT: v_cmp_eq_u32_e32 vcc, 0, v2
+; GFX8-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX8-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
+; GFX8-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
; GFX8-NEXT: ; implicit-def: $vgpr0
; GFX8-NEXT: s_and_saveexec_b64 s[2:3], vcc
; GFX8-NEXT: s_xor_b64 s[2:3], exec, s[2:3]
;
; GFX9-LABEL: and_i32_varying:
; GFX9: ; %bb.0: ; %entry
-; GFX9-NEXT: v_mbcnt_lo_u32_b32 v1, exec_lo, 0
; GFX9-NEXT: s_mov_b64 s[2:3], exec
-; GFX9-NEXT: v_mbcnt_hi_u32_b32 v2, exec_hi, v1
; GFX9-NEXT: s_mov_b32 s4, -1
; GFX9-NEXT: ; implicit-def: $vgpr1
; GFX9-NEXT: .LBB14_1: ; %ComputeLoop
; GFX9-NEXT: s_cmp_lg_u64 s[2:3], 0
; GFX9-NEXT: s_cbranch_scc1 .LBB14_1
; GFX9-NEXT: ; %bb.2: ; %ComputeEnd
-; GFX9-NEXT: v_cmp_eq_u32_e32 vcc, 0, v2
+; GFX9-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX9-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
+; GFX9-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
; GFX9-NEXT: ; implicit-def: $vgpr0
; GFX9-NEXT: s_and_saveexec_b64 s[2:3], vcc
; GFX9-NEXT: s_xor_b64 s[2:3], exec, s[2:3]
;
; GFX1064-LABEL: and_i32_varying:
; GFX1064: ; %bb.0: ; %entry
-; GFX1064-NEXT: v_mbcnt_lo_u32_b32 v1, exec_lo, 0
; GFX1064-NEXT: s_mov_b64 s[2:3], exec
; GFX1064-NEXT: s_mov_b32 s4, -1
-; GFX1064-NEXT: v_mbcnt_hi_u32_b32 v2, exec_hi, v1
; GFX1064-NEXT: ; implicit-def: $vgpr1
; GFX1064-NEXT: .LBB14_1: ; %ComputeLoop
; GFX1064-NEXT: ; =>This Inner Loop Header: Depth=1
; GFX1064-NEXT: s_cmp_lg_u64 s[2:3], 0
; GFX1064-NEXT: s_cbranch_scc1 .LBB14_1
; GFX1064-NEXT: ; %bb.2: ; %ComputeEnd
-; GFX1064-NEXT: v_cmp_eq_u32_e32 vcc, 0, v2
+; GFX1064-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX1064-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
+; GFX1064-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
; GFX1064-NEXT: ; implicit-def: $vgpr0
; GFX1064-NEXT: s_and_saveexec_b64 s[2:3], vcc
; GFX1064-NEXT: s_xor_b64 s[2:3], exec, s[2:3]
;
; GFX1032-LABEL: and_i32_varying:
; GFX1032: ; %bb.0: ; %entry
-; GFX1032-NEXT: v_mbcnt_lo_u32_b32 v2, exec_lo, 0
; GFX1032-NEXT: s_mov_b32 s3, exec_lo
; GFX1032-NEXT: s_mov_b32 s2, -1
; GFX1032-NEXT: ; implicit-def: $vgpr1
; GFX1032-NEXT: s_cmp_lg_u32 s3, 0
; GFX1032-NEXT: s_cbranch_scc1 .LBB14_1
; GFX1032-NEXT: ; %bb.2: ; %ComputeEnd
-; GFX1032-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v2
+; GFX1032-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX1032-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v0
; GFX1032-NEXT: ; implicit-def: $vgpr0
; GFX1032-NEXT: s_and_saveexec_b32 s3, vcc_lo
; GFX1032-NEXT: s_xor_b32 s3, exec_lo, s3
;
; GFX1164-LABEL: and_i32_varying:
; GFX1164: ; %bb.0: ; %entry
-; GFX1164-NEXT: v_mbcnt_lo_u32_b32 v1, exec_lo, 0
; GFX1164-NEXT: s_mov_b64 s[2:3], exec
; GFX1164-NEXT: s_mov_b32 s4, -1
-; GFX1164-NEXT: s_delay_alu instid0(VALU_DEP_1)
-; GFX1164-NEXT: v_mbcnt_hi_u32_b32 v2, exec_hi, v1
; GFX1164-NEXT: ; implicit-def: $vgpr1
; GFX1164-NEXT: .LBB14_1: ; %ComputeLoop
; GFX1164-NEXT: ; =>This Inner Loop Header: Depth=1
; GFX1164-NEXT: s_cmp_lg_u64 s[2:3], 0
; GFX1164-NEXT: s_cbranch_scc1 .LBB14_1
; GFX1164-NEXT: ; %bb.2: ; %ComputeEnd
-; GFX1164-NEXT: s_mov_b64 s[2:3], exec
+; GFX1164-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX1164-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
+; GFX1164-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
+; GFX1164-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
; GFX1164-NEXT: ; implicit-def: $vgpr0
-; GFX1164-NEXT: v_cmpx_eq_u32_e32 0, v2
+; GFX1164-NEXT: s_and_saveexec_b64 s[2:3], vcc
+; GFX1164-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
; GFX1164-NEXT: s_xor_b64 s[2:3], exec, s[2:3]
; GFX1164-NEXT: s_cbranch_execz .LBB14_4
; GFX1164-NEXT: ; %bb.3:
;
; GFX1132-LABEL: and_i32_varying:
; GFX1132: ; %bb.0: ; %entry
-; GFX1132-NEXT: v_mbcnt_lo_u32_b32 v2, exec_lo, 0
; GFX1132-NEXT: s_mov_b32 s3, exec_lo
; GFX1132-NEXT: s_mov_b32 s2, -1
; GFX1132-NEXT: ; implicit-def: $vgpr1
; GFX1132-NEXT: s_cmp_lg_u32 s3, 0
; GFX1132-NEXT: s_cbranch_scc1 .LBB14_1
; GFX1132-NEXT: ; %bb.2: ; %ComputeEnd
-; GFX1132-NEXT: s_mov_b32 s3, exec_lo
+; GFX1132-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX1132-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(SALU_CYCLE_1)
+; GFX1132-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v0
; GFX1132-NEXT: ; implicit-def: $vgpr0
-; GFX1132-NEXT: v_cmpx_eq_u32_e32 0, v2
+; GFX1132-NEXT: s_and_saveexec_b32 s3, vcc_lo
; GFX1132-NEXT: s_xor_b32 s3, exec_lo, s3
; GFX1132-NEXT: s_cbranch_execz .LBB14_4
; GFX1132-NEXT: ; %bb.3:
;
; GFX8-LABEL: or_i32_varying:
; GFX8: ; %bb.0: ; %entry
-; GFX8-NEXT: v_mbcnt_lo_u32_b32 v1, exec_lo, 0
; GFX8-NEXT: s_mov_b64 s[2:3], exec
; GFX8-NEXT: s_mov_b32 s4, 0
-; GFX8-NEXT: v_mbcnt_hi_u32_b32 v2, exec_hi, v1
; GFX8-NEXT: ; implicit-def: $vgpr1
; GFX8-NEXT: .LBB15_1: ; %ComputeLoop
; GFX8-NEXT: ; =>This Inner Loop Header: Depth=1
; GFX8-NEXT: s_cmp_lg_u64 s[2:3], 0
; GFX8-NEXT: s_cbranch_scc1 .LBB15_1
; GFX8-NEXT: ; %bb.2: ; %ComputeEnd
-; GFX8-NEXT: v_cmp_eq_u32_e32 vcc, 0, v2
+; GFX8-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX8-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
+; GFX8-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
; GFX8-NEXT: ; implicit-def: $vgpr0
; GFX8-NEXT: s_and_saveexec_b64 s[2:3], vcc
; GFX8-NEXT: s_xor_b64 s[2:3], exec, s[2:3]
;
; GFX9-LABEL: or_i32_varying:
; GFX9: ; %bb.0: ; %entry
-; GFX9-NEXT: v_mbcnt_lo_u32_b32 v1, exec_lo, 0
; GFX9-NEXT: s_mov_b64 s[2:3], exec
; GFX9-NEXT: s_mov_b32 s4, 0
-; GFX9-NEXT: v_mbcnt_hi_u32_b32 v2, exec_hi, v1
; GFX9-NEXT: ; implicit-def: $vgpr1
; GFX9-NEXT: .LBB15_1: ; %ComputeLoop
; GFX9-NEXT: ; =>This Inner Loop Header: Depth=1
; GFX9-NEXT: s_cmp_lg_u64 s[2:3], 0
; GFX9-NEXT: s_cbranch_scc1 .LBB15_1
; GFX9-NEXT: ; %bb.2: ; %ComputeEnd
-; GFX9-NEXT: v_cmp_eq_u32_e32 vcc, 0, v2
+; GFX9-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX9-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
+; GFX9-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
; GFX9-NEXT: ; implicit-def: $vgpr0
; GFX9-NEXT: s_and_saveexec_b64 s[2:3], vcc
; GFX9-NEXT: s_xor_b64 s[2:3], exec, s[2:3]
;
; GFX1064-LABEL: or_i32_varying:
; GFX1064: ; %bb.0: ; %entry
-; GFX1064-NEXT: v_mbcnt_lo_u32_b32 v1, exec_lo, 0
; GFX1064-NEXT: s_mov_b64 s[2:3], exec
; GFX1064-NEXT: s_mov_b32 s4, 0
-; GFX1064-NEXT: v_mbcnt_hi_u32_b32 v2, exec_hi, v1
; GFX1064-NEXT: ; implicit-def: $vgpr1
; GFX1064-NEXT: .LBB15_1: ; %ComputeLoop
; GFX1064-NEXT: ; =>This Inner Loop Header: Depth=1
; GFX1064-NEXT: s_cmp_lg_u64 s[2:3], 0
; GFX1064-NEXT: s_cbranch_scc1 .LBB15_1
; GFX1064-NEXT: ; %bb.2: ; %ComputeEnd
-; GFX1064-NEXT: v_cmp_eq_u32_e32 vcc, 0, v2
+; GFX1064-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX1064-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
+; GFX1064-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
; GFX1064-NEXT: ; implicit-def: $vgpr0
; GFX1064-NEXT: s_and_saveexec_b64 s[2:3], vcc
; GFX1064-NEXT: s_xor_b64 s[2:3], exec, s[2:3]
;
; GFX1032-LABEL: or_i32_varying:
; GFX1032: ; %bb.0: ; %entry
-; GFX1032-NEXT: v_mbcnt_lo_u32_b32 v2, exec_lo, 0
; GFX1032-NEXT: s_mov_b32 s3, exec_lo
; GFX1032-NEXT: s_mov_b32 s2, 0
; GFX1032-NEXT: ; implicit-def: $vgpr1
; GFX1032-NEXT: s_cmp_lg_u32 s3, 0
; GFX1032-NEXT: s_cbranch_scc1 .LBB15_1
; GFX1032-NEXT: ; %bb.2: ; %ComputeEnd
-; GFX1032-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v2
+; GFX1032-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX1032-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v0
; GFX1032-NEXT: ; implicit-def: $vgpr0
; GFX1032-NEXT: s_and_saveexec_b32 s3, vcc_lo
; GFX1032-NEXT: s_xor_b32 s3, exec_lo, s3
;
; GFX1164-LABEL: or_i32_varying:
; GFX1164: ; %bb.0: ; %entry
-; GFX1164-NEXT: v_mbcnt_lo_u32_b32 v1, exec_lo, 0
; GFX1164-NEXT: s_mov_b64 s[2:3], exec
; GFX1164-NEXT: s_mov_b32 s4, 0
-; GFX1164-NEXT: s_delay_alu instid0(VALU_DEP_1)
-; GFX1164-NEXT: v_mbcnt_hi_u32_b32 v2, exec_hi, v1
; GFX1164-NEXT: ; implicit-def: $vgpr1
; GFX1164-NEXT: .LBB15_1: ; %ComputeLoop
; GFX1164-NEXT: ; =>This Inner Loop Header: Depth=1
; GFX1164-NEXT: s_cmp_lg_u64 s[2:3], 0
; GFX1164-NEXT: s_cbranch_scc1 .LBB15_1
; GFX1164-NEXT: ; %bb.2: ; %ComputeEnd
-; GFX1164-NEXT: s_mov_b64 s[2:3], exec
+; GFX1164-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX1164-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
+; GFX1164-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
+; GFX1164-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
; GFX1164-NEXT: ; implicit-def: $vgpr0
-; GFX1164-NEXT: v_cmpx_eq_u32_e32 0, v2
+; GFX1164-NEXT: s_and_saveexec_b64 s[2:3], vcc
+; GFX1164-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
; GFX1164-NEXT: s_xor_b64 s[2:3], exec, s[2:3]
; GFX1164-NEXT: s_cbranch_execz .LBB15_4
; GFX1164-NEXT: ; %bb.3:
;
; GFX1132-LABEL: or_i32_varying:
; GFX1132: ; %bb.0: ; %entry
-; GFX1132-NEXT: v_mbcnt_lo_u32_b32 v2, exec_lo, 0
; GFX1132-NEXT: s_mov_b32 s3, exec_lo
; GFX1132-NEXT: s_mov_b32 s2, 0
; GFX1132-NEXT: ; implicit-def: $vgpr1
; GFX1132-NEXT: s_cmp_lg_u32 s3, 0
; GFX1132-NEXT: s_cbranch_scc1 .LBB15_1
; GFX1132-NEXT: ; %bb.2: ; %ComputeEnd
-; GFX1132-NEXT: s_mov_b32 s3, exec_lo
+; GFX1132-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX1132-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(SALU_CYCLE_1)
+; GFX1132-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v0
; GFX1132-NEXT: ; implicit-def: $vgpr0
-; GFX1132-NEXT: v_cmpx_eq_u32_e32 0, v2
+; GFX1132-NEXT: s_and_saveexec_b32 s3, vcc_lo
; GFX1132-NEXT: s_xor_b32 s3, exec_lo, s3
; GFX1132-NEXT: s_cbranch_execz .LBB15_4
; GFX1132-NEXT: ; %bb.3:
;
; GFX8-LABEL: xor_i32_varying:
; GFX8: ; %bb.0: ; %entry
-; GFX8-NEXT: v_mbcnt_lo_u32_b32 v1, exec_lo, 0
; GFX8-NEXT: s_mov_b64 s[2:3], exec
; GFX8-NEXT: s_mov_b32 s4, 0
-; GFX8-NEXT: v_mbcnt_hi_u32_b32 v2, exec_hi, v1
; GFX8-NEXT: ; implicit-def: $vgpr1
; GFX8-NEXT: .LBB16_1: ; %ComputeLoop
; GFX8-NEXT: ; =>This Inner Loop Header: Depth=1
; GFX8-NEXT: s_cmp_lg_u64 s[2:3], 0
; GFX8-NEXT: s_cbranch_scc1 .LBB16_1
; GFX8-NEXT: ; %bb.2: ; %ComputeEnd
-; GFX8-NEXT: v_cmp_eq_u32_e32 vcc, 0, v2
+; GFX8-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX8-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
+; GFX8-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
; GFX8-NEXT: ; implicit-def: $vgpr0
; GFX8-NEXT: s_and_saveexec_b64 s[2:3], vcc
; GFX8-NEXT: s_xor_b64 s[2:3], exec, s[2:3]
;
; GFX9-LABEL: xor_i32_varying:
; GFX9: ; %bb.0: ; %entry
-; GFX9-NEXT: v_mbcnt_lo_u32_b32 v1, exec_lo, 0
; GFX9-NEXT: s_mov_b64 s[2:3], exec
; GFX9-NEXT: s_mov_b32 s4, 0
-; GFX9-NEXT: v_mbcnt_hi_u32_b32 v2, exec_hi, v1
; GFX9-NEXT: ; implicit-def: $vgpr1
; GFX9-NEXT: .LBB16_1: ; %ComputeLoop
; GFX9-NEXT: ; =>This Inner Loop Header: Depth=1
; GFX9-NEXT: s_cmp_lg_u64 s[2:3], 0
; GFX9-NEXT: s_cbranch_scc1 .LBB16_1
; GFX9-NEXT: ; %bb.2: ; %ComputeEnd
-; GFX9-NEXT: v_cmp_eq_u32_e32 vcc, 0, v2
+; GFX9-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX9-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
+; GFX9-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
; GFX9-NEXT: ; implicit-def: $vgpr0
; GFX9-NEXT: s_and_saveexec_b64 s[2:3], vcc
; GFX9-NEXT: s_xor_b64 s[2:3], exec, s[2:3]
;
; GFX1064-LABEL: xor_i32_varying:
; GFX1064: ; %bb.0: ; %entry
-; GFX1064-NEXT: v_mbcnt_lo_u32_b32 v1, exec_lo, 0
; GFX1064-NEXT: s_mov_b64 s[2:3], exec
; GFX1064-NEXT: s_mov_b32 s4, 0
-; GFX1064-NEXT: v_mbcnt_hi_u32_b32 v2, exec_hi, v1
; GFX1064-NEXT: ; implicit-def: $vgpr1
; GFX1064-NEXT: .LBB16_1: ; %ComputeLoop
; GFX1064-NEXT: ; =>This Inner Loop Header: Depth=1
; GFX1064-NEXT: s_cmp_lg_u64 s[2:3], 0
; GFX1064-NEXT: s_cbranch_scc1 .LBB16_1
; GFX1064-NEXT: ; %bb.2: ; %ComputeEnd
-; GFX1064-NEXT: v_cmp_eq_u32_e32 vcc, 0, v2
+; GFX1064-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX1064-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
+; GFX1064-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
; GFX1064-NEXT: ; implicit-def: $vgpr0
; GFX1064-NEXT: s_and_saveexec_b64 s[2:3], vcc
; GFX1064-NEXT: s_xor_b64 s[2:3], exec, s[2:3]
;
; GFX1032-LABEL: xor_i32_varying:
; GFX1032: ; %bb.0: ; %entry
-; GFX1032-NEXT: v_mbcnt_lo_u32_b32 v2, exec_lo, 0
; GFX1032-NEXT: s_mov_b32 s3, exec_lo
; GFX1032-NEXT: s_mov_b32 s2, 0
; GFX1032-NEXT: ; implicit-def: $vgpr1
; GFX1032-NEXT: s_cmp_lg_u32 s3, 0
; GFX1032-NEXT: s_cbranch_scc1 .LBB16_1
; GFX1032-NEXT: ; %bb.2: ; %ComputeEnd
-; GFX1032-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v2
+; GFX1032-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX1032-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v0
; GFX1032-NEXT: ; implicit-def: $vgpr0
; GFX1032-NEXT: s_and_saveexec_b32 s3, vcc_lo
; GFX1032-NEXT: s_xor_b32 s3, exec_lo, s3
;
; GFX1164-LABEL: xor_i32_varying:
; GFX1164: ; %bb.0: ; %entry
-; GFX1164-NEXT: v_mbcnt_lo_u32_b32 v1, exec_lo, 0
; GFX1164-NEXT: s_mov_b64 s[2:3], exec
; GFX1164-NEXT: s_mov_b32 s4, 0
-; GFX1164-NEXT: s_delay_alu instid0(VALU_DEP_1)
-; GFX1164-NEXT: v_mbcnt_hi_u32_b32 v2, exec_hi, v1
; GFX1164-NEXT: ; implicit-def: $vgpr1
; GFX1164-NEXT: .LBB16_1: ; %ComputeLoop
; GFX1164-NEXT: ; =>This Inner Loop Header: Depth=1
; GFX1164-NEXT: s_cmp_lg_u64 s[2:3], 0
; GFX1164-NEXT: s_cbranch_scc1 .LBB16_1
; GFX1164-NEXT: ; %bb.2: ; %ComputeEnd
-; GFX1164-NEXT: s_mov_b64 s[2:3], exec
+; GFX1164-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX1164-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
+; GFX1164-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
+; GFX1164-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
; GFX1164-NEXT: ; implicit-def: $vgpr0
-; GFX1164-NEXT: v_cmpx_eq_u32_e32 0, v2
+; GFX1164-NEXT: s_and_saveexec_b64 s[2:3], vcc
+; GFX1164-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
; GFX1164-NEXT: s_xor_b64 s[2:3], exec, s[2:3]
; GFX1164-NEXT: s_cbranch_execz .LBB16_4
; GFX1164-NEXT: ; %bb.3:
;
; GFX1132-LABEL: xor_i32_varying:
; GFX1132: ; %bb.0: ; %entry
-; GFX1132-NEXT: v_mbcnt_lo_u32_b32 v2, exec_lo, 0
; GFX1132-NEXT: s_mov_b32 s3, exec_lo
; GFX1132-NEXT: s_mov_b32 s2, 0
; GFX1132-NEXT: ; implicit-def: $vgpr1
; GFX1132-NEXT: s_cmp_lg_u32 s3, 0
; GFX1132-NEXT: s_cbranch_scc1 .LBB16_1
; GFX1132-NEXT: ; %bb.2: ; %ComputeEnd
-; GFX1132-NEXT: s_mov_b32 s3, exec_lo
+; GFX1132-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX1132-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(SALU_CYCLE_1)
+; GFX1132-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v0
; GFX1132-NEXT: ; implicit-def: $vgpr0
-; GFX1132-NEXT: v_cmpx_eq_u32_e32 0, v2
+; GFX1132-NEXT: s_and_saveexec_b32 s3, vcc_lo
; GFX1132-NEXT: s_xor_b32 s3, exec_lo, s3
; GFX1132-NEXT: s_cbranch_execz .LBB16_4
; GFX1132-NEXT: ; %bb.3:
;
; GFX8-LABEL: max_i32_varying:
; GFX8: ; %bb.0: ; %entry
-; GFX8-NEXT: v_mbcnt_lo_u32_b32 v1, exec_lo, 0
; GFX8-NEXT: s_mov_b64 s[2:3], exec
-; GFX8-NEXT: v_mbcnt_hi_u32_b32 v2, exec_hi, v1
; GFX8-NEXT: s_brev_b32 s4, 1
; GFX8-NEXT: ; implicit-def: $vgpr1
; GFX8-NEXT: .LBB17_1: ; %ComputeLoop
; GFX8-NEXT: s_cmp_lg_u64 s[2:3], 0
; GFX8-NEXT: s_cbranch_scc1 .LBB17_1
; GFX8-NEXT: ; %bb.2: ; %ComputeEnd
-; GFX8-NEXT: v_cmp_eq_u32_e32 vcc, 0, v2
+; GFX8-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX8-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
+; GFX8-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
; GFX8-NEXT: ; implicit-def: $vgpr0
; GFX8-NEXT: s_and_saveexec_b64 s[2:3], vcc
; GFX8-NEXT: s_xor_b64 s[2:3], exec, s[2:3]
;
; GFX9-LABEL: max_i32_varying:
; GFX9: ; %bb.0: ; %entry
-; GFX9-NEXT: v_mbcnt_lo_u32_b32 v1, exec_lo, 0
; GFX9-NEXT: s_mov_b64 s[2:3], exec
-; GFX9-NEXT: v_mbcnt_hi_u32_b32 v2, exec_hi, v1
; GFX9-NEXT: s_brev_b32 s4, 1
; GFX9-NEXT: ; implicit-def: $vgpr1
; GFX9-NEXT: .LBB17_1: ; %ComputeLoop
; GFX9-NEXT: s_cmp_lg_u64 s[2:3], 0
; GFX9-NEXT: s_cbranch_scc1 .LBB17_1
; GFX9-NEXT: ; %bb.2: ; %ComputeEnd
-; GFX9-NEXT: v_cmp_eq_u32_e32 vcc, 0, v2
+; GFX9-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX9-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
+; GFX9-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
; GFX9-NEXT: ; implicit-def: $vgpr0
; GFX9-NEXT: s_and_saveexec_b64 s[2:3], vcc
; GFX9-NEXT: s_xor_b64 s[2:3], exec, s[2:3]
;
; GFX1064-LABEL: max_i32_varying:
; GFX1064: ; %bb.0: ; %entry
-; GFX1064-NEXT: v_mbcnt_lo_u32_b32 v1, exec_lo, 0
; GFX1064-NEXT: s_mov_b64 s[2:3], exec
; GFX1064-NEXT: s_brev_b32 s4, 1
-; GFX1064-NEXT: v_mbcnt_hi_u32_b32 v2, exec_hi, v1
; GFX1064-NEXT: ; implicit-def: $vgpr1
; GFX1064-NEXT: .LBB17_1: ; %ComputeLoop
; GFX1064-NEXT: ; =>This Inner Loop Header: Depth=1
; GFX1064-NEXT: s_cmp_lg_u64 s[2:3], 0
; GFX1064-NEXT: s_cbranch_scc1 .LBB17_1
; GFX1064-NEXT: ; %bb.2: ; %ComputeEnd
-; GFX1064-NEXT: v_cmp_eq_u32_e32 vcc, 0, v2
+; GFX1064-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX1064-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
+; GFX1064-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
; GFX1064-NEXT: ; implicit-def: $vgpr0
; GFX1064-NEXT: s_and_saveexec_b64 s[2:3], vcc
; GFX1064-NEXT: s_xor_b64 s[2:3], exec, s[2:3]
;
; GFX1032-LABEL: max_i32_varying:
; GFX1032: ; %bb.0: ; %entry
-; GFX1032-NEXT: v_mbcnt_lo_u32_b32 v2, exec_lo, 0
; GFX1032-NEXT: s_mov_b32 s3, exec_lo
; GFX1032-NEXT: s_brev_b32 s2, 1
; GFX1032-NEXT: ; implicit-def: $vgpr1
; GFX1032-NEXT: s_cmp_lg_u32 s3, 0
; GFX1032-NEXT: s_cbranch_scc1 .LBB17_1
; GFX1032-NEXT: ; %bb.2: ; %ComputeEnd
-; GFX1032-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v2
+; GFX1032-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX1032-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v0
; GFX1032-NEXT: ; implicit-def: $vgpr0
; GFX1032-NEXT: s_and_saveexec_b32 s3, vcc_lo
; GFX1032-NEXT: s_xor_b32 s3, exec_lo, s3
;
; GFX1164-LABEL: max_i32_varying:
; GFX1164: ; %bb.0: ; %entry
-; GFX1164-NEXT: v_mbcnt_lo_u32_b32 v1, exec_lo, 0
; GFX1164-NEXT: s_mov_b64 s[2:3], exec
; GFX1164-NEXT: s_brev_b32 s4, 1
-; GFX1164-NEXT: s_delay_alu instid0(VALU_DEP_1)
-; GFX1164-NEXT: v_mbcnt_hi_u32_b32 v2, exec_hi, v1
; GFX1164-NEXT: ; implicit-def: $vgpr1
; GFX1164-NEXT: .LBB17_1: ; %ComputeLoop
; GFX1164-NEXT: ; =>This Inner Loop Header: Depth=1
; GFX1164-NEXT: s_cmp_lg_u64 s[2:3], 0
; GFX1164-NEXT: s_cbranch_scc1 .LBB17_1
; GFX1164-NEXT: ; %bb.2: ; %ComputeEnd
-; GFX1164-NEXT: s_mov_b64 s[2:3], exec
+; GFX1164-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX1164-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
+; GFX1164-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
+; GFX1164-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
; GFX1164-NEXT: ; implicit-def: $vgpr0
-; GFX1164-NEXT: v_cmpx_eq_u32_e32 0, v2
+; GFX1164-NEXT: s_and_saveexec_b64 s[2:3], vcc
+; GFX1164-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
; GFX1164-NEXT: s_xor_b64 s[2:3], exec, s[2:3]
; GFX1164-NEXT: s_cbranch_execz .LBB17_4
; GFX1164-NEXT: ; %bb.3:
;
; GFX1132-LABEL: max_i32_varying:
; GFX1132: ; %bb.0: ; %entry
-; GFX1132-NEXT: v_mbcnt_lo_u32_b32 v2, exec_lo, 0
; GFX1132-NEXT: s_mov_b32 s3, exec_lo
; GFX1132-NEXT: s_brev_b32 s2, 1
; GFX1132-NEXT: ; implicit-def: $vgpr1
; GFX1132-NEXT: s_cmp_lg_u32 s3, 0
; GFX1132-NEXT: s_cbranch_scc1 .LBB17_1
; GFX1132-NEXT: ; %bb.2: ; %ComputeEnd
-; GFX1132-NEXT: s_mov_b32 s3, exec_lo
+; GFX1132-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX1132-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(SALU_CYCLE_1)
+; GFX1132-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v0
; GFX1132-NEXT: ; implicit-def: $vgpr0
-; GFX1132-NEXT: v_cmpx_eq_u32_e32 0, v2
+; GFX1132-NEXT: s_and_saveexec_b32 s3, vcc_lo
; GFX1132-NEXT: s_xor_b32 s3, exec_lo, s3
; GFX1132-NEXT: s_cbranch_execz .LBB17_4
; GFX1132-NEXT: ; %bb.3:
;
; GFX8-LABEL: min_i32_varying:
; GFX8: ; %bb.0: ; %entry
-; GFX8-NEXT: v_mbcnt_lo_u32_b32 v1, exec_lo, 0
; GFX8-NEXT: s_mov_b64 s[2:3], exec
-; GFX8-NEXT: v_mbcnt_hi_u32_b32 v2, exec_hi, v1
; GFX8-NEXT: s_brev_b32 s4, -2
; GFX8-NEXT: ; implicit-def: $vgpr1
; GFX8-NEXT: .LBB19_1: ; %ComputeLoop
; GFX8-NEXT: s_cmp_lg_u64 s[2:3], 0
; GFX8-NEXT: s_cbranch_scc1 .LBB19_1
; GFX8-NEXT: ; %bb.2: ; %ComputeEnd
-; GFX8-NEXT: v_cmp_eq_u32_e32 vcc, 0, v2
+; GFX8-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX8-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
+; GFX8-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
; GFX8-NEXT: ; implicit-def: $vgpr0
; GFX8-NEXT: s_and_saveexec_b64 s[2:3], vcc
; GFX8-NEXT: s_xor_b64 s[2:3], exec, s[2:3]
;
; GFX9-LABEL: min_i32_varying:
; GFX9: ; %bb.0: ; %entry
-; GFX9-NEXT: v_mbcnt_lo_u32_b32 v1, exec_lo, 0
; GFX9-NEXT: s_mov_b64 s[2:3], exec
-; GFX9-NEXT: v_mbcnt_hi_u32_b32 v2, exec_hi, v1
; GFX9-NEXT: s_brev_b32 s4, -2
; GFX9-NEXT: ; implicit-def: $vgpr1
; GFX9-NEXT: .LBB19_1: ; %ComputeLoop
; GFX9-NEXT: s_cmp_lg_u64 s[2:3], 0
; GFX9-NEXT: s_cbranch_scc1 .LBB19_1
; GFX9-NEXT: ; %bb.2: ; %ComputeEnd
-; GFX9-NEXT: v_cmp_eq_u32_e32 vcc, 0, v2
+; GFX9-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX9-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
+; GFX9-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
; GFX9-NEXT: ; implicit-def: $vgpr0
; GFX9-NEXT: s_and_saveexec_b64 s[2:3], vcc
; GFX9-NEXT: s_xor_b64 s[2:3], exec, s[2:3]
;
; GFX1064-LABEL: min_i32_varying:
; GFX1064: ; %bb.0: ; %entry
-; GFX1064-NEXT: v_mbcnt_lo_u32_b32 v1, exec_lo, 0
; GFX1064-NEXT: s_mov_b64 s[2:3], exec
; GFX1064-NEXT: s_brev_b32 s4, -2
-; GFX1064-NEXT: v_mbcnt_hi_u32_b32 v2, exec_hi, v1
; GFX1064-NEXT: ; implicit-def: $vgpr1
; GFX1064-NEXT: .LBB19_1: ; %ComputeLoop
; GFX1064-NEXT: ; =>This Inner Loop Header: Depth=1
; GFX1064-NEXT: s_cmp_lg_u64 s[2:3], 0
; GFX1064-NEXT: s_cbranch_scc1 .LBB19_1
; GFX1064-NEXT: ; %bb.2: ; %ComputeEnd
-; GFX1064-NEXT: v_cmp_eq_u32_e32 vcc, 0, v2
+; GFX1064-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX1064-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
+; GFX1064-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
; GFX1064-NEXT: ; implicit-def: $vgpr0
; GFX1064-NEXT: s_and_saveexec_b64 s[2:3], vcc
; GFX1064-NEXT: s_xor_b64 s[2:3], exec, s[2:3]
;
; GFX1032-LABEL: min_i32_varying:
; GFX1032: ; %bb.0: ; %entry
-; GFX1032-NEXT: v_mbcnt_lo_u32_b32 v2, exec_lo, 0
; GFX1032-NEXT: s_mov_b32 s3, exec_lo
; GFX1032-NEXT: s_brev_b32 s2, -2
; GFX1032-NEXT: ; implicit-def: $vgpr1
; GFX1032-NEXT: s_cmp_lg_u32 s3, 0
; GFX1032-NEXT: s_cbranch_scc1 .LBB19_1
; GFX1032-NEXT: ; %bb.2: ; %ComputeEnd
-; GFX1032-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v2
+; GFX1032-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX1032-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v0
; GFX1032-NEXT: ; implicit-def: $vgpr0
; GFX1032-NEXT: s_and_saveexec_b32 s3, vcc_lo
; GFX1032-NEXT: s_xor_b32 s3, exec_lo, s3
;
; GFX1164-LABEL: min_i32_varying:
; GFX1164: ; %bb.0: ; %entry
-; GFX1164-NEXT: v_mbcnt_lo_u32_b32 v1, exec_lo, 0
; GFX1164-NEXT: s_mov_b64 s[2:3], exec
; GFX1164-NEXT: s_brev_b32 s4, -2
-; GFX1164-NEXT: s_delay_alu instid0(VALU_DEP_1)
-; GFX1164-NEXT: v_mbcnt_hi_u32_b32 v2, exec_hi, v1
; GFX1164-NEXT: ; implicit-def: $vgpr1
; GFX1164-NEXT: .LBB19_1: ; %ComputeLoop
; GFX1164-NEXT: ; =>This Inner Loop Header: Depth=1
; GFX1164-NEXT: s_cmp_lg_u64 s[2:3], 0
; GFX1164-NEXT: s_cbranch_scc1 .LBB19_1
; GFX1164-NEXT: ; %bb.2: ; %ComputeEnd
-; GFX1164-NEXT: s_mov_b64 s[2:3], exec
+; GFX1164-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX1164-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
+; GFX1164-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
+; GFX1164-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
; GFX1164-NEXT: ; implicit-def: $vgpr0
-; GFX1164-NEXT: v_cmpx_eq_u32_e32 0, v2
+; GFX1164-NEXT: s_and_saveexec_b64 s[2:3], vcc
+; GFX1164-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
; GFX1164-NEXT: s_xor_b64 s[2:3], exec, s[2:3]
; GFX1164-NEXT: s_cbranch_execz .LBB19_4
; GFX1164-NEXT: ; %bb.3:
;
; GFX1132-LABEL: min_i32_varying:
; GFX1132: ; %bb.0: ; %entry
-; GFX1132-NEXT: v_mbcnt_lo_u32_b32 v2, exec_lo, 0
; GFX1132-NEXT: s_mov_b32 s3, exec_lo
; GFX1132-NEXT: s_brev_b32 s2, -2
; GFX1132-NEXT: ; implicit-def: $vgpr1
; GFX1132-NEXT: s_cmp_lg_u32 s3, 0
; GFX1132-NEXT: s_cbranch_scc1 .LBB19_1
; GFX1132-NEXT: ; %bb.2: ; %ComputeEnd
-; GFX1132-NEXT: s_mov_b32 s3, exec_lo
+; GFX1132-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX1132-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(SALU_CYCLE_1)
+; GFX1132-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v0
; GFX1132-NEXT: ; implicit-def: $vgpr0
-; GFX1132-NEXT: v_cmpx_eq_u32_e32 0, v2
+; GFX1132-NEXT: s_and_saveexec_b32 s3, vcc_lo
; GFX1132-NEXT: s_xor_b32 s3, exec_lo, s3
; GFX1132-NEXT: s_cbranch_execz .LBB19_4
; GFX1132-NEXT: ; %bb.3:
;
; GFX8-LABEL: umax_i32_varying:
; GFX8: ; %bb.0: ; %entry
-; GFX8-NEXT: v_mbcnt_lo_u32_b32 v1, exec_lo, 0
; GFX8-NEXT: s_mov_b64 s[2:3], exec
; GFX8-NEXT: s_mov_b32 s4, 0
-; GFX8-NEXT: v_mbcnt_hi_u32_b32 v2, exec_hi, v1
; GFX8-NEXT: ; implicit-def: $vgpr1
; GFX8-NEXT: .LBB21_1: ; %ComputeLoop
; GFX8-NEXT: ; =>This Inner Loop Header: Depth=1
; GFX8-NEXT: s_cmp_lg_u64 s[2:3], 0
; GFX8-NEXT: s_cbranch_scc1 .LBB21_1
; GFX8-NEXT: ; %bb.2: ; %ComputeEnd
-; GFX8-NEXT: v_cmp_eq_u32_e32 vcc, 0, v2
+; GFX8-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX8-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
+; GFX8-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
; GFX8-NEXT: ; implicit-def: $vgpr0
; GFX8-NEXT: s_and_saveexec_b64 s[2:3], vcc
; GFX8-NEXT: s_xor_b64 s[2:3], exec, s[2:3]
;
; GFX9-LABEL: umax_i32_varying:
; GFX9: ; %bb.0: ; %entry
-; GFX9-NEXT: v_mbcnt_lo_u32_b32 v1, exec_lo, 0
; GFX9-NEXT: s_mov_b64 s[2:3], exec
; GFX9-NEXT: s_mov_b32 s4, 0
-; GFX9-NEXT: v_mbcnt_hi_u32_b32 v2, exec_hi, v1
; GFX9-NEXT: ; implicit-def: $vgpr1
; GFX9-NEXT: .LBB21_1: ; %ComputeLoop
; GFX9-NEXT: ; =>This Inner Loop Header: Depth=1
; GFX9-NEXT: s_cmp_lg_u64 s[2:3], 0
; GFX9-NEXT: s_cbranch_scc1 .LBB21_1
; GFX9-NEXT: ; %bb.2: ; %ComputeEnd
-; GFX9-NEXT: v_cmp_eq_u32_e32 vcc, 0, v2
+; GFX9-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX9-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
+; GFX9-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
; GFX9-NEXT: ; implicit-def: $vgpr0
; GFX9-NEXT: s_and_saveexec_b64 s[2:3], vcc
; GFX9-NEXT: s_xor_b64 s[2:3], exec, s[2:3]
;
; GFX1064-LABEL: umax_i32_varying:
; GFX1064: ; %bb.0: ; %entry
-; GFX1064-NEXT: v_mbcnt_lo_u32_b32 v1, exec_lo, 0
; GFX1064-NEXT: s_mov_b64 s[2:3], exec
; GFX1064-NEXT: s_mov_b32 s4, 0
-; GFX1064-NEXT: v_mbcnt_hi_u32_b32 v2, exec_hi, v1
; GFX1064-NEXT: ; implicit-def: $vgpr1
; GFX1064-NEXT: .LBB21_1: ; %ComputeLoop
; GFX1064-NEXT: ; =>This Inner Loop Header: Depth=1
; GFX1064-NEXT: s_cmp_lg_u64 s[2:3], 0
; GFX1064-NEXT: s_cbranch_scc1 .LBB21_1
; GFX1064-NEXT: ; %bb.2: ; %ComputeEnd
-; GFX1064-NEXT: v_cmp_eq_u32_e32 vcc, 0, v2
+; GFX1064-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX1064-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
+; GFX1064-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
; GFX1064-NEXT: ; implicit-def: $vgpr0
; GFX1064-NEXT: s_and_saveexec_b64 s[2:3], vcc
; GFX1064-NEXT: s_xor_b64 s[2:3], exec, s[2:3]
;
; GFX1032-LABEL: umax_i32_varying:
; GFX1032: ; %bb.0: ; %entry
-; GFX1032-NEXT: v_mbcnt_lo_u32_b32 v2, exec_lo, 0
; GFX1032-NEXT: s_mov_b32 s3, exec_lo
; GFX1032-NEXT: s_mov_b32 s2, 0
; GFX1032-NEXT: ; implicit-def: $vgpr1
; GFX1032-NEXT: s_cmp_lg_u32 s3, 0
; GFX1032-NEXT: s_cbranch_scc1 .LBB21_1
; GFX1032-NEXT: ; %bb.2: ; %ComputeEnd
-; GFX1032-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v2
+; GFX1032-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX1032-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v0
; GFX1032-NEXT: ; implicit-def: $vgpr0
; GFX1032-NEXT: s_and_saveexec_b32 s3, vcc_lo
; GFX1032-NEXT: s_xor_b32 s3, exec_lo, s3
;
; GFX1164-LABEL: umax_i32_varying:
; GFX1164: ; %bb.0: ; %entry
-; GFX1164-NEXT: v_mbcnt_lo_u32_b32 v1, exec_lo, 0
; GFX1164-NEXT: s_mov_b64 s[2:3], exec
; GFX1164-NEXT: s_mov_b32 s4, 0
-; GFX1164-NEXT: s_delay_alu instid0(VALU_DEP_1)
-; GFX1164-NEXT: v_mbcnt_hi_u32_b32 v2, exec_hi, v1
; GFX1164-NEXT: ; implicit-def: $vgpr1
; GFX1164-NEXT: .LBB21_1: ; %ComputeLoop
; GFX1164-NEXT: ; =>This Inner Loop Header: Depth=1
; GFX1164-NEXT: s_cmp_lg_u64 s[2:3], 0
; GFX1164-NEXT: s_cbranch_scc1 .LBB21_1
; GFX1164-NEXT: ; %bb.2: ; %ComputeEnd
-; GFX1164-NEXT: s_mov_b64 s[2:3], exec
+; GFX1164-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX1164-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
+; GFX1164-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
+; GFX1164-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
; GFX1164-NEXT: ; implicit-def: $vgpr0
-; GFX1164-NEXT: v_cmpx_eq_u32_e32 0, v2
+; GFX1164-NEXT: s_and_saveexec_b64 s[2:3], vcc
+; GFX1164-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
; GFX1164-NEXT: s_xor_b64 s[2:3], exec, s[2:3]
; GFX1164-NEXT: s_cbranch_execz .LBB21_4
; GFX1164-NEXT: ; %bb.3:
;
; GFX1132-LABEL: umax_i32_varying:
; GFX1132: ; %bb.0: ; %entry
-; GFX1132-NEXT: v_mbcnt_lo_u32_b32 v2, exec_lo, 0
; GFX1132-NEXT: s_mov_b32 s3, exec_lo
; GFX1132-NEXT: s_mov_b32 s2, 0
; GFX1132-NEXT: ; implicit-def: $vgpr1
; GFX1132-NEXT: s_cmp_lg_u32 s3, 0
; GFX1132-NEXT: s_cbranch_scc1 .LBB21_1
; GFX1132-NEXT: ; %bb.2: ; %ComputeEnd
-; GFX1132-NEXT: s_mov_b32 s3, exec_lo
+; GFX1132-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX1132-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(SALU_CYCLE_1)
+; GFX1132-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v0
; GFX1132-NEXT: ; implicit-def: $vgpr0
-; GFX1132-NEXT: v_cmpx_eq_u32_e32 0, v2
+; GFX1132-NEXT: s_and_saveexec_b32 s3, vcc_lo
; GFX1132-NEXT: s_xor_b32 s3, exec_lo, s3
; GFX1132-NEXT: s_cbranch_execz .LBB21_4
; GFX1132-NEXT: ; %bb.3:
;
; GFX8-LABEL: umin_i32_varying:
; GFX8: ; %bb.0: ; %entry
-; GFX8-NEXT: v_mbcnt_lo_u32_b32 v1, exec_lo, 0
; GFX8-NEXT: s_mov_b64 s[2:3], exec
-; GFX8-NEXT: v_mbcnt_hi_u32_b32 v2, exec_hi, v1
; GFX8-NEXT: s_mov_b32 s4, -1
; GFX8-NEXT: ; implicit-def: $vgpr1
; GFX8-NEXT: .LBB23_1: ; %ComputeLoop
; GFX8-NEXT: s_cmp_lg_u64 s[2:3], 0
; GFX8-NEXT: s_cbranch_scc1 .LBB23_1
; GFX8-NEXT: ; %bb.2: ; %ComputeEnd
-; GFX8-NEXT: v_cmp_eq_u32_e32 vcc, 0, v2
+; GFX8-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX8-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
+; GFX8-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
; GFX8-NEXT: ; implicit-def: $vgpr0
; GFX8-NEXT: s_and_saveexec_b64 s[2:3], vcc
; GFX8-NEXT: s_xor_b64 s[2:3], exec, s[2:3]
;
; GFX9-LABEL: umin_i32_varying:
; GFX9: ; %bb.0: ; %entry
-; GFX9-NEXT: v_mbcnt_lo_u32_b32 v1, exec_lo, 0
; GFX9-NEXT: s_mov_b64 s[2:3], exec
-; GFX9-NEXT: v_mbcnt_hi_u32_b32 v2, exec_hi, v1
; GFX9-NEXT: s_mov_b32 s4, -1
; GFX9-NEXT: ; implicit-def: $vgpr1
; GFX9-NEXT: .LBB23_1: ; %ComputeLoop
; GFX9-NEXT: s_cmp_lg_u64 s[2:3], 0
; GFX9-NEXT: s_cbranch_scc1 .LBB23_1
; GFX9-NEXT: ; %bb.2: ; %ComputeEnd
-; GFX9-NEXT: v_cmp_eq_u32_e32 vcc, 0, v2
+; GFX9-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX9-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
+; GFX9-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
; GFX9-NEXT: ; implicit-def: $vgpr0
; GFX9-NEXT: s_and_saveexec_b64 s[2:3], vcc
; GFX9-NEXT: s_xor_b64 s[2:3], exec, s[2:3]
;
; GFX1064-LABEL: umin_i32_varying:
; GFX1064: ; %bb.0: ; %entry
-; GFX1064-NEXT: v_mbcnt_lo_u32_b32 v1, exec_lo, 0
; GFX1064-NEXT: s_mov_b64 s[2:3], exec
; GFX1064-NEXT: s_mov_b32 s4, -1
-; GFX1064-NEXT: v_mbcnt_hi_u32_b32 v2, exec_hi, v1
; GFX1064-NEXT: ; implicit-def: $vgpr1
; GFX1064-NEXT: .LBB23_1: ; %ComputeLoop
; GFX1064-NEXT: ; =>This Inner Loop Header: Depth=1
; GFX1064-NEXT: s_cmp_lg_u64 s[2:3], 0
; GFX1064-NEXT: s_cbranch_scc1 .LBB23_1
; GFX1064-NEXT: ; %bb.2: ; %ComputeEnd
-; GFX1064-NEXT: v_cmp_eq_u32_e32 vcc, 0, v2
+; GFX1064-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX1064-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
+; GFX1064-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
; GFX1064-NEXT: ; implicit-def: $vgpr0
; GFX1064-NEXT: s_and_saveexec_b64 s[2:3], vcc
; GFX1064-NEXT: s_xor_b64 s[2:3], exec, s[2:3]
;
; GFX1032-LABEL: umin_i32_varying:
; GFX1032: ; %bb.0: ; %entry
-; GFX1032-NEXT: v_mbcnt_lo_u32_b32 v2, exec_lo, 0
; GFX1032-NEXT: s_mov_b32 s3, exec_lo
; GFX1032-NEXT: s_mov_b32 s2, -1
; GFX1032-NEXT: ; implicit-def: $vgpr1
; GFX1032-NEXT: s_cmp_lg_u32 s3, 0
; GFX1032-NEXT: s_cbranch_scc1 .LBB23_1
; GFX1032-NEXT: ; %bb.2: ; %ComputeEnd
-; GFX1032-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v2
+; GFX1032-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX1032-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v0
; GFX1032-NEXT: ; implicit-def: $vgpr0
; GFX1032-NEXT: s_and_saveexec_b32 s3, vcc_lo
; GFX1032-NEXT: s_xor_b32 s3, exec_lo, s3
;
; GFX1164-LABEL: umin_i32_varying:
; GFX1164: ; %bb.0: ; %entry
-; GFX1164-NEXT: v_mbcnt_lo_u32_b32 v1, exec_lo, 0
; GFX1164-NEXT: s_mov_b64 s[2:3], exec
; GFX1164-NEXT: s_mov_b32 s4, -1
-; GFX1164-NEXT: s_delay_alu instid0(VALU_DEP_1)
-; GFX1164-NEXT: v_mbcnt_hi_u32_b32 v2, exec_hi, v1
; GFX1164-NEXT: ; implicit-def: $vgpr1
; GFX1164-NEXT: .LBB23_1: ; %ComputeLoop
; GFX1164-NEXT: ; =>This Inner Loop Header: Depth=1
; GFX1164-NEXT: s_cmp_lg_u64 s[2:3], 0
; GFX1164-NEXT: s_cbranch_scc1 .LBB23_1
; GFX1164-NEXT: ; %bb.2: ; %ComputeEnd
-; GFX1164-NEXT: s_mov_b64 s[2:3], exec
+; GFX1164-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX1164-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
+; GFX1164-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
+; GFX1164-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
; GFX1164-NEXT: ; implicit-def: $vgpr0
-; GFX1164-NEXT: v_cmpx_eq_u32_e32 0, v2
+; GFX1164-NEXT: s_and_saveexec_b64 s[2:3], vcc
+; GFX1164-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
; GFX1164-NEXT: s_xor_b64 s[2:3], exec, s[2:3]
; GFX1164-NEXT: s_cbranch_execz .LBB23_4
; GFX1164-NEXT: ; %bb.3:
;
; GFX1132-LABEL: umin_i32_varying:
; GFX1132: ; %bb.0: ; %entry
-; GFX1132-NEXT: v_mbcnt_lo_u32_b32 v2, exec_lo, 0
; GFX1132-NEXT: s_mov_b32 s3, exec_lo
; GFX1132-NEXT: s_mov_b32 s2, -1
; GFX1132-NEXT: ; implicit-def: $vgpr1
; GFX1132-NEXT: s_cmp_lg_u32 s3, 0
; GFX1132-NEXT: s_cbranch_scc1 .LBB23_1
; GFX1132-NEXT: ; %bb.2: ; %ComputeEnd
-; GFX1132-NEXT: s_mov_b32 s3, exec_lo
+; GFX1132-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX1132-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(SALU_CYCLE_1)
+; GFX1132-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v0
; GFX1132-NEXT: ; implicit-def: $vgpr0
-; GFX1132-NEXT: v_cmpx_eq_u32_e32 0, v2
+; GFX1132-NEXT: s_and_saveexec_b32 s3, vcc_lo
; GFX1132-NEXT: s_xor_b32 s3, exec_lo, s3
; GFX1132-NEXT: s_cbranch_execz .LBB23_4
; GFX1132-NEXT: ; %bb.3: