@@ -2467,7 +2467,7 @@ BackwardPass::DeadStoreImplicitCallBailOut(IR::Instr * instr, bool hasLiveFields
2467
2467
}
2468
2468
2469
2469
bool
2470
- BackwardPass::UpdateImplicitCallBailOutKind (IR::Instr * const instr, bool needsBailOutOnImplicitCall, bool needsLazyBailOut)
2470
+ BackwardPass::UpdateImplicitCallBailOutKind (IR::Instr* const instr, bool needsBailOutOnImplicitCall, bool needsLazyBailOut)
2471
2471
{
2472
2472
Assert (instr);
2473
2473
Assert (instr->HasBailOutInfo ());
@@ -2481,7 +2481,7 @@ BackwardPass::UpdateImplicitCallBailOutKind(IR::Instr *const instr, bool needsBa
2481
2481
" The lazy bailout bit should be present at this point. We might have removed it incorrectly."
2482
2482
);
2483
2483
2484
- const IR::BailOutKind bailOutKindWithBits = instr->GetBailOutKind ();
2484
+ IR::BailOutKind bailOutKindWithBits = instr->GetBailOutKind ();
2485
2485
2486
2486
const bool hasMarkTempObject = bailOutKindWithBits & IR::BailOutMarkTempObject;
2487
2487
@@ -2490,7 +2490,8 @@ BackwardPass::UpdateImplicitCallBailOutKind(IR::Instr *const instr, bool needsBa
2490
2490
// of `needsBailOutOnImplicitCall`.
2491
2491
if (hasMarkTempObject)
2492
2492
{
2493
- instr->SetBailOutKind (bailOutKindWithBits & ~IR::BailOutMarkTempObject);
2493
+ bailOutKindWithBits &= ~IR::BailOutMarkTempObject;
2494
+ instr->SetBailOutKind (bailOutKindWithBits);
2494
2495
}
2495
2496
2496
2497
if (needsBailOutOnImplicitCall)
@@ -2518,9 +2519,10 @@ BackwardPass::UpdateImplicitCallBailOutKind(IR::Instr *const instr, bool needsBa
2518
2519
}
2519
2520
2520
2521
const IR::BailOutKind bailOutKindWithoutBits = instr->GetBailOutKindNoBits ();
2521
-
2522
- if (hasMarkTempObject)
2522
+ if (!instr->GetBailOutInfo ()->canDeadStore )
2523
2523
{
2524
+ // revisit if canDeadStore is used for anything other than BailOutMarkTempObject
2525
+ Assert (hasMarkTempObject);
2524
2526
// Don't remove the implicit call pre op bailout for mark temp object.
2525
2527
Assert (bailOutKindWithoutBits == IR::BailOutOnImplicitCallsPreOp);
2526
2528
return true ;
0 commit comments