diff --git a/.pick_status.json b/.pick_status.json index f3b062aa2ef..198441bba7c 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -14664,7 +14664,7 @@ "description": "aco: fix nir_op_vec8/16 with 16-bit elements.", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "5718347c2b42ee25e5377d40024aaaa929889c44", "notes": null diff --git a/src/amd/compiler/aco_instruction_selection.cpp b/src/amd/compiler/aco_instruction_selection.cpp index b349f15c2c2..d94eedad1af 100644 --- a/src/amd/compiler/aco_instruction_selection.cpp +++ b/src/amd/compiler/aco_instruction_selection.cpp @@ -1462,11 +1462,14 @@ visit_alu_instr(isel_context* ctx, nir_alu_instr* instr) if (dst.size() == 1) bld.copy(Definition(dst), packed[0]); - else if (dst.size() == 2) - bld.pseudo(aco_opcode::p_create_vector, Definition(dst), packed[0], packed[1]); - else - bld.pseudo(aco_opcode::p_create_vector, Definition(dst), packed[0], packed[1], - packed[2]); + else { + aco_ptr vec{create_instruction( + aco_opcode::p_create_vector, Format::PSEUDO, dst.size(), 1)}; + vec->definitions[0] = Definition(dst); + for (unsigned i = 0; i < dst.size(); ++i) + vec->operands[i] = Operand(packed[i]); + bld.insert(std::move(vec)); + } } break; }