From e70cfe47b3e94684fed79feff7da1cf94ac63e73 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Wed, 29 Apr 2020 18:01:50 -0400 Subject: [PATCH] pan/mdg: Be a bit more pedantic in invert passes Signed-off-by: Alyssa Rosenzweig Part-of: --- src/panfrost/midgard/midgard_opt_invert.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/panfrost/midgard/midgard_opt_invert.c b/src/panfrost/midgard/midgard_opt_invert.c index de7f6bc43d8..e9c1ef261a1 100644 --- a/src/panfrost/midgard/midgard_opt_invert.c +++ b/src/panfrost/midgard/midgard_opt_invert.c @@ -308,6 +308,7 @@ midgard_opt_csel_invert(compiler_context *ctx, midgard_block *block) mir_foreach_instr_in_block_safe(block, ins) { if (ins->type != TAG_ALU_4) continue; if (!OP_IS_CSEL(ins->alu.op)) continue; + if (!is_ssa_or_constant(ins->src[2])) continue; if (!mir_single_use(ctx, ins->src[2])) continue; if (!mir_strip_inverted(ctx, ins->src[2])) continue; -- 2.30.2