Skip to content

Commit fa74a1a

Browse files
committed
[Autobackout][FuncReg]Revert of change: b1856f9
Remove Instruction Combining after Memory Opt. MemOpt may combine load/store instructions, while running InstCombine without IR lowering will change the alignment based on the new load/store value types. HSD/Radar: n/a Change-Id: I72f3f31848b14dd035744d52648604611d46d30a
1 parent 4e496d7 commit fa74a1a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

IGC/Compiler/CISACodeGen/ShaderCodeGen.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -474,11 +474,12 @@ namespace IGC
474474
mpm.add(CreatePrivateMemoryResolution());
475475

476476
// Run MemOpt
477-
bool doMemOpt = ctx.m_instrTypes.hasLoadStore && IGC_IS_FLAG_DISABLED(DisableMemOpt);
478-
if (!isOptDisabled && doMemOpt) {
477+
if (!isOptDisabled &&
478+
ctx.m_instrTypes.hasLoadStore && IGC_IS_FLAG_DISABLED(DisableMemOpt)) {
479479
if (IGC_IS_FLAG_ENABLED(EnableAdvMemOpt))
480480
mpm.add(createAdvMemOptPass());
481481
mpm.add(createMemOptPass());
482+
mpm.add(createIGCInstructionCombiningPass());
482483
}
483484

484485
if (ctx.type == ShaderType::OPENCL_SHADER &&
@@ -529,7 +530,7 @@ namespace IGC
529530
if (!isOptDisabled)
530531
{
531532
// Optimize lower-level IR
532-
if (!fastCompile || doMemOpt)
533+
if (!fastCompile)
533534
{
534535
mpm.add(createIGCInstructionCombiningPass());
535536
}

0 commit comments

Comments
 (0)