Skip to content

Commit 4b0eebb

Browse files
dlei6gigcbot
authored andcommitted
Fix disable multi SIMD compile for indirect calls
Don't do CloneFunctionGroupForMultiSIMDCompile() when EnableSIMDVariantCompilation is disabled.
1 parent 14db196 commit 4b0eebb

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

IGC/Compiler/CISACodeGen/GenCodeGenModule.cpp

+4-8
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ void GenXCodeGenModule::processFunction(Function& F)
312312
if (IGC_IS_FLAG_DISABLED(EnableSIMDVariantCompilation))
313313
{
314314
int req_subgroup = 0;
315-
for (auto FG : CallerFGs)
315+
for (const auto& FG : CallerFGs)
316316
{
317317
auto FHead = FG.first->getHead();
318318
auto subGrpSz = pMdUtils->getFunctionsInfoItem(FHead)->getSubGroupSize();
@@ -607,7 +607,8 @@ bool GenXCodeGenModule::runOnModule(Module& M)
607607
}
608608

609609
// Clone indirect funcs if SIMD variants are required
610-
FGA->CloneFunctionGroupForMultiSIMDCompile(&M);
610+
if (IGC_IS_FLAG_ENABLED(EnableSIMDVariantCompilation))
611+
FGA->CloneFunctionGroupForMultiSIMDCompile(&M);
611612

612613
this->pMdUtils->save(M.getContext());
613614

@@ -997,7 +998,7 @@ void GenXFunctionGroupAnalysis::CloneFunctionGroupForMultiSIMDCompile(llvm::Modu
997998
if (hasReqdSIMD > 0)
998999
{
9991000
bool ReqMultipleSIMD = hasReqdSIMD != 8 && hasReqdSIMD != 16 && hasReqdSIMD != 32;
1000-
if (IGC_IS_FLAG_ENABLED(EnableSIMDVariantCompilation) && ReqMultipleSIMD)
1001+
if (ReqMultipleSIMD)
10011002
{
10021003
for (int i = 0; i < 3; i++)
10031004
{
@@ -1023,11 +1024,6 @@ void GenXFunctionGroupAnalysis::CloneFunctionGroupForMultiSIMDCompile(llvm::Modu
10231024
}
10241025
}
10251026
}
1026-
else
1027-
{
1028-
IGC_ASSERT_MESSAGE(!ReqMultipleSIMD, "SIMD variant compilation not supported");
1029-
continue;
1030-
}
10311027
}
10321028
}
10331029

0 commit comments

Comments
 (0)