pan/bi: Allow @rNULL with tied operands

Will enable DCE of atomics.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105>
This commit is contained in:
Alyssa Rosenzweig 2021-02-17 14:45:44 -05:00 committed by Marge Bot
parent 111255512a
commit d31df8416b

View file

@ -330,9 +330,10 @@ bi_pack_tuple(bi_clause *clause, bi_tuple *tuple, bi_tuple *prev, bool first_tup
if (tuple->add) {
bi_instr *add = tuple->add;
bool sr_write = bi_opcode_props[add->op].sr_write;
bool sr_write = bi_opcode_props[add->op].sr_write &&
!bi_is_null(add->dest[0]);
if (sr_read) {
if (sr_read && !bi_is_null(add->src[0])) {
assert(add->src[0].type == BI_INDEX_REGISTER);
clause->staging_register = add->src[0].value;