ir3: Don't emit single-source collects

This will help us propagate shared-ness through to stc when it has a
single component.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22075>
This commit is contained in:
Connor Abbott 2023-02-21 16:53:04 +01:00 committed by Marge Bot
parent 4ffef73bf5
commit ef75ea18cd

View file

@ -284,6 +284,9 @@ ir3_create_collect(struct ir3_block *block, struct ir3_instruction *const *arr,
if (arrsz == 0)
return NULL;
if (arrsz == 1)
return arr[0];
unsigned flags = dest_flags(arr[0]);
collect = ir3_instr_create(block, OPC_META_COLLECT, 1, arrsz);