Skip to content

Commit 9c4772f

Browse files
pleathMikeHolman
authored andcommitted
1 parent 65f1bfe commit 9c4772f

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

lib/Backend/GlobOpt.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2748,11 +2748,14 @@ GlobOpt::OptTagChecks(IR::Instr *instr)
27482748
ChangeValueType(nullptr, value, valueType.SetCanBeTaggedValue(false), true /*preserveSubClassInfo*/);
27492749
return false;
27502750
}
2751-
if (this->byteCodeUses)
2751+
if (!this->IsLoopPrePass())
27522752
{
2753-
this->InsertByteCodeUses(instr);
2753+
if (this->byteCodeUses)
2754+
{
2755+
this->InsertByteCodeUses(instr);
2756+
}
2757+
this->currentBlock->RemoveInstr(instr);
27542758
}
2755-
this->currentBlock->RemoveInstr(instr);
27562759
return true;
27572760
}
27582761

0 commit comments

Comments
 (0)