aco: find scratch reg for sub-dword psuedo instructions which read sgprs

If there's a sgpr operand before a sub-dword operand, a scratch register
will not be found on GFX6/7.

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/12172>
This commit is contained in:
Rhys Perry 2021-06-17 14:15:09 +01:00 committed by Marge Bot
parent f2a48f4eae
commit 207b2cd434

View file

@ -1787,10 +1787,8 @@ handle_pseudo(ra_ctx& ctx, const RegisterFile& reg_file, Instruction* instr)
bool reads_sgpr = false;
bool reads_subdword = false;
for (Operand& op : instr->operands) {
if (op.isTemp() && op.getTemp().type() == RegType::sgpr) {
if (op.isTemp() && op.getTemp().type() == RegType::sgpr)
reads_sgpr = true;
break;
}
if (op.isTemp() && op.regClass().is_subdword())
reads_subdword = true;
}