diff --git a/src/mapleall/maple_be/src/cg/aarch64/aarch64_global.cpp b/src/mapleall/maple_be/src/cg/aarch64/aarch64_global.cpp index ce4b867b752447c77777766bada9f144839adf53..87d94c65e77e9cef09057559f6d62306e4360671 100644 --- a/src/mapleall/maple_be/src/cg/aarch64/aarch64_global.cpp +++ b/src/mapleall/maple_be/src/cg/aarch64/aarch64_global.cpp @@ -553,6 +553,10 @@ bool BackPropPattern::CheckReplacedUseInsn(Insn &insn) { return true; }; /* ensure that the use insns to be replaced is defined by defInsnForSecondOpnd only */ + if (useInsn->IsMemAccess() && + static_cast(static_cast(useInsn)->GetMemOpnd())->GetIndexOpt() != AArch64MemOperand::kIntact) { + return false; + } InsnSet defInsnVecOfSrcOpnd = cgFunc.GetRD()->FindDefForRegOpnd(*useInsn, secondRegNO, true); if (!checkOneDefOnly(defInsnVecOfSrcOpnd, *defInsnForSecondOpnd, true)) { return false; diff --git a/src/mapleall/maple_be/src/cg/loop.cpp b/src/mapleall/maple_be/src/cg/loop.cpp index 9253f7b1e6183a031ac8852e760fae029ac8db07..c581108110f2cff5b64c714b3d39a152a084c1ee 100644 --- a/src/mapleall/maple_be/src/cg/loop.cpp +++ b/src/mapleall/maple_be/src/cg/loop.cpp @@ -657,7 +657,7 @@ bool CgLoopAnalysis::PhaseRun(maplebe::CGFunc &f) { /* do dot gen after detection so the loop backedge can be properly colored using the loop info */ DotGenerator::GenerateDot("buildloop", f, f.GetMirModule(), true, f.GetName()); } -#if xDEBUG +#if DEBUG for (const auto *lp : f.GetLoops()) { lp->CheckLoops(); }