aco: decrease the uses of other copy operations after splitting/removing
authorRhys Perry <pendingchaos02@gmail.com>
Wed, 22 Apr 2020 20:56:02 +0000 (21:56 +0100)
committerMarge Bot <eric+marge@anholt.net>
Thu, 23 Apr 2020 11:39:23 +0000 (11:39 +0000)
commite4383b5c7f24a20ba16b0bb4f74fe5cecf406ddf
tree2590dcd02f5f2ed7bc3b2ca987421122c04b1c31
parent7f17a0a809195cefa2240f55d30f00e3fe0572b3
aco: decrease the uses of other copy operations after splitting/removing

For copies like v[7:8] = v[8:9], what currently happens is:
- do_copy() will skip the second dword
- the uses of the second dword will be reduced to 0
- the copy operation will be removed from the map
and v8 will never be set to v9.

So just decrease the uses of other operations after splitting or removing
the current operation, so: "v8 = v9" will be split off, it's uses reduced
and then the new copy will be done in the next iteration.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4686>
src/amd/compiler/aco_lower_to_hw_instr.cpp