Skip to content

Commit 33c1455

Browse files
stefan-iligcbot
authored andcommitted
Enable MergeAllocas pass for compute only
The MergeAllocas was enabled for 3D pipeline as well but it was itended only for compute.
1 parent ac49833 commit 33c1455

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

IGC/Compiler/CISACodeGen/ShaderCodeGen.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ void AddAnalysisPasses(CodeGenContext& ctx, IGCPassManager& mpm)
313313
}
314314
}
315315
mpm.add(createPromoteMemoryToRegisterPass());
316-
if (IGC_IS_FLAG_DISABLED(DisableMergeAllocasPrivateMemory))
316+
if (IGC_IS_FLAG_DISABLED(DisableMergeAllocasPrivateMemory) && ctx.type == ShaderType::OPENCL_SHADER)
317317
{
318318
mpm.add(createMergeAllocas());
319319
}
@@ -710,7 +710,7 @@ void AddLegalizationPasses(CodeGenContext& ctx, IGCPassManager& mpm, PSSignature
710710
if (!(IGC_IS_FLAG_ENABLED(EnableUnmaskedFunctions) &&
711711
IGC_IS_FLAG_ENABLED(LateInlineUnmaskedFunc)))
712712
{
713-
if (IGC_IS_FLAG_DISABLED(DisableMergeAllocasPrivateMemory))
713+
if (IGC_IS_FLAG_DISABLED(DisableMergeAllocasPrivateMemory) && ctx.type == ShaderType::OPENCL_SHADER)
714714
{
715715
mpm.add(createMergeAllocas());
716716
}

0 commit comments

Comments
 (0)