[llvm] [CGP][AArch64] Rebase the common base offset for better ISel (PR #74046)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 4 03:54:10 PST 2023
================
@@ -15982,6 +15982,19 @@ bool AArch64TargetLowering::isLegalAddressingMode(const DataLayout &DL,
AM.Scale);
}
+// Check whether the 2 offsets belong to the same imm24 range, and their high
+// 12bits are same, then their high part can be decoded with the offset of add.
+int64_t AArch64TargetLowering::getPreferBaseOffset(int64_t MinOffset,
+ int64_t MaxOffset) const {
+ int64_t HighPart = MinOffset & 0xfff000;
+ if (MinOffset >> 12 == MaxOffset >> 12 && isLegalAddImmediate(HighPart)) {
----------------
vfdff wrote:
apply your comment, thanks
https://github.com/llvm/llvm-project/pull/74046
More information about the llvm-commits
mailing list