mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-09 03:52:19 +02:00
Fixed invalid lifetimeStart emission with dynLife vregs
This commit is contained in:
parent
fd08367e2b
commit
d10951527a
1 changed files with 10 additions and 1 deletions
|
@ -16748,7 +16748,16 @@ void BeMCContext::Generate(BeFunction* function)
|
||||||
auto castedInst = (BeLifetimeEndInst*)inst;
|
auto castedInst = (BeLifetimeEndInst*)inst;
|
||||||
auto mcPtr = GetOperand(castedInst->mPtr, false, true);
|
auto mcPtr = GetOperand(castedInst->mPtr, false, true);
|
||||||
if (mcPtr)
|
if (mcPtr)
|
||||||
AllocInst(BeMCInstKind_LifetimeStart, mcPtr);
|
{
|
||||||
|
auto vregInfo = GetVRegInfo(mcPtr);
|
||||||
|
if ((vregInfo != NULL) && (vregInfo->mHasDynLife))
|
||||||
|
{
|
||||||
|
// This alloca had an assignment (ie: `mov vregX, [RBP+homeSize0]`) so it must be defined at the mov
|
||||||
|
// This may indicate incorrectly generated code where we thought an alloca would be in the head but it isn't
|
||||||
|
}
|
||||||
|
else
|
||||||
|
AllocInst(BeMCInstKind_LifetimeStart, mcPtr);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case BeLifetimeExtendInst::TypeId:
|
case BeLifetimeExtendInst::TypeId:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue