[llvm] [AArch64] merge index address with large offset into base address (PR #72187)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 4 22:23:21 PST 2023
================
@@ -15977,6 +15977,18 @@ 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.
+int64_t AArch64TargetLowering::getPreferBaseOffset(int64_t MinOffset,
+ int64_t MaxOffset) const {
+ if (MinOffset >> 12 == MaxOffset >> 12 && MinOffset >> 24 == 0) {
----------------
vfdff wrote:
thanks, I updated with API `isLegalAddImmediate`
https://github.com/llvm/llvm-project/pull/72187
More information about the llvm-commits
mailing list