Skip to content

Commit 6cdb2a9

Browse files
jaladreipsigcbot
authored andcommitted
Universally run GVN, even when there aren't multiple basic blocks
Universally run GVN, even when there aren't multiple basic blocks
1 parent 43c78c9 commit 6cdb2a9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

IGC/Compiler/CISACodeGen/ShaderCodeGen.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1293,6 +1293,10 @@ void OptimizeIR(CodeGenContext *const pContext) {
12931293
}
12941294
mpm.add(new BlockMemOpAddrScalarizationPass());
12951295

1296+
if (IGC_IS_FLAG_ENABLED(EnableGVN)) {
1297+
mpm.add(llvm::createGVNPass());
1298+
}
1299+
12961300
if (pContext->m_instrTypes.hasMultipleBB && !disableGOPT) {
12971301
if (pContext->m_instrTypes.numOfLoop) {
12981302
bool allowLICM = IGC_IS_FLAG_ENABLED(allowLICM) && pContext->m_retryManager.AllowLICM();

0 commit comments

Comments
 (0)