From: Boris Brezillon Date: Mon, 20 Jan 2020 14:55:21 +0000 (+0100) Subject: panfrost/midgard: Make sure promote_fmov() only promotes 32-bit imovs X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6548d01b3dab628d224fb2b60bebd16971a3b121;p=mesa.git panfrost/midgard: Make sure promote_fmov() only promotes 32-bit imovs mir_constant_float() assumes we're dealing with 32-bit integers/floats, which is only the case if reg_mode is equal to midgard_reg_mode_32. Signed-off-by: Boris Brezillon Reviewed-by: Alyssa Rosenzweig Part-of: --- diff --git a/src/panfrost/midgard/midgard_opt_float.c b/src/panfrost/midgard/midgard_opt_float.c index ab6e57be3f8..43e1cd2ea78 100644 --- a/src/panfrost/midgard/midgard_opt_float.c +++ b/src/panfrost/midgard/midgard_opt_float.c @@ -56,6 +56,7 @@ midgard_opt_promote_fmov(compiler_context *ctx, midgard_block *block) if (!ins->has_constants) continue; if (mir_nontrivial_source2_mod_simple(ins)) continue; if (mir_nontrivial_outmod(ins)) continue; + if (ins->alu.reg_mode != midgard_reg_mode_32) continue; /* We found an imov with a constant. Check the constants */ bool ok = true;