From 3b10bcd41743d0cff3460b1ca7b961d9cbe45b13 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Mon, 27 Apr 2020 17:47:13 -0400 Subject: [PATCH] pan/mdg: Don't break SSA Signed-off-by: Alyssa Rosenzweig Part-of: --- src/panfrost/midgard/midgard_compile.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/panfrost/midgard/midgard_compile.c b/src/panfrost/midgard/midgard_compile.c index c70565b..3a9719d 100644 --- a/src/panfrost/midgard/midgard_compile.c +++ b/src/panfrost/midgard/midgard_compile.c @@ -2042,15 +2042,10 @@ inline_alu_constants(compiler_context *ctx, midgard_block *block) /* Corner case: _two_ vec4 constants, for instance with a * csel. For this case, we can only use a constant * register for one, we'll have to emit a move for the - * other. Note, if both arguments are constants, then - * necessarily neither argument depends on the value of - * any particular register. As the destination register - * will be wiped, that means we can spill the constant - * to the destination register. - */ + * other. */ void *entry = _mesa_hash_table_u64_search(ctx->ssa_constants, alu->src[1] + 1); - unsigned scratch = alu->dest; + unsigned scratch = make_compiler_temp(ctx); if (entry) { midgard_instruction ins = v_mov(SSA_FIXED_REGISTER(REGISTER_CONSTANT), scratch); -- 2.7.4