Skip to content

Commit 4614c6c

Browse files
AnBodrovaigcbot
authored andcommitted
Changes in code.
1 parent 93b67ab commit 4614c6c

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

IGC/Compiler/CISACodeGen/GenCodeGenModule.cpp

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ void GenXCodeGenModule::processFunction(Function& F)
315315
if (IGC_IS_FLAG_DISABLED(EnableSIMDVariantCompilation))
316316
{
317317
int req_subgroup = 0;
318-
for (const auto& FG : CallerFGs)
318+
for (auto FG : CallerFGs)
319319
{
320320
auto FHead = FG.first->getHead();
321321
auto subGrpSz = pMdUtils->getFunctionsInfoItem(FHead)->getSubGroupSize();
@@ -610,8 +610,7 @@ bool GenXCodeGenModule::runOnModule(Module& M)
610610
}
611611

612612
// Clone indirect funcs if SIMD variants are required
613-
if (IGC_IS_FLAG_ENABLED(EnableSIMDVariantCompilation))
614-
FGA->CloneFunctionGroupForMultiSIMDCompile(&M);
613+
FGA->CloneFunctionGroupForMultiSIMDCompile(&M);
615614

616615
this->pMdUtils->save(M.getContext());
617616

@@ -1001,7 +1000,7 @@ void GenXFunctionGroupAnalysis::CloneFunctionGroupForMultiSIMDCompile(llvm::Modu
10011000
if (hasReqdSIMD > 0)
10021001
{
10031002
bool ReqMultipleSIMD = hasReqdSIMD != 8 && hasReqdSIMD != 16 && hasReqdSIMD != 32;
1004-
if (ReqMultipleSIMD)
1003+
if (IGC_IS_FLAG_ENABLED(EnableSIMDVariantCompilation) && ReqMultipleSIMD)
10051004
{
10061005
for (int i = 0; i < 3; i++)
10071006
{
@@ -1027,6 +1026,11 @@ void GenXFunctionGroupAnalysis::CloneFunctionGroupForMultiSIMDCompile(llvm::Modu
10271026
}
10281027
}
10291028
}
1029+
else
1030+
{
1031+
IGC_ASSERT_MESSAGE(!ReqMultipleSIMD, "SIMD variant compilation not supported");
1032+
continue;
1033+
}
10301034
}
10311035
}
10321036

0 commit comments

Comments
 (0)