freedreno/ir3: fix mad copy propagation special case
authorRob Clark <robdclark@chromium.org>
Fri, 30 Aug 2019 21:28:01 +0000 (14:28 -0700)
committerRob Clark <robdclark@gmail.com>
Fri, 6 Sep 2019 00:13:44 +0000 (00:13 +0000)
commitf94f22e87a64dcaaafba3e1a0d160385adce4807
tree9e9b73f7577c48c96bb60f0c68cb6a5a4959481d
parent1fd6a91d4a23aec40bd599cec0b6fe5d7bdc0cfb
freedreno/ir3: fix mad copy propagation special case

After the next patch enabling copy propagation for relative sources,
we'll need to dereference the n'th src in valid_flags(), so we actually
need to swap the sources before calling valid_flags().

But the logic was already a bit cumbersome, so move it into a helper
function.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/freedreno/ir3/ir3_cp.c