Skip to content

Commit f7c11b2

Browse files
bowenxue-inteligcbot
authored andcommitted
Allow disabling IntDivRemIncrementReduction by module MD
Allow disabling IntDivRemIncrementReduction by module MD
1 parent a84d0f7 commit f7c11b2

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

IGC/Compiler/CISACodeGen/ShaderCodeGen.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1693,7 +1693,8 @@ void OptimizeIR(CodeGenContext *const pContext) {
16931693
mpm.add(createIntDivConstantReductionPass());
16941694
}
16951695

1696-
if (IGC_IS_FLAG_ENABLED(EnableIntDivRemIncrementReduction)) {
1696+
if (IGC_IS_FLAG_ENABLED(EnableIntDivRemIncrementReduction) &&
1697+
!pContext->getModuleMetaData()->compOpt.DisableIntDivRemIncrementReduction) {
16971698
mpm.add(createIntDivRemIncrementReductionPass());
16981699
}
16991700
GFX_ONLY_PASS { mpm.add(createMergeMemFromBranchOptPass()); }

IGC/common/MDFrameWork.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -459,6 +459,7 @@ enum class ShaderTypeMD
459459
bool DisableEarlyOut = false;
460460
bool ForceInt32DivRemEmu = false;
461461
bool ForceInt32DivRemEmuSP = false;
462+
bool DisableIntDivRemIncrementReduction = false;
462463
bool DisableFastestSingleCSSIMD = false;
463464
bool DisableFastestLinearScan = false;
464465
//if PTSS is enabled and if PrivateData is too large (>256k in XeHP_SDV+),

0 commit comments

Comments
 (0)