File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -227,11 +227,6 @@ bool EmitPass::setCurrentShader(llvm::Function* F)
227227 {
228228 return false;
229229 }
230- // Only simd8 will be tried when there are subroutines in this group.
231- if (m_SimdMode != SIMDMode::SIMD8 && !FG->isSingle())
232- {
233- return false;
234- }
235230 Kernel = FG->getHead();
236231 }
237232 else
@@ -350,6 +345,15 @@ bool EmitPass::runOnFunction(llvm::Function& F)
350345 return false;
351346 }
352347
348+ // If max work group size is set, we need to compile for all requested SIMD modes.
349+ // Otherwise, only compile simd8 for subroutines
350+ if (ctx->getModuleMetaData()->csInfo.maxWorkGroupSize == 0 &&
351+ m_FGA && !m_FGA->getGroup(&F)->isSingle() &&
352+ m_SimdMode != SIMDMode::SIMD8)
353+ {
354+ return false;
355+ }
356+
353357 bool isCloned = false;
354358 if (DebugInfoData::hasDebugInfo(m_currShader))
355359 {
You can’t perform that action at this time.
0 commit comments