- ir::Register Selection::Opaque::replaceDst(SelectionInstruction *insn,
uint32_t regID) {
+ ir::Register Selection::Opaque::replaceDst(SelectionInstruction
+ *insn, uint32_t regID, ir::Type type, bool needMov) {
+ tmp = this->reg(ir::getFamily(type));
+ gr = this->selReg(tmp, type);
Seems that you set default type as ir::TYPE_FLOAT for the argument ir::Type
type in replaceReg()
And you didn't set the type when calling the function, except for the CMP case(
you set it to ir::TYPE_FLOAT), then if a register of type like QWORD. Things
will become wrong.
My suggestion is that we don't need to pass an argument ir::Type.
We just use the type of the replaced register. We need make sure the register
type should be right before calling replaceSrc or replaceDst.
ir::Register tmp;
- if (vector->isSrc)
- tmp = selection.replaceSrc(vector->insn, regID);
- else
- tmp = selection.replaceDst(vector->insn, regID);
+ tmp = this->replaceReg(selection, vector->insn, regID,
+ vector->isSrc);
The ir::Type is not set here.
const VectorLocation location = std::make_pair(vector, regID);
this->vectorMap.insert(std::make_pair(tmp, location));
- intervals.push_back(tmp);
- intervals[tmp].minID = vector->insn->ID;
- intervals[tmp].maxID = vector->insn->ID;
}
}
}
_______________________________________________
Beignet mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/beignet