aco: add and use scratch SGPR to lower subdword p_create_vector on GFX6/7
authorDaniel Schürmann <daniel@schuermann.dev>
Wed, 27 May 2020 17:31:33 +0000 (18:31 +0100)
committerMarge Bot <eric+marge@anholt.net>
Tue, 9 Jun 2020 21:25:38 +0000 (21:25 +0000)
commitb21d2d9a9f1f9042def069f51ae46bd64848c853
tree6bec19bed7df4c6575463677280ccc030d7e0776
parent9e8e12ea6d20763aa1c819a7be4b9a6158df9a37
aco: add and use scratch SGPR to lower subdword p_create_vector on GFX6/7

This is needed to lower some corner cases correctly,
in case the same operand occurs multiple times:
e.g. v0 = p_create_vector(v0[0:8], v0[0:8], v0[0:8], v0[0:8])

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5226>
src/amd/compiler/aco_lower_to_hw_instr.cpp
src/amd/compiler/aco_register_allocation.cpp