} else if (op.bytes() > 2) {
return pseudo(aco_opcode::p_create_vector, dst, op);
} else if (dst.regClass().is_subdword()) {
- aco_ptr<SDWA_instruction> sdwa{create_instruction<SDWA_instruction>(aco_opcode::v_mov_b32, asSDWA(Format::VOP1), 1, 1)};
- sdwa->operands[0] = op;
- sdwa->definitions[0] = dst;
- sdwa->sel[0] = op.bytes() == 1 ? sdwa_ubyte : sdwa_uword;
- sdwa->dst_sel = dst.bytes() == 1 ? sdwa_ubyte : sdwa_uword;
- sdwa->dst_preserve = true;
- return insert(std::move(sdwa));
+ if (program->chip_class >= GFX8) {
+ aco_ptr<SDWA_instruction> sdwa{create_instruction<SDWA_instruction>(aco_opcode::v_mov_b32, asSDWA(Format::VOP1), 1, 1)};
+ sdwa->operands[0] = op;
+ sdwa->definitions[0] = dst;
+ sdwa->sel[0] = op.bytes() == 1 ? sdwa_ubyte : sdwa_uword;
+ sdwa->dst_sel = dst.bytes() == 1 ? sdwa_ubyte : sdwa_uword;
+ sdwa->dst_preserve = true;
+ return insert(std::move(sdwa));
+ } else {
+ return vop1(aco_opcode::v_mov_b32, dst, op);
+ }
} else {
unreachable("Unhandled case in bld.copy()");
}