Conor McCarthy (@cmccarthy) commented about libs/vkd3d-shader/ir.c:
{
ERR("Failed to extend instructions.\n");
goto fail;
}
if (vsir_register_is_label(&ins->src[0].reg))
{
if (!vsir_instruction_init_with_params(parser, &instructions[ins_count], &no_loc, VKD3DSIH_MOV, 1, 1))
goto fail;
dst_param_init_temp_uint(&instructions[ins_count].dst[0], block_temp_idx);
src_param_init_const_uint(&instructions[ins_count].src[0], label_from_src_param(&ins->src[0]));
ins_count++;
}
else
{
if (!vsir_instruction_init_with_params(parser, &instructions[ins_count], &no_loc, VKD3DSIH_MOVC, 1, 3))
If I understand correctly, this takes the place of `phi`, and copies to a new temp the result from the branch which was taken. Another way to do this is force the temp dst register indices to be equal in both branches, unless there's an issue with it I'm missing.