The change adds DPP instruction pseudos and the pass combining V_MOV_B32_dpp instruction with its VALU uses as a DPP src0 operand. If any of the use instruction cannot be combined with the mov the whole sequence is reverted.
$old = ...
$dpp_value = V_MOV_B32_dpp $old, $vgpr_to_be_read_from_other_lane, dpp_controls..., $bound_ctrl
$res = VALU $dpp_value, ...
$res = VALU_DPP $folded_old, $dpp_value, ..., dpp_controls..., $folded_bound_ctrl
$bound_ctrl is DPP_BOUND_ZERO, $old is any
$bound_ctrl is DPP_BOUND_OFF, $old is 0
-> $folded_old = undef, $folded_bound_ctrl = DPP_BOUND_ZERO
$bound_ctrl is DPP_BOUND_OFF, $old is undef
-> $folded_old = undef, $folded_bound_ctrl = DPP_BOUND_OFF
$bound_ctrl is DPP_BOUND_OFF, $old is foldable
-> $folded_old = folded value, $folded_bound_ctrl = DPP_BOUND_OFF
FMAC and MAC instructions doesn't have $old operand, as it already have tied $src2.
Combining into VOPC instructions ins't supported with this patch (to be added later)