diff --git a/src/amd/compiler/aco_optimizer.cpp b/src/amd/compiler/aco_optimizer.cpp index 6952e51fcc4..04676516bbc 100644 --- a/src/amd/compiler/aco_optimizer.cpp +++ b/src/amd/compiler/aco_optimizer.cpp @@ -860,7 +860,8 @@ void label_instruction(opt_ctx &ctx, Block& block, aco_ptr& instr) if (info.is_temp() && info.temp.type() == RegType::sgpr) { instr->operands[i].setTemp(info.temp); info = ctx.info[info.temp.id()]; - } else if (info.is_temp() && info.temp.type() == RegType::vgpr) { + } else if (info.is_temp() && info.temp.type() == RegType::vgpr && + info.temp.bytes() == instr->operands[i].bytes()) { /* propagate vgpr if it can take it */ switch (instr->opcode) { case aco_opcode::p_create_vector: