File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -520,6 +520,9 @@ bool MemOpt::runOnFunction(Function& F) {
520
520
if (ProfitVectorLengths.empty ())
521
521
buildProfitVectorLengths (F);
522
522
523
+ // If LdStCombining is on, no need to do memopt.
524
+ const bool LdStCombineOn = doLdStCombine (CGC);
525
+
523
526
bool Changed = false ;
524
527
525
528
IGC::IGCMD::FunctionInfoMetaDataHandle funcInfoMD = MDU->getFunctionsInfoItem (&F);
@@ -568,8 +571,10 @@ bool MemOpt::runOnFunction(Function& F) {
568
571
569
572
if (LoadInst * LI = dyn_cast<LoadInst>(I))
570
573
Changed |= mergeLoad (LI, MI, MemRefs, MemRefsToOptimize);
571
- else if (StoreInst * SI = dyn_cast<StoreInst>(I))
572
- Changed |= mergeStore (SI, MI, MemRefs, MemRefsToOptimize);
574
+ else if (StoreInst* SI = dyn_cast<StoreInst>(I)) {
575
+ if (!LdStCombineOn)
576
+ Changed |= mergeStore (SI, MI, MemRefs, MemRefsToOptimize);
577
+ }
573
578
else if (EnableRemoveRedBlockreads) {
574
579
if (GenIntrinsicInst* GInst = dyn_cast<GenIntrinsicInst>(I)) {
575
580
if (GInst->getIntrinsicID () == GenISAIntrinsic::GenISA_simdBlockRead) {
You can’t perform that action at this time.
0 commit comments