From: Alyssa Rosenzweig Date: Wed, 29 Apr 2020 22:01:50 +0000 (-0400) Subject: pan/mdg: Be a bit more pedantic in invert passes X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e70cfe47b3e94684fed79feff7da1cf94ac63e73;p=mesa.git pan/mdg: Be a bit more pedantic in invert passes Signed-off-by: Alyssa Rosenzweig Part-of: --- 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;