Skip to content

Commit 0176c6d

Browse files
dlei6gsys_zuul
authored andcommitted
Check dangling constant users for Function/Global symbols, before iterating through the user list.
Change-Id: I09d2d5c52c1ecb062aecf1f998b47693ddb61610
1 parent 0d479dc commit 0176c6d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

IGC/Compiler/CISACodeGen/EmitVISAPass.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9977,7 +9977,8 @@ void EmitPass::emitSymbolRelocation(Function& F)
99779977
}
99789978
else if (Constant* C = dyn_cast<Constant>(*it))
99799979
{
9980-
return ValueUsedInFunction(C, currFunc);
9980+
if (C->isConstantUsed())
9981+
return ValueUsedInFunction(C, currFunc);
99819982
}
99829983
}
99839984
return false;

0 commit comments

Comments
 (0)