Skip to content

Commit e3c2505

Browse files
aratajewgfxbot
authored andcommitted
Changes in code.
Change-Id: I83157361996ab7642185536ed11a73fb9b127f0f
1 parent c8cf546 commit e3c2505

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

IGC/Compiler/CISACodeGen/ShaderCodeGen.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -1325,10 +1325,7 @@ void OptimizeIR(CodeGenContext* pContext)
13251325
// Use CFGSimplification to do clean-up. Needs to be invoked before lowerSwitch.
13261326
mpm.add(llvm::createCFGSimplificationPass());
13271327

1328-
// run instruction combining to clean up the code after CFG optimizations
1329-
mpm.add(createIGCInstructionCombiningPass());
1330-
1331-
if (IGC_IS_FLAG_DISABLED(DisableFlattenSmallSwitch))
1328+
if(IGC_IS_FLAG_DISABLED(DisableFlattenSmallSwitch))
13321329
{
13331330
mpm.add(createFlattenSmallSwitchPass());
13341331
}
@@ -1337,6 +1334,9 @@ void OptimizeIR(CodeGenContext* pContext)
13371334
// After lowering 'switch', run jump threading to remove redundant jumps.
13381335
mpm.add(llvm::createJumpThreadingPass());
13391336

1337+
// run instruction combining to clean up the code after CFG optimizations
1338+
mpm.add(createIGCInstructionCombiningPass());
1339+
13401340
mpm.add(llvm::createDeadCodeEliminationPass());
13411341
mpm.add(llvm::createEarlyCSEPass());
13421342

0 commit comments

Comments
 (0)