agx: prepare for immediates in phis
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26963>
This commit is contained in:
parent
b7585851d0
commit
efeed6a6fc
2 changed files with 4 additions and 1 deletions
|
|
@ -140,7 +140,7 @@ agx_optimizer_inline_imm(agx_instr **defs, agx_instr *I, unsigned srcs,
|
|||
continue;
|
||||
|
||||
agx_instr *def = defs[src.value];
|
||||
if (def->op != AGX_OPCODE_MOV_IMM)
|
||||
if (!def || def->op != AGX_OPCODE_MOV_IMM)
|
||||
continue;
|
||||
|
||||
uint8_t value = def->imm;
|
||||
|
|
|
|||
|
|
@ -935,6 +935,9 @@ agx_insert_parallel_copies(agx_context *ctx, agx_block *block)
|
|||
agx_index dest = phi->dest[0];
|
||||
agx_index src = phi->src[pred_index];
|
||||
|
||||
if (src.type == AGX_INDEX_IMMEDIATE)
|
||||
src.size = dest.size;
|
||||
|
||||
assert(dest.type == AGX_INDEX_REGISTER);
|
||||
assert(dest.size == src.size);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue