r600/sfn: Fix test for possible dest slot

Fixes Coverity CID 1517721

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20367>
This commit is contained in:
Gert Wollny 2022-12-17 11:15:17 +01:00
parent d90da01bef
commit 8646e397ae

View file

@ -138,7 +138,8 @@ AluGroup::add_trans_instructions(AluInstr *instr)
return false;
}
while ((!m_slots[used_slot] && used_slot >= 0) || !(free_mask & (1 << used_slot)))
while (used_slot >= 0 &&
(!m_slots[used_slot] || !(free_mask & (1 << used_slot))))
--used_slot;
// if we schedule a non-trans instr into the trans slot,