Skip to content

Commit cfd312a

Browse files
author
Meghana Gupta
committed
While inlining don't add bytecodeuses of args if it has same bytecodeReg as dst
Fixes #5971
1 parent ccef872 commit cfd312a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Backend/Inline.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2215,7 +2215,7 @@ Inline::InlineBuiltInFunction(
22152215
StackSym * sym = argInstr->GetSrc1()->GetStackSym();
22162216
if (!sym->m_isSingleDef || !sym->m_instrDef->GetSrc1() || !sym->m_instrDef->GetSrc1()->IsConstOpnd())
22172217
{
2218-
if (!sym->IsFromByteCodeConstantTable())
2218+
if (!sym->IsFromByteCodeConstantTable() && sym->GetByteCodeRegSlot() != callInstrDst->GetStackSym()->GetByteCodeRegSlot())
22192219
{
22202220
byteCodeUsesInstr->Set(argInstr->GetSrc1());
22212221
}

0 commit comments

Comments
 (0)