if (tmp->isVOP3()) {
VALU_instruction& vop3 = tmp->valu();
- std::copy(std::cbegin(vop3.neg), std::cend(vop3.neg), std::begin(sdwa.neg));
- std::copy(std::cbegin(vop3.abs), std::cend(vop3.abs), std::begin(sdwa.abs));
+ sdwa.neg = vop3.neg;
+ sdwa.abs = vop3.neg;
sdwa.omod = vop3.omod;
sdwa.clamp = vop3.clamp;
}
if (tmp->isVOP3()) {
const VALU_instruction* vop3 = &tmp->valu();
- std::copy(std::cbegin(vop3->neg), std::cend(vop3->neg), std::begin(dpp->neg));
- std::copy(std::cbegin(vop3->abs), std::cend(vop3->abs), std::begin(dpp->abs));
+ dpp->neg = vop3->neg;
+ dpp->abs = vop3->abs;
}
}
case aco_opcode::v_med3_f16:
case aco_opcode::v_med3_f32: { /* clamp */
VALU_instruction& vop3 = instr->valu();
- if (vop3.abs[0] || vop3.abs[1] || vop3.abs[2] || vop3.neg[0] || vop3.neg[1] || vop3.neg[2] ||
- vop3.omod != 0 || vop3.opsel != 0)
+ if (vop3.abs != 0 || vop3.neg != 0 || vop3.omod != 0 || vop3.opsel != 0)
break;
unsigned idx = 0;
VALU_instruction* new_vop3 =
create_instruction<VALU_instruction>(new_op, asVOP3(Format::VOPC), 2, 1);
VALU_instruction& cmp_vop3 = cmp->valu();
- std::copy(std::cbegin(cmp_vop3.neg), std::cend(cmp_vop3.neg), std::begin(new_vop3->neg));
- std::copy(std::cbegin(cmp_vop3.abs), std::cend(cmp_vop3.abs), std::begin(new_vop3->abs));
+ new_vop3->neg = cmp_vop3.neg;
+ new_vop3->abs = cmp_vop3.abs;
new_vop3->clamp = cmp_vop3.clamp;
new_vop3->omod = cmp_vop3.omod;
new_vop3->opsel = cmp_vop3.opsel;
VALU_instruction* new_vop3 =
create_instruction<VALU_instruction>(new_op, asVOP3(Format::VOPC), 2, 1);
VALU_instruction& cmp_vop3 = cmp->valu();
- std::copy(std::cbegin(cmp_vop3.neg), std::cend(cmp_vop3.neg), std::begin(new_vop3->neg));
- std::copy(std::cbegin(cmp_vop3.abs), std::cend(cmp_vop3.abs), std::begin(new_vop3->abs));
+ new_vop3->neg = cmp_vop3.neg;
+ new_vop3->abs = cmp_vop3.abs;
new_vop3->clamp = cmp_vop3.clamp;
new_vop3->omod = cmp_vop3.omod;
new_vop3->opsel = cmp_vop3.opsel;
if (exec_val->isSDWA()) {
/* This might work but it needs testing and more code to copy the instruction. */
return;
- } else if (!exec_val->isVOP3()) {
- aco_ptr<Instruction> tmp = std::move(exec_val);
- exec_val.reset(create_instruction<VALU_instruction>(
- tmp->opcode, tmp->format, tmp->operands.size(), tmp->definitions.size() + 1));
- std::copy(tmp->operands.cbegin(), tmp->operands.cend(), exec_val->operands.begin());
- std::copy(tmp->definitions.cbegin(), tmp->definitions.cend(),
- exec_val->definitions.begin());
} else {
aco_ptr<Instruction> tmp = std::move(exec_val);
exec_val.reset(create_instruction<VALU_instruction>(
dst.opsel = src.opsel;
dst.omod = src.omod;
dst.clamp = src.clamp;
- std::copy(std::cbegin(src.abs), std::cend(src.abs), std::begin(dst.abs));
- std::copy(std::cbegin(src.neg), std::cend(src.neg), std::begin(dst.neg));
+ dst.neg = src.neg;
+ dst.abs = src.abs;
}
}