From 6548d01b3dab628d224fb2b60bebd16971a3b121 Mon Sep 17 00:00:00 2001 From: Boris Brezillon Date: Mon, 20 Jan 2020 15:55:21 +0100 Subject: [PATCH] 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: --- src/panfrost/midgard/midgard_opt_float.c | 1 + 1 file changed, 1 insertion(+) 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; -- 2.30.2