pan/mdg: Don't break SSA

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4792>
This commit is contained in:
Alyssa Rosenzweig 2020-04-27 17:47:13 -04:00 committed by Marge Bot
parent 23337fd590
commit 3b10bcd417
1 changed files with 2 additions and 7 deletions

View File

@ -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);