From 7d5b8195e80e268256ebe9b78ada315739030a63 Mon Sep 17 00:00:00 2001 From: William Chen Date: Mon, 11 Jul 2022 15:24:04 -0700 Subject: [PATCH] fix cgpeep to not combine ld/st across already split mem opnd --- src/mapleall/maple_be/src/cg/aarch64/aarch64_peep.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/mapleall/maple_be/src/cg/aarch64/aarch64_peep.cpp b/src/mapleall/maple_be/src/cg/aarch64/aarch64_peep.cpp index ba396d77d4..aa4bda1099 100644 --- a/src/mapleall/maple_be/src/cg/aarch64/aarch64_peep.cpp +++ b/src/mapleall/maple_be/src/cg/aarch64/aarch64_peep.cpp @@ -2500,6 +2500,11 @@ std::vector CombineContiLoadAndStorePattern::FindPrevStrLdr(Insn &insn, r } } } + /* do not optimize across mem opnd that is already split */ + if (curInsn->IsLoadStorePair() && + static_cast(static_cast(curInsn->GetMemOpnd())->GetBaseRegister())->GetRegisterNumber() == R16) { + return prevContiInsns; + } /* check insn that changes the data flow */ regno_t stackBaseRegNO = cgFunc->UseFP() ? R29 : RSP; /* ldr x8, [x21, #8] -- Gitee