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 <boris.brezillon@collabora.com> Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3478>
This commit is contained in:

committed by
Marge Bot

parent
9566f26ed4
commit
6548d01b3d
@@ -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;
|
||||
|
Reference in New Issue
Block a user