Skip to content

Commit 8020a5a

Browse files
committed
Update logic to free src2
1 parent 6b66022 commit 8020a5a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Backend/GlobOpt.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4707,7 +4707,7 @@ GlobOpt::ValueNumberDst(IR::Instr **pInstr, Value *src1Val, Value *src2Val)
47074707

47084708
// Due to fall through and the fact that Ld_A only takes one source,
47094709
// free the other source here.
4710-
if (instr->GetSrc2())
4710+
if (instr->GetSrc2() && !(this->IsLoopPrePass() || src1ValueInfo == nullptr || !src1ValueInfo->IsString()))
47114711
{
47124712
instr->FreeSrc2();
47134713
}

0 commit comments

Comments
 (0)