r300: merge together MOV and MAD instructions
Assuming they write different channels of the same destination
and they share at least one source or one of the sources is
RC_FILE_NONE.
shader-db with RV530:
total instructions in shared programs: 136033 -> 135673 (-0.26%)
instructions in affected programs: 22987 -> 22627 (-1.57%)
total temps in shared programs: 18977 -> 18965 (-0.06%)
temps in affected programs: 74 -> 62 (-16.22%)
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6188
Reviewed-by: Filip Gawin <filip@gawin.net>
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18288>