}
static bool isCallerPreservedOrConstPhysReg(MCRegister Reg,
+ const MachineOperand &MO,
const MachineFunction &MF,
- const TargetRegisterInfo &TRI) {
+ const TargetRegisterInfo &TRI,
+ const TargetInstrInfo &TII) {
// MachineRegisterInfo::isConstantPhysReg directly called by
// MachineRegisterInfo::isCallerPreservedOrConstPhysReg expects the
// reserved registers to be frozen. That doesn't cause a problem post-ISel as
// It does cause issues mid-GlobalISel, however, hence the additional
// reservedRegsFrozen check.
const MachineRegisterInfo &MRI = MF.getRegInfo();
- return TRI.isCallerPreservedPhysReg(Reg, MF) ||
+ return TRI.isCallerPreservedPhysReg(Reg, MF) || TII.isIgnorableUse(MO) ||
(MRI.reservedRegsFrozen() && MRI.isConstantPhysReg(Reg));
}
if (Register::isVirtualRegister(Reg))
continue;
// Reading either caller preserved or constant physregs is ok.
- if (!isCallerPreservedOrConstPhysReg(Reg.asMCReg(), *MI->getMF(), *TRI))
+ if (!isCallerPreservedOrConstPhysReg(Reg.asMCReg(), MO, *MI->getMF(), *TRI,
+ *TII))
for (MCRegAliasIterator AI(Reg, TRI, true); AI.isValid(); ++AI)
PhysRefs.insert(*AI);
}
; CHECK-NEXT: v_or_b32_e32 v1, v5, v3
; CHECK-NEXT: v_mov_b32_e32 v0, 0
; CHECK-NEXT: v_cmp_ne_u64_e32 vcc, 0, v[0:1]
+; CHECK-NEXT: v_cvt_f32_u32_e32 v6, v2
; CHECK-NEXT: ; implicit-def: $vgpr0_vgpr1
; CHECK-NEXT: s_and_saveexec_b64 s[4:5], vcc
; CHECK-NEXT: s_xor_b64 s[6:7], exec, s[4:5]
; CHECK-NEXT: s_or_b64 exec, exec, s[6:7]
; CHECK-NEXT: s_setpc_b64 s[30:31]
; CHECK-NEXT: .LBB0_3:
-; CHECK-NEXT: v_cvt_f32_u32_e32 v0, v2
-; CHECK-NEXT: v_cvt_f32_u32_e32 v1, v3
-; CHECK-NEXT: v_sub_i32_e32 v6, vcc, 0, v2
+; CHECK-NEXT: v_cvt_f32_u32_e32 v0, v3
+; CHECK-NEXT: v_sub_i32_e32 v1, vcc, 0, v2
; CHECK-NEXT: v_subb_u32_e32 v7, vcc, 0, v3, vcc
-; CHECK-NEXT: v_mac_f32_e32 v0, 0x4f800000, v1
-; CHECK-NEXT: v_rcp_iflag_f32_e32 v0, v0
+; CHECK-NEXT: v_mac_f32_e32 v6, 0x4f800000, v0
+; CHECK-NEXT: v_rcp_iflag_f32_e32 v0, v6
; CHECK-NEXT: v_mul_f32_e32 v0, 0x5f7ffffc, v0
-; CHECK-NEXT: v_mul_f32_e32 v1, 0x2f800000, v0
-; CHECK-NEXT: v_trunc_f32_e32 v1, v1
-; CHECK-NEXT: v_mac_f32_e32 v0, 0xcf800000, v1
-; CHECK-NEXT: v_cvt_u32_f32_e32 v1, v1
+; CHECK-NEXT: v_mul_f32_e32 v6, 0x2f800000, v0
+; CHECK-NEXT: v_trunc_f32_e32 v6, v6
+; CHECK-NEXT: v_mac_f32_e32 v0, 0xcf800000, v6
+; CHECK-NEXT: v_cvt_u32_f32_e32 v6, v6
; CHECK-NEXT: v_cvt_u32_f32_e32 v0, v0
-; CHECK-NEXT: v_mul_lo_u32 v8, v6, v1
-; CHECK-NEXT: v_mul_lo_u32 v9, v6, v0
+; CHECK-NEXT: v_mul_lo_u32 v8, v1, v6
+; CHECK-NEXT: v_mul_lo_u32 v9, v1, v0
; CHECK-NEXT: v_mul_lo_u32 v10, v7, v0
-; CHECK-NEXT: v_mul_hi_u32 v11, v6, v0
+; CHECK-NEXT: v_mul_hi_u32 v11, v1, v0
; CHECK-NEXT: v_add_i32_e32 v8, vcc, v10, v8
-; CHECK-NEXT: v_mul_lo_u32 v10, v1, v9
+; CHECK-NEXT: v_mul_lo_u32 v10, v6, v9
; CHECK-NEXT: v_mul_hi_u32 v12, v0, v9
-; CHECK-NEXT: v_mul_hi_u32 v9, v1, v9
+; CHECK-NEXT: v_mul_hi_u32 v9, v6, v9
; CHECK-NEXT: v_add_i32_e32 v8, vcc, v8, v11
; CHECK-NEXT: v_mul_lo_u32 v11, v0, v8
-; CHECK-NEXT: v_mul_lo_u32 v13, v1, v8
+; CHECK-NEXT: v_mul_lo_u32 v13, v6, v8
; CHECK-NEXT: v_mul_hi_u32 v14, v0, v8
-; CHECK-NEXT: v_mul_hi_u32 v8, v1, v8
+; CHECK-NEXT: v_mul_hi_u32 v8, v6, v8
; CHECK-NEXT: v_add_i32_e32 v10, vcc, v10, v11
; CHECK-NEXT: v_cndmask_b32_e64 v11, 0, 1, vcc
; CHECK-NEXT: v_add_i32_e32 v9, vcc, v13, v9
; CHECK-NEXT: v_add_i32_e32 v10, vcc, v11, v10
; CHECK-NEXT: v_add_i32_e32 v8, vcc, v8, v10
; CHECK-NEXT: v_add_i32_e32 v0, vcc, v0, v9
-; CHECK-NEXT: v_addc_u32_e32 v1, vcc, v1, v8, vcc
-; CHECK-NEXT: v_mul_lo_u32 v8, v6, v0
+; CHECK-NEXT: v_addc_u32_e32 v6, vcc, v6, v8, vcc
+; CHECK-NEXT: v_mul_lo_u32 v8, v1, v0
; CHECK-NEXT: v_mul_lo_u32 v7, v7, v0
-; CHECK-NEXT: v_mul_hi_u32 v9, v6, v0
-; CHECK-NEXT: v_mul_lo_u32 v6, v6, v1
-; CHECK-NEXT: v_mul_lo_u32 v10, v1, v8
+; CHECK-NEXT: v_mul_hi_u32 v9, v1, v0
+; CHECK-NEXT: v_mul_lo_u32 v1, v1, v6
+; CHECK-NEXT: v_mul_lo_u32 v10, v6, v8
; CHECK-NEXT: v_mul_hi_u32 v11, v0, v8
-; CHECK-NEXT: v_mul_hi_u32 v8, v1, v8
-; CHECK-NEXT: v_add_i32_e32 v6, vcc, v7, v6
-; CHECK-NEXT: v_add_i32_e32 v6, vcc, v6, v9
-; CHECK-NEXT: v_mul_lo_u32 v7, v0, v6
-; CHECK-NEXT: v_mul_lo_u32 v9, v1, v6
-; CHECK-NEXT: v_mul_hi_u32 v12, v0, v6
-; CHECK-NEXT: v_mul_hi_u32 v6, v1, v6
+; CHECK-NEXT: v_mul_hi_u32 v8, v6, v8
+; CHECK-NEXT: v_add_i32_e32 v1, vcc, v7, v1
+; CHECK-NEXT: v_add_i32_e32 v1, vcc, v1, v9
+; CHECK-NEXT: v_mul_lo_u32 v7, v0, v1
+; CHECK-NEXT: v_mul_lo_u32 v9, v6, v1
+; CHECK-NEXT: v_mul_hi_u32 v12, v0, v1
+; CHECK-NEXT: v_mul_hi_u32 v1, v6, v1
; CHECK-NEXT: v_add_i32_e32 v7, vcc, v10, v7
; CHECK-NEXT: v_cndmask_b32_e64 v10, 0, 1, vcc
; CHECK-NEXT: v_add_i32_e32 v8, vcc, v9, v8
; CHECK-NEXT: v_add_i32_e32 v7, vcc, v8, v7
; CHECK-NEXT: v_cndmask_b32_e64 v8, 0, 1, vcc
; CHECK-NEXT: v_add_i32_e32 v8, vcc, v9, v8
-; CHECK-NEXT: v_add_i32_e32 v6, vcc, v6, v8
+; CHECK-NEXT: v_add_i32_e32 v1, vcc, v1, v8
; CHECK-NEXT: v_add_i32_e32 v0, vcc, v0, v7
-; CHECK-NEXT: v_addc_u32_e32 v1, vcc, v1, v6, vcc
+; CHECK-NEXT: v_addc_u32_e32 v1, vcc, v6, v1, vcc
; CHECK-NEXT: v_mul_lo_u32 v6, v5, v0
; CHECK-NEXT: v_mul_hi_u32 v7, v4, v0
; CHECK-NEXT: v_mul_hi_u32 v0, v5, v0
; CHECK-NEXT: v_cmp_ne_u32_e32 vcc, 0, v6
; CHECK-NEXT: v_cndmask_b32_e32 v0, v0, v2, vcc
; CHECK-NEXT: v_cndmask_b32_e32 v1, v1, v3, vcc
+; CHECK-NEXT: ; implicit-def: $vgpr6
; CHECK-NEXT: ; implicit-def: $vgpr2
; CHECK-NEXT: ; implicit-def: $vgpr4
; CHECK-NEXT: s_andn2_saveexec_b64 s[6:7], s[6:7]
; CHECK-NEXT: s_cbranch_execz .LBB0_2
; CHECK-NEXT: .LBB0_4:
-; CHECK-NEXT: v_cvt_f32_u32_e32 v0, v2
+; CHECK-NEXT: v_rcp_iflag_f32_e32 v0, v6
; CHECK-NEXT: v_sub_i32_e32 v1, vcc, 0, v2
-; CHECK-NEXT: v_rcp_iflag_f32_e32 v0, v0
; CHECK-NEXT: v_mul_f32_e32 v0, 0x4f7ffffe, v0
; CHECK-NEXT: v_cvt_u32_f32_e32 v0, v0
; CHECK-NEXT: v_mul_lo_u32 v1, v1, v0
; CGP-NEXT: v_or_b32_e32 v1, v11, v5
; CGP-NEXT: v_mov_b32_e32 v0, 0
; CGP-NEXT: v_cmp_ne_u64_e32 vcc, 0, v[0:1]
+; CGP-NEXT: v_cvt_f32_u32_e32 v2, v4
; CGP-NEXT: ; implicit-def: $vgpr0_vgpr1
; CGP-NEXT: s_and_saveexec_b64 s[4:5], vcc
; CGP-NEXT: s_xor_b64 s[6:7], exec, s[4:5]
; CGP-NEXT: s_cbranch_execz .LBB2_2
; CGP-NEXT: ; %bb.1:
-; CGP-NEXT: v_cvt_f32_u32_e32 v0, v4
-; CGP-NEXT: v_cvt_f32_u32_e32 v1, v5
-; CGP-NEXT: v_sub_i32_e32 v2, vcc, 0, v4
+; CGP-NEXT: v_cvt_f32_u32_e32 v0, v5
+; CGP-NEXT: v_sub_i32_e32 v1, vcc, 0, v4
; CGP-NEXT: v_subb_u32_e32 v3, vcc, 0, v5, vcc
-; CGP-NEXT: v_mac_f32_e32 v0, 0x4f800000, v1
-; CGP-NEXT: v_rcp_iflag_f32_e32 v0, v0
+; CGP-NEXT: v_mac_f32_e32 v2, 0x4f800000, v0
+; CGP-NEXT: v_rcp_iflag_f32_e32 v0, v2
; CGP-NEXT: v_mul_f32_e32 v0, 0x5f7ffffc, v0
-; CGP-NEXT: v_mul_f32_e32 v1, 0x2f800000, v0
-; CGP-NEXT: v_trunc_f32_e32 v1, v1
-; CGP-NEXT: v_mac_f32_e32 v0, 0xcf800000, v1
-; CGP-NEXT: v_cvt_u32_f32_e32 v1, v1
+; CGP-NEXT: v_mul_f32_e32 v2, 0x2f800000, v0
+; CGP-NEXT: v_trunc_f32_e32 v2, v2
+; CGP-NEXT: v_mac_f32_e32 v0, 0xcf800000, v2
+; CGP-NEXT: v_cvt_u32_f32_e32 v2, v2
; CGP-NEXT: v_cvt_u32_f32_e32 v0, v0
-; CGP-NEXT: v_mul_lo_u32 v12, v2, v1
-; CGP-NEXT: v_mul_lo_u32 v13, v2, v0
+; CGP-NEXT: v_mul_lo_u32 v12, v1, v2
+; CGP-NEXT: v_mul_lo_u32 v13, v1, v0
; CGP-NEXT: v_mul_lo_u32 v14, v3, v0
-; CGP-NEXT: v_mul_hi_u32 v15, v2, v0
+; CGP-NEXT: v_mul_hi_u32 v15, v1, v0
; CGP-NEXT: v_add_i32_e32 v12, vcc, v14, v12
-; CGP-NEXT: v_mul_lo_u32 v14, v1, v13
+; CGP-NEXT: v_mul_lo_u32 v14, v2, v13
; CGP-NEXT: v_mul_hi_u32 v16, v0, v13
-; CGP-NEXT: v_mul_hi_u32 v13, v1, v13
+; CGP-NEXT: v_mul_hi_u32 v13, v2, v13
; CGP-NEXT: v_add_i32_e32 v12, vcc, v12, v15
; CGP-NEXT: v_mul_lo_u32 v15, v0, v12
-; CGP-NEXT: v_mul_lo_u32 v17, v1, v12
+; CGP-NEXT: v_mul_lo_u32 v17, v2, v12
; CGP-NEXT: v_mul_hi_u32 v18, v0, v12
-; CGP-NEXT: v_mul_hi_u32 v12, v1, v12
+; CGP-NEXT: v_mul_hi_u32 v12, v2, v12
; CGP-NEXT: v_add_i32_e32 v14, vcc, v14, v15
; CGP-NEXT: v_cndmask_b32_e64 v15, 0, 1, vcc
; CGP-NEXT: v_add_i32_e32 v13, vcc, v17, v13
; CGP-NEXT: v_add_i32_e32 v14, vcc, v15, v14
; CGP-NEXT: v_add_i32_e32 v12, vcc, v12, v14
; CGP-NEXT: v_add_i32_e32 v0, vcc, v0, v13
-; CGP-NEXT: v_addc_u32_e32 v1, vcc, v1, v12, vcc
-; CGP-NEXT: v_mul_lo_u32 v12, v2, v0
+; CGP-NEXT: v_addc_u32_e32 v2, vcc, v2, v12, vcc
+; CGP-NEXT: v_mul_lo_u32 v12, v1, v0
; CGP-NEXT: v_mul_lo_u32 v3, v3, v0
-; CGP-NEXT: v_mul_hi_u32 v13, v2, v0
-; CGP-NEXT: v_mul_lo_u32 v2, v2, v1
-; CGP-NEXT: v_mul_lo_u32 v14, v1, v12
+; CGP-NEXT: v_mul_hi_u32 v13, v1, v0
+; CGP-NEXT: v_mul_lo_u32 v1, v1, v2
+; CGP-NEXT: v_mul_lo_u32 v14, v2, v12
; CGP-NEXT: v_mul_hi_u32 v15, v0, v12
-; CGP-NEXT: v_mul_hi_u32 v12, v1, v12
-; CGP-NEXT: v_add_i32_e32 v2, vcc, v3, v2
-; CGP-NEXT: v_add_i32_e32 v2, vcc, v2, v13
-; CGP-NEXT: v_mul_lo_u32 v3, v0, v2
-; CGP-NEXT: v_mul_lo_u32 v13, v1, v2
-; CGP-NEXT: v_mul_hi_u32 v16, v0, v2
-; CGP-NEXT: v_mul_hi_u32 v2, v1, v2
+; CGP-NEXT: v_mul_hi_u32 v12, v2, v12
+; CGP-NEXT: v_add_i32_e32 v1, vcc, v3, v1
+; CGP-NEXT: v_add_i32_e32 v1, vcc, v1, v13
+; CGP-NEXT: v_mul_lo_u32 v3, v0, v1
+; CGP-NEXT: v_mul_lo_u32 v13, v2, v1
+; CGP-NEXT: v_mul_hi_u32 v16, v0, v1
+; CGP-NEXT: v_mul_hi_u32 v1, v2, v1
; CGP-NEXT: v_add_i32_e32 v3, vcc, v14, v3
; CGP-NEXT: v_cndmask_b32_e64 v14, 0, 1, vcc
; CGP-NEXT: v_add_i32_e32 v12, vcc, v13, v12
; CGP-NEXT: v_add_i32_e32 v3, vcc, v12, v3
; CGP-NEXT: v_cndmask_b32_e64 v12, 0, 1, vcc
; CGP-NEXT: v_add_i32_e32 v12, vcc, v13, v12
-; CGP-NEXT: v_add_i32_e32 v2, vcc, v2, v12
+; CGP-NEXT: v_add_i32_e32 v1, vcc, v1, v12
; CGP-NEXT: v_add_i32_e32 v0, vcc, v0, v3
-; CGP-NEXT: v_addc_u32_e32 v1, vcc, v1, v2, vcc
+; CGP-NEXT: v_addc_u32_e32 v1, vcc, v2, v1, vcc
; CGP-NEXT: v_mul_lo_u32 v2, v11, v0
; CGP-NEXT: v_mul_hi_u32 v3, v10, v0
; CGP-NEXT: v_mul_hi_u32 v0, v11, v0
; CGP-NEXT: v_cmp_ne_u32_e32 vcc, 0, v10
; CGP-NEXT: v_cndmask_b32_e32 v0, v0, v2, vcc
; CGP-NEXT: v_cndmask_b32_e32 v1, v1, v3, vcc
+; CGP-NEXT: ; implicit-def: $vgpr2
; CGP-NEXT: ; implicit-def: $vgpr4
; CGP-NEXT: ; implicit-def: $vgpr10
; CGP-NEXT: .LBB2_2: ; %Flow1
; CGP-NEXT: s_andn2_saveexec_b64 s[6:7], s[6:7]
; CGP-NEXT: s_cbranch_execz .LBB2_4
; CGP-NEXT: ; %bb.3:
-; CGP-NEXT: v_cvt_f32_u32_e32 v0, v4
+; CGP-NEXT: v_rcp_iflag_f32_e32 v0, v2
; CGP-NEXT: v_sub_i32_e32 v1, vcc, 0, v4
-; CGP-NEXT: v_rcp_iflag_f32_e32 v0, v0
; CGP-NEXT: v_mul_f32_e32 v0, 0x4f7ffffe, v0
; CGP-NEXT: v_cvt_u32_f32_e32 v0, v0
; CGP-NEXT: v_mul_lo_u32 v1, v1, v0
; CGP-NEXT: v_or_b32_e32 v3, v9, v7
; CGP-NEXT: v_mov_b32_e32 v2, 0
; CGP-NEXT: v_cmp_ne_u64_e32 vcc, 0, v[2:3]
+; CGP-NEXT: v_cvt_f32_u32_e32 v4, v6
; CGP-NEXT: ; implicit-def: $vgpr2_vgpr3
; CGP-NEXT: s_and_saveexec_b64 s[4:5], vcc
; CGP-NEXT: s_xor_b64 s[6:7], exec, s[4:5]
; CGP-NEXT: s_or_b64 exec, exec, s[6:7]
; CGP-NEXT: s_setpc_b64 s[30:31]
; CGP-NEXT: .LBB2_7:
-; CGP-NEXT: v_cvt_f32_u32_e32 v2, v6
-; CGP-NEXT: v_cvt_f32_u32_e32 v3, v7
-; CGP-NEXT: v_sub_i32_e32 v4, vcc, 0, v6
+; CGP-NEXT: v_cvt_f32_u32_e32 v2, v7
+; CGP-NEXT: v_sub_i32_e32 v3, vcc, 0, v6
; CGP-NEXT: v_subb_u32_e32 v5, vcc, 0, v7, vcc
-; CGP-NEXT: v_mac_f32_e32 v2, 0x4f800000, v3
-; CGP-NEXT: v_rcp_iflag_f32_e32 v2, v2
+; CGP-NEXT: v_mac_f32_e32 v4, 0x4f800000, v2
+; CGP-NEXT: v_rcp_iflag_f32_e32 v2, v4
; CGP-NEXT: v_mul_f32_e32 v2, 0x5f7ffffc, v2
-; CGP-NEXT: v_mul_f32_e32 v3, 0x2f800000, v2
-; CGP-NEXT: v_trunc_f32_e32 v3, v3
-; CGP-NEXT: v_mac_f32_e32 v2, 0xcf800000, v3
-; CGP-NEXT: v_cvt_u32_f32_e32 v3, v3
+; CGP-NEXT: v_mul_f32_e32 v4, 0x2f800000, v2
+; CGP-NEXT: v_trunc_f32_e32 v4, v4
+; CGP-NEXT: v_mac_f32_e32 v2, 0xcf800000, v4
+; CGP-NEXT: v_cvt_u32_f32_e32 v4, v4
; CGP-NEXT: v_cvt_u32_f32_e32 v2, v2
-; CGP-NEXT: v_mul_lo_u32 v10, v4, v3
-; CGP-NEXT: v_mul_lo_u32 v11, v4, v2
+; CGP-NEXT: v_mul_lo_u32 v10, v3, v4
+; CGP-NEXT: v_mul_lo_u32 v11, v3, v2
; CGP-NEXT: v_mul_lo_u32 v12, v5, v2
-; CGP-NEXT: v_mul_hi_u32 v13, v4, v2
+; CGP-NEXT: v_mul_hi_u32 v13, v3, v2
; CGP-NEXT: v_add_i32_e32 v10, vcc, v12, v10
-; CGP-NEXT: v_mul_lo_u32 v12, v3, v11
+; CGP-NEXT: v_mul_lo_u32 v12, v4, v11
; CGP-NEXT: v_mul_hi_u32 v14, v2, v11
-; CGP-NEXT: v_mul_hi_u32 v11, v3, v11
+; CGP-NEXT: v_mul_hi_u32 v11, v4, v11
; CGP-NEXT: v_add_i32_e32 v10, vcc, v10, v13
; CGP-NEXT: v_mul_lo_u32 v13, v2, v10
-; CGP-NEXT: v_mul_lo_u32 v15, v3, v10
+; CGP-NEXT: v_mul_lo_u32 v15, v4, v10
; CGP-NEXT: v_mul_hi_u32 v16, v2, v10
-; CGP-NEXT: v_mul_hi_u32 v10, v3, v10
+; CGP-NEXT: v_mul_hi_u32 v10, v4, v10
; CGP-NEXT: v_add_i32_e32 v12, vcc, v12, v13
; CGP-NEXT: v_cndmask_b32_e64 v13, 0, 1, vcc
; CGP-NEXT: v_add_i32_e32 v11, vcc, v15, v11
; CGP-NEXT: v_add_i32_e32 v12, vcc, v13, v12
; CGP-NEXT: v_add_i32_e32 v10, vcc, v10, v12
; CGP-NEXT: v_add_i32_e32 v2, vcc, v2, v11
-; CGP-NEXT: v_addc_u32_e32 v3, vcc, v3, v10, vcc
-; CGP-NEXT: v_mul_lo_u32 v10, v4, v2
+; CGP-NEXT: v_addc_u32_e32 v4, vcc, v4, v10, vcc
+; CGP-NEXT: v_mul_lo_u32 v10, v3, v2
; CGP-NEXT: v_mul_lo_u32 v5, v5, v2
-; CGP-NEXT: v_mul_hi_u32 v11, v4, v2
-; CGP-NEXT: v_mul_lo_u32 v4, v4, v3
-; CGP-NEXT: v_mul_lo_u32 v12, v3, v10
+; CGP-NEXT: v_mul_hi_u32 v11, v3, v2
+; CGP-NEXT: v_mul_lo_u32 v3, v3, v4
+; CGP-NEXT: v_mul_lo_u32 v12, v4, v10
; CGP-NEXT: v_mul_hi_u32 v13, v2, v10
-; CGP-NEXT: v_mul_hi_u32 v10, v3, v10
-; CGP-NEXT: v_add_i32_e32 v4, vcc, v5, v4
-; CGP-NEXT: v_add_i32_e32 v4, vcc, v4, v11
-; CGP-NEXT: v_mul_lo_u32 v5, v2, v4
-; CGP-NEXT: v_mul_lo_u32 v11, v3, v4
-; CGP-NEXT: v_mul_hi_u32 v14, v2, v4
-; CGP-NEXT: v_mul_hi_u32 v4, v3, v4
+; CGP-NEXT: v_mul_hi_u32 v10, v4, v10
+; CGP-NEXT: v_add_i32_e32 v3, vcc, v5, v3
+; CGP-NEXT: v_add_i32_e32 v3, vcc, v3, v11
+; CGP-NEXT: v_mul_lo_u32 v5, v2, v3
+; CGP-NEXT: v_mul_lo_u32 v11, v4, v3
+; CGP-NEXT: v_mul_hi_u32 v14, v2, v3
+; CGP-NEXT: v_mul_hi_u32 v3, v4, v3
; CGP-NEXT: v_add_i32_e32 v5, vcc, v12, v5
; CGP-NEXT: v_cndmask_b32_e64 v12, 0, 1, vcc
; CGP-NEXT: v_add_i32_e32 v10, vcc, v11, v10
; CGP-NEXT: v_add_i32_e32 v5, vcc, v10, v5
; CGP-NEXT: v_cndmask_b32_e64 v10, 0, 1, vcc
; CGP-NEXT: v_add_i32_e32 v10, vcc, v11, v10
-; CGP-NEXT: v_add_i32_e32 v4, vcc, v4, v10
+; CGP-NEXT: v_add_i32_e32 v3, vcc, v3, v10
; CGP-NEXT: v_add_i32_e32 v2, vcc, v2, v5
-; CGP-NEXT: v_addc_u32_e32 v3, vcc, v3, v4, vcc
+; CGP-NEXT: v_addc_u32_e32 v3, vcc, v4, v3, vcc
; CGP-NEXT: v_mul_lo_u32 v4, v9, v2
; CGP-NEXT: v_mul_hi_u32 v5, v8, v2
; CGP-NEXT: v_mul_hi_u32 v2, v9, v2
; CGP-NEXT: v_cmp_ne_u32_e32 vcc, 0, v8
; CGP-NEXT: v_cndmask_b32_e32 v2, v2, v4, vcc
; CGP-NEXT: v_cndmask_b32_e32 v3, v3, v5, vcc
+; CGP-NEXT: ; implicit-def: $vgpr4
; CGP-NEXT: ; implicit-def: $vgpr6
; CGP-NEXT: ; implicit-def: $vgpr8
; CGP-NEXT: s_andn2_saveexec_b64 s[6:7], s[6:7]
; CGP-NEXT: s_cbranch_execz .LBB2_6
; CGP-NEXT: .LBB2_8:
-; CGP-NEXT: v_cvt_f32_u32_e32 v2, v6
+; CGP-NEXT: v_rcp_iflag_f32_e32 v2, v4
; CGP-NEXT: v_sub_i32_e32 v3, vcc, 0, v6
-; CGP-NEXT: v_rcp_iflag_f32_e32 v2, v2
; CGP-NEXT: v_mul_f32_e32 v2, 0x4f7ffffe, v2
; CGP-NEXT: v_cvt_u32_f32_e32 v2, v2
; CGP-NEXT: v_mul_lo_u32 v3, v3, v2
; CHECK-NEXT: v_mov_b32_e32 v3, v0
; CHECK-NEXT: v_mov_b32_e32 v4, v1
; CHECK-NEXT: s_mov_b64 s[4:5], 0x1000
+; CHECK-NEXT: v_mov_b32_e32 v0, 0
; CHECK-NEXT: v_lshl_b64 v[5:6], s[4:5], v2
; CHECK-NEXT: v_or_b32_e32 v1, v4, v6
-; CHECK-NEXT: v_mov_b32_e32 v0, 0
; CHECK-NEXT: v_cmp_ne_u64_e32 vcc, 0, v[0:1]
+; CHECK-NEXT: v_cvt_f32_u32_e32 v2, v5
; CHECK-NEXT: ; implicit-def: $vgpr0_vgpr1
; CHECK-NEXT: s_and_saveexec_b64 s[4:5], vcc
; CHECK-NEXT: s_xor_b64 s[6:7], exec, s[4:5]
; CHECK-NEXT: s_or_b64 exec, exec, s[6:7]
; CHECK-NEXT: s_setpc_b64 s[30:31]
; CHECK-NEXT: .LBB7_3:
-; CHECK-NEXT: v_cvt_f32_u32_e32 v0, v5
-; CHECK-NEXT: v_cvt_f32_u32_e32 v1, v6
-; CHECK-NEXT: v_sub_i32_e32 v2, vcc, 0, v5
+; CHECK-NEXT: v_cvt_f32_u32_e32 v0, v6
+; CHECK-NEXT: v_sub_i32_e32 v1, vcc, 0, v5
; CHECK-NEXT: v_subb_u32_e32 v7, vcc, 0, v6, vcc
-; CHECK-NEXT: v_mac_f32_e32 v0, 0x4f800000, v1
-; CHECK-NEXT: v_rcp_iflag_f32_e32 v0, v0
+; CHECK-NEXT: v_mac_f32_e32 v2, 0x4f800000, v0
+; CHECK-NEXT: v_rcp_iflag_f32_e32 v0, v2
; CHECK-NEXT: v_mul_f32_e32 v0, 0x5f7ffffc, v0
-; CHECK-NEXT: v_mul_f32_e32 v1, 0x2f800000, v0
-; CHECK-NEXT: v_trunc_f32_e32 v1, v1
-; CHECK-NEXT: v_mac_f32_e32 v0, 0xcf800000, v1
-; CHECK-NEXT: v_cvt_u32_f32_e32 v1, v1
+; CHECK-NEXT: v_mul_f32_e32 v2, 0x2f800000, v0
+; CHECK-NEXT: v_trunc_f32_e32 v2, v2
+; CHECK-NEXT: v_mac_f32_e32 v0, 0xcf800000, v2
+; CHECK-NEXT: v_cvt_u32_f32_e32 v2, v2
; CHECK-NEXT: v_cvt_u32_f32_e32 v0, v0
-; CHECK-NEXT: v_mul_lo_u32 v8, v2, v1
-; CHECK-NEXT: v_mul_lo_u32 v9, v2, v0
+; CHECK-NEXT: v_mul_lo_u32 v8, v1, v2
+; CHECK-NEXT: v_mul_lo_u32 v9, v1, v0
; CHECK-NEXT: v_mul_lo_u32 v10, v7, v0
-; CHECK-NEXT: v_mul_hi_u32 v11, v2, v0
+; CHECK-NEXT: v_mul_hi_u32 v11, v1, v0
; CHECK-NEXT: v_add_i32_e32 v8, vcc, v10, v8
-; CHECK-NEXT: v_mul_lo_u32 v10, v1, v9
+; CHECK-NEXT: v_mul_lo_u32 v10, v2, v9
; CHECK-NEXT: v_mul_hi_u32 v12, v0, v9
-; CHECK-NEXT: v_mul_hi_u32 v9, v1, v9
+; CHECK-NEXT: v_mul_hi_u32 v9, v2, v9
; CHECK-NEXT: v_add_i32_e32 v8, vcc, v8, v11
; CHECK-NEXT: v_mul_lo_u32 v11, v0, v8
-; CHECK-NEXT: v_mul_lo_u32 v13, v1, v8
+; CHECK-NEXT: v_mul_lo_u32 v13, v2, v8
; CHECK-NEXT: v_mul_hi_u32 v14, v0, v8
-; CHECK-NEXT: v_mul_hi_u32 v8, v1, v8
+; CHECK-NEXT: v_mul_hi_u32 v8, v2, v8
; CHECK-NEXT: v_add_i32_e32 v10, vcc, v10, v11
; CHECK-NEXT: v_cndmask_b32_e64 v11, 0, 1, vcc
; CHECK-NEXT: v_add_i32_e32 v9, vcc, v13, v9
; CHECK-NEXT: v_add_i32_e32 v10, vcc, v11, v10
; CHECK-NEXT: v_add_i32_e32 v8, vcc, v8, v10
; CHECK-NEXT: v_add_i32_e32 v0, vcc, v0, v9
-; CHECK-NEXT: v_addc_u32_e32 v1, vcc, v1, v8, vcc
-; CHECK-NEXT: v_mul_lo_u32 v8, v2, v0
+; CHECK-NEXT: v_addc_u32_e32 v2, vcc, v2, v8, vcc
+; CHECK-NEXT: v_mul_lo_u32 v8, v1, v0
; CHECK-NEXT: v_mul_lo_u32 v7, v7, v0
-; CHECK-NEXT: v_mul_hi_u32 v9, v2, v0
-; CHECK-NEXT: v_mul_lo_u32 v2, v2, v1
-; CHECK-NEXT: v_mul_lo_u32 v10, v1, v8
+; CHECK-NEXT: v_mul_hi_u32 v9, v1, v0
+; CHECK-NEXT: v_mul_lo_u32 v1, v1, v2
+; CHECK-NEXT: v_mul_lo_u32 v10, v2, v8
; CHECK-NEXT: v_mul_hi_u32 v11, v0, v8
-; CHECK-NEXT: v_mul_hi_u32 v8, v1, v8
-; CHECK-NEXT: v_add_i32_e32 v2, vcc, v7, v2
-; CHECK-NEXT: v_add_i32_e32 v2, vcc, v2, v9
-; CHECK-NEXT: v_mul_lo_u32 v7, v0, v2
-; CHECK-NEXT: v_mul_lo_u32 v9, v1, v2
-; CHECK-NEXT: v_mul_hi_u32 v12, v0, v2
-; CHECK-NEXT: v_mul_hi_u32 v2, v1, v2
+; CHECK-NEXT: v_mul_hi_u32 v8, v2, v8
+; CHECK-NEXT: v_add_i32_e32 v1, vcc, v7, v1
+; CHECK-NEXT: v_add_i32_e32 v1, vcc, v1, v9
+; CHECK-NEXT: v_mul_lo_u32 v7, v0, v1
+; CHECK-NEXT: v_mul_lo_u32 v9, v2, v1
+; CHECK-NEXT: v_mul_hi_u32 v12, v0, v1
+; CHECK-NEXT: v_mul_hi_u32 v1, v2, v1
; CHECK-NEXT: v_add_i32_e32 v7, vcc, v10, v7
; CHECK-NEXT: v_cndmask_b32_e64 v10, 0, 1, vcc
; CHECK-NEXT: v_add_i32_e32 v8, vcc, v9, v8
; CHECK-NEXT: v_add_i32_e32 v7, vcc, v8, v7
; CHECK-NEXT: v_cndmask_b32_e64 v8, 0, 1, vcc
; CHECK-NEXT: v_add_i32_e32 v8, vcc, v9, v8
-; CHECK-NEXT: v_add_i32_e32 v2, vcc, v2, v8
+; CHECK-NEXT: v_add_i32_e32 v1, vcc, v1, v8
; CHECK-NEXT: v_add_i32_e32 v0, vcc, v0, v7
-; CHECK-NEXT: v_addc_u32_e32 v1, vcc, v1, v2, vcc
+; CHECK-NEXT: v_addc_u32_e32 v1, vcc, v2, v1, vcc
; CHECK-NEXT: v_mul_lo_u32 v2, v4, v0
; CHECK-NEXT: v_mul_hi_u32 v7, v3, v0
; CHECK-NEXT: v_mul_hi_u32 v0, v4, v0
; CHECK-NEXT: v_cmp_ne_u32_e32 vcc, 0, v4
; CHECK-NEXT: v_cndmask_b32_e32 v0, v0, v2, vcc
; CHECK-NEXT: v_cndmask_b32_e32 v1, v1, v3, vcc
+; CHECK-NEXT: ; implicit-def: $vgpr2
; CHECK-NEXT: ; implicit-def: $vgpr5_vgpr6
; CHECK-NEXT: ; implicit-def: $vgpr3
; CHECK-NEXT: s_andn2_saveexec_b64 s[6:7], s[6:7]
; CHECK-NEXT: s_cbranch_execz .LBB7_2
; CHECK-NEXT: .LBB7_4:
-; CHECK-NEXT: v_cvt_f32_u32_e32 v0, v5
+; CHECK-NEXT: v_rcp_iflag_f32_e32 v0, v2
; CHECK-NEXT: v_sub_i32_e32 v1, vcc, 0, v5
-; CHECK-NEXT: v_rcp_iflag_f32_e32 v0, v0
; CHECK-NEXT: v_mul_f32_e32 v0, 0x4f7ffffe, v0
; CHECK-NEXT: v_cvt_u32_f32_e32 v0, v0
; CHECK-NEXT: v_mul_lo_u32 v1, v1, v0
; CGP-NEXT: v_mov_b32_e32 v5, v2
; CGP-NEXT: v_mov_b32_e32 v7, v3
; CGP-NEXT: s_mov_b64 s[6:7], 0x1000
+; CGP-NEXT: v_mov_b32_e32 v0, 0
; CGP-NEXT: v_lshl_b64 v[2:3], s[6:7], v4
; CGP-NEXT: v_or_b32_e32 v1, v9, v3
-; CGP-NEXT: v_mov_b32_e32 v0, 0
; CGP-NEXT: v_cmp_ne_u64_e32 vcc, 0, v[0:1]
+; CGP-NEXT: v_cvt_f32_u32_e32 v4, v2
; CGP-NEXT: ; implicit-def: $vgpr0_vgpr1
; CGP-NEXT: s_and_saveexec_b64 s[4:5], vcc
; CGP-NEXT: s_xor_b64 s[8:9], exec, s[4:5]
; CGP-NEXT: s_cbranch_execz .LBB8_2
; CGP-NEXT: ; %bb.1:
-; CGP-NEXT: v_cvt_f32_u32_e32 v0, v2
-; CGP-NEXT: v_cvt_f32_u32_e32 v1, v3
-; CGP-NEXT: v_sub_i32_e32 v4, vcc, 0, v2
+; CGP-NEXT: v_cvt_f32_u32_e32 v0, v3
+; CGP-NEXT: v_sub_i32_e32 v1, vcc, 0, v2
; CGP-NEXT: v_subb_u32_e32 v10, vcc, 0, v3, vcc
-; CGP-NEXT: v_mac_f32_e32 v0, 0x4f800000, v1
-; CGP-NEXT: v_rcp_iflag_f32_e32 v0, v0
+; CGP-NEXT: v_mac_f32_e32 v4, 0x4f800000, v0
+; CGP-NEXT: v_rcp_iflag_f32_e32 v0, v4
; CGP-NEXT: v_mul_f32_e32 v0, 0x5f7ffffc, v0
-; CGP-NEXT: v_mul_f32_e32 v1, 0x2f800000, v0
-; CGP-NEXT: v_trunc_f32_e32 v1, v1
-; CGP-NEXT: v_mac_f32_e32 v0, 0xcf800000, v1
-; CGP-NEXT: v_cvt_u32_f32_e32 v1, v1
+; CGP-NEXT: v_mul_f32_e32 v4, 0x2f800000, v0
+; CGP-NEXT: v_trunc_f32_e32 v4, v4
+; CGP-NEXT: v_mac_f32_e32 v0, 0xcf800000, v4
+; CGP-NEXT: v_cvt_u32_f32_e32 v4, v4
; CGP-NEXT: v_cvt_u32_f32_e32 v0, v0
-; CGP-NEXT: v_mul_lo_u32 v11, v4, v1
-; CGP-NEXT: v_mul_lo_u32 v12, v4, v0
+; CGP-NEXT: v_mul_lo_u32 v11, v1, v4
+; CGP-NEXT: v_mul_lo_u32 v12, v1, v0
; CGP-NEXT: v_mul_lo_u32 v13, v10, v0
-; CGP-NEXT: v_mul_hi_u32 v14, v4, v0
+; CGP-NEXT: v_mul_hi_u32 v14, v1, v0
; CGP-NEXT: v_add_i32_e32 v11, vcc, v13, v11
-; CGP-NEXT: v_mul_lo_u32 v13, v1, v12
+; CGP-NEXT: v_mul_lo_u32 v13, v4, v12
; CGP-NEXT: v_mul_hi_u32 v15, v0, v12
-; CGP-NEXT: v_mul_hi_u32 v12, v1, v12
+; CGP-NEXT: v_mul_hi_u32 v12, v4, v12
; CGP-NEXT: v_add_i32_e32 v11, vcc, v11, v14
; CGP-NEXT: v_mul_lo_u32 v14, v0, v11
-; CGP-NEXT: v_mul_lo_u32 v16, v1, v11
+; CGP-NEXT: v_mul_lo_u32 v16, v4, v11
; CGP-NEXT: v_mul_hi_u32 v17, v0, v11
-; CGP-NEXT: v_mul_hi_u32 v11, v1, v11
+; CGP-NEXT: v_mul_hi_u32 v11, v4, v11
; CGP-NEXT: v_add_i32_e32 v13, vcc, v13, v14
; CGP-NEXT: v_cndmask_b32_e64 v14, 0, 1, vcc
; CGP-NEXT: v_add_i32_e32 v12, vcc, v16, v12
; CGP-NEXT: v_add_i32_e32 v13, vcc, v14, v13
; CGP-NEXT: v_add_i32_e32 v11, vcc, v11, v13
; CGP-NEXT: v_add_i32_e32 v0, vcc, v0, v12
-; CGP-NEXT: v_addc_u32_e32 v1, vcc, v1, v11, vcc
-; CGP-NEXT: v_mul_lo_u32 v11, v4, v0
+; CGP-NEXT: v_addc_u32_e32 v4, vcc, v4, v11, vcc
+; CGP-NEXT: v_mul_lo_u32 v11, v1, v0
; CGP-NEXT: v_mul_lo_u32 v10, v10, v0
-; CGP-NEXT: v_mul_hi_u32 v12, v4, v0
-; CGP-NEXT: v_mul_lo_u32 v4, v4, v1
-; CGP-NEXT: v_mul_lo_u32 v13, v1, v11
+; CGP-NEXT: v_mul_hi_u32 v12, v1, v0
+; CGP-NEXT: v_mul_lo_u32 v1, v1, v4
+; CGP-NEXT: v_mul_lo_u32 v13, v4, v11
; CGP-NEXT: v_mul_hi_u32 v14, v0, v11
-; CGP-NEXT: v_mul_hi_u32 v11, v1, v11
-; CGP-NEXT: v_add_i32_e32 v4, vcc, v10, v4
-; CGP-NEXT: v_add_i32_e32 v4, vcc, v4, v12
-; CGP-NEXT: v_mul_lo_u32 v10, v0, v4
-; CGP-NEXT: v_mul_lo_u32 v12, v1, v4
-; CGP-NEXT: v_mul_hi_u32 v15, v0, v4
-; CGP-NEXT: v_mul_hi_u32 v4, v1, v4
+; CGP-NEXT: v_mul_hi_u32 v11, v4, v11
+; CGP-NEXT: v_add_i32_e32 v1, vcc, v10, v1
+; CGP-NEXT: v_add_i32_e32 v1, vcc, v1, v12
+; CGP-NEXT: v_mul_lo_u32 v10, v0, v1
+; CGP-NEXT: v_mul_lo_u32 v12, v4, v1
+; CGP-NEXT: v_mul_hi_u32 v15, v0, v1
+; CGP-NEXT: v_mul_hi_u32 v1, v4, v1
; CGP-NEXT: v_add_i32_e32 v10, vcc, v13, v10
; CGP-NEXT: v_cndmask_b32_e64 v13, 0, 1, vcc
; CGP-NEXT: v_add_i32_e32 v11, vcc, v12, v11
; CGP-NEXT: v_add_i32_e32 v10, vcc, v11, v10
; CGP-NEXT: v_cndmask_b32_e64 v11, 0, 1, vcc
; CGP-NEXT: v_add_i32_e32 v11, vcc, v12, v11
-; CGP-NEXT: v_add_i32_e32 v4, vcc, v4, v11
+; CGP-NEXT: v_add_i32_e32 v1, vcc, v1, v11
; CGP-NEXT: v_add_i32_e32 v0, vcc, v0, v10
-; CGP-NEXT: v_addc_u32_e32 v1, vcc, v1, v4, vcc
+; CGP-NEXT: v_addc_u32_e32 v1, vcc, v4, v1, vcc
; CGP-NEXT: v_mul_lo_u32 v4, v9, v0
; CGP-NEXT: v_mul_hi_u32 v10, v8, v0
; CGP-NEXT: v_mul_hi_u32 v0, v9, v0
; CGP-NEXT: v_cmp_ne_u32_e32 vcc, 0, v9
; CGP-NEXT: v_cndmask_b32_e32 v0, v0, v2, vcc
; CGP-NEXT: v_cndmask_b32_e32 v1, v1, v3, vcc
+; CGP-NEXT: ; implicit-def: $vgpr4
; CGP-NEXT: ; implicit-def: $vgpr2_vgpr3
; CGP-NEXT: ; implicit-def: $vgpr8
; CGP-NEXT: .LBB8_2: ; %Flow1
; CGP-NEXT: s_xor_b64 exec, exec, s[8:9]
; CGP-NEXT: s_cbranch_execz .LBB8_4
; CGP-NEXT: ; %bb.3:
-; CGP-NEXT: v_cvt_f32_u32_e32 v0, v2
+; CGP-NEXT: v_rcp_iflag_f32_e32 v0, v4
; CGP-NEXT: v_sub_i32_e32 v1, vcc, 0, v2
-; CGP-NEXT: v_rcp_iflag_f32_e32 v0, v0
; CGP-NEXT: v_mul_f32_e32 v0, 0x4f7ffffe, v0
; CGP-NEXT: v_cvt_u32_f32_e32 v0, v0
; CGP-NEXT: v_mul_lo_u32 v1, v1, v0
; CGP-NEXT: v_or_b32_e32 v3, v7, v10
; CGP-NEXT: v_mov_b32_e32 v2, 0
; CGP-NEXT: v_cmp_ne_u64_e32 vcc, 0, v[2:3]
+; CGP-NEXT: v_cvt_f32_u32_e32 v4, v9
; CGP-NEXT: ; implicit-def: $vgpr2_vgpr3
; CGP-NEXT: s_and_saveexec_b64 s[4:5], vcc
; CGP-NEXT: s_xor_b64 s[6:7], exec, s[4:5]
; CGP-NEXT: s_or_b64 exec, exec, s[6:7]
; CGP-NEXT: s_setpc_b64 s[30:31]
; CGP-NEXT: .LBB8_7:
-; CGP-NEXT: v_cvt_f32_u32_e32 v2, v9
-; CGP-NEXT: v_cvt_f32_u32_e32 v3, v10
-; CGP-NEXT: v_sub_i32_e32 v4, vcc, 0, v9
+; CGP-NEXT: v_cvt_f32_u32_e32 v2, v10
+; CGP-NEXT: v_sub_i32_e32 v3, vcc, 0, v9
; CGP-NEXT: v_subb_u32_e32 v6, vcc, 0, v10, vcc
-; CGP-NEXT: v_mac_f32_e32 v2, 0x4f800000, v3
-; CGP-NEXT: v_rcp_iflag_f32_e32 v2, v2
+; CGP-NEXT: v_mac_f32_e32 v4, 0x4f800000, v2
+; CGP-NEXT: v_rcp_iflag_f32_e32 v2, v4
; CGP-NEXT: v_mul_f32_e32 v2, 0x5f7ffffc, v2
-; CGP-NEXT: v_mul_f32_e32 v3, 0x2f800000, v2
-; CGP-NEXT: v_trunc_f32_e32 v3, v3
-; CGP-NEXT: v_mac_f32_e32 v2, 0xcf800000, v3
-; CGP-NEXT: v_cvt_u32_f32_e32 v3, v3
+; CGP-NEXT: v_mul_f32_e32 v4, 0x2f800000, v2
+; CGP-NEXT: v_trunc_f32_e32 v4, v4
+; CGP-NEXT: v_mac_f32_e32 v2, 0xcf800000, v4
+; CGP-NEXT: v_cvt_u32_f32_e32 v4, v4
; CGP-NEXT: v_cvt_u32_f32_e32 v2, v2
-; CGP-NEXT: v_mul_lo_u32 v8, v4, v3
-; CGP-NEXT: v_mul_lo_u32 v11, v4, v2
+; CGP-NEXT: v_mul_lo_u32 v8, v3, v4
+; CGP-NEXT: v_mul_lo_u32 v11, v3, v2
; CGP-NEXT: v_mul_lo_u32 v12, v6, v2
-; CGP-NEXT: v_mul_hi_u32 v13, v4, v2
+; CGP-NEXT: v_mul_hi_u32 v13, v3, v2
; CGP-NEXT: v_add_i32_e32 v8, vcc, v12, v8
-; CGP-NEXT: v_mul_lo_u32 v12, v3, v11
+; CGP-NEXT: v_mul_lo_u32 v12, v4, v11
; CGP-NEXT: v_mul_hi_u32 v14, v2, v11
-; CGP-NEXT: v_mul_hi_u32 v11, v3, v11
+; CGP-NEXT: v_mul_hi_u32 v11, v4, v11
; CGP-NEXT: v_add_i32_e32 v8, vcc, v8, v13
; CGP-NEXT: v_mul_lo_u32 v13, v2, v8
-; CGP-NEXT: v_mul_lo_u32 v15, v3, v8
+; CGP-NEXT: v_mul_lo_u32 v15, v4, v8
; CGP-NEXT: v_mul_hi_u32 v16, v2, v8
-; CGP-NEXT: v_mul_hi_u32 v8, v3, v8
+; CGP-NEXT: v_mul_hi_u32 v8, v4, v8
; CGP-NEXT: v_add_i32_e32 v12, vcc, v12, v13
; CGP-NEXT: v_cndmask_b32_e64 v13, 0, 1, vcc
; CGP-NEXT: v_add_i32_e32 v11, vcc, v15, v11
; CGP-NEXT: v_add_i32_e32 v12, vcc, v13, v12
; CGP-NEXT: v_add_i32_e32 v8, vcc, v8, v12
; CGP-NEXT: v_add_i32_e32 v2, vcc, v2, v11
-; CGP-NEXT: v_addc_u32_e32 v3, vcc, v3, v8, vcc
-; CGP-NEXT: v_mul_lo_u32 v8, v4, v2
+; CGP-NEXT: v_addc_u32_e32 v4, vcc, v4, v8, vcc
+; CGP-NEXT: v_mul_lo_u32 v8, v3, v2
; CGP-NEXT: v_mul_lo_u32 v6, v6, v2
-; CGP-NEXT: v_mul_hi_u32 v11, v4, v2
-; CGP-NEXT: v_mul_lo_u32 v4, v4, v3
-; CGP-NEXT: v_mul_lo_u32 v12, v3, v8
+; CGP-NEXT: v_mul_hi_u32 v11, v3, v2
+; CGP-NEXT: v_mul_lo_u32 v3, v3, v4
+; CGP-NEXT: v_mul_lo_u32 v12, v4, v8
; CGP-NEXT: v_mul_hi_u32 v13, v2, v8
-; CGP-NEXT: v_mul_hi_u32 v8, v3, v8
-; CGP-NEXT: v_add_i32_e32 v4, vcc, v6, v4
-; CGP-NEXT: v_add_i32_e32 v4, vcc, v4, v11
-; CGP-NEXT: v_mul_lo_u32 v6, v2, v4
-; CGP-NEXT: v_mul_lo_u32 v11, v3, v4
-; CGP-NEXT: v_mul_hi_u32 v14, v2, v4
-; CGP-NEXT: v_mul_hi_u32 v4, v3, v4
+; CGP-NEXT: v_mul_hi_u32 v8, v4, v8
+; CGP-NEXT: v_add_i32_e32 v3, vcc, v6, v3
+; CGP-NEXT: v_add_i32_e32 v3, vcc, v3, v11
+; CGP-NEXT: v_mul_lo_u32 v6, v2, v3
+; CGP-NEXT: v_mul_lo_u32 v11, v4, v3
+; CGP-NEXT: v_mul_hi_u32 v14, v2, v3
+; CGP-NEXT: v_mul_hi_u32 v3, v4, v3
; CGP-NEXT: v_add_i32_e32 v6, vcc, v12, v6
; CGP-NEXT: v_cndmask_b32_e64 v12, 0, 1, vcc
; CGP-NEXT: v_add_i32_e32 v8, vcc, v11, v8
; CGP-NEXT: v_add_i32_e32 v6, vcc, v8, v6
; CGP-NEXT: v_cndmask_b32_e64 v8, 0, 1, vcc
; CGP-NEXT: v_add_i32_e32 v8, vcc, v11, v8
-; CGP-NEXT: v_add_i32_e32 v4, vcc, v4, v8
+; CGP-NEXT: v_add_i32_e32 v3, vcc, v3, v8
; CGP-NEXT: v_add_i32_e32 v2, vcc, v2, v6
-; CGP-NEXT: v_addc_u32_e32 v3, vcc, v3, v4, vcc
+; CGP-NEXT: v_addc_u32_e32 v3, vcc, v4, v3, vcc
; CGP-NEXT: v_mul_lo_u32 v4, v7, v2
; CGP-NEXT: v_mul_hi_u32 v6, v5, v2
; CGP-NEXT: v_mul_hi_u32 v2, v7, v2
; CGP-NEXT: v_cmp_ne_u32_e32 vcc, 0, v6
; CGP-NEXT: v_cndmask_b32_e32 v2, v2, v4, vcc
; CGP-NEXT: v_cndmask_b32_e32 v3, v3, v5, vcc
+; CGP-NEXT: ; implicit-def: $vgpr4
; CGP-NEXT: ; implicit-def: $vgpr9_vgpr10
; CGP-NEXT: ; implicit-def: $vgpr5
; CGP-NEXT: s_andn2_saveexec_b64 s[6:7], s[6:7]
; CGP-NEXT: s_cbranch_execz .LBB8_6
; CGP-NEXT: .LBB8_8:
-; CGP-NEXT: v_cvt_f32_u32_e32 v2, v9
+; CGP-NEXT: v_rcp_iflag_f32_e32 v2, v4
; CGP-NEXT: v_sub_i32_e32 v3, vcc, 0, v9
-; CGP-NEXT: v_rcp_iflag_f32_e32 v2, v2
; CGP-NEXT: v_mul_f32_e32 v2, 0x4f7ffffe, v2
; CGP-NEXT: v_cvt_u32_f32_e32 v2, v2
; CGP-NEXT: v_mul_lo_u32 v3, v3, v2
; CHECK-NEXT: v_or_b32_e32 v1, v5, v3
; CHECK-NEXT: v_mov_b32_e32 v0, 0
; CHECK-NEXT: v_cmp_ne_u64_e32 vcc, 0, v[0:1]
+; CHECK-NEXT: v_cvt_f32_u32_e32 v6, v2
; CHECK-NEXT: ; implicit-def: $vgpr0_vgpr1
; CHECK-NEXT: s_and_saveexec_b64 s[4:5], vcc
; CHECK-NEXT: s_xor_b64 s[6:7], exec, s[4:5]
; CHECK-NEXT: s_or_b64 exec, exec, s[4:5]
; CHECK-NEXT: s_setpc_b64 s[30:31]
; CHECK-NEXT: .LBB0_3:
-; CHECK-NEXT: v_cvt_f32_u32_e32 v0, v2
-; CHECK-NEXT: v_cvt_f32_u32_e32 v1, v3
-; CHECK-NEXT: v_sub_i32_e32 v6, vcc, 0, v2
+; CHECK-NEXT: v_cvt_f32_u32_e32 v0, v3
+; CHECK-NEXT: v_sub_i32_e32 v1, vcc, 0, v2
; CHECK-NEXT: v_subb_u32_e32 v7, vcc, 0, v3, vcc
-; CHECK-NEXT: v_mac_f32_e32 v0, 0x4f800000, v1
-; CHECK-NEXT: v_rcp_iflag_f32_e32 v0, v0
+; CHECK-NEXT: v_mac_f32_e32 v6, 0x4f800000, v0
+; CHECK-NEXT: v_rcp_iflag_f32_e32 v0, v6
; CHECK-NEXT: v_mul_f32_e32 v0, 0x5f7ffffc, v0
-; CHECK-NEXT: v_mul_f32_e32 v1, 0x2f800000, v0
-; CHECK-NEXT: v_trunc_f32_e32 v1, v1
-; CHECK-NEXT: v_mac_f32_e32 v0, 0xcf800000, v1
-; CHECK-NEXT: v_cvt_u32_f32_e32 v1, v1
+; CHECK-NEXT: v_mul_f32_e32 v6, 0x2f800000, v0
+; CHECK-NEXT: v_trunc_f32_e32 v6, v6
+; CHECK-NEXT: v_mac_f32_e32 v0, 0xcf800000, v6
+; CHECK-NEXT: v_cvt_u32_f32_e32 v6, v6
; CHECK-NEXT: v_cvt_u32_f32_e32 v0, v0
-; CHECK-NEXT: v_mul_lo_u32 v8, v6, v1
-; CHECK-NEXT: v_mul_lo_u32 v9, v6, v0
+; CHECK-NEXT: v_mul_lo_u32 v8, v1, v6
+; CHECK-NEXT: v_mul_lo_u32 v9, v1, v0
; CHECK-NEXT: v_mul_lo_u32 v10, v7, v0
-; CHECK-NEXT: v_mul_hi_u32 v11, v6, v0
+; CHECK-NEXT: v_mul_hi_u32 v11, v1, v0
; CHECK-NEXT: v_add_i32_e32 v8, vcc, v10, v8
-; CHECK-NEXT: v_mul_lo_u32 v10, v1, v9
+; CHECK-NEXT: v_mul_lo_u32 v10, v6, v9
; CHECK-NEXT: v_mul_hi_u32 v12, v0, v9
-; CHECK-NEXT: v_mul_hi_u32 v9, v1, v9
+; CHECK-NEXT: v_mul_hi_u32 v9, v6, v9
; CHECK-NEXT: v_add_i32_e32 v8, vcc, v8, v11
; CHECK-NEXT: v_mul_lo_u32 v11, v0, v8
-; CHECK-NEXT: v_mul_lo_u32 v13, v1, v8
+; CHECK-NEXT: v_mul_lo_u32 v13, v6, v8
; CHECK-NEXT: v_mul_hi_u32 v14, v0, v8
-; CHECK-NEXT: v_mul_hi_u32 v8, v1, v8
+; CHECK-NEXT: v_mul_hi_u32 v8, v6, v8
; CHECK-NEXT: v_add_i32_e32 v10, vcc, v10, v11
; CHECK-NEXT: v_cndmask_b32_e64 v11, 0, 1, vcc
; CHECK-NEXT: v_add_i32_e32 v9, vcc, v13, v9
; CHECK-NEXT: v_add_i32_e32 v10, vcc, v11, v10
; CHECK-NEXT: v_add_i32_e32 v8, vcc, v8, v10
; CHECK-NEXT: v_add_i32_e32 v0, vcc, v0, v9
-; CHECK-NEXT: v_addc_u32_e32 v1, vcc, v1, v8, vcc
-; CHECK-NEXT: v_mul_lo_u32 v8, v6, v0
+; CHECK-NEXT: v_addc_u32_e32 v6, vcc, v6, v8, vcc
+; CHECK-NEXT: v_mul_lo_u32 v8, v1, v0
; CHECK-NEXT: v_mul_lo_u32 v7, v7, v0
-; CHECK-NEXT: v_mul_hi_u32 v9, v6, v0
-; CHECK-NEXT: v_mul_lo_u32 v6, v6, v1
-; CHECK-NEXT: v_mul_lo_u32 v10, v1, v8
+; CHECK-NEXT: v_mul_hi_u32 v9, v1, v0
+; CHECK-NEXT: v_mul_lo_u32 v1, v1, v6
+; CHECK-NEXT: v_mul_lo_u32 v10, v6, v8
; CHECK-NEXT: v_mul_hi_u32 v11, v0, v8
-; CHECK-NEXT: v_mul_hi_u32 v8, v1, v8
-; CHECK-NEXT: v_add_i32_e32 v6, vcc, v7, v6
-; CHECK-NEXT: v_add_i32_e32 v6, vcc, v6, v9
-; CHECK-NEXT: v_mul_lo_u32 v7, v0, v6
-; CHECK-NEXT: v_mul_lo_u32 v9, v1, v6
-; CHECK-NEXT: v_mul_hi_u32 v12, v0, v6
-; CHECK-NEXT: v_mul_hi_u32 v6, v1, v6
+; CHECK-NEXT: v_mul_hi_u32 v8, v6, v8
+; CHECK-NEXT: v_add_i32_e32 v1, vcc, v7, v1
+; CHECK-NEXT: v_add_i32_e32 v1, vcc, v1, v9
+; CHECK-NEXT: v_mul_lo_u32 v7, v0, v1
+; CHECK-NEXT: v_mul_lo_u32 v9, v6, v1
+; CHECK-NEXT: v_mul_hi_u32 v12, v0, v1
+; CHECK-NEXT: v_mul_hi_u32 v1, v6, v1
; CHECK-NEXT: v_add_i32_e32 v7, vcc, v10, v7
; CHECK-NEXT: v_cndmask_b32_e64 v10, 0, 1, vcc
; CHECK-NEXT: v_add_i32_e32 v8, vcc, v9, v8
; CHECK-NEXT: v_add_i32_e32 v7, vcc, v8, v7
; CHECK-NEXT: v_cndmask_b32_e64 v8, 0, 1, vcc
; CHECK-NEXT: v_add_i32_e32 v8, vcc, v9, v8
-; CHECK-NEXT: v_add_i32_e32 v6, vcc, v6, v8
+; CHECK-NEXT: v_add_i32_e32 v1, vcc, v1, v8
; CHECK-NEXT: v_add_i32_e32 v0, vcc, v0, v7
-; CHECK-NEXT: v_addc_u32_e32 v1, vcc, v1, v6, vcc
+; CHECK-NEXT: v_addc_u32_e32 v1, vcc, v6, v1, vcc
; CHECK-NEXT: v_mul_lo_u32 v6, v5, v0
; CHECK-NEXT: v_mul_hi_u32 v7, v4, v0
; CHECK-NEXT: v_mul_hi_u32 v0, v5, v0
; CHECK-NEXT: v_cmp_ne_u32_e32 vcc, 0, v5
; CHECK-NEXT: v_cndmask_b32_e32 v0, v1, v2, vcc
; CHECK-NEXT: v_cndmask_b32_e32 v1, v4, v3, vcc
+; CHECK-NEXT: ; implicit-def: $vgpr6
; CHECK-NEXT: ; implicit-def: $vgpr2
; CHECK-NEXT: ; implicit-def: $vgpr4
; CHECK-NEXT: s_andn2_saveexec_b64 s[4:5], s[6:7]
; CHECK-NEXT: s_cbranch_execz .LBB0_2
; CHECK-NEXT: .LBB0_4:
-; CHECK-NEXT: v_cvt_f32_u32_e32 v0, v2
+; CHECK-NEXT: v_rcp_iflag_f32_e32 v0, v6
; CHECK-NEXT: v_sub_i32_e32 v1, vcc, 0, v2
-; CHECK-NEXT: v_rcp_iflag_f32_e32 v0, v0
; CHECK-NEXT: v_mul_f32_e32 v0, 0x4f7ffffe, v0
; CHECK-NEXT: v_cvt_u32_f32_e32 v0, v0
; CHECK-NEXT: v_mul_lo_u32 v1, v1, v0
; CGP-NEXT: v_or_b32_e32 v1, v11, v5
; CGP-NEXT: v_mov_b32_e32 v0, 0
; CGP-NEXT: v_cmp_ne_u64_e32 vcc, 0, v[0:1]
+; CGP-NEXT: v_cvt_f32_u32_e32 v2, v4
; CGP-NEXT: ; implicit-def: $vgpr0_vgpr1
; CGP-NEXT: s_and_saveexec_b64 s[4:5], vcc
; CGP-NEXT: s_xor_b64 s[6:7], exec, s[4:5]
; CGP-NEXT: s_cbranch_execz .LBB2_2
; CGP-NEXT: ; %bb.1:
-; CGP-NEXT: v_cvt_f32_u32_e32 v0, v4
-; CGP-NEXT: v_cvt_f32_u32_e32 v1, v5
-; CGP-NEXT: v_sub_i32_e32 v2, vcc, 0, v4
+; CGP-NEXT: v_cvt_f32_u32_e32 v0, v5
+; CGP-NEXT: v_sub_i32_e32 v1, vcc, 0, v4
; CGP-NEXT: v_subb_u32_e32 v3, vcc, 0, v5, vcc
-; CGP-NEXT: v_mac_f32_e32 v0, 0x4f800000, v1
-; CGP-NEXT: v_rcp_iflag_f32_e32 v0, v0
+; CGP-NEXT: v_mac_f32_e32 v2, 0x4f800000, v0
+; CGP-NEXT: v_rcp_iflag_f32_e32 v0, v2
; CGP-NEXT: v_mul_f32_e32 v0, 0x5f7ffffc, v0
-; CGP-NEXT: v_mul_f32_e32 v1, 0x2f800000, v0
-; CGP-NEXT: v_trunc_f32_e32 v1, v1
-; CGP-NEXT: v_mac_f32_e32 v0, 0xcf800000, v1
-; CGP-NEXT: v_cvt_u32_f32_e32 v1, v1
+; CGP-NEXT: v_mul_f32_e32 v2, 0x2f800000, v0
+; CGP-NEXT: v_trunc_f32_e32 v2, v2
+; CGP-NEXT: v_mac_f32_e32 v0, 0xcf800000, v2
+; CGP-NEXT: v_cvt_u32_f32_e32 v2, v2
; CGP-NEXT: v_cvt_u32_f32_e32 v0, v0
-; CGP-NEXT: v_mul_lo_u32 v12, v2, v1
-; CGP-NEXT: v_mul_lo_u32 v13, v2, v0
+; CGP-NEXT: v_mul_lo_u32 v12, v1, v2
+; CGP-NEXT: v_mul_lo_u32 v13, v1, v0
; CGP-NEXT: v_mul_lo_u32 v14, v3, v0
-; CGP-NEXT: v_mul_hi_u32 v15, v2, v0
+; CGP-NEXT: v_mul_hi_u32 v15, v1, v0
; CGP-NEXT: v_add_i32_e32 v12, vcc, v14, v12
-; CGP-NEXT: v_mul_lo_u32 v14, v1, v13
+; CGP-NEXT: v_mul_lo_u32 v14, v2, v13
; CGP-NEXT: v_mul_hi_u32 v16, v0, v13
-; CGP-NEXT: v_mul_hi_u32 v13, v1, v13
+; CGP-NEXT: v_mul_hi_u32 v13, v2, v13
; CGP-NEXT: v_add_i32_e32 v12, vcc, v12, v15
; CGP-NEXT: v_mul_lo_u32 v15, v0, v12
-; CGP-NEXT: v_mul_lo_u32 v17, v1, v12
+; CGP-NEXT: v_mul_lo_u32 v17, v2, v12
; CGP-NEXT: v_mul_hi_u32 v18, v0, v12
-; CGP-NEXT: v_mul_hi_u32 v12, v1, v12
+; CGP-NEXT: v_mul_hi_u32 v12, v2, v12
; CGP-NEXT: v_add_i32_e32 v14, vcc, v14, v15
; CGP-NEXT: v_cndmask_b32_e64 v15, 0, 1, vcc
; CGP-NEXT: v_add_i32_e32 v13, vcc, v17, v13
; CGP-NEXT: v_add_i32_e32 v14, vcc, v15, v14
; CGP-NEXT: v_add_i32_e32 v12, vcc, v12, v14
; CGP-NEXT: v_add_i32_e32 v0, vcc, v0, v13
-; CGP-NEXT: v_addc_u32_e32 v1, vcc, v1, v12, vcc
-; CGP-NEXT: v_mul_lo_u32 v12, v2, v0
+; CGP-NEXT: v_addc_u32_e32 v2, vcc, v2, v12, vcc
+; CGP-NEXT: v_mul_lo_u32 v12, v1, v0
; CGP-NEXT: v_mul_lo_u32 v3, v3, v0
-; CGP-NEXT: v_mul_hi_u32 v13, v2, v0
-; CGP-NEXT: v_mul_lo_u32 v2, v2, v1
-; CGP-NEXT: v_mul_lo_u32 v14, v1, v12
+; CGP-NEXT: v_mul_hi_u32 v13, v1, v0
+; CGP-NEXT: v_mul_lo_u32 v1, v1, v2
+; CGP-NEXT: v_mul_lo_u32 v14, v2, v12
; CGP-NEXT: v_mul_hi_u32 v15, v0, v12
-; CGP-NEXT: v_mul_hi_u32 v12, v1, v12
-; CGP-NEXT: v_add_i32_e32 v2, vcc, v3, v2
-; CGP-NEXT: v_add_i32_e32 v2, vcc, v2, v13
-; CGP-NEXT: v_mul_lo_u32 v3, v0, v2
-; CGP-NEXT: v_mul_lo_u32 v13, v1, v2
-; CGP-NEXT: v_mul_hi_u32 v16, v0, v2
-; CGP-NEXT: v_mul_hi_u32 v2, v1, v2
+; CGP-NEXT: v_mul_hi_u32 v12, v2, v12
+; CGP-NEXT: v_add_i32_e32 v1, vcc, v3, v1
+; CGP-NEXT: v_add_i32_e32 v1, vcc, v1, v13
+; CGP-NEXT: v_mul_lo_u32 v3, v0, v1
+; CGP-NEXT: v_mul_lo_u32 v13, v2, v1
+; CGP-NEXT: v_mul_hi_u32 v16, v0, v1
+; CGP-NEXT: v_mul_hi_u32 v1, v2, v1
; CGP-NEXT: v_add_i32_e32 v3, vcc, v14, v3
; CGP-NEXT: v_cndmask_b32_e64 v14, 0, 1, vcc
; CGP-NEXT: v_add_i32_e32 v12, vcc, v13, v12
; CGP-NEXT: v_add_i32_e32 v3, vcc, v12, v3
; CGP-NEXT: v_cndmask_b32_e64 v12, 0, 1, vcc
; CGP-NEXT: v_add_i32_e32 v12, vcc, v13, v12
-; CGP-NEXT: v_add_i32_e32 v2, vcc, v2, v12
+; CGP-NEXT: v_add_i32_e32 v1, vcc, v1, v12
; CGP-NEXT: v_add_i32_e32 v0, vcc, v0, v3
-; CGP-NEXT: v_addc_u32_e32 v1, vcc, v1, v2, vcc
+; CGP-NEXT: v_addc_u32_e32 v1, vcc, v2, v1, vcc
; CGP-NEXT: v_mul_lo_u32 v2, v11, v0
; CGP-NEXT: v_mul_hi_u32 v3, v10, v0
; CGP-NEXT: v_mul_hi_u32 v0, v11, v0
; CGP-NEXT: v_cmp_ne_u32_e32 vcc, 0, v3
; CGP-NEXT: v_cndmask_b32_e32 v0, v1, v4, vcc
; CGP-NEXT: v_cndmask_b32_e32 v1, v2, v5, vcc
+; CGP-NEXT: ; implicit-def: $vgpr2
; CGP-NEXT: ; implicit-def: $vgpr4
; CGP-NEXT: ; implicit-def: $vgpr10
; CGP-NEXT: .LBB2_2: ; %Flow1
; CGP-NEXT: s_andn2_saveexec_b64 s[4:5], s[6:7]
; CGP-NEXT: s_cbranch_execz .LBB2_4
; CGP-NEXT: ; %bb.3:
-; CGP-NEXT: v_cvt_f32_u32_e32 v0, v4
+; CGP-NEXT: v_rcp_iflag_f32_e32 v0, v2
; CGP-NEXT: v_sub_i32_e32 v1, vcc, 0, v4
-; CGP-NEXT: v_rcp_iflag_f32_e32 v0, v0
; CGP-NEXT: v_mul_f32_e32 v0, 0x4f7ffffe, v0
; CGP-NEXT: v_cvt_u32_f32_e32 v0, v0
; CGP-NEXT: v_mul_lo_u32 v1, v1, v0
; CGP-NEXT: v_or_b32_e32 v3, v9, v7
; CGP-NEXT: v_mov_b32_e32 v2, 0
; CGP-NEXT: v_cmp_ne_u64_e32 vcc, 0, v[2:3]
+; CGP-NEXT: v_cvt_f32_u32_e32 v4, v6
; CGP-NEXT: ; implicit-def: $vgpr2_vgpr3
; CGP-NEXT: s_and_saveexec_b64 s[4:5], vcc
; CGP-NEXT: s_xor_b64 s[6:7], exec, s[4:5]
; CGP-NEXT: s_or_b64 exec, exec, s[4:5]
; CGP-NEXT: s_setpc_b64 s[30:31]
; CGP-NEXT: .LBB2_7:
-; CGP-NEXT: v_cvt_f32_u32_e32 v2, v6
-; CGP-NEXT: v_cvt_f32_u32_e32 v3, v7
-; CGP-NEXT: v_sub_i32_e32 v4, vcc, 0, v6
+; CGP-NEXT: v_cvt_f32_u32_e32 v2, v7
+; CGP-NEXT: v_sub_i32_e32 v3, vcc, 0, v6
; CGP-NEXT: v_subb_u32_e32 v5, vcc, 0, v7, vcc
-; CGP-NEXT: v_mac_f32_e32 v2, 0x4f800000, v3
-; CGP-NEXT: v_rcp_iflag_f32_e32 v2, v2
+; CGP-NEXT: v_mac_f32_e32 v4, 0x4f800000, v2
+; CGP-NEXT: v_rcp_iflag_f32_e32 v2, v4
; CGP-NEXT: v_mul_f32_e32 v2, 0x5f7ffffc, v2
-; CGP-NEXT: v_mul_f32_e32 v3, 0x2f800000, v2
-; CGP-NEXT: v_trunc_f32_e32 v3, v3
-; CGP-NEXT: v_mac_f32_e32 v2, 0xcf800000, v3
-; CGP-NEXT: v_cvt_u32_f32_e32 v3, v3
+; CGP-NEXT: v_mul_f32_e32 v4, 0x2f800000, v2
+; CGP-NEXT: v_trunc_f32_e32 v4, v4
+; CGP-NEXT: v_mac_f32_e32 v2, 0xcf800000, v4
+; CGP-NEXT: v_cvt_u32_f32_e32 v4, v4
; CGP-NEXT: v_cvt_u32_f32_e32 v2, v2
-; CGP-NEXT: v_mul_lo_u32 v10, v4, v3
-; CGP-NEXT: v_mul_lo_u32 v11, v4, v2
+; CGP-NEXT: v_mul_lo_u32 v10, v3, v4
+; CGP-NEXT: v_mul_lo_u32 v11, v3, v2
; CGP-NEXT: v_mul_lo_u32 v12, v5, v2
-; CGP-NEXT: v_mul_hi_u32 v13, v4, v2
+; CGP-NEXT: v_mul_hi_u32 v13, v3, v2
; CGP-NEXT: v_add_i32_e32 v10, vcc, v12, v10
-; CGP-NEXT: v_mul_lo_u32 v12, v3, v11
+; CGP-NEXT: v_mul_lo_u32 v12, v4, v11
; CGP-NEXT: v_mul_hi_u32 v14, v2, v11
-; CGP-NEXT: v_mul_hi_u32 v11, v3, v11
+; CGP-NEXT: v_mul_hi_u32 v11, v4, v11
; CGP-NEXT: v_add_i32_e32 v10, vcc, v10, v13
; CGP-NEXT: v_mul_lo_u32 v13, v2, v10
-; CGP-NEXT: v_mul_lo_u32 v15, v3, v10
+; CGP-NEXT: v_mul_lo_u32 v15, v4, v10
; CGP-NEXT: v_mul_hi_u32 v16, v2, v10
-; CGP-NEXT: v_mul_hi_u32 v10, v3, v10
+; CGP-NEXT: v_mul_hi_u32 v10, v4, v10
; CGP-NEXT: v_add_i32_e32 v12, vcc, v12, v13
; CGP-NEXT: v_cndmask_b32_e64 v13, 0, 1, vcc
; CGP-NEXT: v_add_i32_e32 v11, vcc, v15, v11
; CGP-NEXT: v_add_i32_e32 v12, vcc, v13, v12
; CGP-NEXT: v_add_i32_e32 v10, vcc, v10, v12
; CGP-NEXT: v_add_i32_e32 v2, vcc, v2, v11
-; CGP-NEXT: v_addc_u32_e32 v3, vcc, v3, v10, vcc
-; CGP-NEXT: v_mul_lo_u32 v10, v4, v2
+; CGP-NEXT: v_addc_u32_e32 v4, vcc, v4, v10, vcc
+; CGP-NEXT: v_mul_lo_u32 v10, v3, v2
; CGP-NEXT: v_mul_lo_u32 v5, v5, v2
-; CGP-NEXT: v_mul_hi_u32 v11, v4, v2
-; CGP-NEXT: v_mul_lo_u32 v4, v4, v3
-; CGP-NEXT: v_mul_lo_u32 v12, v3, v10
+; CGP-NEXT: v_mul_hi_u32 v11, v3, v2
+; CGP-NEXT: v_mul_lo_u32 v3, v3, v4
+; CGP-NEXT: v_mul_lo_u32 v12, v4, v10
; CGP-NEXT: v_mul_hi_u32 v13, v2, v10
-; CGP-NEXT: v_mul_hi_u32 v10, v3, v10
-; CGP-NEXT: v_add_i32_e32 v4, vcc, v5, v4
-; CGP-NEXT: v_add_i32_e32 v4, vcc, v4, v11
-; CGP-NEXT: v_mul_lo_u32 v5, v2, v4
-; CGP-NEXT: v_mul_lo_u32 v11, v3, v4
-; CGP-NEXT: v_mul_hi_u32 v14, v2, v4
-; CGP-NEXT: v_mul_hi_u32 v4, v3, v4
+; CGP-NEXT: v_mul_hi_u32 v10, v4, v10
+; CGP-NEXT: v_add_i32_e32 v3, vcc, v5, v3
+; CGP-NEXT: v_add_i32_e32 v3, vcc, v3, v11
+; CGP-NEXT: v_mul_lo_u32 v5, v2, v3
+; CGP-NEXT: v_mul_lo_u32 v11, v4, v3
+; CGP-NEXT: v_mul_hi_u32 v14, v2, v3
+; CGP-NEXT: v_mul_hi_u32 v3, v4, v3
; CGP-NEXT: v_add_i32_e32 v5, vcc, v12, v5
; CGP-NEXT: v_cndmask_b32_e64 v12, 0, 1, vcc
; CGP-NEXT: v_add_i32_e32 v10, vcc, v11, v10
; CGP-NEXT: v_add_i32_e32 v5, vcc, v10, v5
; CGP-NEXT: v_cndmask_b32_e64 v10, 0, 1, vcc
; CGP-NEXT: v_add_i32_e32 v10, vcc, v11, v10
-; CGP-NEXT: v_add_i32_e32 v4, vcc, v4, v10
+; CGP-NEXT: v_add_i32_e32 v3, vcc, v3, v10
; CGP-NEXT: v_add_i32_e32 v2, vcc, v2, v5
-; CGP-NEXT: v_addc_u32_e32 v3, vcc, v3, v4, vcc
+; CGP-NEXT: v_addc_u32_e32 v3, vcc, v4, v3, vcc
; CGP-NEXT: v_mul_lo_u32 v4, v9, v2
; CGP-NEXT: v_mul_hi_u32 v5, v8, v2
; CGP-NEXT: v_mul_hi_u32 v2, v9, v2
; CGP-NEXT: v_cmp_ne_u32_e32 vcc, 0, v5
; CGP-NEXT: v_cndmask_b32_e32 v2, v3, v6, vcc
; CGP-NEXT: v_cndmask_b32_e32 v3, v4, v7, vcc
+; CGP-NEXT: ; implicit-def: $vgpr4
; CGP-NEXT: ; implicit-def: $vgpr6
; CGP-NEXT: ; implicit-def: $vgpr8
; CGP-NEXT: s_andn2_saveexec_b64 s[4:5], s[6:7]
; CGP-NEXT: s_cbranch_execz .LBB2_6
; CGP-NEXT: .LBB2_8:
-; CGP-NEXT: v_cvt_f32_u32_e32 v2, v6
+; CGP-NEXT: v_rcp_iflag_f32_e32 v2, v4
; CGP-NEXT: v_sub_i32_e32 v3, vcc, 0, v6
-; CGP-NEXT: v_rcp_iflag_f32_e32 v2, v2
; CGP-NEXT: v_mul_f32_e32 v2, 0x4f7ffffe, v2
; CGP-NEXT: v_cvt_u32_f32_e32 v2, v2
; CGP-NEXT: v_mul_lo_u32 v3, v3, v2
; CHECK-NEXT: v_mov_b32_e32 v3, v0
; CHECK-NEXT: v_mov_b32_e32 v4, v1
; CHECK-NEXT: s_mov_b64 s[4:5], 0x1000
+; CHECK-NEXT: v_mov_b32_e32 v0, 0
; CHECK-NEXT: v_lshl_b64 v[5:6], s[4:5], v2
; CHECK-NEXT: v_or_b32_e32 v1, v4, v6
-; CHECK-NEXT: v_mov_b32_e32 v0, 0
; CHECK-NEXT: v_cmp_ne_u64_e32 vcc, 0, v[0:1]
+; CHECK-NEXT: v_cvt_f32_u32_e32 v2, v5
; CHECK-NEXT: ; implicit-def: $vgpr0_vgpr1
; CHECK-NEXT: s_and_saveexec_b64 s[4:5], vcc
; CHECK-NEXT: s_xor_b64 s[6:7], exec, s[4:5]
; CHECK-NEXT: s_or_b64 exec, exec, s[4:5]
; CHECK-NEXT: s_setpc_b64 s[30:31]
; CHECK-NEXT: .LBB7_3:
-; CHECK-NEXT: v_cvt_f32_u32_e32 v0, v5
-; CHECK-NEXT: v_cvt_f32_u32_e32 v1, v6
-; CHECK-NEXT: v_sub_i32_e32 v2, vcc, 0, v5
+; CHECK-NEXT: v_cvt_f32_u32_e32 v0, v6
+; CHECK-NEXT: v_sub_i32_e32 v1, vcc, 0, v5
; CHECK-NEXT: v_subb_u32_e32 v7, vcc, 0, v6, vcc
-; CHECK-NEXT: v_mac_f32_e32 v0, 0x4f800000, v1
-; CHECK-NEXT: v_rcp_iflag_f32_e32 v0, v0
+; CHECK-NEXT: v_mac_f32_e32 v2, 0x4f800000, v0
+; CHECK-NEXT: v_rcp_iflag_f32_e32 v0, v2
; CHECK-NEXT: v_mul_f32_e32 v0, 0x5f7ffffc, v0
-; CHECK-NEXT: v_mul_f32_e32 v1, 0x2f800000, v0
-; CHECK-NEXT: v_trunc_f32_e32 v1, v1
-; CHECK-NEXT: v_mac_f32_e32 v0, 0xcf800000, v1
-; CHECK-NEXT: v_cvt_u32_f32_e32 v1, v1
+; CHECK-NEXT: v_mul_f32_e32 v2, 0x2f800000, v0
+; CHECK-NEXT: v_trunc_f32_e32 v2, v2
+; CHECK-NEXT: v_mac_f32_e32 v0, 0xcf800000, v2
+; CHECK-NEXT: v_cvt_u32_f32_e32 v2, v2
; CHECK-NEXT: v_cvt_u32_f32_e32 v0, v0
-; CHECK-NEXT: v_mul_lo_u32 v8, v2, v1
-; CHECK-NEXT: v_mul_lo_u32 v9, v2, v0
+; CHECK-NEXT: v_mul_lo_u32 v8, v1, v2
+; CHECK-NEXT: v_mul_lo_u32 v9, v1, v0
; CHECK-NEXT: v_mul_lo_u32 v10, v7, v0
-; CHECK-NEXT: v_mul_hi_u32 v11, v2, v0
+; CHECK-NEXT: v_mul_hi_u32 v11, v1, v0
; CHECK-NEXT: v_add_i32_e32 v8, vcc, v10, v8
-; CHECK-NEXT: v_mul_lo_u32 v10, v1, v9
+; CHECK-NEXT: v_mul_lo_u32 v10, v2, v9
; CHECK-NEXT: v_mul_hi_u32 v12, v0, v9
-; CHECK-NEXT: v_mul_hi_u32 v9, v1, v9
+; CHECK-NEXT: v_mul_hi_u32 v9, v2, v9
; CHECK-NEXT: v_add_i32_e32 v8, vcc, v8, v11
; CHECK-NEXT: v_mul_lo_u32 v11, v0, v8
-; CHECK-NEXT: v_mul_lo_u32 v13, v1, v8
+; CHECK-NEXT: v_mul_lo_u32 v13, v2, v8
; CHECK-NEXT: v_mul_hi_u32 v14, v0, v8
-; CHECK-NEXT: v_mul_hi_u32 v8, v1, v8
+; CHECK-NEXT: v_mul_hi_u32 v8, v2, v8
; CHECK-NEXT: v_add_i32_e32 v10, vcc, v10, v11
; CHECK-NEXT: v_cndmask_b32_e64 v11, 0, 1, vcc
; CHECK-NEXT: v_add_i32_e32 v9, vcc, v13, v9
; CHECK-NEXT: v_add_i32_e32 v10, vcc, v11, v10
; CHECK-NEXT: v_add_i32_e32 v8, vcc, v8, v10
; CHECK-NEXT: v_add_i32_e32 v0, vcc, v0, v9
-; CHECK-NEXT: v_addc_u32_e32 v1, vcc, v1, v8, vcc
-; CHECK-NEXT: v_mul_lo_u32 v8, v2, v0
+; CHECK-NEXT: v_addc_u32_e32 v2, vcc, v2, v8, vcc
+; CHECK-NEXT: v_mul_lo_u32 v8, v1, v0
; CHECK-NEXT: v_mul_lo_u32 v7, v7, v0
-; CHECK-NEXT: v_mul_hi_u32 v9, v2, v0
-; CHECK-NEXT: v_mul_lo_u32 v2, v2, v1
-; CHECK-NEXT: v_mul_lo_u32 v10, v1, v8
+; CHECK-NEXT: v_mul_hi_u32 v9, v1, v0
+; CHECK-NEXT: v_mul_lo_u32 v1, v1, v2
+; CHECK-NEXT: v_mul_lo_u32 v10, v2, v8
; CHECK-NEXT: v_mul_hi_u32 v11, v0, v8
-; CHECK-NEXT: v_mul_hi_u32 v8, v1, v8
-; CHECK-NEXT: v_add_i32_e32 v2, vcc, v7, v2
-; CHECK-NEXT: v_add_i32_e32 v2, vcc, v2, v9
-; CHECK-NEXT: v_mul_lo_u32 v7, v0, v2
-; CHECK-NEXT: v_mul_lo_u32 v9, v1, v2
-; CHECK-NEXT: v_mul_hi_u32 v12, v0, v2
-; CHECK-NEXT: v_mul_hi_u32 v2, v1, v2
+; CHECK-NEXT: v_mul_hi_u32 v8, v2, v8
+; CHECK-NEXT: v_add_i32_e32 v1, vcc, v7, v1
+; CHECK-NEXT: v_add_i32_e32 v1, vcc, v1, v9
+; CHECK-NEXT: v_mul_lo_u32 v7, v0, v1
+; CHECK-NEXT: v_mul_lo_u32 v9, v2, v1
+; CHECK-NEXT: v_mul_hi_u32 v12, v0, v1
+; CHECK-NEXT: v_mul_hi_u32 v1, v2, v1
; CHECK-NEXT: v_add_i32_e32 v7, vcc, v10, v7
; CHECK-NEXT: v_cndmask_b32_e64 v10, 0, 1, vcc
; CHECK-NEXT: v_add_i32_e32 v8, vcc, v9, v8
; CHECK-NEXT: v_add_i32_e32 v7, vcc, v8, v7
; CHECK-NEXT: v_cndmask_b32_e64 v8, 0, 1, vcc
; CHECK-NEXT: v_add_i32_e32 v8, vcc, v9, v8
-; CHECK-NEXT: v_add_i32_e32 v2, vcc, v2, v8
+; CHECK-NEXT: v_add_i32_e32 v1, vcc, v1, v8
; CHECK-NEXT: v_add_i32_e32 v0, vcc, v0, v7
-; CHECK-NEXT: v_addc_u32_e32 v1, vcc, v1, v2, vcc
+; CHECK-NEXT: v_addc_u32_e32 v1, vcc, v2, v1, vcc
; CHECK-NEXT: v_mul_lo_u32 v2, v4, v0
; CHECK-NEXT: v_mul_hi_u32 v7, v3, v0
; CHECK-NEXT: v_mul_hi_u32 v0, v4, v0
; CHECK-NEXT: v_cmp_ne_u32_e32 vcc, 0, v3
; CHECK-NEXT: v_cndmask_b32_e32 v0, v1, v4, vcc
; CHECK-NEXT: v_cndmask_b32_e32 v1, v2, v5, vcc
+; CHECK-NEXT: ; implicit-def: $vgpr2
; CHECK-NEXT: ; implicit-def: $vgpr5_vgpr6
; CHECK-NEXT: ; implicit-def: $vgpr3
; CHECK-NEXT: s_andn2_saveexec_b64 s[4:5], s[6:7]
; CHECK-NEXT: s_cbranch_execz .LBB7_2
; CHECK-NEXT: .LBB7_4:
-; CHECK-NEXT: v_cvt_f32_u32_e32 v0, v5
+; CHECK-NEXT: v_rcp_iflag_f32_e32 v0, v2
; CHECK-NEXT: v_sub_i32_e32 v1, vcc, 0, v5
-; CHECK-NEXT: v_rcp_iflag_f32_e32 v0, v0
; CHECK-NEXT: v_mul_f32_e32 v0, 0x4f7ffffe, v0
; CHECK-NEXT: v_cvt_u32_f32_e32 v0, v0
; CHECK-NEXT: v_mul_lo_u32 v1, v1, v0
; CGP-NEXT: v_mov_b32_e32 v5, v2
; CGP-NEXT: v_mov_b32_e32 v7, v3
; CGP-NEXT: s_mov_b64 s[6:7], 0x1000
+; CGP-NEXT: v_mov_b32_e32 v0, 0
; CGP-NEXT: v_lshl_b64 v[2:3], s[6:7], v4
; CGP-NEXT: v_or_b32_e32 v1, v9, v3
-; CGP-NEXT: v_mov_b32_e32 v0, 0
; CGP-NEXT: v_cmp_ne_u64_e32 vcc, 0, v[0:1]
+; CGP-NEXT: v_cvt_f32_u32_e32 v4, v2
; CGP-NEXT: ; implicit-def: $vgpr0_vgpr1
; CGP-NEXT: s_and_saveexec_b64 s[4:5], vcc
; CGP-NEXT: s_xor_b64 s[8:9], exec, s[4:5]
; CGP-NEXT: s_cbranch_execz .LBB8_2
; CGP-NEXT: ; %bb.1:
-; CGP-NEXT: v_cvt_f32_u32_e32 v0, v2
-; CGP-NEXT: v_cvt_f32_u32_e32 v1, v3
-; CGP-NEXT: v_sub_i32_e32 v4, vcc, 0, v2
+; CGP-NEXT: v_cvt_f32_u32_e32 v0, v3
+; CGP-NEXT: v_sub_i32_e32 v1, vcc, 0, v2
; CGP-NEXT: v_subb_u32_e32 v10, vcc, 0, v3, vcc
-; CGP-NEXT: v_mac_f32_e32 v0, 0x4f800000, v1
-; CGP-NEXT: v_rcp_iflag_f32_e32 v0, v0
+; CGP-NEXT: v_mac_f32_e32 v4, 0x4f800000, v0
+; CGP-NEXT: v_rcp_iflag_f32_e32 v0, v4
; CGP-NEXT: v_mul_f32_e32 v0, 0x5f7ffffc, v0
-; CGP-NEXT: v_mul_f32_e32 v1, 0x2f800000, v0
-; CGP-NEXT: v_trunc_f32_e32 v1, v1
-; CGP-NEXT: v_mac_f32_e32 v0, 0xcf800000, v1
-; CGP-NEXT: v_cvt_u32_f32_e32 v1, v1
+; CGP-NEXT: v_mul_f32_e32 v4, 0x2f800000, v0
+; CGP-NEXT: v_trunc_f32_e32 v4, v4
+; CGP-NEXT: v_mac_f32_e32 v0, 0xcf800000, v4
+; CGP-NEXT: v_cvt_u32_f32_e32 v4, v4
; CGP-NEXT: v_cvt_u32_f32_e32 v0, v0
-; CGP-NEXT: v_mul_lo_u32 v11, v4, v1
-; CGP-NEXT: v_mul_lo_u32 v12, v4, v0
+; CGP-NEXT: v_mul_lo_u32 v11, v1, v4
+; CGP-NEXT: v_mul_lo_u32 v12, v1, v0
; CGP-NEXT: v_mul_lo_u32 v13, v10, v0
-; CGP-NEXT: v_mul_hi_u32 v14, v4, v0
+; CGP-NEXT: v_mul_hi_u32 v14, v1, v0
; CGP-NEXT: v_add_i32_e32 v11, vcc, v13, v11
-; CGP-NEXT: v_mul_lo_u32 v13, v1, v12
+; CGP-NEXT: v_mul_lo_u32 v13, v4, v12
; CGP-NEXT: v_mul_hi_u32 v15, v0, v12
-; CGP-NEXT: v_mul_hi_u32 v12, v1, v12
+; CGP-NEXT: v_mul_hi_u32 v12, v4, v12
; CGP-NEXT: v_add_i32_e32 v11, vcc, v11, v14
; CGP-NEXT: v_mul_lo_u32 v14, v0, v11
-; CGP-NEXT: v_mul_lo_u32 v16, v1, v11
+; CGP-NEXT: v_mul_lo_u32 v16, v4, v11
; CGP-NEXT: v_mul_hi_u32 v17, v0, v11
-; CGP-NEXT: v_mul_hi_u32 v11, v1, v11
+; CGP-NEXT: v_mul_hi_u32 v11, v4, v11
; CGP-NEXT: v_add_i32_e32 v13, vcc, v13, v14
; CGP-NEXT: v_cndmask_b32_e64 v14, 0, 1, vcc
; CGP-NEXT: v_add_i32_e32 v12, vcc, v16, v12
; CGP-NEXT: v_add_i32_e32 v13, vcc, v14, v13
; CGP-NEXT: v_add_i32_e32 v11, vcc, v11, v13
; CGP-NEXT: v_add_i32_e32 v0, vcc, v0, v12
-; CGP-NEXT: v_addc_u32_e32 v1, vcc, v1, v11, vcc
-; CGP-NEXT: v_mul_lo_u32 v11, v4, v0
+; CGP-NEXT: v_addc_u32_e32 v4, vcc, v4, v11, vcc
+; CGP-NEXT: v_mul_lo_u32 v11, v1, v0
; CGP-NEXT: v_mul_lo_u32 v10, v10, v0
-; CGP-NEXT: v_mul_hi_u32 v12, v4, v0
-; CGP-NEXT: v_mul_lo_u32 v4, v4, v1
-; CGP-NEXT: v_mul_lo_u32 v13, v1, v11
+; CGP-NEXT: v_mul_hi_u32 v12, v1, v0
+; CGP-NEXT: v_mul_lo_u32 v1, v1, v4
+; CGP-NEXT: v_mul_lo_u32 v13, v4, v11
; CGP-NEXT: v_mul_hi_u32 v14, v0, v11
-; CGP-NEXT: v_mul_hi_u32 v11, v1, v11
-; CGP-NEXT: v_add_i32_e32 v4, vcc, v10, v4
-; CGP-NEXT: v_add_i32_e32 v4, vcc, v4, v12
-; CGP-NEXT: v_mul_lo_u32 v10, v0, v4
-; CGP-NEXT: v_mul_lo_u32 v12, v1, v4
-; CGP-NEXT: v_mul_hi_u32 v15, v0, v4
-; CGP-NEXT: v_mul_hi_u32 v4, v1, v4
+; CGP-NEXT: v_mul_hi_u32 v11, v4, v11
+; CGP-NEXT: v_add_i32_e32 v1, vcc, v10, v1
+; CGP-NEXT: v_add_i32_e32 v1, vcc, v1, v12
+; CGP-NEXT: v_mul_lo_u32 v10, v0, v1
+; CGP-NEXT: v_mul_lo_u32 v12, v4, v1
+; CGP-NEXT: v_mul_hi_u32 v15, v0, v1
+; CGP-NEXT: v_mul_hi_u32 v1, v4, v1
; CGP-NEXT: v_add_i32_e32 v10, vcc, v13, v10
; CGP-NEXT: v_cndmask_b32_e64 v13, 0, 1, vcc
; CGP-NEXT: v_add_i32_e32 v11, vcc, v12, v11
; CGP-NEXT: v_add_i32_e32 v10, vcc, v11, v10
; CGP-NEXT: v_cndmask_b32_e64 v11, 0, 1, vcc
; CGP-NEXT: v_add_i32_e32 v11, vcc, v12, v11
-; CGP-NEXT: v_add_i32_e32 v4, vcc, v4, v11
+; CGP-NEXT: v_add_i32_e32 v1, vcc, v1, v11
; CGP-NEXT: v_add_i32_e32 v0, vcc, v0, v10
-; CGP-NEXT: v_addc_u32_e32 v1, vcc, v1, v4, vcc
+; CGP-NEXT: v_addc_u32_e32 v1, vcc, v4, v1, vcc
; CGP-NEXT: v_mul_lo_u32 v4, v9, v0
; CGP-NEXT: v_mul_hi_u32 v10, v8, v0
; CGP-NEXT: v_mul_hi_u32 v0, v9, v0
; CGP-NEXT: v_cmp_ne_u32_e32 vcc, 0, v8
; CGP-NEXT: v_cndmask_b32_e32 v0, v1, v2, vcc
; CGP-NEXT: v_cndmask_b32_e32 v1, v4, v3, vcc
+; CGP-NEXT: ; implicit-def: $vgpr4
; CGP-NEXT: ; implicit-def: $vgpr2_vgpr3
; CGP-NEXT: ; implicit-def: $vgpr8
; CGP-NEXT: .LBB8_2: ; %Flow1
; CGP-NEXT: s_xor_b64 exec, exec, s[4:5]
; CGP-NEXT: s_cbranch_execz .LBB8_4
; CGP-NEXT: ; %bb.3:
-; CGP-NEXT: v_cvt_f32_u32_e32 v0, v2
+; CGP-NEXT: v_rcp_iflag_f32_e32 v0, v4
; CGP-NEXT: v_sub_i32_e32 v1, vcc, 0, v2
-; CGP-NEXT: v_rcp_iflag_f32_e32 v0, v0
; CGP-NEXT: v_mul_f32_e32 v0, 0x4f7ffffe, v0
; CGP-NEXT: v_cvt_u32_f32_e32 v0, v0
; CGP-NEXT: v_mul_lo_u32 v1, v1, v0
; CGP-NEXT: v_or_b32_e32 v3, v7, v10
; CGP-NEXT: v_mov_b32_e32 v2, 0
; CGP-NEXT: v_cmp_ne_u64_e32 vcc, 0, v[2:3]
+; CGP-NEXT: v_cvt_f32_u32_e32 v4, v9
; CGP-NEXT: ; implicit-def: $vgpr2_vgpr3
; CGP-NEXT: s_and_saveexec_b64 s[4:5], vcc
; CGP-NEXT: s_xor_b64 s[6:7], exec, s[4:5]
; CGP-NEXT: s_or_b64 exec, exec, s[4:5]
; CGP-NEXT: s_setpc_b64 s[30:31]
; CGP-NEXT: .LBB8_7:
-; CGP-NEXT: v_cvt_f32_u32_e32 v2, v9
-; CGP-NEXT: v_cvt_f32_u32_e32 v3, v10
-; CGP-NEXT: v_sub_i32_e32 v4, vcc, 0, v9
+; CGP-NEXT: v_cvt_f32_u32_e32 v2, v10
+; CGP-NEXT: v_sub_i32_e32 v3, vcc, 0, v9
; CGP-NEXT: v_subb_u32_e32 v6, vcc, 0, v10, vcc
-; CGP-NEXT: v_mac_f32_e32 v2, 0x4f800000, v3
-; CGP-NEXT: v_rcp_iflag_f32_e32 v2, v2
+; CGP-NEXT: v_mac_f32_e32 v4, 0x4f800000, v2
+; CGP-NEXT: v_rcp_iflag_f32_e32 v2, v4
; CGP-NEXT: v_mul_f32_e32 v2, 0x5f7ffffc, v2
-; CGP-NEXT: v_mul_f32_e32 v3, 0x2f800000, v2
-; CGP-NEXT: v_trunc_f32_e32 v3, v3
-; CGP-NEXT: v_mac_f32_e32 v2, 0xcf800000, v3
-; CGP-NEXT: v_cvt_u32_f32_e32 v3, v3
+; CGP-NEXT: v_mul_f32_e32 v4, 0x2f800000, v2
+; CGP-NEXT: v_trunc_f32_e32 v4, v4
+; CGP-NEXT: v_mac_f32_e32 v2, 0xcf800000, v4
+; CGP-NEXT: v_cvt_u32_f32_e32 v4, v4
; CGP-NEXT: v_cvt_u32_f32_e32 v2, v2
-; CGP-NEXT: v_mul_lo_u32 v8, v4, v3
-; CGP-NEXT: v_mul_lo_u32 v11, v4, v2
+; CGP-NEXT: v_mul_lo_u32 v8, v3, v4
+; CGP-NEXT: v_mul_lo_u32 v11, v3, v2
; CGP-NEXT: v_mul_lo_u32 v12, v6, v2
-; CGP-NEXT: v_mul_hi_u32 v13, v4, v2
+; CGP-NEXT: v_mul_hi_u32 v13, v3, v2
; CGP-NEXT: v_add_i32_e32 v8, vcc, v12, v8
-; CGP-NEXT: v_mul_lo_u32 v12, v3, v11
+; CGP-NEXT: v_mul_lo_u32 v12, v4, v11
; CGP-NEXT: v_mul_hi_u32 v14, v2, v11
-; CGP-NEXT: v_mul_hi_u32 v11, v3, v11
+; CGP-NEXT: v_mul_hi_u32 v11, v4, v11
; CGP-NEXT: v_add_i32_e32 v8, vcc, v8, v13
; CGP-NEXT: v_mul_lo_u32 v13, v2, v8
-; CGP-NEXT: v_mul_lo_u32 v15, v3, v8
+; CGP-NEXT: v_mul_lo_u32 v15, v4, v8
; CGP-NEXT: v_mul_hi_u32 v16, v2, v8
-; CGP-NEXT: v_mul_hi_u32 v8, v3, v8
+; CGP-NEXT: v_mul_hi_u32 v8, v4, v8
; CGP-NEXT: v_add_i32_e32 v12, vcc, v12, v13
; CGP-NEXT: v_cndmask_b32_e64 v13, 0, 1, vcc
; CGP-NEXT: v_add_i32_e32 v11, vcc, v15, v11
; CGP-NEXT: v_add_i32_e32 v12, vcc, v13, v12
; CGP-NEXT: v_add_i32_e32 v8, vcc, v8, v12
; CGP-NEXT: v_add_i32_e32 v2, vcc, v2, v11
-; CGP-NEXT: v_addc_u32_e32 v3, vcc, v3, v8, vcc
-; CGP-NEXT: v_mul_lo_u32 v8, v4, v2
+; CGP-NEXT: v_addc_u32_e32 v4, vcc, v4, v8, vcc
+; CGP-NEXT: v_mul_lo_u32 v8, v3, v2
; CGP-NEXT: v_mul_lo_u32 v6, v6, v2
-; CGP-NEXT: v_mul_hi_u32 v11, v4, v2
-; CGP-NEXT: v_mul_lo_u32 v4, v4, v3
-; CGP-NEXT: v_mul_lo_u32 v12, v3, v8
+; CGP-NEXT: v_mul_hi_u32 v11, v3, v2
+; CGP-NEXT: v_mul_lo_u32 v3, v3, v4
+; CGP-NEXT: v_mul_lo_u32 v12, v4, v8
; CGP-NEXT: v_mul_hi_u32 v13, v2, v8
-; CGP-NEXT: v_mul_hi_u32 v8, v3, v8
-; CGP-NEXT: v_add_i32_e32 v4, vcc, v6, v4
-; CGP-NEXT: v_add_i32_e32 v4, vcc, v4, v11
-; CGP-NEXT: v_mul_lo_u32 v6, v2, v4
-; CGP-NEXT: v_mul_lo_u32 v11, v3, v4
-; CGP-NEXT: v_mul_hi_u32 v14, v2, v4
-; CGP-NEXT: v_mul_hi_u32 v4, v3, v4
+; CGP-NEXT: v_mul_hi_u32 v8, v4, v8
+; CGP-NEXT: v_add_i32_e32 v3, vcc, v6, v3
+; CGP-NEXT: v_add_i32_e32 v3, vcc, v3, v11
+; CGP-NEXT: v_mul_lo_u32 v6, v2, v3
+; CGP-NEXT: v_mul_lo_u32 v11, v4, v3
+; CGP-NEXT: v_mul_hi_u32 v14, v2, v3
+; CGP-NEXT: v_mul_hi_u32 v3, v4, v3
; CGP-NEXT: v_add_i32_e32 v6, vcc, v12, v6
; CGP-NEXT: v_cndmask_b32_e64 v12, 0, 1, vcc
; CGP-NEXT: v_add_i32_e32 v8, vcc, v11, v8
; CGP-NEXT: v_add_i32_e32 v6, vcc, v8, v6
; CGP-NEXT: v_cndmask_b32_e64 v8, 0, 1, vcc
; CGP-NEXT: v_add_i32_e32 v8, vcc, v11, v8
-; CGP-NEXT: v_add_i32_e32 v4, vcc, v4, v8
+; CGP-NEXT: v_add_i32_e32 v3, vcc, v3, v8
; CGP-NEXT: v_add_i32_e32 v2, vcc, v2, v6
-; CGP-NEXT: v_addc_u32_e32 v3, vcc, v3, v4, vcc
+; CGP-NEXT: v_addc_u32_e32 v3, vcc, v4, v3, vcc
; CGP-NEXT: v_mul_lo_u32 v4, v7, v2
; CGP-NEXT: v_mul_hi_u32 v6, v5, v2
; CGP-NEXT: v_mul_hi_u32 v2, v7, v2
; CGP-NEXT: v_cmp_ne_u32_e32 vcc, 0, v5
; CGP-NEXT: v_cndmask_b32_e32 v2, v3, v6, vcc
; CGP-NEXT: v_cndmask_b32_e32 v3, v4, v7, vcc
+; CGP-NEXT: ; implicit-def: $vgpr4
; CGP-NEXT: ; implicit-def: $vgpr9_vgpr10
; CGP-NEXT: ; implicit-def: $vgpr5
; CGP-NEXT: s_andn2_saveexec_b64 s[4:5], s[6:7]
; CGP-NEXT: s_cbranch_execz .LBB8_6
; CGP-NEXT: .LBB8_8:
-; CGP-NEXT: v_cvt_f32_u32_e32 v2, v9
+; CGP-NEXT: v_rcp_iflag_f32_e32 v2, v4
; CGP-NEXT: v_sub_i32_e32 v3, vcc, 0, v9
-; CGP-NEXT: v_rcp_iflag_f32_e32 v2, v2
; CGP-NEXT: v_mul_f32_e32 v2, 0x4f7ffffe, v2
; CGP-NEXT: v_cvt_u32_f32_e32 v2, v2
; CGP-NEXT: v_mul_lo_u32 v3, v3, v2
;
; GFX9-LABEL: add_i32_varying_vdata:
; GFX9: ; %bb.0: ; %entry
-; GFX9-NEXT: s_or_saveexec_b64 s[2:3], -1
-; GFX9-NEXT: v_mov_b32_e32 v1, 0
-; GFX9-NEXT: s_mov_b64 exec, s[2:3]
-; GFX9-NEXT: v_mbcnt_lo_u32_b32 v3, exec_lo, 0
-; GFX9-NEXT: v_mbcnt_hi_u32_b32 v3, exec_hi, v3
-; GFX9-NEXT: v_mov_b32_e32 v2, v0
+; GFX9-NEXT: v_mov_b32_e32 v3, 0
+; GFX9-NEXT: v_mbcnt_lo_u32_b32 v4, exec_lo, 0
+; GFX9-NEXT: v_mbcnt_hi_u32_b32 v4, exec_hi, v4
+; GFX9-NEXT: v_mov_b32_e32 v1, v0
; GFX9-NEXT: s_not_b64 exec, exec
-; GFX9-NEXT: v_mov_b32_e32 v2, 0
+; GFX9-NEXT: v_mov_b32_e32 v1, 0
; GFX9-NEXT: s_not_b64 exec, exec
; GFX9-NEXT: s_or_saveexec_b64 s[2:3], -1
-; GFX9-NEXT: v_add_u32_dpp v2, v2, v2 row_shr:1 row_mask:0xf bank_mask:0xf bound_ctrl:1
-; GFX9-NEXT: s_nop 1
-; GFX9-NEXT: v_add_u32_dpp v2, v2, v2 row_shr:2 row_mask:0xf bank_mask:0xf bound_ctrl:1
+; GFX9-NEXT: v_add_u32_dpp v1, v1, v1 row_shr:1 row_mask:0xf bank_mask:0xf bound_ctrl:1
+; GFX9-NEXT: v_mov_b32_e32 v2, 0
+; GFX9-NEXT: s_nop 0
+; GFX9-NEXT: v_add_u32_dpp v1, v1, v1 row_shr:2 row_mask:0xf bank_mask:0xf bound_ctrl:1
; GFX9-NEXT: s_nop 1
-; GFX9-NEXT: v_add_u32_dpp v2, v2, v2 row_shr:4 row_mask:0xf bank_mask:0xf bound_ctrl:1
+; GFX9-NEXT: v_add_u32_dpp v1, v1, v1 row_shr:4 row_mask:0xf bank_mask:0xf bound_ctrl:1
; GFX9-NEXT: s_nop 1
-; GFX9-NEXT: v_add_u32_dpp v2, v2, v2 row_shr:8 row_mask:0xf bank_mask:0xf bound_ctrl:1
+; GFX9-NEXT: v_add_u32_dpp v1, v1, v1 row_shr:8 row_mask:0xf bank_mask:0xf bound_ctrl:1
; GFX9-NEXT: s_nop 1
-; GFX9-NEXT: v_add_u32_dpp v2, v2, v2 row_bcast:15 row_mask:0xa bank_mask:0xf
+; GFX9-NEXT: v_add_u32_dpp v1, v1, v1 row_bcast:15 row_mask:0xa bank_mask:0xf
; GFX9-NEXT: s_nop 1
-; GFX9-NEXT: v_add_u32_dpp v2, v2, v2 row_bcast:31 row_mask:0xc bank_mask:0xf
-; GFX9-NEXT: v_readlane_b32 s4, v2, 63
+; GFX9-NEXT: v_add_u32_dpp v1, v1, v1 row_bcast:31 row_mask:0xc bank_mask:0xf
+; GFX9-NEXT: v_readlane_b32 s4, v1, 63
; GFX9-NEXT: s_nop 0
-; GFX9-NEXT: v_mov_b32_dpp v1, v2 wave_shr:1 row_mask:0xf bank_mask:0xf
+; GFX9-NEXT: v_mov_b32_dpp v2, v1 wave_shr:1 row_mask:0xf bank_mask:0xf
; GFX9-NEXT: s_mov_b64 exec, s[2:3]
-; GFX9-NEXT: v_cmp_eq_u32_e32 vcc, 0, v3
+; GFX9-NEXT: v_cmp_eq_u32_e32 vcc, 0, v4
; GFX9-NEXT: ; implicit-def: $vgpr0
; GFX9-NEXT: s_and_saveexec_b64 s[2:3], vcc
; GFX9-NEXT: s_cbranch_execz .LBB2_2
; GFX9-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x24
; GFX9-NEXT: s_waitcnt vmcnt(0)
; GFX9-NEXT: v_readfirstlane_b32 s2, v0
-; GFX9-NEXT: v_mov_b32_e32 v0, v1
-; GFX9-NEXT: v_mov_b32_e32 v3, 0
+; GFX9-NEXT: v_mov_b32_e32 v0, v2
; GFX9-NEXT: v_add_u32_e32 v0, s2, v0
; GFX9-NEXT: s_waitcnt lgkmcnt(0)
; GFX9-NEXT: global_store_dword v3, v0, s[0:1]
; GFX10W64-NEXT: v_readlane_b32 s6, v1, 47
; GFX10W64-NEXT: v_writelane_b32 v3, s5, 32
; GFX10W64-NEXT: s_mov_b64 exec, s[2:3]
-; GFX10W64-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
+; GFX10W64-NEXT: v_mbcnt_hi_u32_b32 v4, exec_hi, v0
+; GFX10W64-NEXT: v_mov_b32_e32 v0, 0
; GFX10W64-NEXT: s_or_saveexec_b64 s[2:3], -1
; GFX10W64-NEXT: v_writelane_b32 v3, s6, 48
; GFX10W64-NEXT: s_mov_b64 exec, s[2:3]
-; GFX10W64-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
-; GFX10W64-NEXT: ; implicit-def: $vgpr0
+; GFX10W64-NEXT: v_cmp_eq_u32_e32 vcc, 0, v4
+; GFX10W64-NEXT: ; implicit-def: $vgpr4
; GFX10W64-NEXT: s_and_saveexec_b64 s[2:3], vcc
; GFX10W64-NEXT: s_cbranch_execz .LBB2_2
; GFX10W64-NEXT: ; %bb.1:
; GFX10W64-NEXT: s_load_dwordx4 s[8:11], s[0:1], 0x34
-; GFX10W64-NEXT: v_mov_b32_e32 v0, s4
+; GFX10W64-NEXT: v_mov_b32_e32 v4, s4
; GFX10W64-NEXT: s_waitcnt lgkmcnt(0)
-; GFX10W64-NEXT: buffer_atomic_add v0, off, s[8:11], 0 glc
+; GFX10W64-NEXT: buffer_atomic_add v4, off, s[8:11], 0 glc
; GFX10W64-NEXT: .LBB2_2:
; GFX10W64-NEXT: s_waitcnt_depctr 0xffe3
; GFX10W64-NEXT: s_or_b64 exec, exec, s[2:3]
; GFX10W64-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x24
; GFX10W64-NEXT: s_waitcnt vmcnt(0)
-; GFX10W64-NEXT: v_readfirstlane_b32 s2, v0
-; GFX10W64-NEXT: v_mov_b32_e32 v0, v3
-; GFX10W64-NEXT: v_mov_b32_e32 v4, 0
-; GFX10W64-NEXT: v_add_nc_u32_e32 v0, s2, v0
+; GFX10W64-NEXT: v_readfirstlane_b32 s2, v4
+; GFX10W64-NEXT: v_mov_b32_e32 v4, v3
+; GFX10W64-NEXT: v_add_nc_u32_e32 v4, s2, v4
; GFX10W64-NEXT: s_waitcnt lgkmcnt(0)
-; GFX10W64-NEXT: global_store_dword v4, v0, s[0:1]
+; GFX10W64-NEXT: global_store_dword v0, v4, s[0:1]
; GFX10W64-NEXT: s_endpgm
;
; GFX10W32-LABEL: add_i32_varying_vdata:
; GFX10W32-NEXT: v_mov_b32_dpp v3, v1 row_shr:1 row_mask:0xf bank_mask:0xf
; GFX10W32-NEXT: v_readlane_b32 s3, v1, 15
; GFX10W32-NEXT: s_mov_b32 exec_lo, s2
-; GFX10W32-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX10W32-NEXT: v_mbcnt_lo_u32_b32 v4, exec_lo, 0
+; GFX10W32-NEXT: v_mov_b32_e32 v0, 0
; GFX10W32-NEXT: s_or_saveexec_b32 s2, -1
; GFX10W32-NEXT: v_writelane_b32 v3, s3, 16
; GFX10W32-NEXT: s_mov_b32 exec_lo, s2
-; GFX10W32-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v0
-; GFX10W32-NEXT: ; implicit-def: $vgpr0
+; GFX10W32-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v4
+; GFX10W32-NEXT: ; implicit-def: $vgpr4
; GFX10W32-NEXT: s_and_saveexec_b32 s2, vcc_lo
; GFX10W32-NEXT: s_cbranch_execz .LBB2_2
; GFX10W32-NEXT: ; %bb.1:
; GFX10W32-NEXT: s_mov_b32 s3, s4
; GFX10W32-NEXT: s_load_dwordx4 s[4:7], s[0:1], 0x34
-; GFX10W32-NEXT: v_mov_b32_e32 v0, s3
+; GFX10W32-NEXT: v_mov_b32_e32 v4, s3
; GFX10W32-NEXT: s_waitcnt lgkmcnt(0)
-; GFX10W32-NEXT: buffer_atomic_add v0, off, s[4:7], 0 glc
+; GFX10W32-NEXT: buffer_atomic_add v4, off, s[4:7], 0 glc
; GFX10W32-NEXT: .LBB2_2:
; GFX10W32-NEXT: s_waitcnt_depctr 0xffe3
; GFX10W32-NEXT: s_or_b32 exec_lo, exec_lo, s2
; GFX10W32-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x24
; GFX10W32-NEXT: s_waitcnt vmcnt(0)
-; GFX10W32-NEXT: v_readfirstlane_b32 s2, v0
-; GFX10W32-NEXT: v_mov_b32_e32 v0, v3
-; GFX10W32-NEXT: v_mov_b32_e32 v4, 0
-; GFX10W32-NEXT: v_add_nc_u32_e32 v0, s2, v0
+; GFX10W32-NEXT: v_readfirstlane_b32 s2, v4
+; GFX10W32-NEXT: v_mov_b32_e32 v4, v3
+; GFX10W32-NEXT: v_add_nc_u32_e32 v4, s2, v4
; GFX10W32-NEXT: s_waitcnt lgkmcnt(0)
-; GFX10W32-NEXT: global_store_dword v4, v0, s[0:1]
+; GFX10W32-NEXT: global_store_dword v0, v4, s[0:1]
; GFX10W32-NEXT: s_endpgm
;
; GFX11W64-LABEL: add_i32_varying_vdata:
; GFX11W64-NEXT: v_readlane_b32 s6, v1, 47
; GFX11W64-NEXT: v_writelane_b32 v3, s5, 32
; GFX11W64-NEXT: s_mov_b64 exec, s[2:3]
-; GFX11W64-NEXT: s_delay_alu instid0(SALU_CYCLE_1) | instskip(SKIP_3) | instid1(VALU_DEP_2)
-; GFX11W64-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
+; GFX11W64-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
+; GFX11W64-NEXT: v_mbcnt_hi_u32_b32 v4, exec_hi, v0
+; GFX11W64-NEXT: v_mov_b32_e32 v0, 0
; GFX11W64-NEXT: s_or_saveexec_b64 s[2:3], -1
; GFX11W64-NEXT: v_writelane_b32 v3, s6, 48
; GFX11W64-NEXT: s_mov_b64 exec, s[2:3]
-; GFX11W64-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
-; GFX11W64-NEXT: ; implicit-def: $vgpr0
+; GFX11W64-NEXT: v_cmp_eq_u32_e32 vcc, 0, v4
+; GFX11W64-NEXT: ; implicit-def: $vgpr4
; GFX11W64-NEXT: s_and_saveexec_b64 s[2:3], vcc
; GFX11W64-NEXT: s_cbranch_execz .LBB2_2
; GFX11W64-NEXT: ; %bb.1:
; GFX11W64-NEXT: s_load_b128 s[8:11], s[0:1], 0x34
-; GFX11W64-NEXT: v_mov_b32_e32 v0, s4
+; GFX11W64-NEXT: v_mov_b32_e32 v4, s4
; GFX11W64-NEXT: s_waitcnt lgkmcnt(0)
-; GFX11W64-NEXT: buffer_atomic_add_u32 v0, off, s[8:11], 0 glc
+; GFX11W64-NEXT: buffer_atomic_add_u32 v4, off, s[8:11], 0 glc
; GFX11W64-NEXT: .LBB2_2:
; GFX11W64-NEXT: s_or_b64 exec, exec, s[2:3]
; GFX11W64-NEXT: s_load_b64 s[0:1], s[0:1], 0x24
; GFX11W64-NEXT: s_waitcnt vmcnt(0)
-; GFX11W64-NEXT: v_readfirstlane_b32 s2, v0
-; GFX11W64-NEXT: v_mov_b32_e32 v0, v3
-; GFX11W64-NEXT: v_mov_b32_e32 v4, 0
-; GFX11W64-NEXT: s_delay_alu instid0(VALU_DEP_2)
-; GFX11W64-NEXT: v_add_nc_u32_e32 v0, s2, v0
+; GFX11W64-NEXT: v_readfirstlane_b32 s2, v4
+; GFX11W64-NEXT: v_mov_b32_e32 v4, v3
+; GFX11W64-NEXT: s_delay_alu instid0(VALU_DEP_1)
+; GFX11W64-NEXT: v_add_nc_u32_e32 v4, s2, v4
; GFX11W64-NEXT: s_waitcnt lgkmcnt(0)
-; GFX11W64-NEXT: global_store_b32 v4, v0, s[0:1]
+; GFX11W64-NEXT: global_store_b32 v0, v4, s[0:1]
; GFX11W64-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
; GFX11W64-NEXT: s_endpgm
;
; GFX11W32-NEXT: v_mov_b32_dpp v3, v1 row_shr:1 row_mask:0xf bank_mask:0xf
; GFX11W32-NEXT: v_readlane_b32 s3, v1, 15
; GFX11W32-NEXT: s_mov_b32 exec_lo, s2
-; GFX11W32-NEXT: s_delay_alu instid0(SALU_CYCLE_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
-; GFX11W32-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX11W32-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
+; GFX11W32-NEXT: v_mbcnt_lo_u32_b32 v4, exec_lo, 0
+; GFX11W32-NEXT: v_mov_b32_e32 v0, 0
; GFX11W32-NEXT: s_or_saveexec_b32 s2, -1
; GFX11W32-NEXT: v_writelane_b32 v3, s3, 16
; GFX11W32-NEXT: s_mov_b32 exec_lo, s2
-; GFX11W32-NEXT: s_delay_alu instid0(VALU_DEP_2)
-; GFX11W32-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v0
-; GFX11W32-NEXT: ; implicit-def: $vgpr0
+; GFX11W32-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v4
+; GFX11W32-NEXT: ; implicit-def: $vgpr4
; GFX11W32-NEXT: s_and_saveexec_b32 s2, vcc_lo
; GFX11W32-NEXT: s_cbranch_execz .LBB2_2
; GFX11W32-NEXT: ; %bb.1:
; GFX11W32-NEXT: s_mov_b32 s3, s4
; GFX11W32-NEXT: s_load_b128 s[4:7], s[0:1], 0x34
-; GFX11W32-NEXT: v_mov_b32_e32 v0, s3
+; GFX11W32-NEXT: v_mov_b32_e32 v4, s3
; GFX11W32-NEXT: s_waitcnt lgkmcnt(0)
-; GFX11W32-NEXT: buffer_atomic_add_u32 v0, off, s[4:7], 0 glc
+; GFX11W32-NEXT: buffer_atomic_add_u32 v4, off, s[4:7], 0 glc
; GFX11W32-NEXT: .LBB2_2:
; GFX11W32-NEXT: s_or_b32 exec_lo, exec_lo, s2
; GFX11W32-NEXT: s_load_b64 s[0:1], s[0:1], 0x24
; GFX11W32-NEXT: s_waitcnt vmcnt(0)
-; GFX11W32-NEXT: v_readfirstlane_b32 s2, v0
-; GFX11W32-NEXT: v_mov_b32_e32 v0, v3
-; GFX11W32-NEXT: v_mov_b32_e32 v4, 0
-; GFX11W32-NEXT: s_delay_alu instid0(VALU_DEP_2)
-; GFX11W32-NEXT: v_add_nc_u32_e32 v0, s2, v0
+; GFX11W32-NEXT: v_readfirstlane_b32 s2, v4
+; GFX11W32-NEXT: v_mov_b32_e32 v4, v3
+; GFX11W32-NEXT: s_delay_alu instid0(VALU_DEP_1)
+; GFX11W32-NEXT: v_add_nc_u32_e32 v4, s2, v4
; GFX11W32-NEXT: s_waitcnt lgkmcnt(0)
-; GFX11W32-NEXT: global_store_b32 v4, v0, s[0:1]
+; GFX11W32-NEXT: global_store_b32 v0, v4, s[0:1]
; GFX11W32-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
; GFX11W32-NEXT: s_endpgm
entry:
;
; GFX9-LABEL: struct_add_i32_varying_vdata:
; GFX9: ; %bb.0: ; %entry
-; GFX9-NEXT: s_or_saveexec_b64 s[2:3], -1
-; GFX9-NEXT: v_mov_b32_e32 v1, 0
-; GFX9-NEXT: s_mov_b64 exec, s[2:3]
-; GFX9-NEXT: v_mbcnt_lo_u32_b32 v3, exec_lo, 0
-; GFX9-NEXT: v_mbcnt_hi_u32_b32 v3, exec_hi, v3
-; GFX9-NEXT: v_mov_b32_e32 v2, v0
+; GFX9-NEXT: v_mov_b32_e32 v3, 0
+; GFX9-NEXT: v_mbcnt_lo_u32_b32 v4, exec_lo, 0
+; GFX9-NEXT: v_mbcnt_hi_u32_b32 v4, exec_hi, v4
+; GFX9-NEXT: v_mov_b32_e32 v1, v0
; GFX9-NEXT: s_not_b64 exec, exec
-; GFX9-NEXT: v_mov_b32_e32 v2, 0
+; GFX9-NEXT: v_mov_b32_e32 v1, 0
; GFX9-NEXT: s_not_b64 exec, exec
; GFX9-NEXT: s_or_saveexec_b64 s[2:3], -1
-; GFX9-NEXT: v_add_u32_dpp v2, v2, v2 row_shr:1 row_mask:0xf bank_mask:0xf bound_ctrl:1
-; GFX9-NEXT: s_nop 1
-; GFX9-NEXT: v_add_u32_dpp v2, v2, v2 row_shr:2 row_mask:0xf bank_mask:0xf bound_ctrl:1
+; GFX9-NEXT: v_add_u32_dpp v1, v1, v1 row_shr:1 row_mask:0xf bank_mask:0xf bound_ctrl:1
+; GFX9-NEXT: v_mov_b32_e32 v2, 0
+; GFX9-NEXT: s_nop 0
+; GFX9-NEXT: v_add_u32_dpp v1, v1, v1 row_shr:2 row_mask:0xf bank_mask:0xf bound_ctrl:1
; GFX9-NEXT: s_nop 1
-; GFX9-NEXT: v_add_u32_dpp v2, v2, v2 row_shr:4 row_mask:0xf bank_mask:0xf bound_ctrl:1
+; GFX9-NEXT: v_add_u32_dpp v1, v1, v1 row_shr:4 row_mask:0xf bank_mask:0xf bound_ctrl:1
; GFX9-NEXT: s_nop 1
-; GFX9-NEXT: v_add_u32_dpp v2, v2, v2 row_shr:8 row_mask:0xf bank_mask:0xf bound_ctrl:1
+; GFX9-NEXT: v_add_u32_dpp v1, v1, v1 row_shr:8 row_mask:0xf bank_mask:0xf bound_ctrl:1
; GFX9-NEXT: s_nop 1
-; GFX9-NEXT: v_add_u32_dpp v2, v2, v2 row_bcast:15 row_mask:0xa bank_mask:0xf
+; GFX9-NEXT: v_add_u32_dpp v1, v1, v1 row_bcast:15 row_mask:0xa bank_mask:0xf
; GFX9-NEXT: s_nop 1
-; GFX9-NEXT: v_add_u32_dpp v2, v2, v2 row_bcast:31 row_mask:0xc bank_mask:0xf
-; GFX9-NEXT: v_readlane_b32 s4, v2, 63
+; GFX9-NEXT: v_add_u32_dpp v1, v1, v1 row_bcast:31 row_mask:0xc bank_mask:0xf
+; GFX9-NEXT: v_readlane_b32 s4, v1, 63
; GFX9-NEXT: s_nop 0
-; GFX9-NEXT: v_mov_b32_dpp v1, v2 wave_shr:1 row_mask:0xf bank_mask:0xf
+; GFX9-NEXT: v_mov_b32_dpp v2, v1 wave_shr:1 row_mask:0xf bank_mask:0xf
; GFX9-NEXT: s_mov_b64 exec, s[2:3]
-; GFX9-NEXT: v_cmp_eq_u32_e32 vcc, 0, v3
+; GFX9-NEXT: v_cmp_eq_u32_e32 vcc, 0, v4
; GFX9-NEXT: ; implicit-def: $vgpr0
; GFX9-NEXT: s_and_saveexec_b64 s[2:3], vcc
; GFX9-NEXT: s_cbranch_execz .LBB3_2
; GFX9-NEXT: s_load_dwordx4 s[8:11], s[0:1], 0x34
; GFX9-NEXT: v_mov_b32_e32 v0, s4
; GFX9-NEXT: s_waitcnt lgkmcnt(0)
-; GFX9-NEXT: v_mov_b32_e32 v3, s5
-; GFX9-NEXT: buffer_atomic_add v0, v3, s[8:11], 0 idxen glc
+; GFX9-NEXT: v_mov_b32_e32 v4, s5
+; GFX9-NEXT: buffer_atomic_add v0, v4, s[8:11], 0 idxen glc
; GFX9-NEXT: .LBB3_2:
; GFX9-NEXT: s_or_b64 exec, exec, s[2:3]
; GFX9-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x24
; GFX9-NEXT: s_waitcnt vmcnt(0)
; GFX9-NEXT: v_readfirstlane_b32 s2, v0
-; GFX9-NEXT: v_mov_b32_e32 v0, v1
-; GFX9-NEXT: v_mov_b32_e32 v3, 0
+; GFX9-NEXT: v_mov_b32_e32 v0, v2
; GFX9-NEXT: v_add_u32_e32 v0, s2, v0
; GFX9-NEXT: s_waitcnt lgkmcnt(0)
; GFX9-NEXT: global_store_dword v3, v0, s[0:1]
; GFX10W64-NEXT: v_readlane_b32 s6, v1, 47
; GFX10W64-NEXT: v_writelane_b32 v3, s5, 32
; GFX10W64-NEXT: s_mov_b64 exec, s[2:3]
-; GFX10W64-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
+; GFX10W64-NEXT: v_mbcnt_hi_u32_b32 v4, exec_hi, v0
+; GFX10W64-NEXT: v_mov_b32_e32 v0, 0
; GFX10W64-NEXT: s_or_saveexec_b64 s[2:3], -1
; GFX10W64-NEXT: v_writelane_b32 v3, s6, 48
; GFX10W64-NEXT: s_mov_b64 exec, s[2:3]
-; GFX10W64-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
-; GFX10W64-NEXT: ; implicit-def: $vgpr0
+; GFX10W64-NEXT: v_cmp_eq_u32_e32 vcc, 0, v4
+; GFX10W64-NEXT: ; implicit-def: $vgpr4
; GFX10W64-NEXT: s_and_saveexec_b64 s[2:3], vcc
; GFX10W64-NEXT: s_cbranch_execz .LBB3_2
; GFX10W64-NEXT: ; %bb.1:
; GFX10W64-NEXT: s_clause 0x1
; GFX10W64-NEXT: s_load_dword s5, s[0:1], 0x44
; GFX10W64-NEXT: s_load_dwordx4 s[8:11], s[0:1], 0x34
-; GFX10W64-NEXT: v_mov_b32_e32 v0, s4
+; GFX10W64-NEXT: v_mov_b32_e32 v4, s4
; GFX10W64-NEXT: s_waitcnt lgkmcnt(0)
-; GFX10W64-NEXT: v_mov_b32_e32 v4, s5
-; GFX10W64-NEXT: buffer_atomic_add v0, v4, s[8:11], 0 idxen glc
+; GFX10W64-NEXT: v_mov_b32_e32 v5, s5
+; GFX10W64-NEXT: buffer_atomic_add v4, v5, s[8:11], 0 idxen glc
; GFX10W64-NEXT: .LBB3_2:
; GFX10W64-NEXT: s_waitcnt_depctr 0xffe3
; GFX10W64-NEXT: s_or_b64 exec, exec, s[2:3]
; GFX10W64-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x24
; GFX10W64-NEXT: s_waitcnt vmcnt(0)
-; GFX10W64-NEXT: v_readfirstlane_b32 s2, v0
-; GFX10W64-NEXT: v_mov_b32_e32 v0, v3
-; GFX10W64-NEXT: v_mov_b32_e32 v4, 0
-; GFX10W64-NEXT: v_add_nc_u32_e32 v0, s2, v0
+; GFX10W64-NEXT: v_readfirstlane_b32 s2, v4
+; GFX10W64-NEXT: v_mov_b32_e32 v4, v3
+; GFX10W64-NEXT: v_add_nc_u32_e32 v4, s2, v4
; GFX10W64-NEXT: s_waitcnt lgkmcnt(0)
-; GFX10W64-NEXT: global_store_dword v4, v0, s[0:1]
+; GFX10W64-NEXT: global_store_dword v0, v4, s[0:1]
; GFX10W64-NEXT: s_endpgm
;
; GFX10W32-LABEL: struct_add_i32_varying_vdata:
; GFX10W32-NEXT: v_mov_b32_dpp v3, v1 row_shr:1 row_mask:0xf bank_mask:0xf
; GFX10W32-NEXT: v_readlane_b32 s3, v1, 15
; GFX10W32-NEXT: s_mov_b32 exec_lo, s2
-; GFX10W32-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX10W32-NEXT: v_mbcnt_lo_u32_b32 v4, exec_lo, 0
+; GFX10W32-NEXT: v_mov_b32_e32 v0, 0
; GFX10W32-NEXT: s_or_saveexec_b32 s2, -1
; GFX10W32-NEXT: v_writelane_b32 v3, s3, 16
; GFX10W32-NEXT: s_mov_b32 exec_lo, s2
-; GFX10W32-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v0
-; GFX10W32-NEXT: ; implicit-def: $vgpr0
+; GFX10W32-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v4
+; GFX10W32-NEXT: ; implicit-def: $vgpr4
; GFX10W32-NEXT: s_and_saveexec_b32 s2, vcc_lo
; GFX10W32-NEXT: s_cbranch_execz .LBB3_2
; GFX10W32-NEXT: ; %bb.1:
; GFX10W32-NEXT: s_clause 0x1
; GFX10W32-NEXT: s_load_dword s8, s[0:1], 0x44
; GFX10W32-NEXT: s_load_dwordx4 s[4:7], s[0:1], 0x34
-; GFX10W32-NEXT: v_mov_b32_e32 v0, s3
+; GFX10W32-NEXT: v_mov_b32_e32 v4, s3
; GFX10W32-NEXT: s_waitcnt lgkmcnt(0)
-; GFX10W32-NEXT: v_mov_b32_e32 v4, s8
-; GFX10W32-NEXT: buffer_atomic_add v0, v4, s[4:7], 0 idxen glc
+; GFX10W32-NEXT: v_mov_b32_e32 v5, s8
+; GFX10W32-NEXT: buffer_atomic_add v4, v5, s[4:7], 0 idxen glc
; GFX10W32-NEXT: .LBB3_2:
; GFX10W32-NEXT: s_waitcnt_depctr 0xffe3
; GFX10W32-NEXT: s_or_b32 exec_lo, exec_lo, s2
; GFX10W32-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x24
; GFX10W32-NEXT: s_waitcnt vmcnt(0)
-; GFX10W32-NEXT: v_readfirstlane_b32 s2, v0
-; GFX10W32-NEXT: v_mov_b32_e32 v0, v3
-; GFX10W32-NEXT: v_mov_b32_e32 v4, 0
-; GFX10W32-NEXT: v_add_nc_u32_e32 v0, s2, v0
+; GFX10W32-NEXT: v_readfirstlane_b32 s2, v4
+; GFX10W32-NEXT: v_mov_b32_e32 v4, v3
+; GFX10W32-NEXT: v_add_nc_u32_e32 v4, s2, v4
; GFX10W32-NEXT: s_waitcnt lgkmcnt(0)
-; GFX10W32-NEXT: global_store_dword v4, v0, s[0:1]
+; GFX10W32-NEXT: global_store_dword v0, v4, s[0:1]
; GFX10W32-NEXT: s_endpgm
;
; GFX11W64-LABEL: struct_add_i32_varying_vdata:
; GFX11W64-NEXT: v_readlane_b32 s6, v1, 47
; GFX11W64-NEXT: v_writelane_b32 v3, s5, 32
; GFX11W64-NEXT: s_mov_b64 exec, s[2:3]
-; GFX11W64-NEXT: s_delay_alu instid0(SALU_CYCLE_1) | instskip(SKIP_3) | instid1(VALU_DEP_2)
-; GFX11W64-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
+; GFX11W64-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
+; GFX11W64-NEXT: v_mbcnt_hi_u32_b32 v4, exec_hi, v0
+; GFX11W64-NEXT: v_mov_b32_e32 v0, 0
; GFX11W64-NEXT: s_or_saveexec_b64 s[2:3], -1
; GFX11W64-NEXT: v_writelane_b32 v3, s6, 48
; GFX11W64-NEXT: s_mov_b64 exec, s[2:3]
-; GFX11W64-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
-; GFX11W64-NEXT: ; implicit-def: $vgpr0
+; GFX11W64-NEXT: v_cmp_eq_u32_e32 vcc, 0, v4
+; GFX11W64-NEXT: ; implicit-def: $vgpr4
; GFX11W64-NEXT: s_and_saveexec_b64 s[2:3], vcc
; GFX11W64-NEXT: s_cbranch_execz .LBB3_2
; GFX11W64-NEXT: ; %bb.1:
; GFX11W64-NEXT: s_clause 0x1
; GFX11W64-NEXT: s_load_b32 s5, s[0:1], 0x44
; GFX11W64-NEXT: s_load_b128 s[8:11], s[0:1], 0x34
-; GFX11W64-NEXT: v_mov_b32_e32 v0, s4
+; GFX11W64-NEXT: v_mov_b32_e32 v4, s4
; GFX11W64-NEXT: s_waitcnt lgkmcnt(0)
-; GFX11W64-NEXT: v_mov_b32_e32 v4, s5
-; GFX11W64-NEXT: buffer_atomic_add_u32 v0, v4, s[8:11], 0 idxen glc
+; GFX11W64-NEXT: v_mov_b32_e32 v5, s5
+; GFX11W64-NEXT: buffer_atomic_add_u32 v4, v5, s[8:11], 0 idxen glc
; GFX11W64-NEXT: .LBB3_2:
; GFX11W64-NEXT: s_or_b64 exec, exec, s[2:3]
; GFX11W64-NEXT: s_load_b64 s[0:1], s[0:1], 0x24
; GFX11W64-NEXT: s_waitcnt vmcnt(0)
-; GFX11W64-NEXT: v_readfirstlane_b32 s2, v0
-; GFX11W64-NEXT: v_mov_b32_e32 v0, v3
-; GFX11W64-NEXT: v_mov_b32_e32 v4, 0
-; GFX11W64-NEXT: s_delay_alu instid0(VALU_DEP_2)
-; GFX11W64-NEXT: v_add_nc_u32_e32 v0, s2, v0
+; GFX11W64-NEXT: v_readfirstlane_b32 s2, v4
+; GFX11W64-NEXT: v_mov_b32_e32 v4, v3
+; GFX11W64-NEXT: s_delay_alu instid0(VALU_DEP_1)
+; GFX11W64-NEXT: v_add_nc_u32_e32 v4, s2, v4
; GFX11W64-NEXT: s_waitcnt lgkmcnt(0)
-; GFX11W64-NEXT: global_store_b32 v4, v0, s[0:1]
+; GFX11W64-NEXT: global_store_b32 v0, v4, s[0:1]
; GFX11W64-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
; GFX11W64-NEXT: s_endpgm
;
; GFX11W32-NEXT: v_mov_b32_dpp v3, v1 row_shr:1 row_mask:0xf bank_mask:0xf
; GFX11W32-NEXT: v_readlane_b32 s3, v1, 15
; GFX11W32-NEXT: s_mov_b32 exec_lo, s2
-; GFX11W32-NEXT: s_delay_alu instid0(SALU_CYCLE_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
-; GFX11W32-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX11W32-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
+; GFX11W32-NEXT: v_mbcnt_lo_u32_b32 v4, exec_lo, 0
+; GFX11W32-NEXT: v_mov_b32_e32 v0, 0
; GFX11W32-NEXT: s_or_saveexec_b32 s2, -1
; GFX11W32-NEXT: v_writelane_b32 v3, s3, 16
; GFX11W32-NEXT: s_mov_b32 exec_lo, s2
-; GFX11W32-NEXT: s_delay_alu instid0(VALU_DEP_2)
-; GFX11W32-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v0
-; GFX11W32-NEXT: ; implicit-def: $vgpr0
+; GFX11W32-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v4
+; GFX11W32-NEXT: ; implicit-def: $vgpr4
; GFX11W32-NEXT: s_and_saveexec_b32 s2, vcc_lo
; GFX11W32-NEXT: s_cbranch_execz .LBB3_2
; GFX11W32-NEXT: ; %bb.1:
; GFX11W32-NEXT: s_clause 0x1
; GFX11W32-NEXT: s_load_b32 s8, s[0:1], 0x44
; GFX11W32-NEXT: s_load_b128 s[4:7], s[0:1], 0x34
-; GFX11W32-NEXT: v_mov_b32_e32 v0, s3
; GFX11W32-NEXT: s_waitcnt lgkmcnt(0)
-; GFX11W32-NEXT: v_mov_b32_e32 v4, s8
-; GFX11W32-NEXT: buffer_atomic_add_u32 v0, v4, s[4:7], 0 idxen glc
+; GFX11W32-NEXT: v_dual_mov_b32 v4, s3 :: v_dual_mov_b32 v5, s8
+; GFX11W32-NEXT: buffer_atomic_add_u32 v4, v5, s[4:7], 0 idxen glc
; GFX11W32-NEXT: .LBB3_2:
; GFX11W32-NEXT: s_or_b32 exec_lo, exec_lo, s2
; GFX11W32-NEXT: s_load_b64 s[0:1], s[0:1], 0x24
; GFX11W32-NEXT: s_waitcnt vmcnt(0)
-; GFX11W32-NEXT: v_readfirstlane_b32 s2, v0
-; GFX11W32-NEXT: v_mov_b32_e32 v0, v3
-; GFX11W32-NEXT: v_mov_b32_e32 v4, 0
-; GFX11W32-NEXT: s_delay_alu instid0(VALU_DEP_2)
-; GFX11W32-NEXT: v_add_nc_u32_e32 v0, s2, v0
+; GFX11W32-NEXT: v_readfirstlane_b32 s2, v4
+; GFX11W32-NEXT: v_mov_b32_e32 v4, v3
+; GFX11W32-NEXT: s_delay_alu instid0(VALU_DEP_1)
+; GFX11W32-NEXT: v_add_nc_u32_e32 v4, s2, v4
; GFX11W32-NEXT: s_waitcnt lgkmcnt(0)
-; GFX11W32-NEXT: global_store_b32 v4, v0, s[0:1]
+; GFX11W32-NEXT: global_store_b32 v0, v4, s[0:1]
; GFX11W32-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
; GFX11W32-NEXT: s_endpgm
entry:
;
; GFX9-LABEL: sub_i32_varying_vdata:
; GFX9: ; %bb.0: ; %entry
-; GFX9-NEXT: s_or_saveexec_b64 s[2:3], -1
-; GFX9-NEXT: v_mov_b32_e32 v1, 0
-; GFX9-NEXT: s_mov_b64 exec, s[2:3]
-; GFX9-NEXT: v_mbcnt_lo_u32_b32 v3, exec_lo, 0
-; GFX9-NEXT: v_mbcnt_hi_u32_b32 v3, exec_hi, v3
-; GFX9-NEXT: v_mov_b32_e32 v2, v0
+; GFX9-NEXT: v_mov_b32_e32 v3, 0
+; GFX9-NEXT: v_mbcnt_lo_u32_b32 v4, exec_lo, 0
+; GFX9-NEXT: v_mbcnt_hi_u32_b32 v4, exec_hi, v4
+; GFX9-NEXT: v_mov_b32_e32 v1, v0
; GFX9-NEXT: s_not_b64 exec, exec
-; GFX9-NEXT: v_mov_b32_e32 v2, 0
+; GFX9-NEXT: v_mov_b32_e32 v1, 0
; GFX9-NEXT: s_not_b64 exec, exec
; GFX9-NEXT: s_or_saveexec_b64 s[2:3], -1
-; GFX9-NEXT: v_add_u32_dpp v2, v2, v2 row_shr:1 row_mask:0xf bank_mask:0xf bound_ctrl:1
-; GFX9-NEXT: s_nop 1
-; GFX9-NEXT: v_add_u32_dpp v2, v2, v2 row_shr:2 row_mask:0xf bank_mask:0xf bound_ctrl:1
+; GFX9-NEXT: v_add_u32_dpp v1, v1, v1 row_shr:1 row_mask:0xf bank_mask:0xf bound_ctrl:1
+; GFX9-NEXT: v_mov_b32_e32 v2, 0
+; GFX9-NEXT: s_nop 0
+; GFX9-NEXT: v_add_u32_dpp v1, v1, v1 row_shr:2 row_mask:0xf bank_mask:0xf bound_ctrl:1
; GFX9-NEXT: s_nop 1
-; GFX9-NEXT: v_add_u32_dpp v2, v2, v2 row_shr:4 row_mask:0xf bank_mask:0xf bound_ctrl:1
+; GFX9-NEXT: v_add_u32_dpp v1, v1, v1 row_shr:4 row_mask:0xf bank_mask:0xf bound_ctrl:1
; GFX9-NEXT: s_nop 1
-; GFX9-NEXT: v_add_u32_dpp v2, v2, v2 row_shr:8 row_mask:0xf bank_mask:0xf bound_ctrl:1
+; GFX9-NEXT: v_add_u32_dpp v1, v1, v1 row_shr:8 row_mask:0xf bank_mask:0xf bound_ctrl:1
; GFX9-NEXT: s_nop 1
-; GFX9-NEXT: v_add_u32_dpp v2, v2, v2 row_bcast:15 row_mask:0xa bank_mask:0xf
+; GFX9-NEXT: v_add_u32_dpp v1, v1, v1 row_bcast:15 row_mask:0xa bank_mask:0xf
; GFX9-NEXT: s_nop 1
-; GFX9-NEXT: v_add_u32_dpp v2, v2, v2 row_bcast:31 row_mask:0xc bank_mask:0xf
-; GFX9-NEXT: v_readlane_b32 s4, v2, 63
+; GFX9-NEXT: v_add_u32_dpp v1, v1, v1 row_bcast:31 row_mask:0xc bank_mask:0xf
+; GFX9-NEXT: v_readlane_b32 s4, v1, 63
; GFX9-NEXT: s_nop 0
-; GFX9-NEXT: v_mov_b32_dpp v1, v2 wave_shr:1 row_mask:0xf bank_mask:0xf
+; GFX9-NEXT: v_mov_b32_dpp v2, v1 wave_shr:1 row_mask:0xf bank_mask:0xf
; GFX9-NEXT: s_mov_b64 exec, s[2:3]
-; GFX9-NEXT: v_cmp_eq_u32_e32 vcc, 0, v3
+; GFX9-NEXT: v_cmp_eq_u32_e32 vcc, 0, v4
; GFX9-NEXT: ; implicit-def: $vgpr0
; GFX9-NEXT: s_and_saveexec_b64 s[2:3], vcc
; GFX9-NEXT: s_cbranch_execz .LBB7_2
; GFX9-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x24
; GFX9-NEXT: s_waitcnt vmcnt(0)
; GFX9-NEXT: v_readfirstlane_b32 s2, v0
-; GFX9-NEXT: v_mov_b32_e32 v0, v1
-; GFX9-NEXT: v_mov_b32_e32 v3, 0
+; GFX9-NEXT: v_mov_b32_e32 v0, v2
; GFX9-NEXT: v_sub_u32_e32 v0, s2, v0
; GFX9-NEXT: s_waitcnt lgkmcnt(0)
; GFX9-NEXT: global_store_dword v3, v0, s[0:1]
; GFX10W64-NEXT: v_readlane_b32 s6, v1, 47
; GFX10W64-NEXT: v_writelane_b32 v3, s5, 32
; GFX10W64-NEXT: s_mov_b64 exec, s[2:3]
-; GFX10W64-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
+; GFX10W64-NEXT: v_mbcnt_hi_u32_b32 v4, exec_hi, v0
+; GFX10W64-NEXT: v_mov_b32_e32 v0, 0
; GFX10W64-NEXT: s_or_saveexec_b64 s[2:3], -1
; GFX10W64-NEXT: v_writelane_b32 v3, s6, 48
; GFX10W64-NEXT: s_mov_b64 exec, s[2:3]
-; GFX10W64-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
-; GFX10W64-NEXT: ; implicit-def: $vgpr0
+; GFX10W64-NEXT: v_cmp_eq_u32_e32 vcc, 0, v4
+; GFX10W64-NEXT: ; implicit-def: $vgpr4
; GFX10W64-NEXT: s_and_saveexec_b64 s[2:3], vcc
; GFX10W64-NEXT: s_cbranch_execz .LBB7_2
; GFX10W64-NEXT: ; %bb.1:
; GFX10W64-NEXT: s_load_dwordx4 s[8:11], s[0:1], 0x34
-; GFX10W64-NEXT: v_mov_b32_e32 v0, s4
+; GFX10W64-NEXT: v_mov_b32_e32 v4, s4
; GFX10W64-NEXT: s_waitcnt lgkmcnt(0)
-; GFX10W64-NEXT: buffer_atomic_sub v0, off, s[8:11], 0 glc
+; GFX10W64-NEXT: buffer_atomic_sub v4, off, s[8:11], 0 glc
; GFX10W64-NEXT: .LBB7_2:
; GFX10W64-NEXT: s_waitcnt_depctr 0xffe3
; GFX10W64-NEXT: s_or_b64 exec, exec, s[2:3]
; GFX10W64-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x24
; GFX10W64-NEXT: s_waitcnt vmcnt(0)
-; GFX10W64-NEXT: v_readfirstlane_b32 s2, v0
-; GFX10W64-NEXT: v_mov_b32_e32 v0, v3
-; GFX10W64-NEXT: v_mov_b32_e32 v4, 0
-; GFX10W64-NEXT: v_sub_nc_u32_e32 v0, s2, v0
+; GFX10W64-NEXT: v_readfirstlane_b32 s2, v4
+; GFX10W64-NEXT: v_mov_b32_e32 v4, v3
+; GFX10W64-NEXT: v_sub_nc_u32_e32 v4, s2, v4
; GFX10W64-NEXT: s_waitcnt lgkmcnt(0)
-; GFX10W64-NEXT: global_store_dword v4, v0, s[0:1]
+; GFX10W64-NEXT: global_store_dword v0, v4, s[0:1]
; GFX10W64-NEXT: s_endpgm
;
; GFX10W32-LABEL: sub_i32_varying_vdata:
; GFX10W32-NEXT: v_mov_b32_dpp v3, v1 row_shr:1 row_mask:0xf bank_mask:0xf
; GFX10W32-NEXT: v_readlane_b32 s3, v1, 15
; GFX10W32-NEXT: s_mov_b32 exec_lo, s2
-; GFX10W32-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX10W32-NEXT: v_mbcnt_lo_u32_b32 v4, exec_lo, 0
+; GFX10W32-NEXT: v_mov_b32_e32 v0, 0
; GFX10W32-NEXT: s_or_saveexec_b32 s2, -1
; GFX10W32-NEXT: v_writelane_b32 v3, s3, 16
; GFX10W32-NEXT: s_mov_b32 exec_lo, s2
-; GFX10W32-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v0
-; GFX10W32-NEXT: ; implicit-def: $vgpr0
+; GFX10W32-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v4
+; GFX10W32-NEXT: ; implicit-def: $vgpr4
; GFX10W32-NEXT: s_and_saveexec_b32 s2, vcc_lo
; GFX10W32-NEXT: s_cbranch_execz .LBB7_2
; GFX10W32-NEXT: ; %bb.1:
; GFX10W32-NEXT: s_mov_b32 s3, s4
; GFX10W32-NEXT: s_load_dwordx4 s[4:7], s[0:1], 0x34
-; GFX10W32-NEXT: v_mov_b32_e32 v0, s3
+; GFX10W32-NEXT: v_mov_b32_e32 v4, s3
; GFX10W32-NEXT: s_waitcnt lgkmcnt(0)
-; GFX10W32-NEXT: buffer_atomic_sub v0, off, s[4:7], 0 glc
+; GFX10W32-NEXT: buffer_atomic_sub v4, off, s[4:7], 0 glc
; GFX10W32-NEXT: .LBB7_2:
; GFX10W32-NEXT: s_waitcnt_depctr 0xffe3
; GFX10W32-NEXT: s_or_b32 exec_lo, exec_lo, s2
; GFX10W32-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x24
; GFX10W32-NEXT: s_waitcnt vmcnt(0)
-; GFX10W32-NEXT: v_readfirstlane_b32 s2, v0
-; GFX10W32-NEXT: v_mov_b32_e32 v0, v3
-; GFX10W32-NEXT: v_mov_b32_e32 v4, 0
-; GFX10W32-NEXT: v_sub_nc_u32_e32 v0, s2, v0
+; GFX10W32-NEXT: v_readfirstlane_b32 s2, v4
+; GFX10W32-NEXT: v_mov_b32_e32 v4, v3
+; GFX10W32-NEXT: v_sub_nc_u32_e32 v4, s2, v4
; GFX10W32-NEXT: s_waitcnt lgkmcnt(0)
-; GFX10W32-NEXT: global_store_dword v4, v0, s[0:1]
+; GFX10W32-NEXT: global_store_dword v0, v4, s[0:1]
; GFX10W32-NEXT: s_endpgm
;
; GFX11W64-LABEL: sub_i32_varying_vdata:
; GFX11W64-NEXT: v_readlane_b32 s6, v1, 47
; GFX11W64-NEXT: v_writelane_b32 v3, s5, 32
; GFX11W64-NEXT: s_mov_b64 exec, s[2:3]
-; GFX11W64-NEXT: s_delay_alu instid0(SALU_CYCLE_1) | instskip(SKIP_3) | instid1(VALU_DEP_2)
-; GFX11W64-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
+; GFX11W64-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
+; GFX11W64-NEXT: v_mbcnt_hi_u32_b32 v4, exec_hi, v0
+; GFX11W64-NEXT: v_mov_b32_e32 v0, 0
; GFX11W64-NEXT: s_or_saveexec_b64 s[2:3], -1
; GFX11W64-NEXT: v_writelane_b32 v3, s6, 48
; GFX11W64-NEXT: s_mov_b64 exec, s[2:3]
-; GFX11W64-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
-; GFX11W64-NEXT: ; implicit-def: $vgpr0
+; GFX11W64-NEXT: v_cmp_eq_u32_e32 vcc, 0, v4
+; GFX11W64-NEXT: ; implicit-def: $vgpr4
; GFX11W64-NEXT: s_and_saveexec_b64 s[2:3], vcc
; GFX11W64-NEXT: s_cbranch_execz .LBB7_2
; GFX11W64-NEXT: ; %bb.1:
; GFX11W64-NEXT: s_load_b128 s[8:11], s[0:1], 0x34
-; GFX11W64-NEXT: v_mov_b32_e32 v0, s4
+; GFX11W64-NEXT: v_mov_b32_e32 v4, s4
; GFX11W64-NEXT: s_waitcnt lgkmcnt(0)
-; GFX11W64-NEXT: buffer_atomic_sub_u32 v0, off, s[8:11], 0 glc
+; GFX11W64-NEXT: buffer_atomic_sub_u32 v4, off, s[8:11], 0 glc
; GFX11W64-NEXT: .LBB7_2:
; GFX11W64-NEXT: s_or_b64 exec, exec, s[2:3]
; GFX11W64-NEXT: s_load_b64 s[0:1], s[0:1], 0x24
; GFX11W64-NEXT: s_waitcnt vmcnt(0)
-; GFX11W64-NEXT: v_readfirstlane_b32 s2, v0
-; GFX11W64-NEXT: v_mov_b32_e32 v0, v3
-; GFX11W64-NEXT: v_mov_b32_e32 v4, 0
-; GFX11W64-NEXT: s_delay_alu instid0(VALU_DEP_2)
-; GFX11W64-NEXT: v_sub_nc_u32_e32 v0, s2, v0
+; GFX11W64-NEXT: v_readfirstlane_b32 s2, v4
+; GFX11W64-NEXT: v_mov_b32_e32 v4, v3
+; GFX11W64-NEXT: s_delay_alu instid0(VALU_DEP_1)
+; GFX11W64-NEXT: v_sub_nc_u32_e32 v4, s2, v4
; GFX11W64-NEXT: s_waitcnt lgkmcnt(0)
-; GFX11W64-NEXT: global_store_b32 v4, v0, s[0:1]
+; GFX11W64-NEXT: global_store_b32 v0, v4, s[0:1]
; GFX11W64-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
; GFX11W64-NEXT: s_endpgm
;
; GFX11W32-NEXT: v_mov_b32_dpp v3, v1 row_shr:1 row_mask:0xf bank_mask:0xf
; GFX11W32-NEXT: v_readlane_b32 s3, v1, 15
; GFX11W32-NEXT: s_mov_b32 exec_lo, s2
-; GFX11W32-NEXT: s_delay_alu instid0(SALU_CYCLE_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
-; GFX11W32-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX11W32-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
+; GFX11W32-NEXT: v_mbcnt_lo_u32_b32 v4, exec_lo, 0
+; GFX11W32-NEXT: v_mov_b32_e32 v0, 0
; GFX11W32-NEXT: s_or_saveexec_b32 s2, -1
; GFX11W32-NEXT: v_writelane_b32 v3, s3, 16
; GFX11W32-NEXT: s_mov_b32 exec_lo, s2
-; GFX11W32-NEXT: s_delay_alu instid0(VALU_DEP_2)
-; GFX11W32-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v0
-; GFX11W32-NEXT: ; implicit-def: $vgpr0
+; GFX11W32-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v4
+; GFX11W32-NEXT: ; implicit-def: $vgpr4
; GFX11W32-NEXT: s_and_saveexec_b32 s2, vcc_lo
; GFX11W32-NEXT: s_cbranch_execz .LBB7_2
; GFX11W32-NEXT: ; %bb.1:
; GFX11W32-NEXT: s_mov_b32 s3, s4
; GFX11W32-NEXT: s_load_b128 s[4:7], s[0:1], 0x34
-; GFX11W32-NEXT: v_mov_b32_e32 v0, s3
+; GFX11W32-NEXT: v_mov_b32_e32 v4, s3
; GFX11W32-NEXT: s_waitcnt lgkmcnt(0)
-; GFX11W32-NEXT: buffer_atomic_sub_u32 v0, off, s[4:7], 0 glc
+; GFX11W32-NEXT: buffer_atomic_sub_u32 v4, off, s[4:7], 0 glc
; GFX11W32-NEXT: .LBB7_2:
; GFX11W32-NEXT: s_or_b32 exec_lo, exec_lo, s2
; GFX11W32-NEXT: s_load_b64 s[0:1], s[0:1], 0x24
; GFX11W32-NEXT: s_waitcnt vmcnt(0)
-; GFX11W32-NEXT: v_readfirstlane_b32 s2, v0
-; GFX11W32-NEXT: v_mov_b32_e32 v0, v3
-; GFX11W32-NEXT: v_mov_b32_e32 v4, 0
-; GFX11W32-NEXT: s_delay_alu instid0(VALU_DEP_2)
-; GFX11W32-NEXT: v_sub_nc_u32_e32 v0, s2, v0
+; GFX11W32-NEXT: v_readfirstlane_b32 s2, v4
+; GFX11W32-NEXT: v_mov_b32_e32 v4, v3
+; GFX11W32-NEXT: s_delay_alu instid0(VALU_DEP_1)
+; GFX11W32-NEXT: v_sub_nc_u32_e32 v4, s2, v4
; GFX11W32-NEXT: s_waitcnt lgkmcnt(0)
-; GFX11W32-NEXT: global_store_b32 v4, v0, s[0:1]
+; GFX11W32-NEXT: global_store_b32 v0, v4, s[0:1]
; GFX11W32-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
; GFX11W32-NEXT: s_endpgm
entry:
;
; GFX8-LABEL: add_i32_varying:
; GFX8: ; %bb.0: ; %entry
-; GFX8-NEXT: s_or_saveexec_b64 s[2:3], -1
-; GFX8-NEXT: v_mov_b32_e32 v1, 0
-; GFX8-NEXT: s_mov_b64 exec, s[2:3]
-; GFX8-NEXT: v_mbcnt_lo_u32_b32 v3, exec_lo, 0
-; GFX8-NEXT: v_mbcnt_hi_u32_b32 v3, exec_hi, v3
-; GFX8-NEXT: v_mov_b32_e32 v2, v0
+; GFX8-NEXT: v_mov_b32_e32 v3, 0
+; GFX8-NEXT: v_mbcnt_lo_u32_b32 v4, exec_lo, 0
+; GFX8-NEXT: v_mbcnt_hi_u32_b32 v4, exec_hi, v4
+; GFX8-NEXT: v_mov_b32_e32 v1, v0
; GFX8-NEXT: s_not_b64 exec, exec
-; GFX8-NEXT: v_mov_b32_e32 v2, 0
+; GFX8-NEXT: v_mov_b32_e32 v1, 0
; GFX8-NEXT: s_not_b64 exec, exec
; GFX8-NEXT: s_or_saveexec_b64 s[2:3], -1
-; GFX8-NEXT: v_add_u32_dpp v2, vcc, v2, v2 row_shr:1 row_mask:0xf bank_mask:0xf bound_ctrl:1
-; GFX8-NEXT: s_nop 1
-; GFX8-NEXT: v_add_u32_dpp v2, vcc, v2, v2 row_shr:2 row_mask:0xf bank_mask:0xf bound_ctrl:1
+; GFX8-NEXT: v_add_u32_dpp v1, vcc, v1, v1 row_shr:1 row_mask:0xf bank_mask:0xf bound_ctrl:1
+; GFX8-NEXT: v_mov_b32_e32 v2, 0
+; GFX8-NEXT: s_nop 0
+; GFX8-NEXT: v_add_u32_dpp v1, vcc, v1, v1 row_shr:2 row_mask:0xf bank_mask:0xf bound_ctrl:1
; GFX8-NEXT: s_nop 1
-; GFX8-NEXT: v_add_u32_dpp v2, vcc, v2, v2 row_shr:4 row_mask:0xf bank_mask:0xf bound_ctrl:1
+; GFX8-NEXT: v_add_u32_dpp v1, vcc, v1, v1 row_shr:4 row_mask:0xf bank_mask:0xf bound_ctrl:1
; GFX8-NEXT: s_nop 1
-; GFX8-NEXT: v_add_u32_dpp v2, vcc, v2, v2 row_shr:8 row_mask:0xf bank_mask:0xf bound_ctrl:1
+; GFX8-NEXT: v_add_u32_dpp v1, vcc, v1, v1 row_shr:8 row_mask:0xf bank_mask:0xf bound_ctrl:1
; GFX8-NEXT: s_nop 1
-; GFX8-NEXT: v_add_u32_dpp v2, vcc, v2, v2 row_bcast:15 row_mask:0xa bank_mask:0xf
+; GFX8-NEXT: v_add_u32_dpp v1, vcc, v1, v1 row_bcast:15 row_mask:0xa bank_mask:0xf
; GFX8-NEXT: s_nop 1
-; GFX8-NEXT: v_add_u32_dpp v2, vcc, v2, v2 row_bcast:31 row_mask:0xc bank_mask:0xf
-; GFX8-NEXT: v_readlane_b32 s4, v2, 63
+; GFX8-NEXT: v_add_u32_dpp v1, vcc, v1, v1 row_bcast:31 row_mask:0xc bank_mask:0xf
+; GFX8-NEXT: v_readlane_b32 s4, v1, 63
; GFX8-NEXT: s_nop 0
-; GFX8-NEXT: v_mov_b32_dpp v1, v2 wave_shr:1 row_mask:0xf bank_mask:0xf
+; GFX8-NEXT: v_mov_b32_dpp v2, v1 wave_shr:1 row_mask:0xf bank_mask:0xf
; GFX8-NEXT: s_mov_b64 exec, s[2:3]
-; GFX8-NEXT: v_cmp_eq_u32_e32 vcc, 0, v3
+; GFX8-NEXT: v_cmp_eq_u32_e32 vcc, 0, v4
; GFX8-NEXT: ; implicit-def: $vgpr0
; GFX8-NEXT: s_and_saveexec_b64 s[2:3], vcc
; GFX8-NEXT: s_cbranch_execz .LBB2_2
; GFX8-NEXT: ; %bb.1:
-; GFX8-NEXT: v_mov_b32_e32 v0, 0
-; GFX8-NEXT: v_mov_b32_e32 v3, s4
+; GFX8-NEXT: v_mov_b32_e32 v0, s4
; GFX8-NEXT: s_mov_b32 m0, -1
; GFX8-NEXT: s_waitcnt lgkmcnt(0)
-; GFX8-NEXT: ds_add_rtn_u32 v0, v0, v3
+; GFX8-NEXT: ds_add_rtn_u32 v0, v3, v0
; GFX8-NEXT: s_waitcnt lgkmcnt(0)
; GFX8-NEXT: .LBB2_2:
; GFX8-NEXT: s_or_b64 exec, exec, s[2:3]
; GFX8-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x24
; GFX8-NEXT: s_waitcnt lgkmcnt(0)
; GFX8-NEXT: v_readfirstlane_b32 s4, v0
-; GFX8-NEXT: v_mov_b32_e32 v0, v1
+; GFX8-NEXT: v_mov_b32_e32 v0, v2
; GFX8-NEXT: s_mov_b32 s3, 0xf000
; GFX8-NEXT: s_mov_b32 s2, -1
; GFX8-NEXT: v_add_u32_e32 v0, vcc, s4, v0
;
; GFX9-LABEL: add_i32_varying:
; GFX9: ; %bb.0: ; %entry
-; GFX9-NEXT: s_or_saveexec_b64 s[2:3], -1
-; GFX9-NEXT: v_mov_b32_e32 v1, 0
-; GFX9-NEXT: s_mov_b64 exec, s[2:3]
-; GFX9-NEXT: v_mbcnt_lo_u32_b32 v3, exec_lo, 0
-; GFX9-NEXT: v_mbcnt_hi_u32_b32 v3, exec_hi, v3
-; GFX9-NEXT: v_mov_b32_e32 v2, v0
+; GFX9-NEXT: v_mov_b32_e32 v3, 0
+; GFX9-NEXT: v_mbcnt_lo_u32_b32 v4, exec_lo, 0
+; GFX9-NEXT: v_mbcnt_hi_u32_b32 v4, exec_hi, v4
+; GFX9-NEXT: v_mov_b32_e32 v1, v0
; GFX9-NEXT: s_not_b64 exec, exec
-; GFX9-NEXT: v_mov_b32_e32 v2, 0
+; GFX9-NEXT: v_mov_b32_e32 v1, 0
; GFX9-NEXT: s_not_b64 exec, exec
; GFX9-NEXT: s_or_saveexec_b64 s[2:3], -1
-; GFX9-NEXT: v_add_u32_dpp v2, v2, v2 row_shr:1 row_mask:0xf bank_mask:0xf bound_ctrl:1
-; GFX9-NEXT: s_nop 1
-; GFX9-NEXT: v_add_u32_dpp v2, v2, v2 row_shr:2 row_mask:0xf bank_mask:0xf bound_ctrl:1
+; GFX9-NEXT: v_add_u32_dpp v1, v1, v1 row_shr:1 row_mask:0xf bank_mask:0xf bound_ctrl:1
+; GFX9-NEXT: v_mov_b32_e32 v2, 0
+; GFX9-NEXT: s_nop 0
+; GFX9-NEXT: v_add_u32_dpp v1, v1, v1 row_shr:2 row_mask:0xf bank_mask:0xf bound_ctrl:1
; GFX9-NEXT: s_nop 1
-; GFX9-NEXT: v_add_u32_dpp v2, v2, v2 row_shr:4 row_mask:0xf bank_mask:0xf bound_ctrl:1
+; GFX9-NEXT: v_add_u32_dpp v1, v1, v1 row_shr:4 row_mask:0xf bank_mask:0xf bound_ctrl:1
; GFX9-NEXT: s_nop 1
-; GFX9-NEXT: v_add_u32_dpp v2, v2, v2 row_shr:8 row_mask:0xf bank_mask:0xf bound_ctrl:1
+; GFX9-NEXT: v_add_u32_dpp v1, v1, v1 row_shr:8 row_mask:0xf bank_mask:0xf bound_ctrl:1
; GFX9-NEXT: s_nop 1
-; GFX9-NEXT: v_add_u32_dpp v2, v2, v2 row_bcast:15 row_mask:0xa bank_mask:0xf
+; GFX9-NEXT: v_add_u32_dpp v1, v1, v1 row_bcast:15 row_mask:0xa bank_mask:0xf
; GFX9-NEXT: s_nop 1
-; GFX9-NEXT: v_add_u32_dpp v2, v2, v2 row_bcast:31 row_mask:0xc bank_mask:0xf
-; GFX9-NEXT: v_readlane_b32 s4, v2, 63
+; GFX9-NEXT: v_add_u32_dpp v1, v1, v1 row_bcast:31 row_mask:0xc bank_mask:0xf
+; GFX9-NEXT: v_readlane_b32 s4, v1, 63
; GFX9-NEXT: s_nop 0
-; GFX9-NEXT: v_mov_b32_dpp v1, v2 wave_shr:1 row_mask:0xf bank_mask:0xf
+; GFX9-NEXT: v_mov_b32_dpp v2, v1 wave_shr:1 row_mask:0xf bank_mask:0xf
; GFX9-NEXT: s_mov_b64 exec, s[2:3]
-; GFX9-NEXT: v_cmp_eq_u32_e32 vcc, 0, v3
+; GFX9-NEXT: v_cmp_eq_u32_e32 vcc, 0, v4
; GFX9-NEXT: ; implicit-def: $vgpr0
; GFX9-NEXT: s_and_saveexec_b64 s[2:3], vcc
; GFX9-NEXT: s_cbranch_execz .LBB2_2
; GFX9-NEXT: ; %bb.1:
-; GFX9-NEXT: v_mov_b32_e32 v0, 0
-; GFX9-NEXT: v_mov_b32_e32 v3, s4
+; GFX9-NEXT: v_mov_b32_e32 v0, s4
; GFX9-NEXT: s_waitcnt lgkmcnt(0)
-; GFX9-NEXT: ds_add_rtn_u32 v0, v0, v3
+; GFX9-NEXT: ds_add_rtn_u32 v0, v3, v0
; GFX9-NEXT: s_waitcnt lgkmcnt(0)
; GFX9-NEXT: .LBB2_2:
; GFX9-NEXT: s_or_b64 exec, exec, s[2:3]
; GFX9-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x24
; GFX9-NEXT: s_waitcnt lgkmcnt(0)
; GFX9-NEXT: v_readfirstlane_b32 s4, v0
-; GFX9-NEXT: v_mov_b32_e32 v0, v1
+; GFX9-NEXT: v_mov_b32_e32 v0, v2
; GFX9-NEXT: s_mov_b32 s3, 0xf000
; GFX9-NEXT: s_mov_b32 s2, -1
; GFX9-NEXT: v_add_u32_e32 v0, s4, v0
; GFX1064-NEXT: v_writelane_b32 v3, s5, 32
; GFX1064-NEXT: s_mov_b64 exec, s[2:3]
; GFX1064-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
+; GFX1064-NEXT: v_mov_b32_e32 v4, 0
; GFX1064-NEXT: s_or_saveexec_b64 s[4:5], -1
; GFX1064-NEXT: v_writelane_b32 v3, s6, 48
; GFX1064-NEXT: s_mov_b64 exec, s[4:5]
; GFX1064-NEXT: s_and_saveexec_b64 s[4:5], vcc
; GFX1064-NEXT: s_cbranch_execz .LBB2_2
; GFX1064-NEXT: ; %bb.1:
-; GFX1064-NEXT: v_mov_b32_e32 v0, 0
-; GFX1064-NEXT: v_mov_b32_e32 v4, s7
+; GFX1064-NEXT: v_mov_b32_e32 v0, s7
; GFX1064-NEXT: s_mov_b32 s3, s7
; GFX1064-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
; GFX1064-NEXT: s_waitcnt_vscnt null, 0x0
-; GFX1064-NEXT: ds_add_rtn_u32 v0, v0, v4
+; GFX1064-NEXT: ds_add_rtn_u32 v0, v4, v0
; GFX1064-NEXT: s_waitcnt lgkmcnt(0)
; GFX1064-NEXT: buffer_gl0_inv
; GFX1064-NEXT: .LBB2_2:
; GFX1032-NEXT: v_mov_b32_dpp v3, v1 row_shr:1 row_mask:0xf bank_mask:0xf
; GFX1032-NEXT: s_mov_b32 exec_lo, s2
; GFX1032-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX1032-NEXT: v_mov_b32_e32 v4, 0
; GFX1032-NEXT: s_or_saveexec_b32 s2, -1
; GFX1032-NEXT: v_writelane_b32 v3, s3, 16
; GFX1032-NEXT: s_mov_b32 exec_lo, s2
; GFX1032-NEXT: s_and_saveexec_b32 s3, vcc_lo
; GFX1032-NEXT: s_cbranch_execz .LBB2_2
; GFX1032-NEXT: ; %bb.1:
-; GFX1032-NEXT: v_mov_b32_e32 v0, 0
-; GFX1032-NEXT: v_mov_b32_e32 v4, s4
+; GFX1032-NEXT: v_mov_b32_e32 v0, s4
; GFX1032-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
; GFX1032-NEXT: s_waitcnt_vscnt null, 0x0
-; GFX1032-NEXT: ds_add_rtn_u32 v0, v0, v4
+; GFX1032-NEXT: ds_add_rtn_u32 v0, v4, v0
; GFX1032-NEXT: s_waitcnt lgkmcnt(0)
; GFX1032-NEXT: buffer_gl0_inv
; GFX1032-NEXT: .LBB2_2:
; GFX1164-NEXT: v_readlane_b32 s6, v1, 47
; GFX1164-NEXT: v_writelane_b32 v3, s5, 32
; GFX1164-NEXT: s_mov_b64 exec, s[2:3]
-; GFX1164-NEXT: s_delay_alu instid0(SALU_CYCLE_1) | instskip(SKIP_3) | instid1(VALU_DEP_2)
+; GFX1164-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
; GFX1164-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
+; GFX1164-NEXT: v_mov_b32_e32 v4, 0
; GFX1164-NEXT: s_or_saveexec_b64 s[4:5], -1
; GFX1164-NEXT: v_writelane_b32 v3, s6, 48
; GFX1164-NEXT: s_mov_b64 exec, s[4:5]
; GFX1164-NEXT: s_and_saveexec_b64 s[4:5], vcc
; GFX1164-NEXT: s_cbranch_execz .LBB2_2
; GFX1164-NEXT: ; %bb.1:
-; GFX1164-NEXT: v_mov_b32_e32 v0, 0
-; GFX1164-NEXT: v_mov_b32_e32 v4, s7
+; GFX1164-NEXT: v_mov_b32_e32 v0, s7
; GFX1164-NEXT: s_mov_b32 s3, s7
; GFX1164-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
; GFX1164-NEXT: s_waitcnt_vscnt null, 0x0
-; GFX1164-NEXT: ds_add_rtn_u32 v0, v0, v4
+; GFX1164-NEXT: ds_add_rtn_u32 v0, v4, v0
; GFX1164-NEXT: s_waitcnt lgkmcnt(0)
; GFX1164-NEXT: buffer_gl0_inv
; GFX1164-NEXT: .LBB2_2:
; GFX1132-NEXT: v_readlane_b32 s4, v1, 31
; GFX1132-NEXT: v_mov_b32_dpp v3, v1 row_shr:1 row_mask:0xf bank_mask:0xf
; GFX1132-NEXT: s_mov_b32 exec_lo, s2
-; GFX1132-NEXT: s_delay_alu instid0(SALU_CYCLE_1) | instskip(SKIP_3) | instid1(VALU_DEP_2)
+; GFX1132-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
; GFX1132-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX1132-NEXT: v_mov_b32_e32 v4, 0
; GFX1132-NEXT: s_or_saveexec_b32 s2, -1
; GFX1132-NEXT: v_writelane_b32 v3, s3, 16
; GFX1132-NEXT: s_mov_b32 exec_lo, s2
; GFX1132-NEXT: s_and_saveexec_b32 s3, vcc_lo
; GFX1132-NEXT: s_cbranch_execz .LBB2_2
; GFX1132-NEXT: ; %bb.1:
-; GFX1132-NEXT: v_mov_b32_e32 v0, 0
-; GFX1132-NEXT: v_mov_b32_e32 v4, s4
+; GFX1132-NEXT: v_mov_b32_e32 v0, s4
; GFX1132-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
; GFX1132-NEXT: s_waitcnt_vscnt null, 0x0
-; GFX1132-NEXT: ds_add_rtn_u32 v0, v0, v4
+; GFX1132-NEXT: ds_add_rtn_u32 v0, v4, v0
; GFX1132-NEXT: s_waitcnt lgkmcnt(0)
; GFX1132-NEXT: buffer_gl0_inv
; GFX1132-NEXT: .LBB2_2:
;
; GFX8-LABEL: add_i32_varying_nouse:
; GFX8: ; %bb.0: ; %entry
-; GFX8-NEXT: v_mbcnt_lo_u32_b32 v2, exec_lo, 0
-; GFX8-NEXT: v_mbcnt_hi_u32_b32 v2, exec_hi, v2
+; GFX8-NEXT: v_mov_b32_e32 v2, 0
+; GFX8-NEXT: v_mbcnt_lo_u32_b32 v3, exec_lo, 0
+; GFX8-NEXT: v_mbcnt_hi_u32_b32 v3, exec_hi, v3
; GFX8-NEXT: v_mov_b32_e32 v1, v0
; GFX8-NEXT: s_not_b64 exec, exec
; GFX8-NEXT: v_mov_b32_e32 v1, 0
; GFX8-NEXT: v_readlane_b32 s2, v1, 63
; GFX8-NEXT: s_mov_b64 exec, s[0:1]
; GFX8-NEXT: s_mov_b32 s0, s2
-; GFX8-NEXT: v_cmp_eq_u32_e32 vcc, 0, v2
+; GFX8-NEXT: v_cmp_eq_u32_e32 vcc, 0, v3
; GFX8-NEXT: s_and_saveexec_b64 s[2:3], vcc
; GFX8-NEXT: s_cbranch_execz .LBB3_2
; GFX8-NEXT: ; %bb.1:
-; GFX8-NEXT: v_mov_b32_e32 v0, 0
-; GFX8-NEXT: v_mov_b32_e32 v2, s0
+; GFX8-NEXT: v_mov_b32_e32 v0, s0
; GFX8-NEXT: s_mov_b32 m0, -1
; GFX8-NEXT: s_waitcnt lgkmcnt(0)
-; GFX8-NEXT: ds_add_u32 v0, v2
+; GFX8-NEXT: ds_add_u32 v2, v0
; GFX8-NEXT: s_waitcnt lgkmcnt(0)
; GFX8-NEXT: .LBB3_2:
; GFX8-NEXT: s_endpgm
;
; GFX9-LABEL: add_i32_varying_nouse:
; GFX9: ; %bb.0: ; %entry
-; GFX9-NEXT: v_mbcnt_lo_u32_b32 v2, exec_lo, 0
-; GFX9-NEXT: v_mbcnt_hi_u32_b32 v2, exec_hi, v2
+; GFX9-NEXT: v_mov_b32_e32 v2, 0
+; GFX9-NEXT: v_mbcnt_lo_u32_b32 v3, exec_lo, 0
+; GFX9-NEXT: v_mbcnt_hi_u32_b32 v3, exec_hi, v3
; GFX9-NEXT: v_mov_b32_e32 v1, v0
; GFX9-NEXT: s_not_b64 exec, exec
; GFX9-NEXT: v_mov_b32_e32 v1, 0
; GFX9-NEXT: v_readlane_b32 s2, v1, 63
; GFX9-NEXT: s_mov_b64 exec, s[0:1]
; GFX9-NEXT: s_mov_b32 s0, s2
-; GFX9-NEXT: v_cmp_eq_u32_e32 vcc, 0, v2
+; GFX9-NEXT: v_cmp_eq_u32_e32 vcc, 0, v3
; GFX9-NEXT: s_and_saveexec_b64 s[2:3], vcc
; GFX9-NEXT: s_cbranch_execz .LBB3_2
; GFX9-NEXT: ; %bb.1:
-; GFX9-NEXT: v_mov_b32_e32 v0, 0
-; GFX9-NEXT: v_mov_b32_e32 v2, s0
+; GFX9-NEXT: v_mov_b32_e32 v0, s0
; GFX9-NEXT: s_waitcnt lgkmcnt(0)
-; GFX9-NEXT: ds_add_u32 v0, v2
+; GFX9-NEXT: ds_add_u32 v2, v0
; GFX9-NEXT: s_waitcnt lgkmcnt(0)
; GFX9-NEXT: .LBB3_2:
; GFX9-NEXT: s_endpgm
; GFX1064-NEXT: v_readlane_b32 s2, v1, 0
; GFX1064-NEXT: v_readlane_b32 s3, v1, 32
; GFX1064-NEXT: s_mov_b64 exec, s[0:1]
-; GFX1064-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
+; GFX1064-NEXT: v_mbcnt_hi_u32_b32 v3, exec_hi, v0
+; GFX1064-NEXT: v_mov_b32_e32 v0, 0
; GFX1064-NEXT: s_add_i32 s0, s2, s3
-; GFX1064-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
+; GFX1064-NEXT: v_cmp_eq_u32_e32 vcc, 0, v3
; GFX1064-NEXT: s_and_saveexec_b64 s[2:3], vcc
; GFX1064-NEXT: s_cbranch_execz .LBB3_2
; GFX1064-NEXT: ; %bb.1:
-; GFX1064-NEXT: v_mov_b32_e32 v0, 0
; GFX1064-NEXT: v_mov_b32_e32 v3, s0
; GFX1064-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
; GFX1064-NEXT: s_waitcnt_vscnt null, 0x0
; GFX1032-NEXT: v_permlanex16_b32 v2, v2, -1, -1
; GFX1032-NEXT: v_add_nc_u32_e32 v1, v1, v2
; GFX1032-NEXT: s_mov_b32 exec_lo, s0
-; GFX1032-NEXT: v_mbcnt_lo_u32_b32 v3, exec_lo, 0
-; GFX1032-NEXT: v_mov_b32_e32 v0, v1
-; GFX1032-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v3
+; GFX1032-NEXT: v_mbcnt_lo_u32_b32 v4, exec_lo, 0
+; GFX1032-NEXT: v_mov_b32_e32 v0, 0
+; GFX1032-NEXT: v_mov_b32_e32 v3, v1
+; GFX1032-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v4
; GFX1032-NEXT: s_and_saveexec_b32 s0, vcc_lo
; GFX1032-NEXT: s_cbranch_execz .LBB3_2
; GFX1032-NEXT: ; %bb.1:
-; GFX1032-NEXT: v_mov_b32_e32 v3, 0
; GFX1032-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
; GFX1032-NEXT: s_waitcnt_vscnt null, 0x0
-; GFX1032-NEXT: ds_add_u32 v3, v0
+; GFX1032-NEXT: ds_add_u32 v0, v3
; GFX1032-NEXT: s_waitcnt lgkmcnt(0)
; GFX1032-NEXT: buffer_gl0_inv
; GFX1032-NEXT: .LBB3_2:
; GFX1164-NEXT: v_add_nc_u32_e32 v1, v1, v2
; GFX1164-NEXT: s_mov_b64 exec, s[0:1]
; GFX1164-NEXT: s_delay_alu instid0(VALU_DEP_2) | instid1(SALU_CYCLE_1)
-; GFX1164-NEXT: v_mbcnt_hi_u32_b32 v3, exec_hi, v0
-; GFX1164-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_2)
-; GFX1164-NEXT: v_mov_b32_e32 v0, v1
+; GFX1164-NEXT: v_mbcnt_hi_u32_b32 v4, exec_hi, v0
+; GFX1164-NEXT: v_mov_b32_e32 v0, 0
+; GFX1164-NEXT: s_delay_alu instid0(VALU_DEP_3) | instskip(SKIP_1) | instid1(VALU_DEP_3)
+; GFX1164-NEXT: v_mov_b32_e32 v3, v1
; GFX1164-NEXT: s_mov_b64 s[0:1], exec
-; GFX1164-NEXT: v_cmpx_eq_u32_e32 0, v3
+; GFX1164-NEXT: v_cmpx_eq_u32_e32 0, v4
; GFX1164-NEXT: s_cbranch_execz .LBB3_2
; GFX1164-NEXT: ; %bb.1:
-; GFX1164-NEXT: v_mov_b32_e32 v3, 0
; GFX1164-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
; GFX1164-NEXT: s_waitcnt_vscnt null, 0x0
-; GFX1164-NEXT: ds_add_u32 v3, v0
+; GFX1164-NEXT: ds_add_u32 v0, v3
; GFX1164-NEXT: s_waitcnt lgkmcnt(0)
; GFX1164-NEXT: buffer_gl0_inv
; GFX1164-NEXT: .LBB3_2:
; GFX1132-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(SALU_CYCLE_1)
; GFX1132-NEXT: v_add_nc_u32_e32 v1, v1, v2
; GFX1132-NEXT: s_mov_b32 exec_lo, s0
-; GFX1132-NEXT: v_mbcnt_lo_u32_b32 v3, exec_lo, 0
+; GFX1132-NEXT: v_mbcnt_lo_u32_b32 v4, exec_lo, 0
; GFX1132-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_2)
-; GFX1132-NEXT: v_mov_b32_e32 v0, v1
+; GFX1132-NEXT: v_dual_mov_b32 v0, 0 :: v_dual_mov_b32 v3, v1
; GFX1132-NEXT: s_mov_b32 s0, exec_lo
-; GFX1132-NEXT: v_cmpx_eq_u32_e32 0, v3
+; GFX1132-NEXT: v_cmpx_eq_u32_e32 0, v4
; GFX1132-NEXT: s_cbranch_execz .LBB3_2
; GFX1132-NEXT: ; %bb.1:
-; GFX1132-NEXT: v_mov_b32_e32 v3, 0
; GFX1132-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
; GFX1132-NEXT: s_waitcnt_vscnt null, 0x0
-; GFX1132-NEXT: ds_add_u32 v3, v0
+; GFX1132-NEXT: ds_add_u32 v0, v3
; GFX1132-NEXT: s_waitcnt lgkmcnt(0)
; GFX1132-NEXT: buffer_gl0_inv
; GFX1132-NEXT: .LBB3_2:
; GFX7LESS: ; %bb.0: ; %entry
; GFX7LESS-NEXT: s_mov_b64 s[4:5], exec
; GFX7LESS-NEXT: v_mbcnt_lo_u32_b32_e64 v0, s4, 0
-; GFX7LESS-NEXT: v_mbcnt_hi_u32_b32_e32 v2, s5, v0
-; GFX7LESS-NEXT: v_cmp_eq_u32_e32 vcc, 0, v2
+; GFX7LESS-NEXT: v_mbcnt_hi_u32_b32_e32 v3, s5, v0
+; GFX7LESS-NEXT: v_mov_b32_e32 v2, 0
+; GFX7LESS-NEXT: v_cmp_eq_u32_e32 vcc, 0, v3
; GFX7LESS-NEXT: ; implicit-def: $vgpr0_vgpr1
; GFX7LESS-NEXT: s_and_saveexec_b64 s[2:3], vcc
; GFX7LESS-NEXT: s_cbranch_execz .LBB4_2
; GFX7LESS-NEXT: ; %bb.1:
; GFX7LESS-NEXT: s_bcnt1_i32_b64 s4, s[4:5]
; GFX7LESS-NEXT: s_mul_i32 s4, s4, 5
-; GFX7LESS-NEXT: v_mov_b32_e32 v1, 0
-; GFX7LESS-NEXT: v_mov_b32_e32 v0, s4
+; GFX7LESS-NEXT: v_mov_b32_e32 v1, s4
; GFX7LESS-NEXT: s_mov_b32 m0, -1
; GFX7LESS-NEXT: s_waitcnt lgkmcnt(0)
-; GFX7LESS-NEXT: ds_add_rtn_u64 v[0:1], v1, v[0:1]
+; GFX7LESS-NEXT: ds_add_rtn_u64 v[0:1], v2, v[1:2]
; GFX7LESS-NEXT: s_waitcnt lgkmcnt(0)
; GFX7LESS-NEXT: .LBB4_2:
; GFX7LESS-NEXT: s_or_b64 exec, exec, s[2:3]
; GFX7LESS-NEXT: s_waitcnt lgkmcnt(0)
; GFX7LESS-NEXT: v_readfirstlane_b32 s4, v0
; GFX7LESS-NEXT: v_readfirstlane_b32 s5, v1
-; GFX7LESS-NEXT: v_mul_hi_u32_u24_e32 v1, 5, v2
-; GFX7LESS-NEXT: v_mul_u32_u24_e32 v0, 5, v2
+; GFX7LESS-NEXT: v_mul_hi_u32_u24_e32 v1, 5, v3
+; GFX7LESS-NEXT: v_mul_u32_u24_e32 v0, 5, v3
; GFX7LESS-NEXT: v_mov_b32_e32 v2, s5
; GFX7LESS-NEXT: v_add_i32_e32 v0, vcc, s4, v0
; GFX7LESS-NEXT: v_addc_u32_e32 v1, vcc, v2, v1, vcc
; GFX8: ; %bb.0: ; %entry
; GFX8-NEXT: s_mov_b64 s[4:5], exec
; GFX8-NEXT: v_mbcnt_lo_u32_b32 v0, s4, 0
-; GFX8-NEXT: v_mbcnt_hi_u32_b32 v2, s5, v0
-; GFX8-NEXT: v_cmp_eq_u32_e32 vcc, 0, v2
+; GFX8-NEXT: v_mbcnt_hi_u32_b32 v3, s5, v0
+; GFX8-NEXT: v_mov_b32_e32 v2, 0
+; GFX8-NEXT: v_cmp_eq_u32_e32 vcc, 0, v3
; GFX8-NEXT: ; implicit-def: $vgpr0_vgpr1
; GFX8-NEXT: s_and_saveexec_b64 s[2:3], vcc
; GFX8-NEXT: s_cbranch_execz .LBB4_2
; GFX8-NEXT: ; %bb.1:
; GFX8-NEXT: s_bcnt1_i32_b64 s4, s[4:5]
; GFX8-NEXT: s_mul_i32 s4, s4, 5
-; GFX8-NEXT: v_mov_b32_e32 v0, s4
-; GFX8-NEXT: v_mov_b32_e32 v1, 0
+; GFX8-NEXT: v_mov_b32_e32 v1, s4
; GFX8-NEXT: s_mov_b32 m0, -1
; GFX8-NEXT: s_waitcnt lgkmcnt(0)
-; GFX8-NEXT: ds_add_rtn_u64 v[0:1], v1, v[0:1]
+; GFX8-NEXT: ds_add_rtn_u64 v[0:1], v2, v[1:2]
; GFX8-NEXT: s_waitcnt lgkmcnt(0)
; GFX8-NEXT: .LBB4_2:
; GFX8-NEXT: s_or_b64 exec, exec, s[2:3]
; GFX8-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x24
; GFX8-NEXT: v_mov_b32_e32 v0, s2
; GFX8-NEXT: v_mov_b32_e32 v1, s3
-; GFX8-NEXT: v_mad_u64_u32 v[0:1], s[2:3], v2, 5, v[0:1]
+; GFX8-NEXT: v_mad_u64_u32 v[0:1], s[2:3], v3, 5, v[0:1]
; GFX8-NEXT: s_mov_b32 s3, 0xf000
; GFX8-NEXT: s_mov_b32 s2, -1
; GFX8-NEXT: s_waitcnt lgkmcnt(0)
; GFX9: ; %bb.0: ; %entry
; GFX9-NEXT: s_mov_b64 s[4:5], exec
; GFX9-NEXT: v_mbcnt_lo_u32_b32 v0, s4, 0
-; GFX9-NEXT: v_mbcnt_hi_u32_b32 v2, s5, v0
-; GFX9-NEXT: v_cmp_eq_u32_e32 vcc, 0, v2
+; GFX9-NEXT: v_mbcnt_hi_u32_b32 v3, s5, v0
+; GFX9-NEXT: v_mov_b32_e32 v2, 0
+; GFX9-NEXT: v_cmp_eq_u32_e32 vcc, 0, v3
; GFX9-NEXT: ; implicit-def: $vgpr0_vgpr1
; GFX9-NEXT: s_and_saveexec_b64 s[2:3], vcc
; GFX9-NEXT: s_cbranch_execz .LBB4_2
; GFX9-NEXT: ; %bb.1:
; GFX9-NEXT: s_bcnt1_i32_b64 s4, s[4:5]
; GFX9-NEXT: s_mul_i32 s4, s4, 5
-; GFX9-NEXT: v_mov_b32_e32 v0, s4
-; GFX9-NEXT: v_mov_b32_e32 v1, 0
+; GFX9-NEXT: v_mov_b32_e32 v1, s4
; GFX9-NEXT: s_waitcnt lgkmcnt(0)
-; GFX9-NEXT: ds_add_rtn_u64 v[0:1], v1, v[0:1]
+; GFX9-NEXT: ds_add_rtn_u64 v[0:1], v2, v[1:2]
; GFX9-NEXT: s_waitcnt lgkmcnt(0)
; GFX9-NEXT: .LBB4_2:
; GFX9-NEXT: s_or_b64 exec, exec, s[2:3]
; GFX9-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x24
; GFX9-NEXT: v_mov_b32_e32 v0, s2
; GFX9-NEXT: v_mov_b32_e32 v1, s3
-; GFX9-NEXT: v_mad_u64_u32 v[0:1], s[2:3], v2, 5, v[0:1]
+; GFX9-NEXT: v_mad_u64_u32 v[0:1], s[2:3], v3, 5, v[0:1]
; GFX9-NEXT: s_mov_b32 s3, 0xf000
; GFX9-NEXT: s_mov_b32 s2, -1
; GFX9-NEXT: s_waitcnt lgkmcnt(0)
; GFX1064-LABEL: add_i64_constant:
; GFX1064: ; %bb.0: ; %entry
; GFX1064-NEXT: s_mov_b64 s[4:5], exec
+; GFX1064-NEXT: v_mov_b32_e32 v2, 0
; GFX1064-NEXT: v_mbcnt_lo_u32_b32 v0, s4, 0
-; GFX1064-NEXT: v_mbcnt_hi_u32_b32 v2, s5, v0
+; GFX1064-NEXT: v_mbcnt_hi_u32_b32 v3, s5, v0
; GFX1064-NEXT: ; implicit-def: $vgpr0_vgpr1
-; GFX1064-NEXT: v_cmp_eq_u32_e32 vcc, 0, v2
+; GFX1064-NEXT: v_cmp_eq_u32_e32 vcc, 0, v3
; GFX1064-NEXT: s_and_saveexec_b64 s[2:3], vcc
; GFX1064-NEXT: s_cbranch_execz .LBB4_2
; GFX1064-NEXT: ; %bb.1:
; GFX1064-NEXT: s_bcnt1_i32_b64 s4, s[4:5]
-; GFX1064-NEXT: v_mov_b32_e32 v1, 0
; GFX1064-NEXT: s_mul_i32 s4, s4, 5
-; GFX1064-NEXT: v_mov_b32_e32 v0, s4
+; GFX1064-NEXT: v_mov_b32_e32 v1, s4
; GFX1064-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
; GFX1064-NEXT: s_waitcnt_vscnt null, 0x0
-; GFX1064-NEXT: ds_add_rtn_u64 v[0:1], v1, v[0:1]
+; GFX1064-NEXT: ds_add_rtn_u64 v[0:1], v2, v[1:2]
; GFX1064-NEXT: s_waitcnt lgkmcnt(0)
; GFX1064-NEXT: buffer_gl0_inv
; GFX1064-NEXT: .LBB4_2:
; GFX1064-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x24
; GFX1064-NEXT: v_readfirstlane_b32 s2, v0
; GFX1064-NEXT: v_readfirstlane_b32 s3, v1
-; GFX1064-NEXT: v_mad_u64_u32 v[0:1], s[2:3], v2, 5, s[2:3]
+; GFX1064-NEXT: v_mad_u64_u32 v[0:1], s[2:3], v3, 5, s[2:3]
; GFX1064-NEXT: s_mov_b32 s3, 0x31016000
; GFX1064-NEXT: s_mov_b32 s2, -1
; GFX1064-NEXT: s_waitcnt lgkmcnt(0)
; GFX1032-LABEL: add_i64_constant:
; GFX1032: ; %bb.0: ; %entry
; GFX1032-NEXT: s_mov_b32 s3, exec_lo
+; GFX1032-NEXT: v_mov_b32_e32 v2, 0
+; GFX1032-NEXT: v_mbcnt_lo_u32_b32 v3, s3, 0
; GFX1032-NEXT: ; implicit-def: $vgpr0_vgpr1
-; GFX1032-NEXT: v_mbcnt_lo_u32_b32 v2, s3, 0
-; GFX1032-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v2
+; GFX1032-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v3
; GFX1032-NEXT: s_and_saveexec_b32 s2, vcc_lo
; GFX1032-NEXT: s_cbranch_execz .LBB4_2
; GFX1032-NEXT: ; %bb.1:
; GFX1032-NEXT: s_bcnt1_i32_b32 s3, s3
-; GFX1032-NEXT: v_mov_b32_e32 v1, 0
; GFX1032-NEXT: s_mul_i32 s3, s3, 5
-; GFX1032-NEXT: v_mov_b32_e32 v0, s3
+; GFX1032-NEXT: v_mov_b32_e32 v1, s3
; GFX1032-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
; GFX1032-NEXT: s_waitcnt_vscnt null, 0x0
-; GFX1032-NEXT: ds_add_rtn_u64 v[0:1], v1, v[0:1]
+; GFX1032-NEXT: ds_add_rtn_u64 v[0:1], v2, v[1:2]
; GFX1032-NEXT: s_waitcnt lgkmcnt(0)
; GFX1032-NEXT: buffer_gl0_inv
; GFX1032-NEXT: .LBB4_2:
; GFX1032-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x24
; GFX1032-NEXT: v_readfirstlane_b32 s2, v0
; GFX1032-NEXT: v_readfirstlane_b32 s3, v1
-; GFX1032-NEXT: v_mad_u64_u32 v[0:1], s2, v2, 5, s[2:3]
+; GFX1032-NEXT: v_mad_u64_u32 v[0:1], s2, v3, 5, s[2:3]
; GFX1032-NEXT: s_mov_b32 s3, 0x31016000
; GFX1032-NEXT: s_mov_b32 s2, -1
; GFX1032-NEXT: s_waitcnt lgkmcnt(0)
; GFX1164-LABEL: add_i64_constant:
; GFX1164: ; %bb.0: ; %entry
; GFX1164-NEXT: s_mov_b64 s[4:5], exec
-; GFX1164-NEXT: s_mov_b64 s[2:3], exec
+; GFX1164-NEXT: v_mov_b32_e32 v2, 0
; GFX1164-NEXT: v_mbcnt_lo_u32_b32 v0, s4, 0
+; GFX1164-NEXT: s_mov_b64 s[2:3], exec
; GFX1164-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
-; GFX1164-NEXT: v_mbcnt_hi_u32_b32 v2, s5, v0
+; GFX1164-NEXT: v_mbcnt_hi_u32_b32 v3, s5, v0
; GFX1164-NEXT: ; implicit-def: $vgpr0_vgpr1
-; GFX1164-NEXT: v_cmpx_eq_u32_e32 0, v2
+; GFX1164-NEXT: v_cmpx_eq_u32_e32 0, v3
; GFX1164-NEXT: s_cbranch_execz .LBB4_2
; GFX1164-NEXT: ; %bb.1:
; GFX1164-NEXT: s_bcnt1_i32_b64 s4, s[4:5]
-; GFX1164-NEXT: v_mov_b32_e32 v1, 0
+; GFX1164-NEXT: s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
; GFX1164-NEXT: s_mul_i32 s4, s4, 5
-; GFX1164-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
-; GFX1164-NEXT: v_mov_b32_e32 v0, s4
+; GFX1164-NEXT: v_mov_b32_e32 v1, s4
; GFX1164-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
; GFX1164-NEXT: s_waitcnt_vscnt null, 0x0
-; GFX1164-NEXT: ds_add_rtn_u64 v[0:1], v1, v[0:1]
+; GFX1164-NEXT: ds_add_rtn_u64 v[0:1], v2, v[1:2]
; GFX1164-NEXT: s_waitcnt lgkmcnt(0)
; GFX1164-NEXT: buffer_gl0_inv
; GFX1164-NEXT: .LBB4_2:
; GFX1164-NEXT: v_readfirstlane_b32 s2, v0
; GFX1164-NEXT: v_readfirstlane_b32 s3, v1
; GFX1164-NEXT: s_delay_alu instid0(VALU_DEP_1)
-; GFX1164-NEXT: v_mad_u64_u32 v[0:1], null, v2, 5, s[2:3]
+; GFX1164-NEXT: v_mad_u64_u32 v[0:1], null, v3, 5, s[2:3]
; GFX1164-NEXT: s_mov_b32 s3, 0x31016000
; GFX1164-NEXT: s_mov_b32 s2, -1
; GFX1164-NEXT: s_waitcnt lgkmcnt(0)
; GFX1132-LABEL: add_i64_constant:
; GFX1132: ; %bb.0: ; %entry
; GFX1132-NEXT: s_mov_b32 s3, exec_lo
+; GFX1132-NEXT: v_mov_b32_e32 v2, 0
+; GFX1132-NEXT: v_mbcnt_lo_u32_b32 v3, s3, 0
; GFX1132-NEXT: s_mov_b32 s2, exec_lo
-; GFX1132-NEXT: v_mbcnt_lo_u32_b32 v2, s3, 0
; GFX1132-NEXT: ; implicit-def: $vgpr0_vgpr1
; GFX1132-NEXT: s_delay_alu instid0(VALU_DEP_1)
-; GFX1132-NEXT: v_cmpx_eq_u32_e32 0, v2
+; GFX1132-NEXT: v_cmpx_eq_u32_e32 0, v3
; GFX1132-NEXT: s_cbranch_execz .LBB4_2
; GFX1132-NEXT: ; %bb.1:
; GFX1132-NEXT: s_bcnt1_i32_b32 s3, s3
-; GFX1132-NEXT: v_mov_b32_e32 v1, 0
+; GFX1132-NEXT: s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
; GFX1132-NEXT: s_mul_i32 s3, s3, 5
-; GFX1132-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
-; GFX1132-NEXT: v_mov_b32_e32 v0, s3
+; GFX1132-NEXT: v_mov_b32_e32 v1, s3
; GFX1132-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
; GFX1132-NEXT: s_waitcnt_vscnt null, 0x0
-; GFX1132-NEXT: ds_add_rtn_u64 v[0:1], v1, v[0:1]
+; GFX1132-NEXT: ds_add_rtn_u64 v[0:1], v2, v[1:2]
; GFX1132-NEXT: s_waitcnt lgkmcnt(0)
; GFX1132-NEXT: buffer_gl0_inv
; GFX1132-NEXT: .LBB4_2:
; GFX1132-NEXT: v_readfirstlane_b32 s2, v0
; GFX1132-NEXT: v_readfirstlane_b32 s3, v1
; GFX1132-NEXT: s_delay_alu instid0(VALU_DEP_1)
-; GFX1132-NEXT: v_mad_u64_u32 v[0:1], null, v2, 5, s[2:3]
+; GFX1132-NEXT: v_mad_u64_u32 v[0:1], null, v3, 5, s[2:3]
; GFX1132-NEXT: s_mov_b32 s3, 0x31016000
; GFX1132-NEXT: s_mov_b32 s2, -1
; GFX1132-NEXT: s_waitcnt lgkmcnt(0)
; GFX7LESS-NEXT: s_load_dwordx4 s[0:3], s[0:1], 0x9
; GFX7LESS-NEXT: v_mbcnt_lo_u32_b32_e64 v0, s6, 0
; GFX7LESS-NEXT: v_mbcnt_hi_u32_b32_e32 v2, s7, v0
+; GFX7LESS-NEXT: v_mov_b32_e32 v3, 0
; GFX7LESS-NEXT: v_cmp_eq_u32_e32 vcc, 0, v2
; GFX7LESS-NEXT: ; implicit-def: $vgpr0_vgpr1
; GFX7LESS-NEXT: s_and_saveexec_b64 s[4:5], vcc
; GFX7LESS-NEXT: s_cbranch_execz .LBB5_2
; GFX7LESS-NEXT: ; %bb.1:
; GFX7LESS-NEXT: s_bcnt1_i32_b64 s6, s[6:7]
-; GFX7LESS-NEXT: v_mov_b32_e32 v3, 0
; GFX7LESS-NEXT: s_waitcnt lgkmcnt(0)
; GFX7LESS-NEXT: s_mul_i32 s7, s3, s6
; GFX7LESS-NEXT: v_mov_b32_e32 v0, s6
; GFX8-NEXT: s_mov_b64 s[6:7], exec
; GFX8-NEXT: v_mbcnt_lo_u32_b32 v0, s6, 0
; GFX8-NEXT: v_mbcnt_hi_u32_b32 v2, s7, v0
+; GFX8-NEXT: v_mov_b32_e32 v3, 0
; GFX8-NEXT: v_cmp_eq_u32_e32 vcc, 0, v2
; GFX8-NEXT: ; implicit-def: $vgpr0_vgpr1
; GFX8-NEXT: s_and_saveexec_b64 s[4:5], vcc
; GFX8-NEXT: s_waitcnt lgkmcnt(0)
; GFX8-NEXT: v_mad_u64_u32 v[0:1], s[6:7], s2, v0, 0
; GFX8-NEXT: s_mul_i32 s6, s3, s8
-; GFX8-NEXT: v_mov_b32_e32 v3, 0
-; GFX8-NEXT: v_add_u32_e32 v1, vcc, s6, v1
; GFX8-NEXT: s_mov_b32 m0, -1
+; GFX8-NEXT: v_add_u32_e32 v1, vcc, s6, v1
; GFX8-NEXT: s_waitcnt lgkmcnt(0)
; GFX8-NEXT: ds_add_rtn_u64 v[0:1], v3, v[0:1]
; GFX8-NEXT: s_waitcnt lgkmcnt(0)
; GFX9-NEXT: s_mov_b64 s[6:7], exec
; GFX9-NEXT: v_mbcnt_lo_u32_b32 v0, s6, 0
; GFX9-NEXT: v_mbcnt_hi_u32_b32 v2, s7, v0
+; GFX9-NEXT: v_mov_b32_e32 v3, 0
; GFX9-NEXT: v_cmp_eq_u32_e32 vcc, 0, v2
; GFX9-NEXT: ; implicit-def: $vgpr0_vgpr1
; GFX9-NEXT: s_and_saveexec_b64 s[4:5], vcc
; GFX9-NEXT: s_mul_i32 s6, s2, s6
; GFX9-NEXT: v_mov_b32_e32 v0, s6
; GFX9-NEXT: v_mov_b32_e32 v1, s8
-; GFX9-NEXT: v_mov_b32_e32 v3, 0
; GFX9-NEXT: s_waitcnt lgkmcnt(0)
; GFX9-NEXT: ds_add_rtn_u64 v[0:1], v3, v[0:1]
; GFX9-NEXT: s_waitcnt lgkmcnt(0)
; GFX1064: ; %bb.0: ; %entry
; GFX1064-NEXT: s_load_dwordx4 s[0:3], s[0:1], 0x24
; GFX1064-NEXT: s_mov_b64 s[6:7], exec
+; GFX1064-NEXT: v_mov_b32_e32 v3, 0
; GFX1064-NEXT: v_mbcnt_lo_u32_b32 v0, s6, 0
; GFX1064-NEXT: v_mbcnt_hi_u32_b32 v2, s7, v0
; GFX1064-NEXT: ; implicit-def: $vgpr0_vgpr1
; GFX1064-NEXT: s_cbranch_execz .LBB5_2
; GFX1064-NEXT: ; %bb.1:
; GFX1064-NEXT: s_bcnt1_i32_b64 s6, s[6:7]
-; GFX1064-NEXT: v_mov_b32_e32 v3, 0
; GFX1064-NEXT: s_waitcnt lgkmcnt(0)
; GFX1064-NEXT: s_mul_i32 s7, s3, s6
; GFX1064-NEXT: s_mul_hi_u32 s8, s2, s6
; GFX1032: ; %bb.0: ; %entry
; GFX1032-NEXT: s_load_dwordx4 s[0:3], s[0:1], 0x24
; GFX1032-NEXT: s_mov_b32 s5, exec_lo
-; GFX1032-NEXT: ; implicit-def: $vgpr0_vgpr1
+; GFX1032-NEXT: v_mov_b32_e32 v3, 0
; GFX1032-NEXT: v_mbcnt_lo_u32_b32 v2, s5, 0
+; GFX1032-NEXT: ; implicit-def: $vgpr0_vgpr1
; GFX1032-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v2
; GFX1032-NEXT: s_and_saveexec_b32 s4, vcc_lo
; GFX1032-NEXT: s_cbranch_execz .LBB5_2
; GFX1032-NEXT: ; %bb.1:
; GFX1032-NEXT: s_bcnt1_i32_b32 s5, s5
-; GFX1032-NEXT: v_mov_b32_e32 v3, 0
; GFX1032-NEXT: s_waitcnt lgkmcnt(0)
; GFX1032-NEXT: s_mul_i32 s6, s3, s5
; GFX1032-NEXT: s_mul_hi_u32 s7, s2, s5
; GFX1164: ; %bb.0: ; %entry
; GFX1164-NEXT: s_load_b128 s[0:3], s[0:1], 0x24
; GFX1164-NEXT: s_mov_b64 s[6:7], exec
-; GFX1164-NEXT: s_mov_b64 s[4:5], exec
+; GFX1164-NEXT: v_mov_b32_e32 v3, 0
; GFX1164-NEXT: v_mbcnt_lo_u32_b32 v0, s6, 0
+; GFX1164-NEXT: s_mov_b64 s[4:5], exec
; GFX1164-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
; GFX1164-NEXT: v_mbcnt_hi_u32_b32 v2, s7, v0
; GFX1164-NEXT: ; implicit-def: $vgpr0_vgpr1
; GFX1164-NEXT: s_cbranch_execz .LBB5_2
; GFX1164-NEXT: ; %bb.1:
; GFX1164-NEXT: s_bcnt1_i32_b64 s6, s[6:7]
-; GFX1164-NEXT: v_mov_b32_e32 v3, 0
; GFX1164-NEXT: s_waitcnt lgkmcnt(0)
; GFX1164-NEXT: s_mul_i32 s7, s3, s6
; GFX1164-NEXT: s_mul_hi_u32 s8, s2, s6
; GFX1132: ; %bb.0: ; %entry
; GFX1132-NEXT: s_load_b128 s[0:3], s[0:1], 0x24
; GFX1132-NEXT: s_mov_b32 s5, exec_lo
-; GFX1132-NEXT: s_mov_b32 s4, exec_lo
+; GFX1132-NEXT: v_mov_b32_e32 v3, 0
; GFX1132-NEXT: v_mbcnt_lo_u32_b32 v2, s5, 0
+; GFX1132-NEXT: s_mov_b32 s4, exec_lo
; GFX1132-NEXT: ; implicit-def: $vgpr0_vgpr1
; GFX1132-NEXT: s_delay_alu instid0(VALU_DEP_1)
; GFX1132-NEXT: v_cmpx_eq_u32_e32 0, v2
; GFX1132-NEXT: s_cbranch_execz .LBB5_2
; GFX1132-NEXT: ; %bb.1:
; GFX1132-NEXT: s_bcnt1_i32_b32 s5, s5
-; GFX1132-NEXT: v_mov_b32_e32 v3, 0
; GFX1132-NEXT: s_waitcnt lgkmcnt(0)
; GFX1132-NEXT: s_mul_i32 s6, s3, s5
; GFX1132-NEXT: s_mul_hi_u32 s7, s2, s5
;
; GFX8-LABEL: sub_i32_varying:
; GFX8: ; %bb.0: ; %entry
-; GFX8-NEXT: s_or_saveexec_b64 s[2:3], -1
-; GFX8-NEXT: v_mov_b32_e32 v1, 0
-; GFX8-NEXT: s_mov_b64 exec, s[2:3]
-; GFX8-NEXT: v_mbcnt_lo_u32_b32 v3, exec_lo, 0
-; GFX8-NEXT: v_mbcnt_hi_u32_b32 v3, exec_hi, v3
-; GFX8-NEXT: v_mov_b32_e32 v2, v0
+; GFX8-NEXT: v_mov_b32_e32 v3, 0
+; GFX8-NEXT: v_mbcnt_lo_u32_b32 v4, exec_lo, 0
+; GFX8-NEXT: v_mbcnt_hi_u32_b32 v4, exec_hi, v4
+; GFX8-NEXT: v_mov_b32_e32 v1, v0
; GFX8-NEXT: s_not_b64 exec, exec
-; GFX8-NEXT: v_mov_b32_e32 v2, 0
+; GFX8-NEXT: v_mov_b32_e32 v1, 0
; GFX8-NEXT: s_not_b64 exec, exec
; GFX8-NEXT: s_or_saveexec_b64 s[2:3], -1
-; GFX8-NEXT: v_add_u32_dpp v2, vcc, v2, v2 row_shr:1 row_mask:0xf bank_mask:0xf bound_ctrl:1
-; GFX8-NEXT: s_nop 1
-; GFX8-NEXT: v_add_u32_dpp v2, vcc, v2, v2 row_shr:2 row_mask:0xf bank_mask:0xf bound_ctrl:1
+; GFX8-NEXT: v_add_u32_dpp v1, vcc, v1, v1 row_shr:1 row_mask:0xf bank_mask:0xf bound_ctrl:1
+; GFX8-NEXT: v_mov_b32_e32 v2, 0
+; GFX8-NEXT: s_nop 0
+; GFX8-NEXT: v_add_u32_dpp v1, vcc, v1, v1 row_shr:2 row_mask:0xf bank_mask:0xf bound_ctrl:1
; GFX8-NEXT: s_nop 1
-; GFX8-NEXT: v_add_u32_dpp v2, vcc, v2, v2 row_shr:4 row_mask:0xf bank_mask:0xf bound_ctrl:1
+; GFX8-NEXT: v_add_u32_dpp v1, vcc, v1, v1 row_shr:4 row_mask:0xf bank_mask:0xf bound_ctrl:1
; GFX8-NEXT: s_nop 1
-; GFX8-NEXT: v_add_u32_dpp v2, vcc, v2, v2 row_shr:8 row_mask:0xf bank_mask:0xf bound_ctrl:1
+; GFX8-NEXT: v_add_u32_dpp v1, vcc, v1, v1 row_shr:8 row_mask:0xf bank_mask:0xf bound_ctrl:1
; GFX8-NEXT: s_nop 1
-; GFX8-NEXT: v_add_u32_dpp v2, vcc, v2, v2 row_bcast:15 row_mask:0xa bank_mask:0xf
+; GFX8-NEXT: v_add_u32_dpp v1, vcc, v1, v1 row_bcast:15 row_mask:0xa bank_mask:0xf
; GFX8-NEXT: s_nop 1
-; GFX8-NEXT: v_add_u32_dpp v2, vcc, v2, v2 row_bcast:31 row_mask:0xc bank_mask:0xf
-; GFX8-NEXT: v_readlane_b32 s4, v2, 63
+; GFX8-NEXT: v_add_u32_dpp v1, vcc, v1, v1 row_bcast:31 row_mask:0xc bank_mask:0xf
+; GFX8-NEXT: v_readlane_b32 s4, v1, 63
; GFX8-NEXT: s_nop 0
-; GFX8-NEXT: v_mov_b32_dpp v1, v2 wave_shr:1 row_mask:0xf bank_mask:0xf
+; GFX8-NEXT: v_mov_b32_dpp v2, v1 wave_shr:1 row_mask:0xf bank_mask:0xf
; GFX8-NEXT: s_mov_b64 exec, s[2:3]
-; GFX8-NEXT: v_cmp_eq_u32_e32 vcc, 0, v3
+; GFX8-NEXT: v_cmp_eq_u32_e32 vcc, 0, v4
; GFX8-NEXT: ; implicit-def: $vgpr0
; GFX8-NEXT: s_and_saveexec_b64 s[2:3], vcc
; GFX8-NEXT: s_cbranch_execz .LBB9_2
; GFX8-NEXT: ; %bb.1:
-; GFX8-NEXT: v_mov_b32_e32 v0, 0
-; GFX8-NEXT: v_mov_b32_e32 v3, s4
+; GFX8-NEXT: v_mov_b32_e32 v0, s4
; GFX8-NEXT: s_mov_b32 m0, -1
; GFX8-NEXT: s_waitcnt lgkmcnt(0)
-; GFX8-NEXT: ds_sub_rtn_u32 v0, v0, v3
+; GFX8-NEXT: ds_sub_rtn_u32 v0, v3, v0
; GFX8-NEXT: s_waitcnt lgkmcnt(0)
; GFX8-NEXT: .LBB9_2:
; GFX8-NEXT: s_or_b64 exec, exec, s[2:3]
; GFX8-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x24
; GFX8-NEXT: s_waitcnt lgkmcnt(0)
; GFX8-NEXT: v_readfirstlane_b32 s4, v0
-; GFX8-NEXT: v_mov_b32_e32 v0, v1
+; GFX8-NEXT: v_mov_b32_e32 v0, v2
; GFX8-NEXT: s_mov_b32 s3, 0xf000
; GFX8-NEXT: s_mov_b32 s2, -1
; GFX8-NEXT: v_sub_u32_e32 v0, vcc, s4, v0
;
; GFX9-LABEL: sub_i32_varying:
; GFX9: ; %bb.0: ; %entry
-; GFX9-NEXT: s_or_saveexec_b64 s[2:3], -1
-; GFX9-NEXT: v_mov_b32_e32 v1, 0
-; GFX9-NEXT: s_mov_b64 exec, s[2:3]
-; GFX9-NEXT: v_mbcnt_lo_u32_b32 v3, exec_lo, 0
-; GFX9-NEXT: v_mbcnt_hi_u32_b32 v3, exec_hi, v3
-; GFX9-NEXT: v_mov_b32_e32 v2, v0
+; GFX9-NEXT: v_mov_b32_e32 v3, 0
+; GFX9-NEXT: v_mbcnt_lo_u32_b32 v4, exec_lo, 0
+; GFX9-NEXT: v_mbcnt_hi_u32_b32 v4, exec_hi, v4
+; GFX9-NEXT: v_mov_b32_e32 v1, v0
; GFX9-NEXT: s_not_b64 exec, exec
-; GFX9-NEXT: v_mov_b32_e32 v2, 0
+; GFX9-NEXT: v_mov_b32_e32 v1, 0
; GFX9-NEXT: s_not_b64 exec, exec
; GFX9-NEXT: s_or_saveexec_b64 s[2:3], -1
-; GFX9-NEXT: v_add_u32_dpp v2, v2, v2 row_shr:1 row_mask:0xf bank_mask:0xf bound_ctrl:1
-; GFX9-NEXT: s_nop 1
-; GFX9-NEXT: v_add_u32_dpp v2, v2, v2 row_shr:2 row_mask:0xf bank_mask:0xf bound_ctrl:1
+; GFX9-NEXT: v_add_u32_dpp v1, v1, v1 row_shr:1 row_mask:0xf bank_mask:0xf bound_ctrl:1
+; GFX9-NEXT: v_mov_b32_e32 v2, 0
+; GFX9-NEXT: s_nop 0
+; GFX9-NEXT: v_add_u32_dpp v1, v1, v1 row_shr:2 row_mask:0xf bank_mask:0xf bound_ctrl:1
; GFX9-NEXT: s_nop 1
-; GFX9-NEXT: v_add_u32_dpp v2, v2, v2 row_shr:4 row_mask:0xf bank_mask:0xf bound_ctrl:1
+; GFX9-NEXT: v_add_u32_dpp v1, v1, v1 row_shr:4 row_mask:0xf bank_mask:0xf bound_ctrl:1
; GFX9-NEXT: s_nop 1
-; GFX9-NEXT: v_add_u32_dpp v2, v2, v2 row_shr:8 row_mask:0xf bank_mask:0xf bound_ctrl:1
+; GFX9-NEXT: v_add_u32_dpp v1, v1, v1 row_shr:8 row_mask:0xf bank_mask:0xf bound_ctrl:1
; GFX9-NEXT: s_nop 1
-; GFX9-NEXT: v_add_u32_dpp v2, v2, v2 row_bcast:15 row_mask:0xa bank_mask:0xf
+; GFX9-NEXT: v_add_u32_dpp v1, v1, v1 row_bcast:15 row_mask:0xa bank_mask:0xf
; GFX9-NEXT: s_nop 1
-; GFX9-NEXT: v_add_u32_dpp v2, v2, v2 row_bcast:31 row_mask:0xc bank_mask:0xf
-; GFX9-NEXT: v_readlane_b32 s4, v2, 63
+; GFX9-NEXT: v_add_u32_dpp v1, v1, v1 row_bcast:31 row_mask:0xc bank_mask:0xf
+; GFX9-NEXT: v_readlane_b32 s4, v1, 63
; GFX9-NEXT: s_nop 0
-; GFX9-NEXT: v_mov_b32_dpp v1, v2 wave_shr:1 row_mask:0xf bank_mask:0xf
+; GFX9-NEXT: v_mov_b32_dpp v2, v1 wave_shr:1 row_mask:0xf bank_mask:0xf
; GFX9-NEXT: s_mov_b64 exec, s[2:3]
-; GFX9-NEXT: v_cmp_eq_u32_e32 vcc, 0, v3
+; GFX9-NEXT: v_cmp_eq_u32_e32 vcc, 0, v4
; GFX9-NEXT: ; implicit-def: $vgpr0
; GFX9-NEXT: s_and_saveexec_b64 s[2:3], vcc
; GFX9-NEXT: s_cbranch_execz .LBB9_2
; GFX9-NEXT: ; %bb.1:
-; GFX9-NEXT: v_mov_b32_e32 v0, 0
-; GFX9-NEXT: v_mov_b32_e32 v3, s4
+; GFX9-NEXT: v_mov_b32_e32 v0, s4
; GFX9-NEXT: s_waitcnt lgkmcnt(0)
-; GFX9-NEXT: ds_sub_rtn_u32 v0, v0, v3
+; GFX9-NEXT: ds_sub_rtn_u32 v0, v3, v0
; GFX9-NEXT: s_waitcnt lgkmcnt(0)
; GFX9-NEXT: .LBB9_2:
; GFX9-NEXT: s_or_b64 exec, exec, s[2:3]
; GFX9-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x24
; GFX9-NEXT: s_waitcnt lgkmcnt(0)
; GFX9-NEXT: v_readfirstlane_b32 s4, v0
-; GFX9-NEXT: v_mov_b32_e32 v0, v1
+; GFX9-NEXT: v_mov_b32_e32 v0, v2
; GFX9-NEXT: s_mov_b32 s3, 0xf000
; GFX9-NEXT: s_mov_b32 s2, -1
; GFX9-NEXT: v_sub_u32_e32 v0, s4, v0
; GFX1064-NEXT: v_writelane_b32 v3, s5, 32
; GFX1064-NEXT: s_mov_b64 exec, s[2:3]
; GFX1064-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
+; GFX1064-NEXT: v_mov_b32_e32 v4, 0
; GFX1064-NEXT: s_or_saveexec_b64 s[4:5], -1
; GFX1064-NEXT: v_writelane_b32 v3, s6, 48
; GFX1064-NEXT: s_mov_b64 exec, s[4:5]
; GFX1064-NEXT: s_and_saveexec_b64 s[4:5], vcc
; GFX1064-NEXT: s_cbranch_execz .LBB9_2
; GFX1064-NEXT: ; %bb.1:
-; GFX1064-NEXT: v_mov_b32_e32 v0, 0
-; GFX1064-NEXT: v_mov_b32_e32 v4, s7
+; GFX1064-NEXT: v_mov_b32_e32 v0, s7
; GFX1064-NEXT: s_mov_b32 s3, s7
; GFX1064-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
; GFX1064-NEXT: s_waitcnt_vscnt null, 0x0
-; GFX1064-NEXT: ds_sub_rtn_u32 v0, v0, v4
+; GFX1064-NEXT: ds_sub_rtn_u32 v0, v4, v0
; GFX1064-NEXT: s_waitcnt lgkmcnt(0)
; GFX1064-NEXT: buffer_gl0_inv
; GFX1064-NEXT: .LBB9_2:
; GFX1032-NEXT: v_mov_b32_dpp v3, v1 row_shr:1 row_mask:0xf bank_mask:0xf
; GFX1032-NEXT: s_mov_b32 exec_lo, s2
; GFX1032-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX1032-NEXT: v_mov_b32_e32 v4, 0
; GFX1032-NEXT: s_or_saveexec_b32 s2, -1
; GFX1032-NEXT: v_writelane_b32 v3, s3, 16
; GFX1032-NEXT: s_mov_b32 exec_lo, s2
; GFX1032-NEXT: s_and_saveexec_b32 s3, vcc_lo
; GFX1032-NEXT: s_cbranch_execz .LBB9_2
; GFX1032-NEXT: ; %bb.1:
-; GFX1032-NEXT: v_mov_b32_e32 v0, 0
-; GFX1032-NEXT: v_mov_b32_e32 v4, s4
+; GFX1032-NEXT: v_mov_b32_e32 v0, s4
; GFX1032-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
; GFX1032-NEXT: s_waitcnt_vscnt null, 0x0
-; GFX1032-NEXT: ds_sub_rtn_u32 v0, v0, v4
+; GFX1032-NEXT: ds_sub_rtn_u32 v0, v4, v0
; GFX1032-NEXT: s_waitcnt lgkmcnt(0)
; GFX1032-NEXT: buffer_gl0_inv
; GFX1032-NEXT: .LBB9_2:
; GFX1164-NEXT: v_readlane_b32 s6, v1, 47
; GFX1164-NEXT: v_writelane_b32 v3, s5, 32
; GFX1164-NEXT: s_mov_b64 exec, s[2:3]
-; GFX1164-NEXT: s_delay_alu instid0(SALU_CYCLE_1) | instskip(SKIP_3) | instid1(VALU_DEP_2)
+; GFX1164-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
; GFX1164-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
+; GFX1164-NEXT: v_mov_b32_e32 v4, 0
; GFX1164-NEXT: s_or_saveexec_b64 s[4:5], -1
; GFX1164-NEXT: v_writelane_b32 v3, s6, 48
; GFX1164-NEXT: s_mov_b64 exec, s[4:5]
; GFX1164-NEXT: s_and_saveexec_b64 s[4:5], vcc
; GFX1164-NEXT: s_cbranch_execz .LBB9_2
; GFX1164-NEXT: ; %bb.1:
-; GFX1164-NEXT: v_mov_b32_e32 v0, 0
-; GFX1164-NEXT: v_mov_b32_e32 v4, s7
+; GFX1164-NEXT: v_mov_b32_e32 v0, s7
; GFX1164-NEXT: s_mov_b32 s3, s7
; GFX1164-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
; GFX1164-NEXT: s_waitcnt_vscnt null, 0x0
-; GFX1164-NEXT: ds_sub_rtn_u32 v0, v0, v4
+; GFX1164-NEXT: ds_sub_rtn_u32 v0, v4, v0
; GFX1164-NEXT: s_waitcnt lgkmcnt(0)
; GFX1164-NEXT: buffer_gl0_inv
; GFX1164-NEXT: .LBB9_2:
; GFX1132-NEXT: v_readlane_b32 s4, v1, 31
; GFX1132-NEXT: v_mov_b32_dpp v3, v1 row_shr:1 row_mask:0xf bank_mask:0xf
; GFX1132-NEXT: s_mov_b32 exec_lo, s2
-; GFX1132-NEXT: s_delay_alu instid0(SALU_CYCLE_1) | instskip(SKIP_3) | instid1(VALU_DEP_2)
+; GFX1132-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
; GFX1132-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX1132-NEXT: v_mov_b32_e32 v4, 0
; GFX1132-NEXT: s_or_saveexec_b32 s2, -1
; GFX1132-NEXT: v_writelane_b32 v3, s3, 16
; GFX1132-NEXT: s_mov_b32 exec_lo, s2
; GFX1132-NEXT: s_and_saveexec_b32 s3, vcc_lo
; GFX1132-NEXT: s_cbranch_execz .LBB9_2
; GFX1132-NEXT: ; %bb.1:
-; GFX1132-NEXT: v_mov_b32_e32 v0, 0
-; GFX1132-NEXT: v_mov_b32_e32 v4, s4
+; GFX1132-NEXT: v_mov_b32_e32 v0, s4
; GFX1132-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
; GFX1132-NEXT: s_waitcnt_vscnt null, 0x0
-; GFX1132-NEXT: ds_sub_rtn_u32 v0, v0, v4
+; GFX1132-NEXT: ds_sub_rtn_u32 v0, v4, v0
; GFX1132-NEXT: s_waitcnt lgkmcnt(0)
; GFX1132-NEXT: buffer_gl0_inv
; GFX1132-NEXT: .LBB9_2:
;
; GFX8-LABEL: sub_i32_varying_nouse:
; GFX8: ; %bb.0: ; %entry
-; GFX8-NEXT: v_mbcnt_lo_u32_b32 v2, exec_lo, 0
-; GFX8-NEXT: v_mbcnt_hi_u32_b32 v2, exec_hi, v2
+; GFX8-NEXT: v_mov_b32_e32 v2, 0
+; GFX8-NEXT: v_mbcnt_lo_u32_b32 v3, exec_lo, 0
+; GFX8-NEXT: v_mbcnt_hi_u32_b32 v3, exec_hi, v3
; GFX8-NEXT: v_mov_b32_e32 v1, v0
; GFX8-NEXT: s_not_b64 exec, exec
; GFX8-NEXT: v_mov_b32_e32 v1, 0
; GFX8-NEXT: v_readlane_b32 s2, v1, 63
; GFX8-NEXT: s_mov_b64 exec, s[0:1]
; GFX8-NEXT: s_mov_b32 s0, s2
-; GFX8-NEXT: v_cmp_eq_u32_e32 vcc, 0, v2
+; GFX8-NEXT: v_cmp_eq_u32_e32 vcc, 0, v3
; GFX8-NEXT: s_and_saveexec_b64 s[2:3], vcc
; GFX8-NEXT: s_cbranch_execz .LBB10_2
; GFX8-NEXT: ; %bb.1:
-; GFX8-NEXT: v_mov_b32_e32 v0, 0
-; GFX8-NEXT: v_mov_b32_e32 v2, s0
+; GFX8-NEXT: v_mov_b32_e32 v0, s0
; GFX8-NEXT: s_mov_b32 m0, -1
; GFX8-NEXT: s_waitcnt lgkmcnt(0)
-; GFX8-NEXT: ds_sub_u32 v0, v2
+; GFX8-NEXT: ds_sub_u32 v2, v0
; GFX8-NEXT: s_waitcnt lgkmcnt(0)
; GFX8-NEXT: .LBB10_2:
; GFX8-NEXT: s_endpgm
;
; GFX9-LABEL: sub_i32_varying_nouse:
; GFX9: ; %bb.0: ; %entry
-; GFX9-NEXT: v_mbcnt_lo_u32_b32 v2, exec_lo, 0
-; GFX9-NEXT: v_mbcnt_hi_u32_b32 v2, exec_hi, v2
+; GFX9-NEXT: v_mov_b32_e32 v2, 0
+; GFX9-NEXT: v_mbcnt_lo_u32_b32 v3, exec_lo, 0
+; GFX9-NEXT: v_mbcnt_hi_u32_b32 v3, exec_hi, v3
; GFX9-NEXT: v_mov_b32_e32 v1, v0
; GFX9-NEXT: s_not_b64 exec, exec
; GFX9-NEXT: v_mov_b32_e32 v1, 0
; GFX9-NEXT: v_readlane_b32 s2, v1, 63
; GFX9-NEXT: s_mov_b64 exec, s[0:1]
; GFX9-NEXT: s_mov_b32 s0, s2
-; GFX9-NEXT: v_cmp_eq_u32_e32 vcc, 0, v2
+; GFX9-NEXT: v_cmp_eq_u32_e32 vcc, 0, v3
; GFX9-NEXT: s_and_saveexec_b64 s[2:3], vcc
; GFX9-NEXT: s_cbranch_execz .LBB10_2
; GFX9-NEXT: ; %bb.1:
-; GFX9-NEXT: v_mov_b32_e32 v0, 0
-; GFX9-NEXT: v_mov_b32_e32 v2, s0
+; GFX9-NEXT: v_mov_b32_e32 v0, s0
; GFX9-NEXT: s_waitcnt lgkmcnt(0)
-; GFX9-NEXT: ds_sub_u32 v0, v2
+; GFX9-NEXT: ds_sub_u32 v2, v0
; GFX9-NEXT: s_waitcnt lgkmcnt(0)
; GFX9-NEXT: .LBB10_2:
; GFX9-NEXT: s_endpgm
; GFX1064-NEXT: v_readlane_b32 s2, v1, 0
; GFX1064-NEXT: v_readlane_b32 s3, v1, 32
; GFX1064-NEXT: s_mov_b64 exec, s[0:1]
-; GFX1064-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
+; GFX1064-NEXT: v_mbcnt_hi_u32_b32 v3, exec_hi, v0
+; GFX1064-NEXT: v_mov_b32_e32 v0, 0
; GFX1064-NEXT: s_add_i32 s0, s2, s3
-; GFX1064-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
+; GFX1064-NEXT: v_cmp_eq_u32_e32 vcc, 0, v3
; GFX1064-NEXT: s_and_saveexec_b64 s[2:3], vcc
; GFX1064-NEXT: s_cbranch_execz .LBB10_2
; GFX1064-NEXT: ; %bb.1:
-; GFX1064-NEXT: v_mov_b32_e32 v0, 0
; GFX1064-NEXT: v_mov_b32_e32 v3, s0
; GFX1064-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
; GFX1064-NEXT: s_waitcnt_vscnt null, 0x0
; GFX1032-NEXT: v_permlanex16_b32 v2, v2, -1, -1
; GFX1032-NEXT: v_add_nc_u32_e32 v1, v1, v2
; GFX1032-NEXT: s_mov_b32 exec_lo, s0
-; GFX1032-NEXT: v_mbcnt_lo_u32_b32 v3, exec_lo, 0
-; GFX1032-NEXT: v_mov_b32_e32 v0, v1
-; GFX1032-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v3
+; GFX1032-NEXT: v_mbcnt_lo_u32_b32 v4, exec_lo, 0
+; GFX1032-NEXT: v_mov_b32_e32 v0, 0
+; GFX1032-NEXT: v_mov_b32_e32 v3, v1
+; GFX1032-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v4
; GFX1032-NEXT: s_and_saveexec_b32 s0, vcc_lo
; GFX1032-NEXT: s_cbranch_execz .LBB10_2
; GFX1032-NEXT: ; %bb.1:
-; GFX1032-NEXT: v_mov_b32_e32 v3, 0
; GFX1032-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
; GFX1032-NEXT: s_waitcnt_vscnt null, 0x0
-; GFX1032-NEXT: ds_sub_u32 v3, v0
+; GFX1032-NEXT: ds_sub_u32 v0, v3
; GFX1032-NEXT: s_waitcnt lgkmcnt(0)
; GFX1032-NEXT: buffer_gl0_inv
; GFX1032-NEXT: .LBB10_2:
; GFX1164-NEXT: v_add_nc_u32_e32 v1, v1, v2
; GFX1164-NEXT: s_mov_b64 exec, s[0:1]
; GFX1164-NEXT: s_delay_alu instid0(VALU_DEP_2) | instid1(SALU_CYCLE_1)
-; GFX1164-NEXT: v_mbcnt_hi_u32_b32 v3, exec_hi, v0
-; GFX1164-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_2)
-; GFX1164-NEXT: v_mov_b32_e32 v0, v1
+; GFX1164-NEXT: v_mbcnt_hi_u32_b32 v4, exec_hi, v0
+; GFX1164-NEXT: v_mov_b32_e32 v0, 0
+; GFX1164-NEXT: s_delay_alu instid0(VALU_DEP_3) | instskip(SKIP_1) | instid1(VALU_DEP_3)
+; GFX1164-NEXT: v_mov_b32_e32 v3, v1
; GFX1164-NEXT: s_mov_b64 s[0:1], exec
-; GFX1164-NEXT: v_cmpx_eq_u32_e32 0, v3
+; GFX1164-NEXT: v_cmpx_eq_u32_e32 0, v4
; GFX1164-NEXT: s_cbranch_execz .LBB10_2
; GFX1164-NEXT: ; %bb.1:
-; GFX1164-NEXT: v_mov_b32_e32 v3, 0
; GFX1164-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
; GFX1164-NEXT: s_waitcnt_vscnt null, 0x0
-; GFX1164-NEXT: ds_sub_u32 v3, v0
+; GFX1164-NEXT: ds_sub_u32 v0, v3
; GFX1164-NEXT: s_waitcnt lgkmcnt(0)
; GFX1164-NEXT: buffer_gl0_inv
; GFX1164-NEXT: .LBB10_2:
; GFX1132-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(SALU_CYCLE_1)
; GFX1132-NEXT: v_add_nc_u32_e32 v1, v1, v2
; GFX1132-NEXT: s_mov_b32 exec_lo, s0
-; GFX1132-NEXT: v_mbcnt_lo_u32_b32 v3, exec_lo, 0
+; GFX1132-NEXT: v_mbcnt_lo_u32_b32 v4, exec_lo, 0
; GFX1132-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_2)
-; GFX1132-NEXT: v_mov_b32_e32 v0, v1
+; GFX1132-NEXT: v_dual_mov_b32 v0, 0 :: v_dual_mov_b32 v3, v1
; GFX1132-NEXT: s_mov_b32 s0, exec_lo
-; GFX1132-NEXT: v_cmpx_eq_u32_e32 0, v3
+; GFX1132-NEXT: v_cmpx_eq_u32_e32 0, v4
; GFX1132-NEXT: s_cbranch_execz .LBB10_2
; GFX1132-NEXT: ; %bb.1:
-; GFX1132-NEXT: v_mov_b32_e32 v3, 0
; GFX1132-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
; GFX1132-NEXT: s_waitcnt_vscnt null, 0x0
-; GFX1132-NEXT: ds_sub_u32 v3, v0
+; GFX1132-NEXT: ds_sub_u32 v0, v3
; GFX1132-NEXT: s_waitcnt lgkmcnt(0)
; GFX1132-NEXT: buffer_gl0_inv
; GFX1132-NEXT: .LBB10_2:
; GFX7LESS: ; %bb.0: ; %entry
; GFX7LESS-NEXT: s_mov_b64 s[4:5], exec
; GFX7LESS-NEXT: v_mbcnt_lo_u32_b32_e64 v0, s4, 0
-; GFX7LESS-NEXT: v_mbcnt_hi_u32_b32_e32 v2, s5, v0
-; GFX7LESS-NEXT: v_cmp_eq_u32_e32 vcc, 0, v2
+; GFX7LESS-NEXT: v_mbcnt_hi_u32_b32_e32 v3, s5, v0
+; GFX7LESS-NEXT: v_mov_b32_e32 v2, 0
+; GFX7LESS-NEXT: v_cmp_eq_u32_e32 vcc, 0, v3
; GFX7LESS-NEXT: ; implicit-def: $vgpr0_vgpr1
; GFX7LESS-NEXT: s_and_saveexec_b64 s[2:3], vcc
; GFX7LESS-NEXT: s_cbranch_execz .LBB11_2
; GFX7LESS-NEXT: ; %bb.1:
; GFX7LESS-NEXT: s_bcnt1_i32_b64 s4, s[4:5]
; GFX7LESS-NEXT: s_mul_i32 s4, s4, 5
-; GFX7LESS-NEXT: v_mov_b32_e32 v1, 0
-; GFX7LESS-NEXT: v_mov_b32_e32 v0, s4
+; GFX7LESS-NEXT: v_mov_b32_e32 v1, s4
; GFX7LESS-NEXT: s_mov_b32 m0, -1
; GFX7LESS-NEXT: s_waitcnt lgkmcnt(0)
-; GFX7LESS-NEXT: ds_sub_rtn_u64 v[0:1], v1, v[0:1]
+; GFX7LESS-NEXT: ds_sub_rtn_u64 v[0:1], v2, v[1:2]
; GFX7LESS-NEXT: s_waitcnt lgkmcnt(0)
; GFX7LESS-NEXT: .LBB11_2:
; GFX7LESS-NEXT: s_or_b64 exec, exec, s[2:3]
; GFX7LESS-NEXT: s_waitcnt lgkmcnt(0)
; GFX7LESS-NEXT: v_readfirstlane_b32 s4, v0
; GFX7LESS-NEXT: v_readfirstlane_b32 s5, v1
-; GFX7LESS-NEXT: v_mul_hi_u32_u24_e32 v1, 5, v2
-; GFX7LESS-NEXT: v_mul_u32_u24_e32 v0, 5, v2
+; GFX7LESS-NEXT: v_mul_hi_u32_u24_e32 v1, 5, v3
+; GFX7LESS-NEXT: v_mul_u32_u24_e32 v0, 5, v3
; GFX7LESS-NEXT: v_mov_b32_e32 v2, s5
; GFX7LESS-NEXT: v_sub_i32_e32 v0, vcc, s4, v0
; GFX7LESS-NEXT: v_subb_u32_e32 v1, vcc, v2, v1, vcc
; GFX8: ; %bb.0: ; %entry
; GFX8-NEXT: s_mov_b64 s[4:5], exec
; GFX8-NEXT: v_mbcnt_lo_u32_b32 v0, s4, 0
-; GFX8-NEXT: v_mbcnt_hi_u32_b32 v2, s5, v0
-; GFX8-NEXT: v_cmp_eq_u32_e32 vcc, 0, v2
+; GFX8-NEXT: v_mbcnt_hi_u32_b32 v3, s5, v0
+; GFX8-NEXT: v_mov_b32_e32 v2, 0
+; GFX8-NEXT: v_cmp_eq_u32_e32 vcc, 0, v3
; GFX8-NEXT: ; implicit-def: $vgpr0_vgpr1
; GFX8-NEXT: s_and_saveexec_b64 s[2:3], vcc
; GFX8-NEXT: s_cbranch_execz .LBB11_2
; GFX8-NEXT: ; %bb.1:
; GFX8-NEXT: s_bcnt1_i32_b64 s4, s[4:5]
; GFX8-NEXT: s_mul_i32 s4, s4, 5
-; GFX8-NEXT: v_mov_b32_e32 v0, s4
-; GFX8-NEXT: v_mov_b32_e32 v1, 0
+; GFX8-NEXT: v_mov_b32_e32 v1, s4
; GFX8-NEXT: s_mov_b32 m0, -1
; GFX8-NEXT: s_waitcnt lgkmcnt(0)
-; GFX8-NEXT: ds_sub_rtn_u64 v[0:1], v1, v[0:1]
+; GFX8-NEXT: ds_sub_rtn_u64 v[0:1], v2, v[1:2]
; GFX8-NEXT: s_waitcnt lgkmcnt(0)
; GFX8-NEXT: .LBB11_2:
; GFX8-NEXT: s_or_b64 exec, exec, s[2:3]
; GFX8-NEXT: s_waitcnt lgkmcnt(0)
; GFX8-NEXT: v_readfirstlane_b32 s4, v0
; GFX8-NEXT: v_readfirstlane_b32 s5, v1
-; GFX8-NEXT: v_mul_u32_u24_e32 v0, 5, v2
-; GFX8-NEXT: v_mul_hi_u32_u24_e32 v1, 5, v2
+; GFX8-NEXT: v_mul_u32_u24_e32 v0, 5, v3
+; GFX8-NEXT: v_mul_hi_u32_u24_e32 v1, 5, v3
; GFX8-NEXT: v_mov_b32_e32 v2, s5
; GFX8-NEXT: v_sub_u32_e32 v0, vcc, s4, v0
; GFX8-NEXT: s_mov_b32 s3, 0xf000
; GFX9: ; %bb.0: ; %entry
; GFX9-NEXT: s_mov_b64 s[4:5], exec
; GFX9-NEXT: v_mbcnt_lo_u32_b32 v0, s4, 0
-; GFX9-NEXT: v_mbcnt_hi_u32_b32 v2, s5, v0
-; GFX9-NEXT: v_cmp_eq_u32_e32 vcc, 0, v2
+; GFX9-NEXT: v_mbcnt_hi_u32_b32 v3, s5, v0
+; GFX9-NEXT: v_mov_b32_e32 v2, 0
+; GFX9-NEXT: v_cmp_eq_u32_e32 vcc, 0, v3
; GFX9-NEXT: ; implicit-def: $vgpr0_vgpr1
; GFX9-NEXT: s_and_saveexec_b64 s[2:3], vcc
; GFX9-NEXT: s_cbranch_execz .LBB11_2
; GFX9-NEXT: ; %bb.1:
; GFX9-NEXT: s_bcnt1_i32_b64 s4, s[4:5]
; GFX9-NEXT: s_mul_i32 s4, s4, 5
-; GFX9-NEXT: v_mov_b32_e32 v0, s4
-; GFX9-NEXT: v_mov_b32_e32 v1, 0
+; GFX9-NEXT: v_mov_b32_e32 v1, s4
; GFX9-NEXT: s_waitcnt lgkmcnt(0)
-; GFX9-NEXT: ds_sub_rtn_u64 v[0:1], v1, v[0:1]
+; GFX9-NEXT: ds_sub_rtn_u64 v[0:1], v2, v[1:2]
; GFX9-NEXT: s_waitcnt lgkmcnt(0)
; GFX9-NEXT: .LBB11_2:
; GFX9-NEXT: s_or_b64 exec, exec, s[2:3]
; GFX9-NEXT: s_waitcnt lgkmcnt(0)
; GFX9-NEXT: v_readfirstlane_b32 s4, v0
; GFX9-NEXT: v_readfirstlane_b32 s5, v1
-; GFX9-NEXT: v_mul_u32_u24_e32 v0, 5, v2
-; GFX9-NEXT: v_mul_hi_u32_u24_e32 v1, 5, v2
+; GFX9-NEXT: v_mul_u32_u24_e32 v0, 5, v3
+; GFX9-NEXT: v_mul_hi_u32_u24_e32 v1, 5, v3
; GFX9-NEXT: v_mov_b32_e32 v2, s5
; GFX9-NEXT: v_sub_co_u32_e32 v0, vcc, s4, v0
; GFX9-NEXT: s_mov_b32 s3, 0xf000
; GFX1064-LABEL: sub_i64_constant:
; GFX1064: ; %bb.0: ; %entry
; GFX1064-NEXT: s_mov_b64 s[4:5], exec
+; GFX1064-NEXT: v_mov_b32_e32 v2, 0
; GFX1064-NEXT: v_mbcnt_lo_u32_b32 v0, s4, 0
-; GFX1064-NEXT: v_mbcnt_hi_u32_b32 v2, s5, v0
+; GFX1064-NEXT: v_mbcnt_hi_u32_b32 v3, s5, v0
; GFX1064-NEXT: ; implicit-def: $vgpr0_vgpr1
-; GFX1064-NEXT: v_cmp_eq_u32_e32 vcc, 0, v2
+; GFX1064-NEXT: v_cmp_eq_u32_e32 vcc, 0, v3
; GFX1064-NEXT: s_and_saveexec_b64 s[2:3], vcc
; GFX1064-NEXT: s_cbranch_execz .LBB11_2
; GFX1064-NEXT: ; %bb.1:
; GFX1064-NEXT: s_bcnt1_i32_b64 s4, s[4:5]
-; GFX1064-NEXT: v_mov_b32_e32 v1, 0
; GFX1064-NEXT: s_mul_i32 s4, s4, 5
-; GFX1064-NEXT: v_mov_b32_e32 v0, s4
+; GFX1064-NEXT: v_mov_b32_e32 v1, s4
; GFX1064-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
; GFX1064-NEXT: s_waitcnt_vscnt null, 0x0
-; GFX1064-NEXT: ds_sub_rtn_u64 v[0:1], v1, v[0:1]
+; GFX1064-NEXT: ds_sub_rtn_u64 v[0:1], v2, v[1:2]
; GFX1064-NEXT: s_waitcnt lgkmcnt(0)
; GFX1064-NEXT: buffer_gl0_inv
; GFX1064-NEXT: .LBB11_2:
; GFX1064-NEXT: s_or_b64 exec, exec, s[2:3]
; GFX1064-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x24
; GFX1064-NEXT: v_readfirstlane_b32 s2, v0
-; GFX1064-NEXT: v_mul_u32_u24_e32 v0, 5, v2
+; GFX1064-NEXT: v_mul_u32_u24_e32 v0, 5, v3
; GFX1064-NEXT: v_readfirstlane_b32 s3, v1
-; GFX1064-NEXT: v_mul_hi_u32_u24_e32 v1, 5, v2
+; GFX1064-NEXT: v_mul_hi_u32_u24_e32 v1, 5, v3
; GFX1064-NEXT: v_sub_co_u32 v0, vcc, s2, v0
; GFX1064-NEXT: v_sub_co_ci_u32_e32 v1, vcc, s3, v1, vcc
; GFX1064-NEXT: s_mov_b32 s3, 0x31016000
; GFX1032-LABEL: sub_i64_constant:
; GFX1032: ; %bb.0: ; %entry
; GFX1032-NEXT: s_mov_b32 s3, exec_lo
+; GFX1032-NEXT: v_mov_b32_e32 v2, 0
+; GFX1032-NEXT: v_mbcnt_lo_u32_b32 v3, s3, 0
; GFX1032-NEXT: ; implicit-def: $vgpr0_vgpr1
-; GFX1032-NEXT: v_mbcnt_lo_u32_b32 v2, s3, 0
-; GFX1032-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v2
+; GFX1032-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v3
; GFX1032-NEXT: s_and_saveexec_b32 s2, vcc_lo
; GFX1032-NEXT: s_cbranch_execz .LBB11_2
; GFX1032-NEXT: ; %bb.1:
; GFX1032-NEXT: s_bcnt1_i32_b32 s3, s3
-; GFX1032-NEXT: v_mov_b32_e32 v1, 0
; GFX1032-NEXT: s_mul_i32 s3, s3, 5
-; GFX1032-NEXT: v_mov_b32_e32 v0, s3
+; GFX1032-NEXT: v_mov_b32_e32 v1, s3
; GFX1032-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
; GFX1032-NEXT: s_waitcnt_vscnt null, 0x0
-; GFX1032-NEXT: ds_sub_rtn_u64 v[0:1], v1, v[0:1]
+; GFX1032-NEXT: ds_sub_rtn_u64 v[0:1], v2, v[1:2]
; GFX1032-NEXT: s_waitcnt lgkmcnt(0)
; GFX1032-NEXT: buffer_gl0_inv
; GFX1032-NEXT: .LBB11_2:
; GFX1032-NEXT: s_or_b32 exec_lo, exec_lo, s2
; GFX1032-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x24
; GFX1032-NEXT: v_readfirstlane_b32 s2, v0
-; GFX1032-NEXT: v_mul_u32_u24_e32 v0, 5, v2
+; GFX1032-NEXT: v_mul_u32_u24_e32 v0, 5, v3
; GFX1032-NEXT: v_readfirstlane_b32 s3, v1
-; GFX1032-NEXT: v_mul_hi_u32_u24_e32 v1, 5, v2
+; GFX1032-NEXT: v_mul_hi_u32_u24_e32 v1, 5, v3
; GFX1032-NEXT: v_sub_co_u32 v0, vcc_lo, s2, v0
; GFX1032-NEXT: v_sub_co_ci_u32_e32 v1, vcc_lo, s3, v1, vcc_lo
; GFX1032-NEXT: s_mov_b32 s3, 0x31016000
; GFX1164-LABEL: sub_i64_constant:
; GFX1164: ; %bb.0: ; %entry
; GFX1164-NEXT: s_mov_b64 s[4:5], exec
-; GFX1164-NEXT: s_mov_b64 s[2:3], exec
+; GFX1164-NEXT: v_mov_b32_e32 v2, 0
; GFX1164-NEXT: v_mbcnt_lo_u32_b32 v0, s4, 0
+; GFX1164-NEXT: s_mov_b64 s[2:3], exec
; GFX1164-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
-; GFX1164-NEXT: v_mbcnt_hi_u32_b32 v2, s5, v0
+; GFX1164-NEXT: v_mbcnt_hi_u32_b32 v3, s5, v0
; GFX1164-NEXT: ; implicit-def: $vgpr0_vgpr1
-; GFX1164-NEXT: v_cmpx_eq_u32_e32 0, v2
+; GFX1164-NEXT: v_cmpx_eq_u32_e32 0, v3
; GFX1164-NEXT: s_cbranch_execz .LBB11_2
; GFX1164-NEXT: ; %bb.1:
; GFX1164-NEXT: s_bcnt1_i32_b64 s4, s[4:5]
-; GFX1164-NEXT: v_mov_b32_e32 v1, 0
+; GFX1164-NEXT: s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
; GFX1164-NEXT: s_mul_i32 s4, s4, 5
-; GFX1164-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
-; GFX1164-NEXT: v_mov_b32_e32 v0, s4
+; GFX1164-NEXT: v_mov_b32_e32 v1, s4
; GFX1164-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
; GFX1164-NEXT: s_waitcnt_vscnt null, 0x0
-; GFX1164-NEXT: ds_sub_rtn_u64 v[0:1], v1, v[0:1]
+; GFX1164-NEXT: ds_sub_rtn_u64 v[0:1], v2, v[1:2]
; GFX1164-NEXT: s_waitcnt lgkmcnt(0)
; GFX1164-NEXT: buffer_gl0_inv
; GFX1164-NEXT: .LBB11_2:
; GFX1164-NEXT: s_or_b64 exec, exec, s[2:3]
; GFX1164-NEXT: s_load_b64 s[0:1], s[0:1], 0x24
; GFX1164-NEXT: v_readfirstlane_b32 s2, v0
-; GFX1164-NEXT: v_mul_u32_u24_e32 v0, 5, v2
+; GFX1164-NEXT: v_mul_u32_u24_e32 v0, 5, v3
; GFX1164-NEXT: v_readfirstlane_b32 s3, v1
-; GFX1164-NEXT: v_mul_hi_u32_u24_e32 v1, 5, v2
+; GFX1164-NEXT: v_mul_hi_u32_u24_e32 v1, 5, v3
; GFX1164-NEXT: s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_2)
; GFX1164-NEXT: v_sub_co_u32 v0, vcc, s2, v0
; GFX1164-NEXT: v_sub_co_ci_u32_e32 v1, vcc, s3, v1, vcc
; GFX1132-LABEL: sub_i64_constant:
; GFX1132: ; %bb.0: ; %entry
; GFX1132-NEXT: s_mov_b32 s3, exec_lo
+; GFX1132-NEXT: v_mov_b32_e32 v2, 0
+; GFX1132-NEXT: v_mbcnt_lo_u32_b32 v3, s3, 0
; GFX1132-NEXT: s_mov_b32 s2, exec_lo
-; GFX1132-NEXT: v_mbcnt_lo_u32_b32 v2, s3, 0
; GFX1132-NEXT: ; implicit-def: $vgpr0_vgpr1
; GFX1132-NEXT: s_delay_alu instid0(VALU_DEP_1)
-; GFX1132-NEXT: v_cmpx_eq_u32_e32 0, v2
+; GFX1132-NEXT: v_cmpx_eq_u32_e32 0, v3
; GFX1132-NEXT: s_cbranch_execz .LBB11_2
; GFX1132-NEXT: ; %bb.1:
; GFX1132-NEXT: s_bcnt1_i32_b32 s3, s3
-; GFX1132-NEXT: v_mov_b32_e32 v1, 0
+; GFX1132-NEXT: s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
; GFX1132-NEXT: s_mul_i32 s3, s3, 5
-; GFX1132-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
-; GFX1132-NEXT: v_mov_b32_e32 v0, s3
+; GFX1132-NEXT: v_mov_b32_e32 v1, s3
; GFX1132-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
; GFX1132-NEXT: s_waitcnt_vscnt null, 0x0
-; GFX1132-NEXT: ds_sub_rtn_u64 v[0:1], v1, v[0:1]
+; GFX1132-NEXT: ds_sub_rtn_u64 v[0:1], v2, v[1:2]
; GFX1132-NEXT: s_waitcnt lgkmcnt(0)
; GFX1132-NEXT: buffer_gl0_inv
; GFX1132-NEXT: .LBB11_2:
; GFX1132-NEXT: s_or_b32 exec_lo, exec_lo, s2
; GFX1132-NEXT: s_load_b64 s[0:1], s[0:1], 0x24
; GFX1132-NEXT: v_readfirstlane_b32 s2, v0
-; GFX1132-NEXT: v_mul_u32_u24_e32 v0, 5, v2
+; GFX1132-NEXT: v_mul_u32_u24_e32 v0, 5, v3
; GFX1132-NEXT: v_readfirstlane_b32 s3, v1
-; GFX1132-NEXT: v_mul_hi_u32_u24_e32 v1, 5, v2
+; GFX1132-NEXT: v_mul_hi_u32_u24_e32 v1, 5, v3
; GFX1132-NEXT: s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_2)
; GFX1132-NEXT: v_sub_co_u32 v0, vcc_lo, s2, v0
; GFX1132-NEXT: v_sub_co_ci_u32_e32 v1, vcc_lo, s3, v1, vcc_lo
; GFX7LESS-NEXT: s_load_dwordx4 s[0:3], s[0:1], 0x9
; GFX7LESS-NEXT: v_mbcnt_lo_u32_b32_e64 v0, s6, 0
; GFX7LESS-NEXT: v_mbcnt_hi_u32_b32_e32 v2, s7, v0
+; GFX7LESS-NEXT: v_mov_b32_e32 v3, 0
; GFX7LESS-NEXT: v_cmp_eq_u32_e32 vcc, 0, v2
; GFX7LESS-NEXT: ; implicit-def: $vgpr0_vgpr1
; GFX7LESS-NEXT: s_and_saveexec_b64 s[4:5], vcc
; GFX7LESS-NEXT: s_cbranch_execz .LBB12_2
; GFX7LESS-NEXT: ; %bb.1:
; GFX7LESS-NEXT: s_bcnt1_i32_b64 s6, s[6:7]
-; GFX7LESS-NEXT: v_mov_b32_e32 v3, 0
; GFX7LESS-NEXT: s_waitcnt lgkmcnt(0)
; GFX7LESS-NEXT: s_mul_i32 s7, s3, s6
; GFX7LESS-NEXT: v_mov_b32_e32 v0, s6
; GFX8-NEXT: s_mov_b64 s[6:7], exec
; GFX8-NEXT: v_mbcnt_lo_u32_b32 v0, s6, 0
; GFX8-NEXT: v_mbcnt_hi_u32_b32 v2, s7, v0
+; GFX8-NEXT: v_mov_b32_e32 v3, 0
; GFX8-NEXT: v_cmp_eq_u32_e32 vcc, 0, v2
; GFX8-NEXT: ; implicit-def: $vgpr0_vgpr1
; GFX8-NEXT: s_and_saveexec_b64 s[4:5], vcc
; GFX8-NEXT: s_waitcnt lgkmcnt(0)
; GFX8-NEXT: v_mad_u64_u32 v[0:1], s[6:7], s2, v0, 0
; GFX8-NEXT: s_mul_i32 s6, s3, s8
-; GFX8-NEXT: v_mov_b32_e32 v3, 0
-; GFX8-NEXT: v_add_u32_e32 v1, vcc, s6, v1
; GFX8-NEXT: s_mov_b32 m0, -1
+; GFX8-NEXT: v_add_u32_e32 v1, vcc, s6, v1
; GFX8-NEXT: s_waitcnt lgkmcnt(0)
; GFX8-NEXT: ds_sub_rtn_u64 v[0:1], v3, v[0:1]
; GFX8-NEXT: s_waitcnt lgkmcnt(0)
; GFX9-NEXT: s_mov_b64 s[6:7], exec
; GFX9-NEXT: v_mbcnt_lo_u32_b32 v0, s6, 0
; GFX9-NEXT: v_mbcnt_hi_u32_b32 v2, s7, v0
+; GFX9-NEXT: v_mov_b32_e32 v3, 0
; GFX9-NEXT: v_cmp_eq_u32_e32 vcc, 0, v2
; GFX9-NEXT: ; implicit-def: $vgpr0_vgpr1
; GFX9-NEXT: s_and_saveexec_b64 s[4:5], vcc
; GFX9-NEXT: s_mul_i32 s6, s2, s6
; GFX9-NEXT: v_mov_b32_e32 v0, s6
; GFX9-NEXT: v_mov_b32_e32 v1, s8
-; GFX9-NEXT: v_mov_b32_e32 v3, 0
; GFX9-NEXT: s_waitcnt lgkmcnt(0)
; GFX9-NEXT: ds_sub_rtn_u64 v[0:1], v3, v[0:1]
; GFX9-NEXT: s_waitcnt lgkmcnt(0)
; GFX1064: ; %bb.0: ; %entry
; GFX1064-NEXT: s_load_dwordx4 s[0:3], s[0:1], 0x24
; GFX1064-NEXT: s_mov_b64 s[6:7], exec
+; GFX1064-NEXT: v_mov_b32_e32 v3, 0
; GFX1064-NEXT: v_mbcnt_lo_u32_b32 v0, s6, 0
; GFX1064-NEXT: v_mbcnt_hi_u32_b32 v2, s7, v0
; GFX1064-NEXT: ; implicit-def: $vgpr0_vgpr1
; GFX1064-NEXT: s_cbranch_execz .LBB12_2
; GFX1064-NEXT: ; %bb.1:
; GFX1064-NEXT: s_bcnt1_i32_b64 s6, s[6:7]
-; GFX1064-NEXT: v_mov_b32_e32 v3, 0
; GFX1064-NEXT: s_waitcnt lgkmcnt(0)
; GFX1064-NEXT: s_mul_i32 s7, s3, s6
; GFX1064-NEXT: s_mul_hi_u32 s8, s2, s6
; GFX1032: ; %bb.0: ; %entry
; GFX1032-NEXT: s_load_dwordx4 s[0:3], s[0:1], 0x24
; GFX1032-NEXT: s_mov_b32 s5, exec_lo
-; GFX1032-NEXT: ; implicit-def: $vgpr0_vgpr1
+; GFX1032-NEXT: v_mov_b32_e32 v3, 0
; GFX1032-NEXT: v_mbcnt_lo_u32_b32 v2, s5, 0
+; GFX1032-NEXT: ; implicit-def: $vgpr0_vgpr1
; GFX1032-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v2
; GFX1032-NEXT: s_and_saveexec_b32 s4, vcc_lo
; GFX1032-NEXT: s_cbranch_execz .LBB12_2
; GFX1032-NEXT: ; %bb.1:
; GFX1032-NEXT: s_bcnt1_i32_b32 s5, s5
-; GFX1032-NEXT: v_mov_b32_e32 v3, 0
; GFX1032-NEXT: s_waitcnt lgkmcnt(0)
; GFX1032-NEXT: s_mul_i32 s6, s3, s5
; GFX1032-NEXT: s_mul_hi_u32 s7, s2, s5
; GFX1164: ; %bb.0: ; %entry
; GFX1164-NEXT: s_load_b128 s[0:3], s[0:1], 0x24
; GFX1164-NEXT: s_mov_b64 s[6:7], exec
-; GFX1164-NEXT: s_mov_b64 s[4:5], exec
+; GFX1164-NEXT: v_mov_b32_e32 v3, 0
; GFX1164-NEXT: v_mbcnt_lo_u32_b32 v0, s6, 0
+; GFX1164-NEXT: s_mov_b64 s[4:5], exec
; GFX1164-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
; GFX1164-NEXT: v_mbcnt_hi_u32_b32 v2, s7, v0
; GFX1164-NEXT: ; implicit-def: $vgpr0_vgpr1
; GFX1164-NEXT: s_cbranch_execz .LBB12_2
; GFX1164-NEXT: ; %bb.1:
; GFX1164-NEXT: s_bcnt1_i32_b64 s6, s[6:7]
-; GFX1164-NEXT: v_mov_b32_e32 v3, 0
; GFX1164-NEXT: s_waitcnt lgkmcnt(0)
; GFX1164-NEXT: s_mul_i32 s7, s3, s6
; GFX1164-NEXT: s_mul_hi_u32 s8, s2, s6
; GFX1132: ; %bb.0: ; %entry
; GFX1132-NEXT: s_load_b128 s[0:3], s[0:1], 0x24
; GFX1132-NEXT: s_mov_b32 s5, exec_lo
-; GFX1132-NEXT: s_mov_b32 s4, exec_lo
+; GFX1132-NEXT: v_mov_b32_e32 v3, 0
; GFX1132-NEXT: v_mbcnt_lo_u32_b32 v2, s5, 0
+; GFX1132-NEXT: s_mov_b32 s4, exec_lo
; GFX1132-NEXT: ; implicit-def: $vgpr0_vgpr1
; GFX1132-NEXT: s_delay_alu instid0(VALU_DEP_1)
; GFX1132-NEXT: v_cmpx_eq_u32_e32 0, v2
; GFX1132-NEXT: s_cbranch_execz .LBB12_2
; GFX1132-NEXT: ; %bb.1:
; GFX1132-NEXT: s_bcnt1_i32_b32 s5, s5
-; GFX1132-NEXT: v_mov_b32_e32 v3, 0
; GFX1132-NEXT: s_waitcnt lgkmcnt(0)
; GFX1132-NEXT: s_mul_i32 s6, s3, s5
; GFX1132-NEXT: s_mul_hi_u32 s7, s2, s5
;
; GFX8-LABEL: or_i32_varying:
; GFX8: ; %bb.0: ; %entry
-; GFX8-NEXT: s_or_saveexec_b64 s[2:3], -1
-; GFX8-NEXT: v_mov_b32_e32 v1, 0
-; GFX8-NEXT: s_mov_b64 exec, s[2:3]
-; GFX8-NEXT: v_mbcnt_lo_u32_b32 v3, exec_lo, 0
-; GFX8-NEXT: v_mbcnt_hi_u32_b32 v3, exec_hi, v3
-; GFX8-NEXT: v_mov_b32_e32 v2, v0
+; GFX8-NEXT: v_mov_b32_e32 v3, 0
+; GFX8-NEXT: v_mbcnt_lo_u32_b32 v4, exec_lo, 0
+; GFX8-NEXT: v_mbcnt_hi_u32_b32 v4, exec_hi, v4
+; GFX8-NEXT: v_mov_b32_e32 v1, v0
; GFX8-NEXT: s_not_b64 exec, exec
-; GFX8-NEXT: v_mov_b32_e32 v2, 0
+; GFX8-NEXT: v_mov_b32_e32 v1, 0
; GFX8-NEXT: s_not_b64 exec, exec
; GFX8-NEXT: s_or_saveexec_b64 s[2:3], -1
-; GFX8-NEXT: v_or_b32_dpp v2, v2, v2 row_shr:1 row_mask:0xf bank_mask:0xf bound_ctrl:1
-; GFX8-NEXT: s_nop 1
-; GFX8-NEXT: v_or_b32_dpp v2, v2, v2 row_shr:2 row_mask:0xf bank_mask:0xf bound_ctrl:1
+; GFX8-NEXT: v_or_b32_dpp v1, v1, v1 row_shr:1 row_mask:0xf bank_mask:0xf bound_ctrl:1
+; GFX8-NEXT: v_mov_b32_e32 v2, 0
+; GFX8-NEXT: s_nop 0
+; GFX8-NEXT: v_or_b32_dpp v1, v1, v1 row_shr:2 row_mask:0xf bank_mask:0xf bound_ctrl:1
; GFX8-NEXT: s_nop 1
-; GFX8-NEXT: v_or_b32_dpp v2, v2, v2 row_shr:4 row_mask:0xf bank_mask:0xf bound_ctrl:1
+; GFX8-NEXT: v_or_b32_dpp v1, v1, v1 row_shr:4 row_mask:0xf bank_mask:0xf bound_ctrl:1
; GFX8-NEXT: s_nop 1
-; GFX8-NEXT: v_or_b32_dpp v2, v2, v2 row_shr:8 row_mask:0xf bank_mask:0xf bound_ctrl:1
+; GFX8-NEXT: v_or_b32_dpp v1, v1, v1 row_shr:8 row_mask:0xf bank_mask:0xf bound_ctrl:1
; GFX8-NEXT: s_nop 1
-; GFX8-NEXT: v_or_b32_dpp v2, v2, v2 row_bcast:15 row_mask:0xa bank_mask:0xf
+; GFX8-NEXT: v_or_b32_dpp v1, v1, v1 row_bcast:15 row_mask:0xa bank_mask:0xf
; GFX8-NEXT: s_nop 1
-; GFX8-NEXT: v_or_b32_dpp v2, v2, v2 row_bcast:31 row_mask:0xc bank_mask:0xf
-; GFX8-NEXT: v_readlane_b32 s4, v2, 63
+; GFX8-NEXT: v_or_b32_dpp v1, v1, v1 row_bcast:31 row_mask:0xc bank_mask:0xf
+; GFX8-NEXT: v_readlane_b32 s4, v1, 63
; GFX8-NEXT: s_nop 0
-; GFX8-NEXT: v_mov_b32_dpp v1, v2 wave_shr:1 row_mask:0xf bank_mask:0xf
+; GFX8-NEXT: v_mov_b32_dpp v2, v1 wave_shr:1 row_mask:0xf bank_mask:0xf
; GFX8-NEXT: s_mov_b64 exec, s[2:3]
-; GFX8-NEXT: v_cmp_eq_u32_e32 vcc, 0, v3
+; GFX8-NEXT: v_cmp_eq_u32_e32 vcc, 0, v4
; GFX8-NEXT: ; implicit-def: $vgpr0
; GFX8-NEXT: s_and_saveexec_b64 s[2:3], vcc
; GFX8-NEXT: s_cbranch_execz .LBB15_2
; GFX8-NEXT: ; %bb.1:
-; GFX8-NEXT: v_mov_b32_e32 v0, 0
-; GFX8-NEXT: v_mov_b32_e32 v3, s4
+; GFX8-NEXT: v_mov_b32_e32 v0, s4
; GFX8-NEXT: s_mov_b32 m0, -1
; GFX8-NEXT: s_waitcnt lgkmcnt(0)
-; GFX8-NEXT: ds_or_rtn_b32 v0, v0, v3
+; GFX8-NEXT: ds_or_rtn_b32 v0, v3, v0
; GFX8-NEXT: s_waitcnt lgkmcnt(0)
; GFX8-NEXT: .LBB15_2:
; GFX8-NEXT: s_or_b64 exec, exec, s[2:3]
; GFX8-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x24
; GFX8-NEXT: s_waitcnt lgkmcnt(0)
; GFX8-NEXT: v_readfirstlane_b32 s4, v0
-; GFX8-NEXT: v_mov_b32_e32 v0, v1
+; GFX8-NEXT: v_mov_b32_e32 v0, v2
; GFX8-NEXT: s_mov_b32 s3, 0xf000
; GFX8-NEXT: s_mov_b32 s2, -1
; GFX8-NEXT: v_or_b32_e32 v0, s4, v0
;
; GFX9-LABEL: or_i32_varying:
; GFX9: ; %bb.0: ; %entry
-; GFX9-NEXT: s_or_saveexec_b64 s[2:3], -1
-; GFX9-NEXT: v_mov_b32_e32 v1, 0
-; GFX9-NEXT: s_mov_b64 exec, s[2:3]
-; GFX9-NEXT: v_mbcnt_lo_u32_b32 v3, exec_lo, 0
-; GFX9-NEXT: v_mbcnt_hi_u32_b32 v3, exec_hi, v3
-; GFX9-NEXT: v_mov_b32_e32 v2, v0
+; GFX9-NEXT: v_mov_b32_e32 v3, 0
+; GFX9-NEXT: v_mbcnt_lo_u32_b32 v4, exec_lo, 0
+; GFX9-NEXT: v_mbcnt_hi_u32_b32 v4, exec_hi, v4
+; GFX9-NEXT: v_mov_b32_e32 v1, v0
; GFX9-NEXT: s_not_b64 exec, exec
-; GFX9-NEXT: v_mov_b32_e32 v2, 0
+; GFX9-NEXT: v_mov_b32_e32 v1, 0
; GFX9-NEXT: s_not_b64 exec, exec
; GFX9-NEXT: s_or_saveexec_b64 s[2:3], -1
-; GFX9-NEXT: v_or_b32_dpp v2, v2, v2 row_shr:1 row_mask:0xf bank_mask:0xf bound_ctrl:1
-; GFX9-NEXT: s_nop 1
-; GFX9-NEXT: v_or_b32_dpp v2, v2, v2 row_shr:2 row_mask:0xf bank_mask:0xf bound_ctrl:1
+; GFX9-NEXT: v_or_b32_dpp v1, v1, v1 row_shr:1 row_mask:0xf bank_mask:0xf bound_ctrl:1
+; GFX9-NEXT: v_mov_b32_e32 v2, 0
+; GFX9-NEXT: s_nop 0
+; GFX9-NEXT: v_or_b32_dpp v1, v1, v1 row_shr:2 row_mask:0xf bank_mask:0xf bound_ctrl:1
; GFX9-NEXT: s_nop 1
-; GFX9-NEXT: v_or_b32_dpp v2, v2, v2 row_shr:4 row_mask:0xf bank_mask:0xf bound_ctrl:1
+; GFX9-NEXT: v_or_b32_dpp v1, v1, v1 row_shr:4 row_mask:0xf bank_mask:0xf bound_ctrl:1
; GFX9-NEXT: s_nop 1
-; GFX9-NEXT: v_or_b32_dpp v2, v2, v2 row_shr:8 row_mask:0xf bank_mask:0xf bound_ctrl:1
+; GFX9-NEXT: v_or_b32_dpp v1, v1, v1 row_shr:8 row_mask:0xf bank_mask:0xf bound_ctrl:1
; GFX9-NEXT: s_nop 1
-; GFX9-NEXT: v_or_b32_dpp v2, v2, v2 row_bcast:15 row_mask:0xa bank_mask:0xf
+; GFX9-NEXT: v_or_b32_dpp v1, v1, v1 row_bcast:15 row_mask:0xa bank_mask:0xf
; GFX9-NEXT: s_nop 1
-; GFX9-NEXT: v_or_b32_dpp v2, v2, v2 row_bcast:31 row_mask:0xc bank_mask:0xf
-; GFX9-NEXT: v_readlane_b32 s4, v2, 63
+; GFX9-NEXT: v_or_b32_dpp v1, v1, v1 row_bcast:31 row_mask:0xc bank_mask:0xf
+; GFX9-NEXT: v_readlane_b32 s4, v1, 63
; GFX9-NEXT: s_nop 0
-; GFX9-NEXT: v_mov_b32_dpp v1, v2 wave_shr:1 row_mask:0xf bank_mask:0xf
+; GFX9-NEXT: v_mov_b32_dpp v2, v1 wave_shr:1 row_mask:0xf bank_mask:0xf
; GFX9-NEXT: s_mov_b64 exec, s[2:3]
-; GFX9-NEXT: v_cmp_eq_u32_e32 vcc, 0, v3
+; GFX9-NEXT: v_cmp_eq_u32_e32 vcc, 0, v4
; GFX9-NEXT: ; implicit-def: $vgpr0
; GFX9-NEXT: s_and_saveexec_b64 s[2:3], vcc
; GFX9-NEXT: s_cbranch_execz .LBB15_2
; GFX9-NEXT: ; %bb.1:
-; GFX9-NEXT: v_mov_b32_e32 v0, 0
-; GFX9-NEXT: v_mov_b32_e32 v3, s4
+; GFX9-NEXT: v_mov_b32_e32 v0, s4
; GFX9-NEXT: s_waitcnt lgkmcnt(0)
-; GFX9-NEXT: ds_or_rtn_b32 v0, v0, v3
+; GFX9-NEXT: ds_or_rtn_b32 v0, v3, v0
; GFX9-NEXT: s_waitcnt lgkmcnt(0)
; GFX9-NEXT: .LBB15_2:
; GFX9-NEXT: s_or_b64 exec, exec, s[2:3]
; GFX9-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x24
; GFX9-NEXT: s_waitcnt lgkmcnt(0)
; GFX9-NEXT: v_readfirstlane_b32 s4, v0
-; GFX9-NEXT: v_mov_b32_e32 v0, v1
+; GFX9-NEXT: v_mov_b32_e32 v0, v2
; GFX9-NEXT: s_mov_b32 s3, 0xf000
; GFX9-NEXT: s_mov_b32 s2, -1
; GFX9-NEXT: v_or_b32_e32 v0, s4, v0
; GFX1064-NEXT: v_writelane_b32 v3, s5, 32
; GFX1064-NEXT: s_mov_b64 exec, s[2:3]
; GFX1064-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
+; GFX1064-NEXT: v_mov_b32_e32 v4, 0
; GFX1064-NEXT: s_or_saveexec_b64 s[4:5], -1
; GFX1064-NEXT: v_writelane_b32 v3, s6, 48
; GFX1064-NEXT: s_mov_b64 exec, s[4:5]
; GFX1064-NEXT: s_and_saveexec_b64 s[4:5], vcc
; GFX1064-NEXT: s_cbranch_execz .LBB15_2
; GFX1064-NEXT: ; %bb.1:
-; GFX1064-NEXT: v_mov_b32_e32 v0, 0
-; GFX1064-NEXT: v_mov_b32_e32 v4, s7
+; GFX1064-NEXT: v_mov_b32_e32 v0, s7
; GFX1064-NEXT: s_mov_b32 s3, s7
; GFX1064-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
; GFX1064-NEXT: s_waitcnt_vscnt null, 0x0
-; GFX1064-NEXT: ds_or_rtn_b32 v0, v0, v4
+; GFX1064-NEXT: ds_or_rtn_b32 v0, v4, v0
; GFX1064-NEXT: s_waitcnt lgkmcnt(0)
; GFX1064-NEXT: buffer_gl0_inv
; GFX1064-NEXT: .LBB15_2:
; GFX1032-NEXT: v_mov_b32_dpp v3, v1 row_shr:1 row_mask:0xf bank_mask:0xf
; GFX1032-NEXT: s_mov_b32 exec_lo, s2
; GFX1032-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX1032-NEXT: v_mov_b32_e32 v4, 0
; GFX1032-NEXT: s_or_saveexec_b32 s2, -1
; GFX1032-NEXT: v_writelane_b32 v3, s3, 16
; GFX1032-NEXT: s_mov_b32 exec_lo, s2
; GFX1032-NEXT: s_and_saveexec_b32 s3, vcc_lo
; GFX1032-NEXT: s_cbranch_execz .LBB15_2
; GFX1032-NEXT: ; %bb.1:
-; GFX1032-NEXT: v_mov_b32_e32 v0, 0
-; GFX1032-NEXT: v_mov_b32_e32 v4, s4
+; GFX1032-NEXT: v_mov_b32_e32 v0, s4
; GFX1032-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
; GFX1032-NEXT: s_waitcnt_vscnt null, 0x0
-; GFX1032-NEXT: ds_or_rtn_b32 v0, v0, v4
+; GFX1032-NEXT: ds_or_rtn_b32 v0, v4, v0
; GFX1032-NEXT: s_waitcnt lgkmcnt(0)
; GFX1032-NEXT: buffer_gl0_inv
; GFX1032-NEXT: .LBB15_2:
; GFX1164-NEXT: v_readlane_b32 s6, v1, 47
; GFX1164-NEXT: v_writelane_b32 v3, s5, 32
; GFX1164-NEXT: s_mov_b64 exec, s[2:3]
-; GFX1164-NEXT: s_delay_alu instid0(SALU_CYCLE_1) | instskip(SKIP_3) | instid1(VALU_DEP_2)
+; GFX1164-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
; GFX1164-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
+; GFX1164-NEXT: v_mov_b32_e32 v4, 0
; GFX1164-NEXT: s_or_saveexec_b64 s[4:5], -1
; GFX1164-NEXT: v_writelane_b32 v3, s6, 48
; GFX1164-NEXT: s_mov_b64 exec, s[4:5]
; GFX1164-NEXT: s_and_saveexec_b64 s[4:5], vcc
; GFX1164-NEXT: s_cbranch_execz .LBB15_2
; GFX1164-NEXT: ; %bb.1:
-; GFX1164-NEXT: v_mov_b32_e32 v0, 0
-; GFX1164-NEXT: v_mov_b32_e32 v4, s7
+; GFX1164-NEXT: v_mov_b32_e32 v0, s7
; GFX1164-NEXT: s_mov_b32 s3, s7
; GFX1164-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
; GFX1164-NEXT: s_waitcnt_vscnt null, 0x0
-; GFX1164-NEXT: ds_or_rtn_b32 v0, v0, v4
+; GFX1164-NEXT: ds_or_rtn_b32 v0, v4, v0
; GFX1164-NEXT: s_waitcnt lgkmcnt(0)
; GFX1164-NEXT: buffer_gl0_inv
; GFX1164-NEXT: .LBB15_2:
; GFX1132-NEXT: v_readlane_b32 s4, v1, 31
; GFX1132-NEXT: v_mov_b32_dpp v3, v1 row_shr:1 row_mask:0xf bank_mask:0xf
; GFX1132-NEXT: s_mov_b32 exec_lo, s2
-; GFX1132-NEXT: s_delay_alu instid0(SALU_CYCLE_1) | instskip(SKIP_3) | instid1(VALU_DEP_2)
+; GFX1132-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
; GFX1132-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX1132-NEXT: v_mov_b32_e32 v4, 0
; GFX1132-NEXT: s_or_saveexec_b32 s2, -1
; GFX1132-NEXT: v_writelane_b32 v3, s3, 16
; GFX1132-NEXT: s_mov_b32 exec_lo, s2
; GFX1132-NEXT: s_and_saveexec_b32 s3, vcc_lo
; GFX1132-NEXT: s_cbranch_execz .LBB15_2
; GFX1132-NEXT: ; %bb.1:
-; GFX1132-NEXT: v_mov_b32_e32 v0, 0
-; GFX1132-NEXT: v_mov_b32_e32 v4, s4
+; GFX1132-NEXT: v_mov_b32_e32 v0, s4
; GFX1132-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
; GFX1132-NEXT: s_waitcnt_vscnt null, 0x0
-; GFX1132-NEXT: ds_or_rtn_b32 v0, v0, v4
+; GFX1132-NEXT: ds_or_rtn_b32 v0, v4, v0
; GFX1132-NEXT: s_waitcnt lgkmcnt(0)
; GFX1132-NEXT: buffer_gl0_inv
; GFX1132-NEXT: .LBB15_2:
;
; GFX8-LABEL: xor_i32_varying:
; GFX8: ; %bb.0: ; %entry
-; GFX8-NEXT: s_or_saveexec_b64 s[2:3], -1
-; GFX8-NEXT: v_mov_b32_e32 v1, 0
-; GFX8-NEXT: s_mov_b64 exec, s[2:3]
-; GFX8-NEXT: v_mbcnt_lo_u32_b32 v3, exec_lo, 0
-; GFX8-NEXT: v_mbcnt_hi_u32_b32 v3, exec_hi, v3
-; GFX8-NEXT: v_mov_b32_e32 v2, v0
+; GFX8-NEXT: v_mov_b32_e32 v3, 0
+; GFX8-NEXT: v_mbcnt_lo_u32_b32 v4, exec_lo, 0
+; GFX8-NEXT: v_mbcnt_hi_u32_b32 v4, exec_hi, v4
+; GFX8-NEXT: v_mov_b32_e32 v1, v0
; GFX8-NEXT: s_not_b64 exec, exec
-; GFX8-NEXT: v_mov_b32_e32 v2, 0
+; GFX8-NEXT: v_mov_b32_e32 v1, 0
; GFX8-NEXT: s_not_b64 exec, exec
; GFX8-NEXT: s_or_saveexec_b64 s[2:3], -1
-; GFX8-NEXT: v_xor_b32_dpp v2, v2, v2 row_shr:1 row_mask:0xf bank_mask:0xf bound_ctrl:1
-; GFX8-NEXT: s_nop 1
-; GFX8-NEXT: v_xor_b32_dpp v2, v2, v2 row_shr:2 row_mask:0xf bank_mask:0xf bound_ctrl:1
+; GFX8-NEXT: v_xor_b32_dpp v1, v1, v1 row_shr:1 row_mask:0xf bank_mask:0xf bound_ctrl:1
+; GFX8-NEXT: v_mov_b32_e32 v2, 0
+; GFX8-NEXT: s_nop 0
+; GFX8-NEXT: v_xor_b32_dpp v1, v1, v1 row_shr:2 row_mask:0xf bank_mask:0xf bound_ctrl:1
; GFX8-NEXT: s_nop 1
-; GFX8-NEXT: v_xor_b32_dpp v2, v2, v2 row_shr:4 row_mask:0xf bank_mask:0xf bound_ctrl:1
+; GFX8-NEXT: v_xor_b32_dpp v1, v1, v1 row_shr:4 row_mask:0xf bank_mask:0xf bound_ctrl:1
; GFX8-NEXT: s_nop 1
-; GFX8-NEXT: v_xor_b32_dpp v2, v2, v2 row_shr:8 row_mask:0xf bank_mask:0xf bound_ctrl:1
+; GFX8-NEXT: v_xor_b32_dpp v1, v1, v1 row_shr:8 row_mask:0xf bank_mask:0xf bound_ctrl:1
; GFX8-NEXT: s_nop 1
-; GFX8-NEXT: v_xor_b32_dpp v2, v2, v2 row_bcast:15 row_mask:0xa bank_mask:0xf
+; GFX8-NEXT: v_xor_b32_dpp v1, v1, v1 row_bcast:15 row_mask:0xa bank_mask:0xf
; GFX8-NEXT: s_nop 1
-; GFX8-NEXT: v_xor_b32_dpp v2, v2, v2 row_bcast:31 row_mask:0xc bank_mask:0xf
-; GFX8-NEXT: v_readlane_b32 s4, v2, 63
+; GFX8-NEXT: v_xor_b32_dpp v1, v1, v1 row_bcast:31 row_mask:0xc bank_mask:0xf
+; GFX8-NEXT: v_readlane_b32 s4, v1, 63
; GFX8-NEXT: s_nop 0
-; GFX8-NEXT: v_mov_b32_dpp v1, v2 wave_shr:1 row_mask:0xf bank_mask:0xf
+; GFX8-NEXT: v_mov_b32_dpp v2, v1 wave_shr:1 row_mask:0xf bank_mask:0xf
; GFX8-NEXT: s_mov_b64 exec, s[2:3]
-; GFX8-NEXT: v_cmp_eq_u32_e32 vcc, 0, v3
+; GFX8-NEXT: v_cmp_eq_u32_e32 vcc, 0, v4
; GFX8-NEXT: ; implicit-def: $vgpr0
; GFX8-NEXT: s_and_saveexec_b64 s[2:3], vcc
; GFX8-NEXT: s_cbranch_execz .LBB16_2
; GFX8-NEXT: ; %bb.1:
-; GFX8-NEXT: v_mov_b32_e32 v0, 0
-; GFX8-NEXT: v_mov_b32_e32 v3, s4
+; GFX8-NEXT: v_mov_b32_e32 v0, s4
; GFX8-NEXT: s_mov_b32 m0, -1
; GFX8-NEXT: s_waitcnt lgkmcnt(0)
-; GFX8-NEXT: ds_xor_rtn_b32 v0, v0, v3
+; GFX8-NEXT: ds_xor_rtn_b32 v0, v3, v0
; GFX8-NEXT: s_waitcnt lgkmcnt(0)
; GFX8-NEXT: .LBB16_2:
; GFX8-NEXT: s_or_b64 exec, exec, s[2:3]
; GFX8-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x24
; GFX8-NEXT: s_waitcnt lgkmcnt(0)
; GFX8-NEXT: v_readfirstlane_b32 s4, v0
-; GFX8-NEXT: v_mov_b32_e32 v0, v1
+; GFX8-NEXT: v_mov_b32_e32 v0, v2
; GFX8-NEXT: s_mov_b32 s3, 0xf000
; GFX8-NEXT: s_mov_b32 s2, -1
; GFX8-NEXT: v_xor_b32_e32 v0, s4, v0
;
; GFX9-LABEL: xor_i32_varying:
; GFX9: ; %bb.0: ; %entry
-; GFX9-NEXT: s_or_saveexec_b64 s[2:3], -1
-; GFX9-NEXT: v_mov_b32_e32 v1, 0
-; GFX9-NEXT: s_mov_b64 exec, s[2:3]
-; GFX9-NEXT: v_mbcnt_lo_u32_b32 v3, exec_lo, 0
-; GFX9-NEXT: v_mbcnt_hi_u32_b32 v3, exec_hi, v3
-; GFX9-NEXT: v_mov_b32_e32 v2, v0
+; GFX9-NEXT: v_mov_b32_e32 v3, 0
+; GFX9-NEXT: v_mbcnt_lo_u32_b32 v4, exec_lo, 0
+; GFX9-NEXT: v_mbcnt_hi_u32_b32 v4, exec_hi, v4
+; GFX9-NEXT: v_mov_b32_e32 v1, v0
; GFX9-NEXT: s_not_b64 exec, exec
-; GFX9-NEXT: v_mov_b32_e32 v2, 0
+; GFX9-NEXT: v_mov_b32_e32 v1, 0
; GFX9-NEXT: s_not_b64 exec, exec
; GFX9-NEXT: s_or_saveexec_b64 s[2:3], -1
-; GFX9-NEXT: v_xor_b32_dpp v2, v2, v2 row_shr:1 row_mask:0xf bank_mask:0xf bound_ctrl:1
-; GFX9-NEXT: s_nop 1
-; GFX9-NEXT: v_xor_b32_dpp v2, v2, v2 row_shr:2 row_mask:0xf bank_mask:0xf bound_ctrl:1
+; GFX9-NEXT: v_xor_b32_dpp v1, v1, v1 row_shr:1 row_mask:0xf bank_mask:0xf bound_ctrl:1
+; GFX9-NEXT: v_mov_b32_e32 v2, 0
+; GFX9-NEXT: s_nop 0
+; GFX9-NEXT: v_xor_b32_dpp v1, v1, v1 row_shr:2 row_mask:0xf bank_mask:0xf bound_ctrl:1
; GFX9-NEXT: s_nop 1
-; GFX9-NEXT: v_xor_b32_dpp v2, v2, v2 row_shr:4 row_mask:0xf bank_mask:0xf bound_ctrl:1
+; GFX9-NEXT: v_xor_b32_dpp v1, v1, v1 row_shr:4 row_mask:0xf bank_mask:0xf bound_ctrl:1
; GFX9-NEXT: s_nop 1
-; GFX9-NEXT: v_xor_b32_dpp v2, v2, v2 row_shr:8 row_mask:0xf bank_mask:0xf bound_ctrl:1
+; GFX9-NEXT: v_xor_b32_dpp v1, v1, v1 row_shr:8 row_mask:0xf bank_mask:0xf bound_ctrl:1
; GFX9-NEXT: s_nop 1
-; GFX9-NEXT: v_xor_b32_dpp v2, v2, v2 row_bcast:15 row_mask:0xa bank_mask:0xf
+; GFX9-NEXT: v_xor_b32_dpp v1, v1, v1 row_bcast:15 row_mask:0xa bank_mask:0xf
; GFX9-NEXT: s_nop 1
-; GFX9-NEXT: v_xor_b32_dpp v2, v2, v2 row_bcast:31 row_mask:0xc bank_mask:0xf
-; GFX9-NEXT: v_readlane_b32 s4, v2, 63
+; GFX9-NEXT: v_xor_b32_dpp v1, v1, v1 row_bcast:31 row_mask:0xc bank_mask:0xf
+; GFX9-NEXT: v_readlane_b32 s4, v1, 63
; GFX9-NEXT: s_nop 0
-; GFX9-NEXT: v_mov_b32_dpp v1, v2 wave_shr:1 row_mask:0xf bank_mask:0xf
+; GFX9-NEXT: v_mov_b32_dpp v2, v1 wave_shr:1 row_mask:0xf bank_mask:0xf
; GFX9-NEXT: s_mov_b64 exec, s[2:3]
-; GFX9-NEXT: v_cmp_eq_u32_e32 vcc, 0, v3
+; GFX9-NEXT: v_cmp_eq_u32_e32 vcc, 0, v4
; GFX9-NEXT: ; implicit-def: $vgpr0
; GFX9-NEXT: s_and_saveexec_b64 s[2:3], vcc
; GFX9-NEXT: s_cbranch_execz .LBB16_2
; GFX9-NEXT: ; %bb.1:
-; GFX9-NEXT: v_mov_b32_e32 v0, 0
-; GFX9-NEXT: v_mov_b32_e32 v3, s4
+; GFX9-NEXT: v_mov_b32_e32 v0, s4
; GFX9-NEXT: s_waitcnt lgkmcnt(0)
-; GFX9-NEXT: ds_xor_rtn_b32 v0, v0, v3
+; GFX9-NEXT: ds_xor_rtn_b32 v0, v3, v0
; GFX9-NEXT: s_waitcnt lgkmcnt(0)
; GFX9-NEXT: .LBB16_2:
; GFX9-NEXT: s_or_b64 exec, exec, s[2:3]
; GFX9-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x24
; GFX9-NEXT: s_waitcnt lgkmcnt(0)
; GFX9-NEXT: v_readfirstlane_b32 s4, v0
-; GFX9-NEXT: v_mov_b32_e32 v0, v1
+; GFX9-NEXT: v_mov_b32_e32 v0, v2
; GFX9-NEXT: s_mov_b32 s3, 0xf000
; GFX9-NEXT: s_mov_b32 s2, -1
; GFX9-NEXT: v_xor_b32_e32 v0, s4, v0
; GFX1064-NEXT: v_writelane_b32 v3, s5, 32
; GFX1064-NEXT: s_mov_b64 exec, s[2:3]
; GFX1064-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
+; GFX1064-NEXT: v_mov_b32_e32 v4, 0
; GFX1064-NEXT: s_or_saveexec_b64 s[4:5], -1
; GFX1064-NEXT: v_writelane_b32 v3, s6, 48
; GFX1064-NEXT: s_mov_b64 exec, s[4:5]
; GFX1064-NEXT: s_and_saveexec_b64 s[4:5], vcc
; GFX1064-NEXT: s_cbranch_execz .LBB16_2
; GFX1064-NEXT: ; %bb.1:
-; GFX1064-NEXT: v_mov_b32_e32 v0, 0
-; GFX1064-NEXT: v_mov_b32_e32 v4, s7
+; GFX1064-NEXT: v_mov_b32_e32 v0, s7
; GFX1064-NEXT: s_mov_b32 s3, s7
; GFX1064-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
; GFX1064-NEXT: s_waitcnt_vscnt null, 0x0
-; GFX1064-NEXT: ds_xor_rtn_b32 v0, v0, v4
+; GFX1064-NEXT: ds_xor_rtn_b32 v0, v4, v0
; GFX1064-NEXT: s_waitcnt lgkmcnt(0)
; GFX1064-NEXT: buffer_gl0_inv
; GFX1064-NEXT: .LBB16_2:
; GFX1032-NEXT: v_mov_b32_dpp v3, v1 row_shr:1 row_mask:0xf bank_mask:0xf
; GFX1032-NEXT: s_mov_b32 exec_lo, s2
; GFX1032-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX1032-NEXT: v_mov_b32_e32 v4, 0
; GFX1032-NEXT: s_or_saveexec_b32 s2, -1
; GFX1032-NEXT: v_writelane_b32 v3, s3, 16
; GFX1032-NEXT: s_mov_b32 exec_lo, s2
; GFX1032-NEXT: s_and_saveexec_b32 s3, vcc_lo
; GFX1032-NEXT: s_cbranch_execz .LBB16_2
; GFX1032-NEXT: ; %bb.1:
-; GFX1032-NEXT: v_mov_b32_e32 v0, 0
-; GFX1032-NEXT: v_mov_b32_e32 v4, s4
+; GFX1032-NEXT: v_mov_b32_e32 v0, s4
; GFX1032-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
; GFX1032-NEXT: s_waitcnt_vscnt null, 0x0
-; GFX1032-NEXT: ds_xor_rtn_b32 v0, v0, v4
+; GFX1032-NEXT: ds_xor_rtn_b32 v0, v4, v0
; GFX1032-NEXT: s_waitcnt lgkmcnt(0)
; GFX1032-NEXT: buffer_gl0_inv
; GFX1032-NEXT: .LBB16_2:
; GFX1164-NEXT: v_readlane_b32 s6, v1, 47
; GFX1164-NEXT: v_writelane_b32 v3, s5, 32
; GFX1164-NEXT: s_mov_b64 exec, s[2:3]
-; GFX1164-NEXT: s_delay_alu instid0(SALU_CYCLE_1) | instskip(SKIP_3) | instid1(VALU_DEP_2)
+; GFX1164-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
; GFX1164-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
+; GFX1164-NEXT: v_mov_b32_e32 v4, 0
; GFX1164-NEXT: s_or_saveexec_b64 s[4:5], -1
; GFX1164-NEXT: v_writelane_b32 v3, s6, 48
; GFX1164-NEXT: s_mov_b64 exec, s[4:5]
; GFX1164-NEXT: s_and_saveexec_b64 s[4:5], vcc
; GFX1164-NEXT: s_cbranch_execz .LBB16_2
; GFX1164-NEXT: ; %bb.1:
-; GFX1164-NEXT: v_mov_b32_e32 v0, 0
-; GFX1164-NEXT: v_mov_b32_e32 v4, s7
+; GFX1164-NEXT: v_mov_b32_e32 v0, s7
; GFX1164-NEXT: s_mov_b32 s3, s7
; GFX1164-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
; GFX1164-NEXT: s_waitcnt_vscnt null, 0x0
-; GFX1164-NEXT: ds_xor_rtn_b32 v0, v0, v4
+; GFX1164-NEXT: ds_xor_rtn_b32 v0, v4, v0
; GFX1164-NEXT: s_waitcnt lgkmcnt(0)
; GFX1164-NEXT: buffer_gl0_inv
; GFX1164-NEXT: .LBB16_2:
; GFX1132-NEXT: v_readlane_b32 s4, v1, 31
; GFX1132-NEXT: v_mov_b32_dpp v3, v1 row_shr:1 row_mask:0xf bank_mask:0xf
; GFX1132-NEXT: s_mov_b32 exec_lo, s2
-; GFX1132-NEXT: s_delay_alu instid0(SALU_CYCLE_1) | instskip(SKIP_3) | instid1(VALU_DEP_2)
+; GFX1132-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
; GFX1132-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX1132-NEXT: v_mov_b32_e32 v4, 0
; GFX1132-NEXT: s_or_saveexec_b32 s2, -1
; GFX1132-NEXT: v_writelane_b32 v3, s3, 16
; GFX1132-NEXT: s_mov_b32 exec_lo, s2
; GFX1132-NEXT: s_and_saveexec_b32 s3, vcc_lo
; GFX1132-NEXT: s_cbranch_execz .LBB16_2
; GFX1132-NEXT: ; %bb.1:
-; GFX1132-NEXT: v_mov_b32_e32 v0, 0
-; GFX1132-NEXT: v_mov_b32_e32 v4, s4
+; GFX1132-NEXT: v_mov_b32_e32 v0, s4
; GFX1132-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
; GFX1132-NEXT: s_waitcnt_vscnt null, 0x0
-; GFX1132-NEXT: ds_xor_rtn_b32 v0, v0, v4
+; GFX1132-NEXT: ds_xor_rtn_b32 v0, v4, v0
; GFX1132-NEXT: s_waitcnt lgkmcnt(0)
; GFX1132-NEXT: buffer_gl0_inv
; GFX1132-NEXT: .LBB16_2:
;
; GFX8-LABEL: umax_i32_varying:
; GFX8: ; %bb.0: ; %entry
-; GFX8-NEXT: s_or_saveexec_b64 s[2:3], -1
-; GFX8-NEXT: v_mov_b32_e32 v1, 0
-; GFX8-NEXT: s_mov_b64 exec, s[2:3]
-; GFX8-NEXT: v_mbcnt_lo_u32_b32 v3, exec_lo, 0
-; GFX8-NEXT: v_mbcnt_hi_u32_b32 v3, exec_hi, v3
-; GFX8-NEXT: v_mov_b32_e32 v2, v0
+; GFX8-NEXT: v_mov_b32_e32 v3, 0
+; GFX8-NEXT: v_mbcnt_lo_u32_b32 v4, exec_lo, 0
+; GFX8-NEXT: v_mbcnt_hi_u32_b32 v4, exec_hi, v4
+; GFX8-NEXT: v_mov_b32_e32 v1, v0
; GFX8-NEXT: s_not_b64 exec, exec
-; GFX8-NEXT: v_mov_b32_e32 v2, 0
+; GFX8-NEXT: v_mov_b32_e32 v1, 0
; GFX8-NEXT: s_not_b64 exec, exec
; GFX8-NEXT: s_or_saveexec_b64 s[2:3], -1
-; GFX8-NEXT: v_max_u32_dpp v2, v2, v2 row_shr:1 row_mask:0xf bank_mask:0xf bound_ctrl:1
-; GFX8-NEXT: s_nop 1
-; GFX8-NEXT: v_max_u32_dpp v2, v2, v2 row_shr:2 row_mask:0xf bank_mask:0xf bound_ctrl:1
+; GFX8-NEXT: v_max_u32_dpp v1, v1, v1 row_shr:1 row_mask:0xf bank_mask:0xf bound_ctrl:1
+; GFX8-NEXT: v_mov_b32_e32 v2, 0
+; GFX8-NEXT: s_nop 0
+; GFX8-NEXT: v_max_u32_dpp v1, v1, v1 row_shr:2 row_mask:0xf bank_mask:0xf bound_ctrl:1
; GFX8-NEXT: s_nop 1
-; GFX8-NEXT: v_max_u32_dpp v2, v2, v2 row_shr:4 row_mask:0xf bank_mask:0xf bound_ctrl:1
+; GFX8-NEXT: v_max_u32_dpp v1, v1, v1 row_shr:4 row_mask:0xf bank_mask:0xf bound_ctrl:1
; GFX8-NEXT: s_nop 1
-; GFX8-NEXT: v_max_u32_dpp v2, v2, v2 row_shr:8 row_mask:0xf bank_mask:0xf bound_ctrl:1
+; GFX8-NEXT: v_max_u32_dpp v1, v1, v1 row_shr:8 row_mask:0xf bank_mask:0xf bound_ctrl:1
; GFX8-NEXT: s_nop 1
-; GFX8-NEXT: v_max_u32_dpp v2, v2, v2 row_bcast:15 row_mask:0xa bank_mask:0xf
+; GFX8-NEXT: v_max_u32_dpp v1, v1, v1 row_bcast:15 row_mask:0xa bank_mask:0xf
; GFX8-NEXT: s_nop 1
-; GFX8-NEXT: v_max_u32_dpp v2, v2, v2 row_bcast:31 row_mask:0xc bank_mask:0xf
-; GFX8-NEXT: v_readlane_b32 s4, v2, 63
+; GFX8-NEXT: v_max_u32_dpp v1, v1, v1 row_bcast:31 row_mask:0xc bank_mask:0xf
+; GFX8-NEXT: v_readlane_b32 s4, v1, 63
; GFX8-NEXT: s_nop 0
-; GFX8-NEXT: v_mov_b32_dpp v1, v2 wave_shr:1 row_mask:0xf bank_mask:0xf
+; GFX8-NEXT: v_mov_b32_dpp v2, v1 wave_shr:1 row_mask:0xf bank_mask:0xf
; GFX8-NEXT: s_mov_b64 exec, s[2:3]
-; GFX8-NEXT: v_cmp_eq_u32_e32 vcc, 0, v3
+; GFX8-NEXT: v_cmp_eq_u32_e32 vcc, 0, v4
; GFX8-NEXT: ; implicit-def: $vgpr0
; GFX8-NEXT: s_and_saveexec_b64 s[2:3], vcc
; GFX8-NEXT: s_cbranch_execz .LBB21_2
; GFX8-NEXT: ; %bb.1:
-; GFX8-NEXT: v_mov_b32_e32 v0, 0
-; GFX8-NEXT: v_mov_b32_e32 v3, s4
+; GFX8-NEXT: v_mov_b32_e32 v0, s4
; GFX8-NEXT: s_mov_b32 m0, -1
; GFX8-NEXT: s_waitcnt lgkmcnt(0)
-; GFX8-NEXT: ds_max_rtn_u32 v0, v0, v3
+; GFX8-NEXT: ds_max_rtn_u32 v0, v3, v0
; GFX8-NEXT: s_waitcnt lgkmcnt(0)
; GFX8-NEXT: .LBB21_2:
; GFX8-NEXT: s_or_b64 exec, exec, s[2:3]
; GFX8-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x24
; GFX8-NEXT: s_waitcnt lgkmcnt(0)
; GFX8-NEXT: v_readfirstlane_b32 s4, v0
-; GFX8-NEXT: v_mov_b32_e32 v0, v1
+; GFX8-NEXT: v_mov_b32_e32 v0, v2
; GFX8-NEXT: s_mov_b32 s3, 0xf000
; GFX8-NEXT: s_mov_b32 s2, -1
; GFX8-NEXT: v_max_u32_e32 v0, s4, v0
;
; GFX9-LABEL: umax_i32_varying:
; GFX9: ; %bb.0: ; %entry
-; GFX9-NEXT: s_or_saveexec_b64 s[2:3], -1
-; GFX9-NEXT: v_mov_b32_e32 v1, 0
-; GFX9-NEXT: s_mov_b64 exec, s[2:3]
-; GFX9-NEXT: v_mbcnt_lo_u32_b32 v3, exec_lo, 0
-; GFX9-NEXT: v_mbcnt_hi_u32_b32 v3, exec_hi, v3
-; GFX9-NEXT: v_mov_b32_e32 v2, v0
+; GFX9-NEXT: v_mov_b32_e32 v3, 0
+; GFX9-NEXT: v_mbcnt_lo_u32_b32 v4, exec_lo, 0
+; GFX9-NEXT: v_mbcnt_hi_u32_b32 v4, exec_hi, v4
+; GFX9-NEXT: v_mov_b32_e32 v1, v0
; GFX9-NEXT: s_not_b64 exec, exec
-; GFX9-NEXT: v_mov_b32_e32 v2, 0
+; GFX9-NEXT: v_mov_b32_e32 v1, 0
; GFX9-NEXT: s_not_b64 exec, exec
; GFX9-NEXT: s_or_saveexec_b64 s[2:3], -1
-; GFX9-NEXT: v_max_u32_dpp v2, v2, v2 row_shr:1 row_mask:0xf bank_mask:0xf bound_ctrl:1
-; GFX9-NEXT: s_nop 1
-; GFX9-NEXT: v_max_u32_dpp v2, v2, v2 row_shr:2 row_mask:0xf bank_mask:0xf bound_ctrl:1
+; GFX9-NEXT: v_max_u32_dpp v1, v1, v1 row_shr:1 row_mask:0xf bank_mask:0xf bound_ctrl:1
+; GFX9-NEXT: v_mov_b32_e32 v2, 0
+; GFX9-NEXT: s_nop 0
+; GFX9-NEXT: v_max_u32_dpp v1, v1, v1 row_shr:2 row_mask:0xf bank_mask:0xf bound_ctrl:1
; GFX9-NEXT: s_nop 1
-; GFX9-NEXT: v_max_u32_dpp v2, v2, v2 row_shr:4 row_mask:0xf bank_mask:0xf bound_ctrl:1
+; GFX9-NEXT: v_max_u32_dpp v1, v1, v1 row_shr:4 row_mask:0xf bank_mask:0xf bound_ctrl:1
; GFX9-NEXT: s_nop 1
-; GFX9-NEXT: v_max_u32_dpp v2, v2, v2 row_shr:8 row_mask:0xf bank_mask:0xf bound_ctrl:1
+; GFX9-NEXT: v_max_u32_dpp v1, v1, v1 row_shr:8 row_mask:0xf bank_mask:0xf bound_ctrl:1
; GFX9-NEXT: s_nop 1
-; GFX9-NEXT: v_max_u32_dpp v2, v2, v2 row_bcast:15 row_mask:0xa bank_mask:0xf
+; GFX9-NEXT: v_max_u32_dpp v1, v1, v1 row_bcast:15 row_mask:0xa bank_mask:0xf
; GFX9-NEXT: s_nop 1
-; GFX9-NEXT: v_max_u32_dpp v2, v2, v2 row_bcast:31 row_mask:0xc bank_mask:0xf
-; GFX9-NEXT: v_readlane_b32 s4, v2, 63
+; GFX9-NEXT: v_max_u32_dpp v1, v1, v1 row_bcast:31 row_mask:0xc bank_mask:0xf
+; GFX9-NEXT: v_readlane_b32 s4, v1, 63
; GFX9-NEXT: s_nop 0
-; GFX9-NEXT: v_mov_b32_dpp v1, v2 wave_shr:1 row_mask:0xf bank_mask:0xf
+; GFX9-NEXT: v_mov_b32_dpp v2, v1 wave_shr:1 row_mask:0xf bank_mask:0xf
; GFX9-NEXT: s_mov_b64 exec, s[2:3]
-; GFX9-NEXT: v_cmp_eq_u32_e32 vcc, 0, v3
+; GFX9-NEXT: v_cmp_eq_u32_e32 vcc, 0, v4
; GFX9-NEXT: ; implicit-def: $vgpr0
; GFX9-NEXT: s_and_saveexec_b64 s[2:3], vcc
; GFX9-NEXT: s_cbranch_execz .LBB21_2
; GFX9-NEXT: ; %bb.1:
-; GFX9-NEXT: v_mov_b32_e32 v0, 0
-; GFX9-NEXT: v_mov_b32_e32 v3, s4
+; GFX9-NEXT: v_mov_b32_e32 v0, s4
; GFX9-NEXT: s_waitcnt lgkmcnt(0)
-; GFX9-NEXT: ds_max_rtn_u32 v0, v0, v3
+; GFX9-NEXT: ds_max_rtn_u32 v0, v3, v0
; GFX9-NEXT: s_waitcnt lgkmcnt(0)
; GFX9-NEXT: .LBB21_2:
; GFX9-NEXT: s_or_b64 exec, exec, s[2:3]
; GFX9-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x24
; GFX9-NEXT: s_waitcnt lgkmcnt(0)
; GFX9-NEXT: v_readfirstlane_b32 s4, v0
-; GFX9-NEXT: v_mov_b32_e32 v0, v1
+; GFX9-NEXT: v_mov_b32_e32 v0, v2
; GFX9-NEXT: s_mov_b32 s3, 0xf000
; GFX9-NEXT: s_mov_b32 s2, -1
; GFX9-NEXT: v_max_u32_e32 v0, s4, v0
; GFX1064-NEXT: v_writelane_b32 v3, s5, 32
; GFX1064-NEXT: s_mov_b64 exec, s[2:3]
; GFX1064-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
+; GFX1064-NEXT: v_mov_b32_e32 v4, 0
; GFX1064-NEXT: s_or_saveexec_b64 s[4:5], -1
; GFX1064-NEXT: v_writelane_b32 v3, s6, 48
; GFX1064-NEXT: s_mov_b64 exec, s[4:5]
; GFX1064-NEXT: s_and_saveexec_b64 s[4:5], vcc
; GFX1064-NEXT: s_cbranch_execz .LBB21_2
; GFX1064-NEXT: ; %bb.1:
-; GFX1064-NEXT: v_mov_b32_e32 v0, 0
-; GFX1064-NEXT: v_mov_b32_e32 v4, s7
+; GFX1064-NEXT: v_mov_b32_e32 v0, s7
; GFX1064-NEXT: s_mov_b32 s3, s7
; GFX1064-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
; GFX1064-NEXT: s_waitcnt_vscnt null, 0x0
-; GFX1064-NEXT: ds_max_rtn_u32 v0, v0, v4
+; GFX1064-NEXT: ds_max_rtn_u32 v0, v4, v0
; GFX1064-NEXT: s_waitcnt lgkmcnt(0)
; GFX1064-NEXT: buffer_gl0_inv
; GFX1064-NEXT: .LBB21_2:
; GFX1032-NEXT: v_mov_b32_dpp v3, v1 row_shr:1 row_mask:0xf bank_mask:0xf
; GFX1032-NEXT: s_mov_b32 exec_lo, s2
; GFX1032-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX1032-NEXT: v_mov_b32_e32 v4, 0
; GFX1032-NEXT: s_or_saveexec_b32 s2, -1
; GFX1032-NEXT: v_writelane_b32 v3, s3, 16
; GFX1032-NEXT: s_mov_b32 exec_lo, s2
; GFX1032-NEXT: s_and_saveexec_b32 s3, vcc_lo
; GFX1032-NEXT: s_cbranch_execz .LBB21_2
; GFX1032-NEXT: ; %bb.1:
-; GFX1032-NEXT: v_mov_b32_e32 v0, 0
-; GFX1032-NEXT: v_mov_b32_e32 v4, s4
+; GFX1032-NEXT: v_mov_b32_e32 v0, s4
; GFX1032-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
; GFX1032-NEXT: s_waitcnt_vscnt null, 0x0
-; GFX1032-NEXT: ds_max_rtn_u32 v0, v0, v4
+; GFX1032-NEXT: ds_max_rtn_u32 v0, v4, v0
; GFX1032-NEXT: s_waitcnt lgkmcnt(0)
; GFX1032-NEXT: buffer_gl0_inv
; GFX1032-NEXT: .LBB21_2:
; GFX1164-NEXT: v_readlane_b32 s6, v1, 47
; GFX1164-NEXT: v_writelane_b32 v3, s5, 32
; GFX1164-NEXT: s_mov_b64 exec, s[2:3]
-; GFX1164-NEXT: s_delay_alu instid0(SALU_CYCLE_1) | instskip(SKIP_3) | instid1(VALU_DEP_2)
+; GFX1164-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
; GFX1164-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
+; GFX1164-NEXT: v_mov_b32_e32 v4, 0
; GFX1164-NEXT: s_or_saveexec_b64 s[4:5], -1
; GFX1164-NEXT: v_writelane_b32 v3, s6, 48
; GFX1164-NEXT: s_mov_b64 exec, s[4:5]
; GFX1164-NEXT: s_and_saveexec_b64 s[4:5], vcc
; GFX1164-NEXT: s_cbranch_execz .LBB21_2
; GFX1164-NEXT: ; %bb.1:
-; GFX1164-NEXT: v_mov_b32_e32 v0, 0
-; GFX1164-NEXT: v_mov_b32_e32 v4, s7
+; GFX1164-NEXT: v_mov_b32_e32 v0, s7
; GFX1164-NEXT: s_mov_b32 s3, s7
; GFX1164-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
; GFX1164-NEXT: s_waitcnt_vscnt null, 0x0
-; GFX1164-NEXT: ds_max_rtn_u32 v0, v0, v4
+; GFX1164-NEXT: ds_max_rtn_u32 v0, v4, v0
; GFX1164-NEXT: s_waitcnt lgkmcnt(0)
; GFX1164-NEXT: buffer_gl0_inv
; GFX1164-NEXT: .LBB21_2:
; GFX1132-NEXT: v_readlane_b32 s4, v1, 31
; GFX1132-NEXT: v_mov_b32_dpp v3, v1 row_shr:1 row_mask:0xf bank_mask:0xf
; GFX1132-NEXT: s_mov_b32 exec_lo, s2
-; GFX1132-NEXT: s_delay_alu instid0(SALU_CYCLE_1) | instskip(SKIP_3) | instid1(VALU_DEP_2)
+; GFX1132-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
; GFX1132-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX1132-NEXT: v_mov_b32_e32 v4, 0
; GFX1132-NEXT: s_or_saveexec_b32 s2, -1
; GFX1132-NEXT: v_writelane_b32 v3, s3, 16
; GFX1132-NEXT: s_mov_b32 exec_lo, s2
; GFX1132-NEXT: s_and_saveexec_b32 s3, vcc_lo
; GFX1132-NEXT: s_cbranch_execz .LBB21_2
; GFX1132-NEXT: ; %bb.1:
-; GFX1132-NEXT: v_mov_b32_e32 v0, 0
-; GFX1132-NEXT: v_mov_b32_e32 v4, s4
+; GFX1132-NEXT: v_mov_b32_e32 v0, s4
; GFX1132-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
; GFX1132-NEXT: s_waitcnt_vscnt null, 0x0
-; GFX1132-NEXT: ds_max_rtn_u32 v0, v0, v4
+; GFX1132-NEXT: ds_max_rtn_u32 v0, v4, v0
; GFX1132-NEXT: s_waitcnt lgkmcnt(0)
; GFX1132-NEXT: buffer_gl0_inv
; GFX1132-NEXT: .LBB21_2:
;
; GFX9-LABEL: add_i32_varying_vdata:
; GFX9: ; %bb.0: ; %entry
-; GFX9-NEXT: s_or_saveexec_b64 s[2:3], -1
-; GFX9-NEXT: v_mov_b32_e32 v1, 0
-; GFX9-NEXT: s_mov_b64 exec, s[2:3]
-; GFX9-NEXT: v_mbcnt_lo_u32_b32 v3, exec_lo, 0
-; GFX9-NEXT: v_mbcnt_hi_u32_b32 v3, exec_hi, v3
-; GFX9-NEXT: v_mov_b32_e32 v2, v0
+; GFX9-NEXT: v_mov_b32_e32 v3, 0
+; GFX9-NEXT: v_mbcnt_lo_u32_b32 v4, exec_lo, 0
+; GFX9-NEXT: v_mbcnt_hi_u32_b32 v4, exec_hi, v4
+; GFX9-NEXT: v_mov_b32_e32 v1, v0
; GFX9-NEXT: s_not_b64 exec, exec
-; GFX9-NEXT: v_mov_b32_e32 v2, 0
+; GFX9-NEXT: v_mov_b32_e32 v1, 0
; GFX9-NEXT: s_not_b64 exec, exec
; GFX9-NEXT: s_or_saveexec_b64 s[2:3], -1
-; GFX9-NEXT: v_add_u32_dpp v2, v2, v2 row_shr:1 row_mask:0xf bank_mask:0xf bound_ctrl:1
-; GFX9-NEXT: s_nop 1
-; GFX9-NEXT: v_add_u32_dpp v2, v2, v2 row_shr:2 row_mask:0xf bank_mask:0xf bound_ctrl:1
+; GFX9-NEXT: v_add_u32_dpp v1, v1, v1 row_shr:1 row_mask:0xf bank_mask:0xf bound_ctrl:1
+; GFX9-NEXT: v_mov_b32_e32 v2, 0
+; GFX9-NEXT: s_nop 0
+; GFX9-NEXT: v_add_u32_dpp v1, v1, v1 row_shr:2 row_mask:0xf bank_mask:0xf bound_ctrl:1
; GFX9-NEXT: s_nop 1
-; GFX9-NEXT: v_add_u32_dpp v2, v2, v2 row_shr:4 row_mask:0xf bank_mask:0xf bound_ctrl:1
+; GFX9-NEXT: v_add_u32_dpp v1, v1, v1 row_shr:4 row_mask:0xf bank_mask:0xf bound_ctrl:1
; GFX9-NEXT: s_nop 1
-; GFX9-NEXT: v_add_u32_dpp v2, v2, v2 row_shr:8 row_mask:0xf bank_mask:0xf bound_ctrl:1
+; GFX9-NEXT: v_add_u32_dpp v1, v1, v1 row_shr:8 row_mask:0xf bank_mask:0xf bound_ctrl:1
; GFX9-NEXT: s_nop 1
-; GFX9-NEXT: v_add_u32_dpp v2, v2, v2 row_bcast:15 row_mask:0xa bank_mask:0xf
+; GFX9-NEXT: v_add_u32_dpp v1, v1, v1 row_bcast:15 row_mask:0xa bank_mask:0xf
; GFX9-NEXT: s_nop 1
-; GFX9-NEXT: v_add_u32_dpp v2, v2, v2 row_bcast:31 row_mask:0xc bank_mask:0xf
-; GFX9-NEXT: v_readlane_b32 s4, v2, 63
+; GFX9-NEXT: v_add_u32_dpp v1, v1, v1 row_bcast:31 row_mask:0xc bank_mask:0xf
+; GFX9-NEXT: v_readlane_b32 s4, v1, 63
; GFX9-NEXT: s_nop 0
-; GFX9-NEXT: v_mov_b32_dpp v1, v2 wave_shr:1 row_mask:0xf bank_mask:0xf
+; GFX9-NEXT: v_mov_b32_dpp v2, v1 wave_shr:1 row_mask:0xf bank_mask:0xf
; GFX9-NEXT: s_mov_b64 exec, s[2:3]
-; GFX9-NEXT: v_cmp_eq_u32_e32 vcc, 0, v3
+; GFX9-NEXT: v_cmp_eq_u32_e32 vcc, 0, v4
; GFX9-NEXT: ; implicit-def: $vgpr0
; GFX9-NEXT: s_and_saveexec_b64 s[2:3], vcc
; GFX9-NEXT: s_cbranch_execz .LBB2_2
; GFX9-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x24
; GFX9-NEXT: s_waitcnt vmcnt(0)
; GFX9-NEXT: v_readfirstlane_b32 s2, v0
-; GFX9-NEXT: v_mov_b32_e32 v0, v1
-; GFX9-NEXT: v_mov_b32_e32 v3, 0
+; GFX9-NEXT: v_mov_b32_e32 v0, v2
; GFX9-NEXT: v_add_u32_e32 v0, s2, v0
; GFX9-NEXT: s_waitcnt lgkmcnt(0)
; GFX9-NEXT: global_store_dword v3, v0, s[0:1]
; GFX10W64-NEXT: v_readlane_b32 s6, v1, 47
; GFX10W64-NEXT: v_writelane_b32 v3, s5, 32
; GFX10W64-NEXT: s_mov_b64 exec, s[2:3]
-; GFX10W64-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
+; GFX10W64-NEXT: v_mbcnt_hi_u32_b32 v4, exec_hi, v0
+; GFX10W64-NEXT: v_mov_b32_e32 v0, 0
; GFX10W64-NEXT: s_or_saveexec_b64 s[2:3], -1
; GFX10W64-NEXT: v_writelane_b32 v3, s6, 48
; GFX10W64-NEXT: s_mov_b64 exec, s[2:3]
-; GFX10W64-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
-; GFX10W64-NEXT: ; implicit-def: $vgpr0
+; GFX10W64-NEXT: v_cmp_eq_u32_e32 vcc, 0, v4
+; GFX10W64-NEXT: ; implicit-def: $vgpr4
; GFX10W64-NEXT: s_and_saveexec_b64 s[2:3], vcc
; GFX10W64-NEXT: s_cbranch_execz .LBB2_2
; GFX10W64-NEXT: ; %bb.1:
; GFX10W64-NEXT: s_load_dwordx4 s[8:11], s[0:1], 0x34
-; GFX10W64-NEXT: v_mov_b32_e32 v0, s4
+; GFX10W64-NEXT: v_mov_b32_e32 v4, s4
; GFX10W64-NEXT: s_waitcnt lgkmcnt(0)
-; GFX10W64-NEXT: buffer_atomic_add v0, off, s[8:11], 0 glc
+; GFX10W64-NEXT: buffer_atomic_add v4, off, s[8:11], 0 glc
; GFX10W64-NEXT: .LBB2_2:
; GFX10W64-NEXT: s_waitcnt_depctr 0xffe3
; GFX10W64-NEXT: s_or_b64 exec, exec, s[2:3]
; GFX10W64-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x24
; GFX10W64-NEXT: s_waitcnt vmcnt(0)
-; GFX10W64-NEXT: v_readfirstlane_b32 s2, v0
-; GFX10W64-NEXT: v_mov_b32_e32 v0, v3
-; GFX10W64-NEXT: v_mov_b32_e32 v4, 0
-; GFX10W64-NEXT: v_add_nc_u32_e32 v0, s2, v0
+; GFX10W64-NEXT: v_readfirstlane_b32 s2, v4
+; GFX10W64-NEXT: v_mov_b32_e32 v4, v3
+; GFX10W64-NEXT: v_add_nc_u32_e32 v4, s2, v4
; GFX10W64-NEXT: s_waitcnt lgkmcnt(0)
-; GFX10W64-NEXT: global_store_dword v4, v0, s[0:1]
+; GFX10W64-NEXT: global_store_dword v0, v4, s[0:1]
; GFX10W64-NEXT: s_endpgm
;
; GFX10W32-LABEL: add_i32_varying_vdata:
; GFX10W32-NEXT: v_mov_b32_dpp v3, v1 row_shr:1 row_mask:0xf bank_mask:0xf
; GFX10W32-NEXT: v_readlane_b32 s3, v1, 15
; GFX10W32-NEXT: s_mov_b32 exec_lo, s2
-; GFX10W32-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX10W32-NEXT: v_mbcnt_lo_u32_b32 v4, exec_lo, 0
+; GFX10W32-NEXT: v_mov_b32_e32 v0, 0
; GFX10W32-NEXT: s_or_saveexec_b32 s2, -1
; GFX10W32-NEXT: v_writelane_b32 v3, s3, 16
; GFX10W32-NEXT: s_mov_b32 exec_lo, s2
-; GFX10W32-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v0
-; GFX10W32-NEXT: ; implicit-def: $vgpr0
+; GFX10W32-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v4
+; GFX10W32-NEXT: ; implicit-def: $vgpr4
; GFX10W32-NEXT: s_and_saveexec_b32 s2, vcc_lo
; GFX10W32-NEXT: s_cbranch_execz .LBB2_2
; GFX10W32-NEXT: ; %bb.1:
; GFX10W32-NEXT: s_mov_b32 s3, s4
; GFX10W32-NEXT: s_load_dwordx4 s[4:7], s[0:1], 0x34
-; GFX10W32-NEXT: v_mov_b32_e32 v0, s3
+; GFX10W32-NEXT: v_mov_b32_e32 v4, s3
; GFX10W32-NEXT: s_waitcnt lgkmcnt(0)
-; GFX10W32-NEXT: buffer_atomic_add v0, off, s[4:7], 0 glc
+; GFX10W32-NEXT: buffer_atomic_add v4, off, s[4:7], 0 glc
; GFX10W32-NEXT: .LBB2_2:
; GFX10W32-NEXT: s_waitcnt_depctr 0xffe3
; GFX10W32-NEXT: s_or_b32 exec_lo, exec_lo, s2
; GFX10W32-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x24
; GFX10W32-NEXT: s_waitcnt vmcnt(0)
-; GFX10W32-NEXT: v_readfirstlane_b32 s2, v0
-; GFX10W32-NEXT: v_mov_b32_e32 v0, v3
-; GFX10W32-NEXT: v_mov_b32_e32 v4, 0
-; GFX10W32-NEXT: v_add_nc_u32_e32 v0, s2, v0
+; GFX10W32-NEXT: v_readfirstlane_b32 s2, v4
+; GFX10W32-NEXT: v_mov_b32_e32 v4, v3
+; GFX10W32-NEXT: v_add_nc_u32_e32 v4, s2, v4
; GFX10W32-NEXT: s_waitcnt lgkmcnt(0)
-; GFX10W32-NEXT: global_store_dword v4, v0, s[0:1]
+; GFX10W32-NEXT: global_store_dword v0, v4, s[0:1]
; GFX10W32-NEXT: s_endpgm
;
; GFX11W64-LABEL: add_i32_varying_vdata:
; GFX11W64-NEXT: v_readlane_b32 s6, v1, 47
; GFX11W64-NEXT: v_writelane_b32 v3, s5, 32
; GFX11W64-NEXT: s_mov_b64 exec, s[2:3]
-; GFX11W64-NEXT: s_delay_alu instid0(SALU_CYCLE_1) | instskip(SKIP_3) | instid1(VALU_DEP_2)
-; GFX11W64-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
+; GFX11W64-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
+; GFX11W64-NEXT: v_mbcnt_hi_u32_b32 v4, exec_hi, v0
+; GFX11W64-NEXT: v_mov_b32_e32 v0, 0
; GFX11W64-NEXT: s_or_saveexec_b64 s[2:3], -1
; GFX11W64-NEXT: v_writelane_b32 v3, s6, 48
; GFX11W64-NEXT: s_mov_b64 exec, s[2:3]
-; GFX11W64-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
-; GFX11W64-NEXT: ; implicit-def: $vgpr0
+; GFX11W64-NEXT: v_cmp_eq_u32_e32 vcc, 0, v4
+; GFX11W64-NEXT: ; implicit-def: $vgpr4
; GFX11W64-NEXT: s_and_saveexec_b64 s[2:3], vcc
; GFX11W64-NEXT: s_cbranch_execz .LBB2_2
; GFX11W64-NEXT: ; %bb.1:
; GFX11W64-NEXT: s_load_b128 s[8:11], s[0:1], 0x34
-; GFX11W64-NEXT: v_mov_b32_e32 v0, s4
+; GFX11W64-NEXT: v_mov_b32_e32 v4, s4
; GFX11W64-NEXT: s_waitcnt lgkmcnt(0)
-; GFX11W64-NEXT: buffer_atomic_add_u32 v0, off, s[8:11], 0 glc
+; GFX11W64-NEXT: buffer_atomic_add_u32 v4, off, s[8:11], 0 glc
; GFX11W64-NEXT: .LBB2_2:
; GFX11W64-NEXT: s_or_b64 exec, exec, s[2:3]
; GFX11W64-NEXT: s_load_b64 s[0:1], s[0:1], 0x24
; GFX11W64-NEXT: s_waitcnt vmcnt(0)
-; GFX11W64-NEXT: v_readfirstlane_b32 s2, v0
-; GFX11W64-NEXT: v_mov_b32_e32 v0, v3
-; GFX11W64-NEXT: v_mov_b32_e32 v4, 0
-; GFX11W64-NEXT: s_delay_alu instid0(VALU_DEP_2)
-; GFX11W64-NEXT: v_add_nc_u32_e32 v0, s2, v0
+; GFX11W64-NEXT: v_readfirstlane_b32 s2, v4
+; GFX11W64-NEXT: v_mov_b32_e32 v4, v3
+; GFX11W64-NEXT: s_delay_alu instid0(VALU_DEP_1)
+; GFX11W64-NEXT: v_add_nc_u32_e32 v4, s2, v4
; GFX11W64-NEXT: s_waitcnt lgkmcnt(0)
-; GFX11W64-NEXT: global_store_b32 v4, v0, s[0:1]
+; GFX11W64-NEXT: global_store_b32 v0, v4, s[0:1]
; GFX11W64-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
; GFX11W64-NEXT: s_endpgm
;
; GFX11W32-NEXT: v_mov_b32_dpp v3, v1 row_shr:1 row_mask:0xf bank_mask:0xf
; GFX11W32-NEXT: v_readlane_b32 s3, v1, 15
; GFX11W32-NEXT: s_mov_b32 exec_lo, s2
-; GFX11W32-NEXT: s_delay_alu instid0(SALU_CYCLE_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
-; GFX11W32-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX11W32-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
+; GFX11W32-NEXT: v_mbcnt_lo_u32_b32 v4, exec_lo, 0
+; GFX11W32-NEXT: v_mov_b32_e32 v0, 0
; GFX11W32-NEXT: s_or_saveexec_b32 s2, -1
; GFX11W32-NEXT: v_writelane_b32 v3, s3, 16
; GFX11W32-NEXT: s_mov_b32 exec_lo, s2
-; GFX11W32-NEXT: s_delay_alu instid0(VALU_DEP_2)
-; GFX11W32-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v0
-; GFX11W32-NEXT: ; implicit-def: $vgpr0
+; GFX11W32-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v4
+; GFX11W32-NEXT: ; implicit-def: $vgpr4
; GFX11W32-NEXT: s_and_saveexec_b32 s2, vcc_lo
; GFX11W32-NEXT: s_cbranch_execz .LBB2_2
; GFX11W32-NEXT: ; %bb.1:
; GFX11W32-NEXT: s_mov_b32 s3, s4
; GFX11W32-NEXT: s_load_b128 s[4:7], s[0:1], 0x34
-; GFX11W32-NEXT: v_mov_b32_e32 v0, s3
+; GFX11W32-NEXT: v_mov_b32_e32 v4, s3
; GFX11W32-NEXT: s_waitcnt lgkmcnt(0)
-; GFX11W32-NEXT: buffer_atomic_add_u32 v0, off, s[4:7], 0 glc
+; GFX11W32-NEXT: buffer_atomic_add_u32 v4, off, s[4:7], 0 glc
; GFX11W32-NEXT: .LBB2_2:
; GFX11W32-NEXT: s_or_b32 exec_lo, exec_lo, s2
; GFX11W32-NEXT: s_load_b64 s[0:1], s[0:1], 0x24
; GFX11W32-NEXT: s_waitcnt vmcnt(0)
-; GFX11W32-NEXT: v_readfirstlane_b32 s2, v0
-; GFX11W32-NEXT: v_mov_b32_e32 v0, v3
-; GFX11W32-NEXT: v_mov_b32_e32 v4, 0
-; GFX11W32-NEXT: s_delay_alu instid0(VALU_DEP_2)
-; GFX11W32-NEXT: v_add_nc_u32_e32 v0, s2, v0
+; GFX11W32-NEXT: v_readfirstlane_b32 s2, v4
+; GFX11W32-NEXT: v_mov_b32_e32 v4, v3
+; GFX11W32-NEXT: s_delay_alu instid0(VALU_DEP_1)
+; GFX11W32-NEXT: v_add_nc_u32_e32 v4, s2, v4
; GFX11W32-NEXT: s_waitcnt lgkmcnt(0)
-; GFX11W32-NEXT: global_store_b32 v4, v0, s[0:1]
+; GFX11W32-NEXT: global_store_b32 v0, v4, s[0:1]
; GFX11W32-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
; GFX11W32-NEXT: s_endpgm
entry:
;
; GFX9-LABEL: sub_i32_varying_vdata:
; GFX9: ; %bb.0: ; %entry
-; GFX9-NEXT: s_or_saveexec_b64 s[2:3], -1
-; GFX9-NEXT: v_mov_b32_e32 v1, 0
-; GFX9-NEXT: s_mov_b64 exec, s[2:3]
-; GFX9-NEXT: v_mbcnt_lo_u32_b32 v3, exec_lo, 0
-; GFX9-NEXT: v_mbcnt_hi_u32_b32 v3, exec_hi, v3
-; GFX9-NEXT: v_mov_b32_e32 v2, v0
+; GFX9-NEXT: v_mov_b32_e32 v3, 0
+; GFX9-NEXT: v_mbcnt_lo_u32_b32 v4, exec_lo, 0
+; GFX9-NEXT: v_mbcnt_hi_u32_b32 v4, exec_hi, v4
+; GFX9-NEXT: v_mov_b32_e32 v1, v0
; GFX9-NEXT: s_not_b64 exec, exec
-; GFX9-NEXT: v_mov_b32_e32 v2, 0
+; GFX9-NEXT: v_mov_b32_e32 v1, 0
; GFX9-NEXT: s_not_b64 exec, exec
; GFX9-NEXT: s_or_saveexec_b64 s[2:3], -1
-; GFX9-NEXT: v_add_u32_dpp v2, v2, v2 row_shr:1 row_mask:0xf bank_mask:0xf bound_ctrl:1
-; GFX9-NEXT: s_nop 1
-; GFX9-NEXT: v_add_u32_dpp v2, v2, v2 row_shr:2 row_mask:0xf bank_mask:0xf bound_ctrl:1
+; GFX9-NEXT: v_add_u32_dpp v1, v1, v1 row_shr:1 row_mask:0xf bank_mask:0xf bound_ctrl:1
+; GFX9-NEXT: v_mov_b32_e32 v2, 0
+; GFX9-NEXT: s_nop 0
+; GFX9-NEXT: v_add_u32_dpp v1, v1, v1 row_shr:2 row_mask:0xf bank_mask:0xf bound_ctrl:1
; GFX9-NEXT: s_nop 1
-; GFX9-NEXT: v_add_u32_dpp v2, v2, v2 row_shr:4 row_mask:0xf bank_mask:0xf bound_ctrl:1
+; GFX9-NEXT: v_add_u32_dpp v1, v1, v1 row_shr:4 row_mask:0xf bank_mask:0xf bound_ctrl:1
; GFX9-NEXT: s_nop 1
-; GFX9-NEXT: v_add_u32_dpp v2, v2, v2 row_shr:8 row_mask:0xf bank_mask:0xf bound_ctrl:1
+; GFX9-NEXT: v_add_u32_dpp v1, v1, v1 row_shr:8 row_mask:0xf bank_mask:0xf bound_ctrl:1
; GFX9-NEXT: s_nop 1
-; GFX9-NEXT: v_add_u32_dpp v2, v2, v2 row_bcast:15 row_mask:0xa bank_mask:0xf
+; GFX9-NEXT: v_add_u32_dpp v1, v1, v1 row_bcast:15 row_mask:0xa bank_mask:0xf
; GFX9-NEXT: s_nop 1
-; GFX9-NEXT: v_add_u32_dpp v2, v2, v2 row_bcast:31 row_mask:0xc bank_mask:0xf
-; GFX9-NEXT: v_readlane_b32 s4, v2, 63
+; GFX9-NEXT: v_add_u32_dpp v1, v1, v1 row_bcast:31 row_mask:0xc bank_mask:0xf
+; GFX9-NEXT: v_readlane_b32 s4, v1, 63
; GFX9-NEXT: s_nop 0
-; GFX9-NEXT: v_mov_b32_dpp v1, v2 wave_shr:1 row_mask:0xf bank_mask:0xf
+; GFX9-NEXT: v_mov_b32_dpp v2, v1 wave_shr:1 row_mask:0xf bank_mask:0xf
; GFX9-NEXT: s_mov_b64 exec, s[2:3]
-; GFX9-NEXT: v_cmp_eq_u32_e32 vcc, 0, v3
+; GFX9-NEXT: v_cmp_eq_u32_e32 vcc, 0, v4
; GFX9-NEXT: ; implicit-def: $vgpr0
; GFX9-NEXT: s_and_saveexec_b64 s[2:3], vcc
; GFX9-NEXT: s_cbranch_execz .LBB6_2
; GFX9-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x24
; GFX9-NEXT: s_waitcnt vmcnt(0)
; GFX9-NEXT: v_readfirstlane_b32 s2, v0
-; GFX9-NEXT: v_mov_b32_e32 v0, v1
-; GFX9-NEXT: v_mov_b32_e32 v3, 0
+; GFX9-NEXT: v_mov_b32_e32 v0, v2
; GFX9-NEXT: v_sub_u32_e32 v0, s2, v0
; GFX9-NEXT: s_waitcnt lgkmcnt(0)
; GFX9-NEXT: global_store_dword v3, v0, s[0:1]
; GFX10W64-NEXT: v_readlane_b32 s6, v1, 47
; GFX10W64-NEXT: v_writelane_b32 v3, s5, 32
; GFX10W64-NEXT: s_mov_b64 exec, s[2:3]
-; GFX10W64-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
+; GFX10W64-NEXT: v_mbcnt_hi_u32_b32 v4, exec_hi, v0
+; GFX10W64-NEXT: v_mov_b32_e32 v0, 0
; GFX10W64-NEXT: s_or_saveexec_b64 s[2:3], -1
; GFX10W64-NEXT: v_writelane_b32 v3, s6, 48
; GFX10W64-NEXT: s_mov_b64 exec, s[2:3]
-; GFX10W64-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
-; GFX10W64-NEXT: ; implicit-def: $vgpr0
+; GFX10W64-NEXT: v_cmp_eq_u32_e32 vcc, 0, v4
+; GFX10W64-NEXT: ; implicit-def: $vgpr4
; GFX10W64-NEXT: s_and_saveexec_b64 s[2:3], vcc
; GFX10W64-NEXT: s_cbranch_execz .LBB6_2
; GFX10W64-NEXT: ; %bb.1:
; GFX10W64-NEXT: s_load_dwordx4 s[8:11], s[0:1], 0x34
-; GFX10W64-NEXT: v_mov_b32_e32 v0, s4
+; GFX10W64-NEXT: v_mov_b32_e32 v4, s4
; GFX10W64-NEXT: s_waitcnt lgkmcnt(0)
-; GFX10W64-NEXT: buffer_atomic_sub v0, off, s[8:11], 0 glc
+; GFX10W64-NEXT: buffer_atomic_sub v4, off, s[8:11], 0 glc
; GFX10W64-NEXT: .LBB6_2:
; GFX10W64-NEXT: s_waitcnt_depctr 0xffe3
; GFX10W64-NEXT: s_or_b64 exec, exec, s[2:3]
; GFX10W64-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x24
; GFX10W64-NEXT: s_waitcnt vmcnt(0)
-; GFX10W64-NEXT: v_readfirstlane_b32 s2, v0
-; GFX10W64-NEXT: v_mov_b32_e32 v0, v3
-; GFX10W64-NEXT: v_mov_b32_e32 v4, 0
-; GFX10W64-NEXT: v_sub_nc_u32_e32 v0, s2, v0
+; GFX10W64-NEXT: v_readfirstlane_b32 s2, v4
+; GFX10W64-NEXT: v_mov_b32_e32 v4, v3
+; GFX10W64-NEXT: v_sub_nc_u32_e32 v4, s2, v4
; GFX10W64-NEXT: s_waitcnt lgkmcnt(0)
-; GFX10W64-NEXT: global_store_dword v4, v0, s[0:1]
+; GFX10W64-NEXT: global_store_dword v0, v4, s[0:1]
; GFX10W64-NEXT: s_endpgm
;
; GFX10W32-LABEL: sub_i32_varying_vdata:
; GFX10W32-NEXT: v_mov_b32_dpp v3, v1 row_shr:1 row_mask:0xf bank_mask:0xf
; GFX10W32-NEXT: v_readlane_b32 s3, v1, 15
; GFX10W32-NEXT: s_mov_b32 exec_lo, s2
-; GFX10W32-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX10W32-NEXT: v_mbcnt_lo_u32_b32 v4, exec_lo, 0
+; GFX10W32-NEXT: v_mov_b32_e32 v0, 0
; GFX10W32-NEXT: s_or_saveexec_b32 s2, -1
; GFX10W32-NEXT: v_writelane_b32 v3, s3, 16
; GFX10W32-NEXT: s_mov_b32 exec_lo, s2
-; GFX10W32-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v0
-; GFX10W32-NEXT: ; implicit-def: $vgpr0
+; GFX10W32-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v4
+; GFX10W32-NEXT: ; implicit-def: $vgpr4
; GFX10W32-NEXT: s_and_saveexec_b32 s2, vcc_lo
; GFX10W32-NEXT: s_cbranch_execz .LBB6_2
; GFX10W32-NEXT: ; %bb.1:
; GFX10W32-NEXT: s_mov_b32 s3, s4
; GFX10W32-NEXT: s_load_dwordx4 s[4:7], s[0:1], 0x34
-; GFX10W32-NEXT: v_mov_b32_e32 v0, s3
+; GFX10W32-NEXT: v_mov_b32_e32 v4, s3
; GFX10W32-NEXT: s_waitcnt lgkmcnt(0)
-; GFX10W32-NEXT: buffer_atomic_sub v0, off, s[4:7], 0 glc
+; GFX10W32-NEXT: buffer_atomic_sub v4, off, s[4:7], 0 glc
; GFX10W32-NEXT: .LBB6_2:
; GFX10W32-NEXT: s_waitcnt_depctr 0xffe3
; GFX10W32-NEXT: s_or_b32 exec_lo, exec_lo, s2
; GFX10W32-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x24
; GFX10W32-NEXT: s_waitcnt vmcnt(0)
-; GFX10W32-NEXT: v_readfirstlane_b32 s2, v0
-; GFX10W32-NEXT: v_mov_b32_e32 v0, v3
-; GFX10W32-NEXT: v_mov_b32_e32 v4, 0
-; GFX10W32-NEXT: v_sub_nc_u32_e32 v0, s2, v0
+; GFX10W32-NEXT: v_readfirstlane_b32 s2, v4
+; GFX10W32-NEXT: v_mov_b32_e32 v4, v3
+; GFX10W32-NEXT: v_sub_nc_u32_e32 v4, s2, v4
; GFX10W32-NEXT: s_waitcnt lgkmcnt(0)
-; GFX10W32-NEXT: global_store_dword v4, v0, s[0:1]
+; GFX10W32-NEXT: global_store_dword v0, v4, s[0:1]
; GFX10W32-NEXT: s_endpgm
;
; GFX11W64-LABEL: sub_i32_varying_vdata:
; GFX11W64-NEXT: v_readlane_b32 s6, v1, 47
; GFX11W64-NEXT: v_writelane_b32 v3, s5, 32
; GFX11W64-NEXT: s_mov_b64 exec, s[2:3]
-; GFX11W64-NEXT: s_delay_alu instid0(SALU_CYCLE_1) | instskip(SKIP_3) | instid1(VALU_DEP_2)
-; GFX11W64-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
+; GFX11W64-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
+; GFX11W64-NEXT: v_mbcnt_hi_u32_b32 v4, exec_hi, v0
+; GFX11W64-NEXT: v_mov_b32_e32 v0, 0
; GFX11W64-NEXT: s_or_saveexec_b64 s[2:3], -1
; GFX11W64-NEXT: v_writelane_b32 v3, s6, 48
; GFX11W64-NEXT: s_mov_b64 exec, s[2:3]
-; GFX11W64-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
-; GFX11W64-NEXT: ; implicit-def: $vgpr0
+; GFX11W64-NEXT: v_cmp_eq_u32_e32 vcc, 0, v4
+; GFX11W64-NEXT: ; implicit-def: $vgpr4
; GFX11W64-NEXT: s_and_saveexec_b64 s[2:3], vcc
; GFX11W64-NEXT: s_cbranch_execz .LBB6_2
; GFX11W64-NEXT: ; %bb.1:
; GFX11W64-NEXT: s_load_b128 s[8:11], s[0:1], 0x34
-; GFX11W64-NEXT: v_mov_b32_e32 v0, s4
+; GFX11W64-NEXT: v_mov_b32_e32 v4, s4
; GFX11W64-NEXT: s_waitcnt lgkmcnt(0)
-; GFX11W64-NEXT: buffer_atomic_sub_u32 v0, off, s[8:11], 0 glc
+; GFX11W64-NEXT: buffer_atomic_sub_u32 v4, off, s[8:11], 0 glc
; GFX11W64-NEXT: .LBB6_2:
; GFX11W64-NEXT: s_or_b64 exec, exec, s[2:3]
; GFX11W64-NEXT: s_load_b64 s[0:1], s[0:1], 0x24
; GFX11W64-NEXT: s_waitcnt vmcnt(0)
-; GFX11W64-NEXT: v_readfirstlane_b32 s2, v0
-; GFX11W64-NEXT: v_mov_b32_e32 v0, v3
-; GFX11W64-NEXT: v_mov_b32_e32 v4, 0
-; GFX11W64-NEXT: s_delay_alu instid0(VALU_DEP_2)
-; GFX11W64-NEXT: v_sub_nc_u32_e32 v0, s2, v0
+; GFX11W64-NEXT: v_readfirstlane_b32 s2, v4
+; GFX11W64-NEXT: v_mov_b32_e32 v4, v3
+; GFX11W64-NEXT: s_delay_alu instid0(VALU_DEP_1)
+; GFX11W64-NEXT: v_sub_nc_u32_e32 v4, s2, v4
; GFX11W64-NEXT: s_waitcnt lgkmcnt(0)
-; GFX11W64-NEXT: global_store_b32 v4, v0, s[0:1]
+; GFX11W64-NEXT: global_store_b32 v0, v4, s[0:1]
; GFX11W64-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
; GFX11W64-NEXT: s_endpgm
;
; GFX11W32-NEXT: v_mov_b32_dpp v3, v1 row_shr:1 row_mask:0xf bank_mask:0xf
; GFX11W32-NEXT: v_readlane_b32 s3, v1, 15
; GFX11W32-NEXT: s_mov_b32 exec_lo, s2
-; GFX11W32-NEXT: s_delay_alu instid0(SALU_CYCLE_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
-; GFX11W32-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX11W32-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
+; GFX11W32-NEXT: v_mbcnt_lo_u32_b32 v4, exec_lo, 0
+; GFX11W32-NEXT: v_mov_b32_e32 v0, 0
; GFX11W32-NEXT: s_or_saveexec_b32 s2, -1
; GFX11W32-NEXT: v_writelane_b32 v3, s3, 16
; GFX11W32-NEXT: s_mov_b32 exec_lo, s2
-; GFX11W32-NEXT: s_delay_alu instid0(VALU_DEP_2)
-; GFX11W32-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v0
-; GFX11W32-NEXT: ; implicit-def: $vgpr0
+; GFX11W32-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v4
+; GFX11W32-NEXT: ; implicit-def: $vgpr4
; GFX11W32-NEXT: s_and_saveexec_b32 s2, vcc_lo
; GFX11W32-NEXT: s_cbranch_execz .LBB6_2
; GFX11W32-NEXT: ; %bb.1:
; GFX11W32-NEXT: s_mov_b32 s3, s4
; GFX11W32-NEXT: s_load_b128 s[4:7], s[0:1], 0x34
-; GFX11W32-NEXT: v_mov_b32_e32 v0, s3
+; GFX11W32-NEXT: v_mov_b32_e32 v4, s3
; GFX11W32-NEXT: s_waitcnt lgkmcnt(0)
-; GFX11W32-NEXT: buffer_atomic_sub_u32 v0, off, s[4:7], 0 glc
+; GFX11W32-NEXT: buffer_atomic_sub_u32 v4, off, s[4:7], 0 glc
; GFX11W32-NEXT: .LBB6_2:
; GFX11W32-NEXT: s_or_b32 exec_lo, exec_lo, s2
; GFX11W32-NEXT: s_load_b64 s[0:1], s[0:1], 0x24
; GFX11W32-NEXT: s_waitcnt vmcnt(0)
-; GFX11W32-NEXT: v_readfirstlane_b32 s2, v0
-; GFX11W32-NEXT: v_mov_b32_e32 v0, v3
-; GFX11W32-NEXT: v_mov_b32_e32 v4, 0
-; GFX11W32-NEXT: s_delay_alu instid0(VALU_DEP_2)
-; GFX11W32-NEXT: v_sub_nc_u32_e32 v0, s2, v0
+; GFX11W32-NEXT: v_readfirstlane_b32 s2, v4
+; GFX11W32-NEXT: v_mov_b32_e32 v4, v3
+; GFX11W32-NEXT: s_delay_alu instid0(VALU_DEP_1)
+; GFX11W32-NEXT: v_sub_nc_u32_e32 v4, s2, v4
; GFX11W32-NEXT: s_waitcnt lgkmcnt(0)
-; GFX11W32-NEXT: global_store_b32 v4, v0, s[0:1]
+; GFX11W32-NEXT: global_store_b32 v0, v4, s[0:1]
; GFX11W32-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
; GFX11W32-NEXT: s_endpgm
entry:
;
; GFX8-LABEL: add_i32_varying_vdata:
; GFX8: ; %bb.0: ; %entry
-; GFX8-NEXT: s_or_saveexec_b64 s[2:3], -1
-; GFX8-NEXT: v_mov_b32_e32 v1, 0
-; GFX8-NEXT: s_mov_b64 exec, s[2:3]
-; GFX8-NEXT: v_mbcnt_lo_u32_b32 v3, exec_lo, 0
-; GFX8-NEXT: v_mbcnt_hi_u32_b32 v3, exec_hi, v3
-; GFX8-NEXT: v_mov_b32_e32 v2, v0
+; GFX8-NEXT: v_mov_b32_e32 v3, 0
+; GFX8-NEXT: v_mbcnt_lo_u32_b32 v4, exec_lo, 0
+; GFX8-NEXT: v_mbcnt_hi_u32_b32 v4, exec_hi, v4
+; GFX8-NEXT: v_mov_b32_e32 v1, v0
; GFX8-NEXT: s_not_b64 exec, exec
-; GFX8-NEXT: v_mov_b32_e32 v2, 0
+; GFX8-NEXT: v_mov_b32_e32 v1, 0
; GFX8-NEXT: s_not_b64 exec, exec
; GFX8-NEXT: s_or_saveexec_b64 s[2:3], -1
-; GFX8-NEXT: v_add_u32_dpp v2, vcc, v2, v2 row_shr:1 row_mask:0xf bank_mask:0xf bound_ctrl:1
-; GFX8-NEXT: s_nop 1
-; GFX8-NEXT: v_add_u32_dpp v2, vcc, v2, v2 row_shr:2 row_mask:0xf bank_mask:0xf bound_ctrl:1
+; GFX8-NEXT: v_add_u32_dpp v1, vcc, v1, v1 row_shr:1 row_mask:0xf bank_mask:0xf bound_ctrl:1
+; GFX8-NEXT: v_mov_b32_e32 v2, 0
+; GFX8-NEXT: s_nop 0
+; GFX8-NEXT: v_add_u32_dpp v1, vcc, v1, v1 row_shr:2 row_mask:0xf bank_mask:0xf bound_ctrl:1
; GFX8-NEXT: s_nop 1
-; GFX8-NEXT: v_add_u32_dpp v2, vcc, v2, v2 row_shr:4 row_mask:0xf bank_mask:0xf bound_ctrl:1
+; GFX8-NEXT: v_add_u32_dpp v1, vcc, v1, v1 row_shr:4 row_mask:0xf bank_mask:0xf bound_ctrl:1
; GFX8-NEXT: s_nop 1
-; GFX8-NEXT: v_add_u32_dpp v2, vcc, v2, v2 row_shr:8 row_mask:0xf bank_mask:0xf bound_ctrl:1
+; GFX8-NEXT: v_add_u32_dpp v1, vcc, v1, v1 row_shr:8 row_mask:0xf bank_mask:0xf bound_ctrl:1
; GFX8-NEXT: s_nop 1
-; GFX8-NEXT: v_add_u32_dpp v2, vcc, v2, v2 row_bcast:15 row_mask:0xa bank_mask:0xf
+; GFX8-NEXT: v_add_u32_dpp v1, vcc, v1, v1 row_bcast:15 row_mask:0xa bank_mask:0xf
; GFX8-NEXT: s_nop 1
-; GFX8-NEXT: v_add_u32_dpp v2, vcc, v2, v2 row_bcast:31 row_mask:0xc bank_mask:0xf
-; GFX8-NEXT: v_readlane_b32 s4, v2, 63
+; GFX8-NEXT: v_add_u32_dpp v1, vcc, v1, v1 row_bcast:31 row_mask:0xc bank_mask:0xf
+; GFX8-NEXT: v_readlane_b32 s4, v1, 63
; GFX8-NEXT: s_nop 0
-; GFX8-NEXT: v_mov_b32_dpp v1, v2 wave_shr:1 row_mask:0xf bank_mask:0xf
+; GFX8-NEXT: v_mov_b32_dpp v2, v1 wave_shr:1 row_mask:0xf bank_mask:0xf
; GFX8-NEXT: s_mov_b64 exec, s[2:3]
-; GFX8-NEXT: v_cmp_eq_u32_e32 vcc, 0, v3
+; GFX8-NEXT: v_cmp_eq_u32_e32 vcc, 0, v4
; GFX8-NEXT: ; implicit-def: $vgpr0
; GFX8-NEXT: s_and_saveexec_b64 s[2:3], vcc
; GFX8-NEXT: s_cbranch_execz .LBB2_2
; GFX8-NEXT: ; %bb.1:
; GFX8-NEXT: s_load_dwordx4 s[8:11], s[0:1], 0x34
; GFX8-NEXT: v_mov_b32_e32 v0, s4
-; GFX8-NEXT: v_mov_b32_e32 v3, 0
; GFX8-NEXT: s_waitcnt lgkmcnt(0)
; GFX8-NEXT: buffer_atomic_add v0, v3, s[8:11], 0 idxen glc
; GFX8-NEXT: .LBB2_2:
; GFX8-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x24
; GFX8-NEXT: s_waitcnt vmcnt(0)
; GFX8-NEXT: v_readfirstlane_b32 s2, v0
-; GFX8-NEXT: v_mov_b32_e32 v0, v1
+; GFX8-NEXT: v_mov_b32_e32 v0, v2
; GFX8-NEXT: v_add_u32_e32 v0, vcc, s2, v0
; GFX8-NEXT: s_waitcnt lgkmcnt(0)
; GFX8-NEXT: v_mov_b32_e32 v4, s1
;
; GFX9-LABEL: add_i32_varying_vdata:
; GFX9: ; %bb.0: ; %entry
-; GFX9-NEXT: s_or_saveexec_b64 s[2:3], -1
-; GFX9-NEXT: v_mov_b32_e32 v1, 0
-; GFX9-NEXT: s_mov_b64 exec, s[2:3]
-; GFX9-NEXT: v_mbcnt_lo_u32_b32 v3, exec_lo, 0
-; GFX9-NEXT: v_mbcnt_hi_u32_b32 v3, exec_hi, v3
-; GFX9-NEXT: v_mov_b32_e32 v2, v0
+; GFX9-NEXT: v_mov_b32_e32 v3, 0
+; GFX9-NEXT: v_mbcnt_lo_u32_b32 v4, exec_lo, 0
+; GFX9-NEXT: v_mbcnt_hi_u32_b32 v4, exec_hi, v4
+; GFX9-NEXT: v_mov_b32_e32 v1, v0
; GFX9-NEXT: s_not_b64 exec, exec
-; GFX9-NEXT: v_mov_b32_e32 v2, 0
+; GFX9-NEXT: v_mov_b32_e32 v1, 0
; GFX9-NEXT: s_not_b64 exec, exec
; GFX9-NEXT: s_or_saveexec_b64 s[2:3], -1
-; GFX9-NEXT: v_add_u32_dpp v2, v2, v2 row_shr:1 row_mask:0xf bank_mask:0xf bound_ctrl:1
-; GFX9-NEXT: s_nop 1
-; GFX9-NEXT: v_add_u32_dpp v2, v2, v2 row_shr:2 row_mask:0xf bank_mask:0xf bound_ctrl:1
+; GFX9-NEXT: v_add_u32_dpp v1, v1, v1 row_shr:1 row_mask:0xf bank_mask:0xf bound_ctrl:1
+; GFX9-NEXT: v_mov_b32_e32 v2, 0
+; GFX9-NEXT: s_nop 0
+; GFX9-NEXT: v_add_u32_dpp v1, v1, v1 row_shr:2 row_mask:0xf bank_mask:0xf bound_ctrl:1
; GFX9-NEXT: s_nop 1
-; GFX9-NEXT: v_add_u32_dpp v2, v2, v2 row_shr:4 row_mask:0xf bank_mask:0xf bound_ctrl:1
+; GFX9-NEXT: v_add_u32_dpp v1, v1, v1 row_shr:4 row_mask:0xf bank_mask:0xf bound_ctrl:1
; GFX9-NEXT: s_nop 1
-; GFX9-NEXT: v_add_u32_dpp v2, v2, v2 row_shr:8 row_mask:0xf bank_mask:0xf bound_ctrl:1
+; GFX9-NEXT: v_add_u32_dpp v1, v1, v1 row_shr:8 row_mask:0xf bank_mask:0xf bound_ctrl:1
; GFX9-NEXT: s_nop 1
-; GFX9-NEXT: v_add_u32_dpp v2, v2, v2 row_bcast:15 row_mask:0xa bank_mask:0xf
+; GFX9-NEXT: v_add_u32_dpp v1, v1, v1 row_bcast:15 row_mask:0xa bank_mask:0xf
; GFX9-NEXT: s_nop 1
-; GFX9-NEXT: v_add_u32_dpp v2, v2, v2 row_bcast:31 row_mask:0xc bank_mask:0xf
-; GFX9-NEXT: v_readlane_b32 s4, v2, 63
+; GFX9-NEXT: v_add_u32_dpp v1, v1, v1 row_bcast:31 row_mask:0xc bank_mask:0xf
+; GFX9-NEXT: v_readlane_b32 s4, v1, 63
; GFX9-NEXT: s_nop 0
-; GFX9-NEXT: v_mov_b32_dpp v1, v2 wave_shr:1 row_mask:0xf bank_mask:0xf
+; GFX9-NEXT: v_mov_b32_dpp v2, v1 wave_shr:1 row_mask:0xf bank_mask:0xf
; GFX9-NEXT: s_mov_b64 exec, s[2:3]
-; GFX9-NEXT: v_cmp_eq_u32_e32 vcc, 0, v3
+; GFX9-NEXT: v_cmp_eq_u32_e32 vcc, 0, v4
; GFX9-NEXT: ; implicit-def: $vgpr0
; GFX9-NEXT: s_and_saveexec_b64 s[2:3], vcc
; GFX9-NEXT: s_cbranch_execz .LBB2_2
; GFX9-NEXT: ; %bb.1:
; GFX9-NEXT: s_load_dwordx4 s[8:11], s[0:1], 0x34
; GFX9-NEXT: v_mov_b32_e32 v0, s4
-; GFX9-NEXT: v_mov_b32_e32 v3, 0
; GFX9-NEXT: s_waitcnt lgkmcnt(0)
; GFX9-NEXT: buffer_atomic_add v0, v3, s[8:11], 0 idxen glc
; GFX9-NEXT: .LBB2_2:
; GFX9-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x24
; GFX9-NEXT: s_waitcnt vmcnt(0)
; GFX9-NEXT: v_readfirstlane_b32 s2, v0
-; GFX9-NEXT: v_mov_b32_e32 v0, v1
-; GFX9-NEXT: v_mov_b32_e32 v3, 0
+; GFX9-NEXT: v_mov_b32_e32 v0, v2
; GFX9-NEXT: v_add_u32_e32 v0, s2, v0
; GFX9-NEXT: s_waitcnt lgkmcnt(0)
; GFX9-NEXT: global_store_dword v3, v0, s[0:1]
; GFX10W64-NEXT: v_readlane_b32 s6, v1, 47
; GFX10W64-NEXT: v_writelane_b32 v3, s5, 32
; GFX10W64-NEXT: s_mov_b64 exec, s[2:3]
-; GFX10W64-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
+; GFX10W64-NEXT: v_mbcnt_hi_u32_b32 v4, exec_hi, v0
+; GFX10W64-NEXT: v_mov_b32_e32 v0, 0
; GFX10W64-NEXT: s_or_saveexec_b64 s[2:3], -1
; GFX10W64-NEXT: v_writelane_b32 v3, s6, 48
; GFX10W64-NEXT: s_mov_b64 exec, s[2:3]
-; GFX10W64-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
-; GFX10W64-NEXT: ; implicit-def: $vgpr0
+; GFX10W64-NEXT: v_cmp_eq_u32_e32 vcc, 0, v4
+; GFX10W64-NEXT: ; implicit-def: $vgpr4
; GFX10W64-NEXT: s_and_saveexec_b64 s[2:3], vcc
; GFX10W64-NEXT: s_cbranch_execz .LBB2_2
; GFX10W64-NEXT: ; %bb.1:
; GFX10W64-NEXT: s_load_dwordx4 s[8:11], s[0:1], 0x34
-; GFX10W64-NEXT: v_mov_b32_e32 v0, s4
-; GFX10W64-NEXT: v_mov_b32_e32 v4, 0
+; GFX10W64-NEXT: v_mov_b32_e32 v4, s4
; GFX10W64-NEXT: s_waitcnt lgkmcnt(0)
-; GFX10W64-NEXT: buffer_atomic_add v0, v4, s[8:11], 0 idxen glc
+; GFX10W64-NEXT: buffer_atomic_add v4, v0, s[8:11], 0 idxen glc
; GFX10W64-NEXT: .LBB2_2:
; GFX10W64-NEXT: s_waitcnt_depctr 0xffe3
; GFX10W64-NEXT: s_or_b64 exec, exec, s[2:3]
; GFX10W64-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x24
; GFX10W64-NEXT: s_waitcnt vmcnt(0)
-; GFX10W64-NEXT: v_readfirstlane_b32 s2, v0
-; GFX10W64-NEXT: v_mov_b32_e32 v0, v3
-; GFX10W64-NEXT: v_mov_b32_e32 v4, 0
-; GFX10W64-NEXT: v_add_nc_u32_e32 v0, s2, v0
+; GFX10W64-NEXT: v_readfirstlane_b32 s2, v4
+; GFX10W64-NEXT: v_mov_b32_e32 v4, v3
+; GFX10W64-NEXT: v_add_nc_u32_e32 v4, s2, v4
; GFX10W64-NEXT: s_waitcnt lgkmcnt(0)
-; GFX10W64-NEXT: global_store_dword v4, v0, s[0:1]
+; GFX10W64-NEXT: global_store_dword v0, v4, s[0:1]
; GFX10W64-NEXT: s_endpgm
;
; GFX10W32-LABEL: add_i32_varying_vdata:
; GFX10W32-NEXT: v_mov_b32_dpp v3, v1 row_shr:1 row_mask:0xf bank_mask:0xf
; GFX10W32-NEXT: v_readlane_b32 s3, v1, 15
; GFX10W32-NEXT: s_mov_b32 exec_lo, s2
-; GFX10W32-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX10W32-NEXT: v_mbcnt_lo_u32_b32 v4, exec_lo, 0
+; GFX10W32-NEXT: v_mov_b32_e32 v0, 0
; GFX10W32-NEXT: s_or_saveexec_b32 s2, -1
; GFX10W32-NEXT: v_writelane_b32 v3, s3, 16
; GFX10W32-NEXT: s_mov_b32 exec_lo, s2
-; GFX10W32-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v0
-; GFX10W32-NEXT: ; implicit-def: $vgpr0
+; GFX10W32-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v4
+; GFX10W32-NEXT: ; implicit-def: $vgpr4
; GFX10W32-NEXT: s_and_saveexec_b32 s2, vcc_lo
; GFX10W32-NEXT: s_cbranch_execz .LBB2_2
; GFX10W32-NEXT: ; %bb.1:
; GFX10W32-NEXT: s_mov_b32 s3, s4
; GFX10W32-NEXT: s_load_dwordx4 s[4:7], s[0:1], 0x34
-; GFX10W32-NEXT: v_mov_b32_e32 v0, s3
-; GFX10W32-NEXT: v_mov_b32_e32 v4, 0
+; GFX10W32-NEXT: v_mov_b32_e32 v4, s3
; GFX10W32-NEXT: s_waitcnt lgkmcnt(0)
-; GFX10W32-NEXT: buffer_atomic_add v0, v4, s[4:7], 0 idxen glc
+; GFX10W32-NEXT: buffer_atomic_add v4, v0, s[4:7], 0 idxen glc
; GFX10W32-NEXT: .LBB2_2:
; GFX10W32-NEXT: s_waitcnt_depctr 0xffe3
; GFX10W32-NEXT: s_or_b32 exec_lo, exec_lo, s2
; GFX10W32-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x24
; GFX10W32-NEXT: s_waitcnt vmcnt(0)
-; GFX10W32-NEXT: v_readfirstlane_b32 s2, v0
-; GFX10W32-NEXT: v_mov_b32_e32 v0, v3
-; GFX10W32-NEXT: v_mov_b32_e32 v4, 0
-; GFX10W32-NEXT: v_add_nc_u32_e32 v0, s2, v0
+; GFX10W32-NEXT: v_readfirstlane_b32 s2, v4
+; GFX10W32-NEXT: v_mov_b32_e32 v4, v3
+; GFX10W32-NEXT: v_add_nc_u32_e32 v4, s2, v4
; GFX10W32-NEXT: s_waitcnt lgkmcnt(0)
-; GFX10W32-NEXT: global_store_dword v4, v0, s[0:1]
+; GFX10W32-NEXT: global_store_dword v0, v4, s[0:1]
; GFX10W32-NEXT: s_endpgm
;
; GFX11W64-LABEL: add_i32_varying_vdata:
; GFX11W64-NEXT: v_readlane_b32 s6, v1, 47
; GFX11W64-NEXT: v_writelane_b32 v3, s5, 32
; GFX11W64-NEXT: s_mov_b64 exec, s[2:3]
-; GFX11W64-NEXT: s_delay_alu instid0(SALU_CYCLE_1) | instskip(SKIP_3) | instid1(VALU_DEP_2)
-; GFX11W64-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
+; GFX11W64-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
+; GFX11W64-NEXT: v_mbcnt_hi_u32_b32 v4, exec_hi, v0
+; GFX11W64-NEXT: v_mov_b32_e32 v0, 0
; GFX11W64-NEXT: s_or_saveexec_b64 s[2:3], -1
; GFX11W64-NEXT: v_writelane_b32 v3, s6, 48
; GFX11W64-NEXT: s_mov_b64 exec, s[2:3]
-; GFX11W64-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
-; GFX11W64-NEXT: ; implicit-def: $vgpr0
+; GFX11W64-NEXT: v_cmp_eq_u32_e32 vcc, 0, v4
+; GFX11W64-NEXT: ; implicit-def: $vgpr4
; GFX11W64-NEXT: s_and_saveexec_b64 s[2:3], vcc
; GFX11W64-NEXT: s_cbranch_execz .LBB2_2
; GFX11W64-NEXT: ; %bb.1:
; GFX11W64-NEXT: s_load_b128 s[8:11], s[0:1], 0x34
-; GFX11W64-NEXT: v_mov_b32_e32 v0, s4
-; GFX11W64-NEXT: v_mov_b32_e32 v4, 0
+; GFX11W64-NEXT: v_mov_b32_e32 v4, s4
; GFX11W64-NEXT: s_waitcnt lgkmcnt(0)
-; GFX11W64-NEXT: buffer_atomic_add_u32 v0, v4, s[8:11], 0 idxen glc
+; GFX11W64-NEXT: buffer_atomic_add_u32 v4, v0, s[8:11], 0 idxen glc
; GFX11W64-NEXT: .LBB2_2:
; GFX11W64-NEXT: s_or_b64 exec, exec, s[2:3]
; GFX11W64-NEXT: s_load_b64 s[0:1], s[0:1], 0x24
; GFX11W64-NEXT: s_waitcnt vmcnt(0)
-; GFX11W64-NEXT: v_readfirstlane_b32 s2, v0
-; GFX11W64-NEXT: v_mov_b32_e32 v0, v3
-; GFX11W64-NEXT: v_mov_b32_e32 v4, 0
-; GFX11W64-NEXT: s_delay_alu instid0(VALU_DEP_2)
-; GFX11W64-NEXT: v_add_nc_u32_e32 v0, s2, v0
+; GFX11W64-NEXT: v_readfirstlane_b32 s2, v4
+; GFX11W64-NEXT: v_mov_b32_e32 v4, v3
+; GFX11W64-NEXT: s_delay_alu instid0(VALU_DEP_1)
+; GFX11W64-NEXT: v_add_nc_u32_e32 v4, s2, v4
; GFX11W64-NEXT: s_waitcnt lgkmcnt(0)
-; GFX11W64-NEXT: global_store_b32 v4, v0, s[0:1]
+; GFX11W64-NEXT: global_store_b32 v0, v4, s[0:1]
; GFX11W64-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
; GFX11W64-NEXT: s_endpgm
;
; GFX11W32-NEXT: v_mov_b32_dpp v3, v1 row_shr:1 row_mask:0xf bank_mask:0xf
; GFX11W32-NEXT: v_readlane_b32 s3, v1, 15
; GFX11W32-NEXT: s_mov_b32 exec_lo, s2
-; GFX11W32-NEXT: s_delay_alu instid0(SALU_CYCLE_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
-; GFX11W32-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX11W32-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
+; GFX11W32-NEXT: v_mbcnt_lo_u32_b32 v4, exec_lo, 0
+; GFX11W32-NEXT: v_mov_b32_e32 v0, 0
; GFX11W32-NEXT: s_or_saveexec_b32 s2, -1
; GFX11W32-NEXT: v_writelane_b32 v3, s3, 16
; GFX11W32-NEXT: s_mov_b32 exec_lo, s2
-; GFX11W32-NEXT: s_delay_alu instid0(VALU_DEP_2)
-; GFX11W32-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v0
-; GFX11W32-NEXT: ; implicit-def: $vgpr0
+; GFX11W32-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v4
+; GFX11W32-NEXT: ; implicit-def: $vgpr4
; GFX11W32-NEXT: s_and_saveexec_b32 s2, vcc_lo
; GFX11W32-NEXT: s_cbranch_execz .LBB2_2
; GFX11W32-NEXT: ; %bb.1:
; GFX11W32-NEXT: s_mov_b32 s3, s4
; GFX11W32-NEXT: s_load_b128 s[4:7], s[0:1], 0x34
-; GFX11W32-NEXT: v_mov_b32_e32 v0, s3
-; GFX11W32-NEXT: v_mov_b32_e32 v4, 0
+; GFX11W32-NEXT: v_mov_b32_e32 v4, s3
; GFX11W32-NEXT: s_waitcnt lgkmcnt(0)
-; GFX11W32-NEXT: buffer_atomic_add_u32 v0, v4, s[4:7], 0 idxen glc
+; GFX11W32-NEXT: buffer_atomic_add_u32 v4, v0, s[4:7], 0 idxen glc
; GFX11W32-NEXT: .LBB2_2:
; GFX11W32-NEXT: s_or_b32 exec_lo, exec_lo, s2
; GFX11W32-NEXT: s_load_b64 s[0:1], s[0:1], 0x24
; GFX11W32-NEXT: s_waitcnt vmcnt(0)
-; GFX11W32-NEXT: v_readfirstlane_b32 s2, v0
-; GFX11W32-NEXT: v_mov_b32_e32 v0, v3
-; GFX11W32-NEXT: v_mov_b32_e32 v4, 0
-; GFX11W32-NEXT: s_delay_alu instid0(VALU_DEP_2)
-; GFX11W32-NEXT: v_add_nc_u32_e32 v0, s2, v0
+; GFX11W32-NEXT: v_readfirstlane_b32 s2, v4
+; GFX11W32-NEXT: v_mov_b32_e32 v4, v3
+; GFX11W32-NEXT: s_delay_alu instid0(VALU_DEP_1)
+; GFX11W32-NEXT: v_add_nc_u32_e32 v4, s2, v4
; GFX11W32-NEXT: s_waitcnt lgkmcnt(0)
-; GFX11W32-NEXT: global_store_b32 v4, v0, s[0:1]
+; GFX11W32-NEXT: global_store_b32 v0, v4, s[0:1]
; GFX11W32-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
; GFX11W32-NEXT: s_endpgm
entry:
;
; GFX8-LABEL: sub_i32_varying_vdata:
; GFX8: ; %bb.0: ; %entry
-; GFX8-NEXT: s_or_saveexec_b64 s[2:3], -1
-; GFX8-NEXT: v_mov_b32_e32 v1, 0
-; GFX8-NEXT: s_mov_b64 exec, s[2:3]
-; GFX8-NEXT: v_mbcnt_lo_u32_b32 v3, exec_lo, 0
-; GFX8-NEXT: v_mbcnt_hi_u32_b32 v3, exec_hi, v3
-; GFX8-NEXT: v_mov_b32_e32 v2, v0
+; GFX8-NEXT: v_mov_b32_e32 v3, 0
+; GFX8-NEXT: v_mbcnt_lo_u32_b32 v4, exec_lo, 0
+; GFX8-NEXT: v_mbcnt_hi_u32_b32 v4, exec_hi, v4
+; GFX8-NEXT: v_mov_b32_e32 v1, v0
; GFX8-NEXT: s_not_b64 exec, exec
-; GFX8-NEXT: v_mov_b32_e32 v2, 0
+; GFX8-NEXT: v_mov_b32_e32 v1, 0
; GFX8-NEXT: s_not_b64 exec, exec
; GFX8-NEXT: s_or_saveexec_b64 s[2:3], -1
-; GFX8-NEXT: v_add_u32_dpp v2, vcc, v2, v2 row_shr:1 row_mask:0xf bank_mask:0xf bound_ctrl:1
-; GFX8-NEXT: s_nop 1
-; GFX8-NEXT: v_add_u32_dpp v2, vcc, v2, v2 row_shr:2 row_mask:0xf bank_mask:0xf bound_ctrl:1
+; GFX8-NEXT: v_add_u32_dpp v1, vcc, v1, v1 row_shr:1 row_mask:0xf bank_mask:0xf bound_ctrl:1
+; GFX8-NEXT: v_mov_b32_e32 v2, 0
+; GFX8-NEXT: s_nop 0
+; GFX8-NEXT: v_add_u32_dpp v1, vcc, v1, v1 row_shr:2 row_mask:0xf bank_mask:0xf bound_ctrl:1
; GFX8-NEXT: s_nop 1
-; GFX8-NEXT: v_add_u32_dpp v2, vcc, v2, v2 row_shr:4 row_mask:0xf bank_mask:0xf bound_ctrl:1
+; GFX8-NEXT: v_add_u32_dpp v1, vcc, v1, v1 row_shr:4 row_mask:0xf bank_mask:0xf bound_ctrl:1
; GFX8-NEXT: s_nop 1
-; GFX8-NEXT: v_add_u32_dpp v2, vcc, v2, v2 row_shr:8 row_mask:0xf bank_mask:0xf bound_ctrl:1
+; GFX8-NEXT: v_add_u32_dpp v1, vcc, v1, v1 row_shr:8 row_mask:0xf bank_mask:0xf bound_ctrl:1
; GFX8-NEXT: s_nop 1
-; GFX8-NEXT: v_add_u32_dpp v2, vcc, v2, v2 row_bcast:15 row_mask:0xa bank_mask:0xf
+; GFX8-NEXT: v_add_u32_dpp v1, vcc, v1, v1 row_bcast:15 row_mask:0xa bank_mask:0xf
; GFX8-NEXT: s_nop 1
-; GFX8-NEXT: v_add_u32_dpp v2, vcc, v2, v2 row_bcast:31 row_mask:0xc bank_mask:0xf
-; GFX8-NEXT: v_readlane_b32 s4, v2, 63
+; GFX8-NEXT: v_add_u32_dpp v1, vcc, v1, v1 row_bcast:31 row_mask:0xc bank_mask:0xf
+; GFX8-NEXT: v_readlane_b32 s4, v1, 63
; GFX8-NEXT: s_nop 0
-; GFX8-NEXT: v_mov_b32_dpp v1, v2 wave_shr:1 row_mask:0xf bank_mask:0xf
+; GFX8-NEXT: v_mov_b32_dpp v2, v1 wave_shr:1 row_mask:0xf bank_mask:0xf
; GFX8-NEXT: s_mov_b64 exec, s[2:3]
-; GFX8-NEXT: v_cmp_eq_u32_e32 vcc, 0, v3
+; GFX8-NEXT: v_cmp_eq_u32_e32 vcc, 0, v4
; GFX8-NEXT: ; implicit-def: $vgpr0
; GFX8-NEXT: s_and_saveexec_b64 s[2:3], vcc
; GFX8-NEXT: s_cbranch_execz .LBB7_2
; GFX8-NEXT: ; %bb.1:
; GFX8-NEXT: s_load_dwordx4 s[8:11], s[0:1], 0x34
; GFX8-NEXT: v_mov_b32_e32 v0, s4
-; GFX8-NEXT: v_mov_b32_e32 v3, 0
; GFX8-NEXT: s_waitcnt lgkmcnt(0)
; GFX8-NEXT: buffer_atomic_sub v0, v3, s[8:11], 0 idxen glc
; GFX8-NEXT: .LBB7_2:
; GFX8-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x24
; GFX8-NEXT: s_waitcnt vmcnt(0)
; GFX8-NEXT: v_readfirstlane_b32 s2, v0
-; GFX8-NEXT: v_mov_b32_e32 v0, v1
+; GFX8-NEXT: v_mov_b32_e32 v0, v2
; GFX8-NEXT: v_sub_u32_e32 v0, vcc, s2, v0
; GFX8-NEXT: s_waitcnt lgkmcnt(0)
; GFX8-NEXT: v_mov_b32_e32 v4, s1
;
; GFX9-LABEL: sub_i32_varying_vdata:
; GFX9: ; %bb.0: ; %entry
-; GFX9-NEXT: s_or_saveexec_b64 s[2:3], -1
-; GFX9-NEXT: v_mov_b32_e32 v1, 0
-; GFX9-NEXT: s_mov_b64 exec, s[2:3]
-; GFX9-NEXT: v_mbcnt_lo_u32_b32 v3, exec_lo, 0
-; GFX9-NEXT: v_mbcnt_hi_u32_b32 v3, exec_hi, v3
-; GFX9-NEXT: v_mov_b32_e32 v2, v0
+; GFX9-NEXT: v_mov_b32_e32 v3, 0
+; GFX9-NEXT: v_mbcnt_lo_u32_b32 v4, exec_lo, 0
+; GFX9-NEXT: v_mbcnt_hi_u32_b32 v4, exec_hi, v4
+; GFX9-NEXT: v_mov_b32_e32 v1, v0
; GFX9-NEXT: s_not_b64 exec, exec
-; GFX9-NEXT: v_mov_b32_e32 v2, 0
+; GFX9-NEXT: v_mov_b32_e32 v1, 0
; GFX9-NEXT: s_not_b64 exec, exec
; GFX9-NEXT: s_or_saveexec_b64 s[2:3], -1
-; GFX9-NEXT: v_add_u32_dpp v2, v2, v2 row_shr:1 row_mask:0xf bank_mask:0xf bound_ctrl:1
-; GFX9-NEXT: s_nop 1
-; GFX9-NEXT: v_add_u32_dpp v2, v2, v2 row_shr:2 row_mask:0xf bank_mask:0xf bound_ctrl:1
+; GFX9-NEXT: v_add_u32_dpp v1, v1, v1 row_shr:1 row_mask:0xf bank_mask:0xf bound_ctrl:1
+; GFX9-NEXT: v_mov_b32_e32 v2, 0
+; GFX9-NEXT: s_nop 0
+; GFX9-NEXT: v_add_u32_dpp v1, v1, v1 row_shr:2 row_mask:0xf bank_mask:0xf bound_ctrl:1
; GFX9-NEXT: s_nop 1
-; GFX9-NEXT: v_add_u32_dpp v2, v2, v2 row_shr:4 row_mask:0xf bank_mask:0xf bound_ctrl:1
+; GFX9-NEXT: v_add_u32_dpp v1, v1, v1 row_shr:4 row_mask:0xf bank_mask:0xf bound_ctrl:1
; GFX9-NEXT: s_nop 1
-; GFX9-NEXT: v_add_u32_dpp v2, v2, v2 row_shr:8 row_mask:0xf bank_mask:0xf bound_ctrl:1
+; GFX9-NEXT: v_add_u32_dpp v1, v1, v1 row_shr:8 row_mask:0xf bank_mask:0xf bound_ctrl:1
; GFX9-NEXT: s_nop 1
-; GFX9-NEXT: v_add_u32_dpp v2, v2, v2 row_bcast:15 row_mask:0xa bank_mask:0xf
+; GFX9-NEXT: v_add_u32_dpp v1, v1, v1 row_bcast:15 row_mask:0xa bank_mask:0xf
; GFX9-NEXT: s_nop 1
-; GFX9-NEXT: v_add_u32_dpp v2, v2, v2 row_bcast:31 row_mask:0xc bank_mask:0xf
-; GFX9-NEXT: v_readlane_b32 s4, v2, 63
+; GFX9-NEXT: v_add_u32_dpp v1, v1, v1 row_bcast:31 row_mask:0xc bank_mask:0xf
+; GFX9-NEXT: v_readlane_b32 s4, v1, 63
; GFX9-NEXT: s_nop 0
-; GFX9-NEXT: v_mov_b32_dpp v1, v2 wave_shr:1 row_mask:0xf bank_mask:0xf
+; GFX9-NEXT: v_mov_b32_dpp v2, v1 wave_shr:1 row_mask:0xf bank_mask:0xf
; GFX9-NEXT: s_mov_b64 exec, s[2:3]
-; GFX9-NEXT: v_cmp_eq_u32_e32 vcc, 0, v3
+; GFX9-NEXT: v_cmp_eq_u32_e32 vcc, 0, v4
; GFX9-NEXT: ; implicit-def: $vgpr0
; GFX9-NEXT: s_and_saveexec_b64 s[2:3], vcc
; GFX9-NEXT: s_cbranch_execz .LBB7_2
; GFX9-NEXT: ; %bb.1:
; GFX9-NEXT: s_load_dwordx4 s[8:11], s[0:1], 0x34
; GFX9-NEXT: v_mov_b32_e32 v0, s4
-; GFX9-NEXT: v_mov_b32_e32 v3, 0
; GFX9-NEXT: s_waitcnt lgkmcnt(0)
; GFX9-NEXT: buffer_atomic_sub v0, v3, s[8:11], 0 idxen glc
; GFX9-NEXT: .LBB7_2:
; GFX9-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x24
; GFX9-NEXT: s_waitcnt vmcnt(0)
; GFX9-NEXT: v_readfirstlane_b32 s2, v0
-; GFX9-NEXT: v_mov_b32_e32 v0, v1
-; GFX9-NEXT: v_mov_b32_e32 v3, 0
+; GFX9-NEXT: v_mov_b32_e32 v0, v2
; GFX9-NEXT: v_sub_u32_e32 v0, s2, v0
; GFX9-NEXT: s_waitcnt lgkmcnt(0)
; GFX9-NEXT: global_store_dword v3, v0, s[0:1]
; GFX10W64-NEXT: v_readlane_b32 s6, v1, 47
; GFX10W64-NEXT: v_writelane_b32 v3, s5, 32
; GFX10W64-NEXT: s_mov_b64 exec, s[2:3]
-; GFX10W64-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
+; GFX10W64-NEXT: v_mbcnt_hi_u32_b32 v4, exec_hi, v0
+; GFX10W64-NEXT: v_mov_b32_e32 v0, 0
; GFX10W64-NEXT: s_or_saveexec_b64 s[2:3], -1
; GFX10W64-NEXT: v_writelane_b32 v3, s6, 48
; GFX10W64-NEXT: s_mov_b64 exec, s[2:3]
-; GFX10W64-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
-; GFX10W64-NEXT: ; implicit-def: $vgpr0
+; GFX10W64-NEXT: v_cmp_eq_u32_e32 vcc, 0, v4
+; GFX10W64-NEXT: ; implicit-def: $vgpr4
; GFX10W64-NEXT: s_and_saveexec_b64 s[2:3], vcc
; GFX10W64-NEXT: s_cbranch_execz .LBB7_2
; GFX10W64-NEXT: ; %bb.1:
; GFX10W64-NEXT: s_load_dwordx4 s[8:11], s[0:1], 0x34
-; GFX10W64-NEXT: v_mov_b32_e32 v0, s4
-; GFX10W64-NEXT: v_mov_b32_e32 v4, 0
+; GFX10W64-NEXT: v_mov_b32_e32 v4, s4
; GFX10W64-NEXT: s_waitcnt lgkmcnt(0)
-; GFX10W64-NEXT: buffer_atomic_sub v0, v4, s[8:11], 0 idxen glc
+; GFX10W64-NEXT: buffer_atomic_sub v4, v0, s[8:11], 0 idxen glc
; GFX10W64-NEXT: .LBB7_2:
; GFX10W64-NEXT: s_waitcnt_depctr 0xffe3
; GFX10W64-NEXT: s_or_b64 exec, exec, s[2:3]
; GFX10W64-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x24
; GFX10W64-NEXT: s_waitcnt vmcnt(0)
-; GFX10W64-NEXT: v_readfirstlane_b32 s2, v0
-; GFX10W64-NEXT: v_mov_b32_e32 v0, v3
-; GFX10W64-NEXT: v_mov_b32_e32 v4, 0
-; GFX10W64-NEXT: v_sub_nc_u32_e32 v0, s2, v0
+; GFX10W64-NEXT: v_readfirstlane_b32 s2, v4
+; GFX10W64-NEXT: v_mov_b32_e32 v4, v3
+; GFX10W64-NEXT: v_sub_nc_u32_e32 v4, s2, v4
; GFX10W64-NEXT: s_waitcnt lgkmcnt(0)
-; GFX10W64-NEXT: global_store_dword v4, v0, s[0:1]
+; GFX10W64-NEXT: global_store_dword v0, v4, s[0:1]
; GFX10W64-NEXT: s_endpgm
;
; GFX10W32-LABEL: sub_i32_varying_vdata:
; GFX10W32-NEXT: v_mov_b32_dpp v3, v1 row_shr:1 row_mask:0xf bank_mask:0xf
; GFX10W32-NEXT: v_readlane_b32 s3, v1, 15
; GFX10W32-NEXT: s_mov_b32 exec_lo, s2
-; GFX10W32-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX10W32-NEXT: v_mbcnt_lo_u32_b32 v4, exec_lo, 0
+; GFX10W32-NEXT: v_mov_b32_e32 v0, 0
; GFX10W32-NEXT: s_or_saveexec_b32 s2, -1
; GFX10W32-NEXT: v_writelane_b32 v3, s3, 16
; GFX10W32-NEXT: s_mov_b32 exec_lo, s2
-; GFX10W32-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v0
-; GFX10W32-NEXT: ; implicit-def: $vgpr0
+; GFX10W32-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v4
+; GFX10W32-NEXT: ; implicit-def: $vgpr4
; GFX10W32-NEXT: s_and_saveexec_b32 s2, vcc_lo
; GFX10W32-NEXT: s_cbranch_execz .LBB7_2
; GFX10W32-NEXT: ; %bb.1:
; GFX10W32-NEXT: s_mov_b32 s3, s4
; GFX10W32-NEXT: s_load_dwordx4 s[4:7], s[0:1], 0x34
-; GFX10W32-NEXT: v_mov_b32_e32 v0, s3
-; GFX10W32-NEXT: v_mov_b32_e32 v4, 0
+; GFX10W32-NEXT: v_mov_b32_e32 v4, s3
; GFX10W32-NEXT: s_waitcnt lgkmcnt(0)
-; GFX10W32-NEXT: buffer_atomic_sub v0, v4, s[4:7], 0 idxen glc
+; GFX10W32-NEXT: buffer_atomic_sub v4, v0, s[4:7], 0 idxen glc
; GFX10W32-NEXT: .LBB7_2:
; GFX10W32-NEXT: s_waitcnt_depctr 0xffe3
; GFX10W32-NEXT: s_or_b32 exec_lo, exec_lo, s2
; GFX10W32-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x24
; GFX10W32-NEXT: s_waitcnt vmcnt(0)
-; GFX10W32-NEXT: v_readfirstlane_b32 s2, v0
-; GFX10W32-NEXT: v_mov_b32_e32 v0, v3
-; GFX10W32-NEXT: v_mov_b32_e32 v4, 0
-; GFX10W32-NEXT: v_sub_nc_u32_e32 v0, s2, v0
+; GFX10W32-NEXT: v_readfirstlane_b32 s2, v4
+; GFX10W32-NEXT: v_mov_b32_e32 v4, v3
+; GFX10W32-NEXT: v_sub_nc_u32_e32 v4, s2, v4
; GFX10W32-NEXT: s_waitcnt lgkmcnt(0)
-; GFX10W32-NEXT: global_store_dword v4, v0, s[0:1]
+; GFX10W32-NEXT: global_store_dword v0, v4, s[0:1]
; GFX10W32-NEXT: s_endpgm
;
; GFX11W64-LABEL: sub_i32_varying_vdata:
; GFX11W64-NEXT: v_readlane_b32 s6, v1, 47
; GFX11W64-NEXT: v_writelane_b32 v3, s5, 32
; GFX11W64-NEXT: s_mov_b64 exec, s[2:3]
-; GFX11W64-NEXT: s_delay_alu instid0(SALU_CYCLE_1) | instskip(SKIP_3) | instid1(VALU_DEP_2)
-; GFX11W64-NEXT: v_mbcnt_hi_u32_b32 v0, exec_hi, v0
+; GFX11W64-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
+; GFX11W64-NEXT: v_mbcnt_hi_u32_b32 v4, exec_hi, v0
+; GFX11W64-NEXT: v_mov_b32_e32 v0, 0
; GFX11W64-NEXT: s_or_saveexec_b64 s[2:3], -1
; GFX11W64-NEXT: v_writelane_b32 v3, s6, 48
; GFX11W64-NEXT: s_mov_b64 exec, s[2:3]
-; GFX11W64-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
-; GFX11W64-NEXT: ; implicit-def: $vgpr0
+; GFX11W64-NEXT: v_cmp_eq_u32_e32 vcc, 0, v4
+; GFX11W64-NEXT: ; implicit-def: $vgpr4
; GFX11W64-NEXT: s_and_saveexec_b64 s[2:3], vcc
; GFX11W64-NEXT: s_cbranch_execz .LBB7_2
; GFX11W64-NEXT: ; %bb.1:
; GFX11W64-NEXT: s_load_b128 s[8:11], s[0:1], 0x34
-; GFX11W64-NEXT: v_mov_b32_e32 v0, s4
-; GFX11W64-NEXT: v_mov_b32_e32 v4, 0
+; GFX11W64-NEXT: v_mov_b32_e32 v4, s4
; GFX11W64-NEXT: s_waitcnt lgkmcnt(0)
-; GFX11W64-NEXT: buffer_atomic_sub_u32 v0, v4, s[8:11], 0 idxen glc
+; GFX11W64-NEXT: buffer_atomic_sub_u32 v4, v0, s[8:11], 0 idxen glc
; GFX11W64-NEXT: .LBB7_2:
; GFX11W64-NEXT: s_or_b64 exec, exec, s[2:3]
; GFX11W64-NEXT: s_load_b64 s[0:1], s[0:1], 0x24
; GFX11W64-NEXT: s_waitcnt vmcnt(0)
-; GFX11W64-NEXT: v_readfirstlane_b32 s2, v0
-; GFX11W64-NEXT: v_mov_b32_e32 v0, v3
-; GFX11W64-NEXT: v_mov_b32_e32 v4, 0
-; GFX11W64-NEXT: s_delay_alu instid0(VALU_DEP_2)
-; GFX11W64-NEXT: v_sub_nc_u32_e32 v0, s2, v0
+; GFX11W64-NEXT: v_readfirstlane_b32 s2, v4
+; GFX11W64-NEXT: v_mov_b32_e32 v4, v3
+; GFX11W64-NEXT: s_delay_alu instid0(VALU_DEP_1)
+; GFX11W64-NEXT: v_sub_nc_u32_e32 v4, s2, v4
; GFX11W64-NEXT: s_waitcnt lgkmcnt(0)
-; GFX11W64-NEXT: global_store_b32 v4, v0, s[0:1]
+; GFX11W64-NEXT: global_store_b32 v0, v4, s[0:1]
; GFX11W64-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
; GFX11W64-NEXT: s_endpgm
;
; GFX11W32-NEXT: v_mov_b32_dpp v3, v1 row_shr:1 row_mask:0xf bank_mask:0xf
; GFX11W32-NEXT: v_readlane_b32 s3, v1, 15
; GFX11W32-NEXT: s_mov_b32 exec_lo, s2
-; GFX11W32-NEXT: s_delay_alu instid0(SALU_CYCLE_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
-; GFX11W32-NEXT: v_mbcnt_lo_u32_b32 v0, exec_lo, 0
+; GFX11W32-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
+; GFX11W32-NEXT: v_mbcnt_lo_u32_b32 v4, exec_lo, 0
+; GFX11W32-NEXT: v_mov_b32_e32 v0, 0
; GFX11W32-NEXT: s_or_saveexec_b32 s2, -1
; GFX11W32-NEXT: v_writelane_b32 v3, s3, 16
; GFX11W32-NEXT: s_mov_b32 exec_lo, s2
-; GFX11W32-NEXT: s_delay_alu instid0(VALU_DEP_2)
-; GFX11W32-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v0
-; GFX11W32-NEXT: ; implicit-def: $vgpr0
+; GFX11W32-NEXT: v_cmp_eq_u32_e32 vcc_lo, 0, v4
+; GFX11W32-NEXT: ; implicit-def: $vgpr4
; GFX11W32-NEXT: s_and_saveexec_b32 s2, vcc_lo
; GFX11W32-NEXT: s_cbranch_execz .LBB7_2
; GFX11W32-NEXT: ; %bb.1:
; GFX11W32-NEXT: s_mov_b32 s3, s4
; GFX11W32-NEXT: s_load_b128 s[4:7], s[0:1], 0x34
-; GFX11W32-NEXT: v_mov_b32_e32 v0, s3
-; GFX11W32-NEXT: v_mov_b32_e32 v4, 0
+; GFX11W32-NEXT: v_mov_b32_e32 v4, s3
; GFX11W32-NEXT: s_waitcnt lgkmcnt(0)
-; GFX11W32-NEXT: buffer_atomic_sub_u32 v0, v4, s[4:7], 0 idxen glc
+; GFX11W32-NEXT: buffer_atomic_sub_u32 v4, v0, s[4:7], 0 idxen glc
; GFX11W32-NEXT: .LBB7_2:
; GFX11W32-NEXT: s_or_b32 exec_lo, exec_lo, s2
; GFX11W32-NEXT: s_load_b64 s[0:1], s[0:1], 0x24
; GFX11W32-NEXT: s_waitcnt vmcnt(0)
-; GFX11W32-NEXT: v_readfirstlane_b32 s2, v0
-; GFX11W32-NEXT: v_mov_b32_e32 v0, v3
-; GFX11W32-NEXT: v_mov_b32_e32 v4, 0
-; GFX11W32-NEXT: s_delay_alu instid0(VALU_DEP_2)
-; GFX11W32-NEXT: v_sub_nc_u32_e32 v0, s2, v0
+; GFX11W32-NEXT: v_readfirstlane_b32 s2, v4
+; GFX11W32-NEXT: v_mov_b32_e32 v4, v3
+; GFX11W32-NEXT: s_delay_alu instid0(VALU_DEP_1)
+; GFX11W32-NEXT: v_sub_nc_u32_e32 v4, s2, v4
; GFX11W32-NEXT: s_waitcnt lgkmcnt(0)
-; GFX11W32-NEXT: global_store_b32 v4, v0, s[0:1]
+; GFX11W32-NEXT: global_store_b32 v0, v4, s[0:1]
; GFX11W32-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
; GFX11W32-NEXT: s_endpgm
entry:
; SI-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0xd
; SI-NEXT: s_mov_b32 s2, 0
; SI-NEXT: v_cmp_ne_u32_e32 vcc, 0, v0
+; SI-NEXT: v_lshlrev_b32_e32 v0, 2, v0
; SI-NEXT: ; implicit-def: $sgpr8_sgpr9
; SI-NEXT: s_and_saveexec_b64 s[10:11], vcc
; SI-NEXT: s_xor_b64 s[10:11], exec, s[10:11]
; SI-NEXT: s_cbranch_execz .LBB3_2
; SI-NEXT: ; %bb.1: ; %else
; SI-NEXT: s_mov_b32 s3, 0xf000
-; SI-NEXT: v_lshlrev_b32_e32 v0, 2, v0
; SI-NEXT: v_mov_b32_e32 v1, 0
; SI-NEXT: s_waitcnt lgkmcnt(0)
; SI-NEXT: buffer_load_dword v0, v[0:1], s[0:3], 0 addr64
; SI-NEXT: s_mov_b32 s15, 0xf000
; SI-NEXT: s_mov_b32 s14, 0
; SI-NEXT: s_mov_b64 s[12:13], s[6:7]
-; SI-NEXT: v_lshlrev_b32_e32 v0, 2, v0
; SI-NEXT: v_mov_b32_e32 v1, 0
; SI-NEXT: buffer_load_dword v0, v[0:1], s[12:15], 0 addr64
; SI-NEXT: s_andn2_b64 s[2:3], s[8:9], exec
; GLOBALNESS1-NEXT: s_cbranch_vccz .LBB1_24
; GLOBALNESS1-NEXT: .LBB1_9: ; %baz.exit.i
; GLOBALNESS1-NEXT: ; in Loop: Header=BB1_4 Depth=1
-; GLOBALNESS1-NEXT: v_pk_mov_b32 v[0:1], 0, 0
-; GLOBALNESS1-NEXT: flat_load_dword v0, v[0:1]
+; GLOBALNESS1-NEXT: v_pk_mov_b32 v[32:33], 0, 0
+; GLOBALNESS1-NEXT: flat_load_dword v0, v[32:33]
; GLOBALNESS1-NEXT: s_mov_b32 s68, s93
; GLOBALNESS1-NEXT: s_mov_b32 s70, s93
; GLOBALNESS1-NEXT: s_mov_b32 s71, s69
; GLOBALNESS1-NEXT: s_cbranch_execz .LBB1_26
; GLOBALNESS1-NEXT: ; %bb.10: ; %bb33.i
; GLOBALNESS1-NEXT: ; in Loop: Header=BB1_4 Depth=1
-; GLOBALNESS1-NEXT: v_pk_mov_b32 v[2:3], 0, 0
-; GLOBALNESS1-NEXT: global_load_dwordx2 v[0:1], v[2:3], off
+; GLOBALNESS1-NEXT: global_load_dwordx2 v[0:1], v[32:33], off
; GLOBALNESS1-NEXT: v_readlane_b32 s4, v41, 0
; GLOBALNESS1-NEXT: v_readlane_b32 s5, v41, 1
; GLOBALNESS1-NEXT: s_andn2_b64 vcc, exec, s[4:5]
; GLOBALNESS1-NEXT: ; %bb.11: ; %bb39.i
; GLOBALNESS1-NEXT: ; in Loop: Header=BB1_4 Depth=1
; GLOBALNESS1-NEXT: v_mov_b32_e32 v45, v44
+; GLOBALNESS1-NEXT: v_pk_mov_b32 v[2:3], 0, 0
; GLOBALNESS1-NEXT: global_store_dwordx2 v[2:3], v[44:45], off
; GLOBALNESS1-NEXT: .LBB1_12: ; %bb44.lr.ph.i
; GLOBALNESS1-NEXT: ; in Loop: Header=BB1_4 Depth=1
; GLOBALNESS1-NEXT: s_mov_b32 s14, s98
; GLOBALNESS1-NEXT: v_mov_b32_e32 v31, v42
; GLOBALNESS1-NEXT: s_swappc_b64 s[30:31], s[66:67]
-; GLOBALNESS1-NEXT: v_pk_mov_b32 v[0:1], 0, 0
+; GLOBALNESS1-NEXT: v_pk_mov_b32 v[46:47], 0, 0
; GLOBALNESS1-NEXT: s_mov_b64 s[4:5], s[64:65]
; GLOBALNESS1-NEXT: s_mov_b64 s[6:7], s[54:55]
; GLOBALNESS1-NEXT: s_mov_b64 s[8:9], s[60:61]
; GLOBALNESS1-NEXT: s_mov_b32 s13, s99
; GLOBALNESS1-NEXT: s_mov_b32 s14, s98
; GLOBALNESS1-NEXT: v_mov_b32_e32 v31, v42
-; GLOBALNESS1-NEXT: global_store_dwordx2 v[0:1], a[32:33], off
+; GLOBALNESS1-NEXT: global_store_dwordx2 v[46:47], a[32:33], off
; GLOBALNESS1-NEXT: s_swappc_b64 s[30:31], s[66:67]
; GLOBALNESS1-NEXT: s_and_saveexec_b64 s[4:5], s[58:59]
; GLOBALNESS1-NEXT: s_cbranch_execz .LBB1_13
; GLOBALNESS1-NEXT: ; %bb.22: ; %bb62.i
; GLOBALNESS1-NEXT: ; in Loop: Header=BB1_15 Depth=2
; GLOBALNESS1-NEXT: v_mov_b32_e32 v45, v44
-; GLOBALNESS1-NEXT: v_pk_mov_b32 v[0:1], 0, 0
-; GLOBALNESS1-NEXT: global_store_dwordx2 v[0:1], v[44:45], off
+; GLOBALNESS1-NEXT: global_store_dwordx2 v[46:47], v[44:45], off
; GLOBALNESS1-NEXT: s_branch .LBB1_13
; GLOBALNESS1-NEXT: .LBB1_23: ; %LeafBlock
; GLOBALNESS1-NEXT: ; in Loop: Header=BB1_4 Depth=1
; GLOBALNESS0-NEXT: s_cbranch_vccz .LBB1_24
; GLOBALNESS0-NEXT: .LBB1_9: ; %baz.exit.i
; GLOBALNESS0-NEXT: ; in Loop: Header=BB1_4 Depth=1
-; GLOBALNESS0-NEXT: v_pk_mov_b32 v[0:1], 0, 0
-; GLOBALNESS0-NEXT: flat_load_dword v0, v[0:1]
+; GLOBALNESS0-NEXT: v_pk_mov_b32 v[32:33], 0, 0
+; GLOBALNESS0-NEXT: flat_load_dword v0, v[32:33]
; GLOBALNESS0-NEXT: s_mov_b32 s68, s93
; GLOBALNESS0-NEXT: s_mov_b32 s70, s93
; GLOBALNESS0-NEXT: s_mov_b32 s71, s69
; GLOBALNESS0-NEXT: s_cbranch_execz .LBB1_26
; GLOBALNESS0-NEXT: ; %bb.10: ; %bb33.i
; GLOBALNESS0-NEXT: ; in Loop: Header=BB1_4 Depth=1
-; GLOBALNESS0-NEXT: v_pk_mov_b32 v[2:3], 0, 0
-; GLOBALNESS0-NEXT: global_load_dwordx2 v[0:1], v[2:3], off
+; GLOBALNESS0-NEXT: global_load_dwordx2 v[0:1], v[32:33], off
; GLOBALNESS0-NEXT: v_readlane_b32 s4, v41, 0
; GLOBALNESS0-NEXT: v_readlane_b32 s5, v41, 1
; GLOBALNESS0-NEXT: s_andn2_b64 vcc, exec, s[4:5]
; GLOBALNESS0-NEXT: ; %bb.11: ; %bb39.i
; GLOBALNESS0-NEXT: ; in Loop: Header=BB1_4 Depth=1
; GLOBALNESS0-NEXT: v_mov_b32_e32 v45, v44
+; GLOBALNESS0-NEXT: v_pk_mov_b32 v[2:3], 0, 0
; GLOBALNESS0-NEXT: global_store_dwordx2 v[2:3], v[44:45], off
; GLOBALNESS0-NEXT: .LBB1_12: ; %bb44.lr.ph.i
; GLOBALNESS0-NEXT: ; in Loop: Header=BB1_4 Depth=1
; GLOBALNESS0-NEXT: s_mov_b32 s14, s98
; GLOBALNESS0-NEXT: v_mov_b32_e32 v31, v42
; GLOBALNESS0-NEXT: s_swappc_b64 s[30:31], s[66:67]
-; GLOBALNESS0-NEXT: v_pk_mov_b32 v[0:1], 0, 0
+; GLOBALNESS0-NEXT: v_pk_mov_b32 v[46:47], 0, 0
; GLOBALNESS0-NEXT: s_mov_b64 s[4:5], s[62:63]
; GLOBALNESS0-NEXT: s_mov_b64 s[6:7], s[54:55]
; GLOBALNESS0-NEXT: s_mov_b64 s[8:9], s[64:65]
; GLOBALNESS0-NEXT: s_mov_b32 s13, s99
; GLOBALNESS0-NEXT: s_mov_b32 s14, s98
; GLOBALNESS0-NEXT: v_mov_b32_e32 v31, v42
-; GLOBALNESS0-NEXT: global_store_dwordx2 v[0:1], a[32:33], off
+; GLOBALNESS0-NEXT: global_store_dwordx2 v[46:47], a[32:33], off
; GLOBALNESS0-NEXT: s_swappc_b64 s[30:31], s[66:67]
; GLOBALNESS0-NEXT: s_and_saveexec_b64 s[4:5], s[58:59]
; GLOBALNESS0-NEXT: s_cbranch_execz .LBB1_13
; GLOBALNESS0-NEXT: ; %bb.22: ; %bb62.i
; GLOBALNESS0-NEXT: ; in Loop: Header=BB1_15 Depth=2
; GLOBALNESS0-NEXT: v_mov_b32_e32 v45, v44
-; GLOBALNESS0-NEXT: v_pk_mov_b32 v[0:1], 0, 0
-; GLOBALNESS0-NEXT: global_store_dwordx2 v[0:1], v[44:45], off
+; GLOBALNESS0-NEXT: global_store_dwordx2 v[46:47], v[44:45], off
; GLOBALNESS0-NEXT: s_branch .LBB1_13
; GLOBALNESS0-NEXT: .LBB1_23: ; %LeafBlock
; GLOBALNESS0-NEXT: ; in Loop: Header=BB1_4 Depth=1