GP-4672 Set correct INDIRECT flags during SplitFlow

This commit is contained in:
caheckman 2024-06-11 18:51:46 +00:00
parent e6112ce481
commit a67e80c286
3 changed files with 16 additions and 0 deletions

View File

@ -1515,6 +1515,8 @@ bool SplitFlow::addOp(PcodeOp *op,TransformVar *rvn,int4 slot)
if (op->code() == CPUI_INDIRECT) {
opSetInput(loOp,newIop(op->getIn(1)),1);
opSetInput(hiOp,newIop(op->getIn(1)),1);
loOp->inheritIndirect(op);
hiOp->inheritIndirect(op);
numParam = 1;
}
for(int4 i=0;i<numParam;++i) {

View File

@ -268,6 +268,19 @@ bool TransformOp::attemptInsertion(Funcdata *fd)
return true; // Already inserted
}
/// Prepare to build the transformed INDIRECT PcodeOp based on settings from the given INDIRECT.
/// \param indOp is the given INDIRECT
void TransformOp::inheritIndirect(PcodeOp *indOp)
{
if (indOp->isIndirectCreation()) {
if (indOp->getIn(0)->isIndirectZero())
special |= TransformOp::indirect_creation;
else
special |= TransformOp::indirect_creation_possible_out;
}
}
void LanedRegister::LanedIterator::normalize(void)
{

View File

@ -87,6 +87,7 @@ private:
public:
TransformVar *getOut(void) const { return output; } ///< Get the output placeholder variable for \b this operator
TransformVar *getIn(int4 i) const { return input[i]; } ///< Get the i-th input placeholder variable for \b this
void inheritIndirect(PcodeOp *indOp); ///< Set \e indirect \e creation flags for \b this based on given INDIRECT
};
/// \brief Describes a (register) storage location and the ways it might be split into lanes