Skip to content

Commit 50d3848

Browse files
committed
Fix missing logic in UpdateImplicitCallBailOutKind due to bad merge
1 parent bc4056a commit 50d3848

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

lib/Backend/BackwardPass.cpp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2467,7 +2467,7 @@ BackwardPass::DeadStoreImplicitCallBailOut(IR::Instr * instr, bool hasLiveFields
24672467
}
24682468

24692469
bool
2470-
BackwardPass::UpdateImplicitCallBailOutKind(IR::Instr *const instr, bool needsBailOutOnImplicitCall, bool needsLazyBailOut)
2470+
BackwardPass::UpdateImplicitCallBailOutKind(IR::Instr* const instr, bool needsBailOutOnImplicitCall, bool needsLazyBailOut)
24712471
{
24722472
Assert(instr);
24732473
Assert(instr->HasBailOutInfo());
@@ -2481,7 +2481,7 @@ BackwardPass::UpdateImplicitCallBailOutKind(IR::Instr *const instr, bool needsBa
24812481
"The lazy bailout bit should be present at this point. We might have removed it incorrectly."
24822482
);
24832483

2484-
const IR::BailOutKind bailOutKindWithBits = instr->GetBailOutKind();
2484+
IR::BailOutKind bailOutKindWithBits = instr->GetBailOutKind();
24852485

24862486
const bool hasMarkTempObject = bailOutKindWithBits & IR::BailOutMarkTempObject;
24872487

@@ -2490,7 +2490,8 @@ BackwardPass::UpdateImplicitCallBailOutKind(IR::Instr *const instr, bool needsBa
24902490
// of `needsBailOutOnImplicitCall`.
24912491
if (hasMarkTempObject)
24922492
{
2493-
instr->SetBailOutKind(bailOutKindWithBits & ~IR::BailOutMarkTempObject);
2493+
bailOutKindWithBits &= ~IR::BailOutMarkTempObject;
2494+
instr->SetBailOutKind(bailOutKindWithBits);
24942495
}
24952496

24962497
if (needsBailOutOnImplicitCall)
@@ -2518,9 +2519,10 @@ BackwardPass::UpdateImplicitCallBailOutKind(IR::Instr *const instr, bool needsBa
25182519
}
25192520

25202521
const IR::BailOutKind bailOutKindWithoutBits = instr->GetBailOutKindNoBits();
2521-
2522-
if (hasMarkTempObject)
2522+
if (!instr->GetBailOutInfo()->canDeadStore)
25232523
{
2524+
// revisit if canDeadStore is used for anything other than BailOutMarkTempObject
2525+
Assert(hasMarkTempObject);
25242526
// Don't remove the implicit call pre op bailout for mark temp object.
25252527
Assert(bailOutKindWithoutBits == IR::BailOutOnImplicitCallsPreOp);
25262528
return true;

0 commit comments

Comments
 (0)