Skip to content

Commit 245ef55

Browse files
aparshin-inteligcbot
authored andcommitted
cleanup old emulation functions to preserve compatibility with old ISPC
1 parent 40a982e commit 245ef55

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

IGC/VectorCompiler/lib/GenXCodeGen/GenXEmulate.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1581,10 +1581,13 @@ bool GenXEmulate::runOnModule(Module &M) {
15811581
I->eraseFromParent();
15821582
ToErase.clear();
15831583

1584+
auto IsOldEmulationFunction = [](const Function *F) {
1585+
return F->getName().contains("__cm_intrinsic_impl_");
1586+
};
15841587
// Delete unused builtins, make used ones internal.
15851588
for (auto I = M.begin(); I != M.end();) {
15861589
Function &F = *I++;
1587-
if (isEmulationFunction(&F)) {
1590+
if (isEmulationFunction(&F) || IsOldEmulationFunction(&F)) {
15881591
Changed = true;
15891592
if (F.use_empty())
15901593
F.eraseFromParent();

0 commit comments

Comments
 (0)