Skip to content

Commit 13a2387

Browse files
jgu222igcbot
authored andcommitted
[Autobackout][FuncReg]Revert of change: 9140be1
_Don't run mergestore if store combining is on Store combining is a super set of mergestore. If store combining is on, do not run mergestore as it is not needed. Don't expect functional change.
1 parent 0ee8de5 commit 13a2387

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

IGC/Compiler/CISACodeGen/MemOpt.cpp

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -520,9 +520,6 @@ bool MemOpt::runOnFunction(Function& F) {
520520
if (ProfitVectorLengths.empty())
521521
buildProfitVectorLengths(F);
522522

523-
// If LdStCombining is on, no need to do memopt.
524-
const bool LdStCombineOn = doLdStCombine(CGC);
525-
526523
bool Changed = false;
527524

528525
IGC::IGCMD::FunctionInfoMetaDataHandle funcInfoMD = MDU->getFunctionsInfoItem(&F);
@@ -571,10 +568,8 @@ bool MemOpt::runOnFunction(Function& F) {
571568

572569
if (LoadInst * LI = dyn_cast<LoadInst>(I))
573570
Changed |= mergeLoad(LI, MI, MemRefs, MemRefsToOptimize);
574-
else if (StoreInst* SI = dyn_cast<StoreInst>(I)) {
575-
if (!LdStCombineOn)
576-
Changed |= mergeStore(SI, MI, MemRefs, MemRefsToOptimize);
577-
}
571+
else if (StoreInst * SI = dyn_cast<StoreInst>(I))
572+
Changed |= mergeStore(SI, MI, MemRefs, MemRefsToOptimize);
578573
else if (EnableRemoveRedBlockreads) {
579574
if (GenIntrinsicInst* GInst = dyn_cast<GenIntrinsicInst>(I)) {
580575
if (GInst->getIntrinsicID() == GenISAIntrinsic::GenISA_simdBlockRead) {

0 commit comments

Comments
 (0)