From 35e24aef6f7680280f97728f69c9cfe27070539f Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Fri, 19 Feb 2021 09:28:52 -0500 Subject: [PATCH] pan/bi: Mark DISCARD as having side effects Signed-off-by: Alyssa Rosenzweig Reviewed-by: Boris Brezillon Part-of: --- src/panfrost/bifrost/bir.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/panfrost/bifrost/bir.c b/src/panfrost/bifrost/bir.c index 93d51e6..567c7c1 100644 --- a/src/panfrost/bifrost/bir.c +++ b/src/panfrost/bifrost/bir.c @@ -138,15 +138,15 @@ bi_next_clause(bi_context *ctx, pan_block *block, bi_clause *clause) } /* Does an instruction have a side effect not captured by its register - * destination? Applies to certain message-passing instructions and branching - * only, used in dead code elimation. Branches are characterized by `last` - * which applies to them and some atomics, +BARRIER, +BLEND which implies no - * loss of generality */ + * destination? Applies to certain message-passing instructions, +DISCARD, and + * branching only, used in dead code elimation. Branches are characterized by + * `last` which applies to them and some atomics, +BARRIER, +BLEND which + * implies no loss of generality */ bool bi_side_effects(enum bi_opcode op) { - if (bi_opcode_props[op].last) + if (bi_opcode_props[op].last || op == BI_OPCODE_DISCARD_F32) return true; switch (bi_opcode_props[op].message) { -- 2.7.4