diff options
author | Alyssa Rosenzweig <[email protected]> | 2020-04-27 17:47:13 -0400 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-04-29 15:18:38 +0000 |
commit | 3b10bcd41743d0cff3460b1ca7b961d9cbe45b13 (patch) | |
tree | 3f4d8bf2fd416b16b70524981cdf2f1671594c8f /src | |
parent | 23337fd5907e834eab05f5486af8458cc446376d (diff) |
pan/mdg: Don't break SSA
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4792>
Diffstat (limited to 'src')
-rw-r--r-- | src/panfrost/midgard/midgard_compile.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/panfrost/midgard/midgard_compile.c b/src/panfrost/midgard/midgard_compile.c index c70565ba1c8..3a9719d440b 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); |