[llvm] [AArch64] Reland merge index address with large offset into base address (PR #79951)

David Green via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 30 05:05:07 PST 2024


================
@@ -2213,6 +2213,9 @@ bool AArch64LoadStoreOpt::isMatchingMovConstInsn(MachineInstr &MemMI,
     // movz + movk hold a large offset of a Ld/St instruction.
     MachineBasicBlock::iterator B = MI.getParent()->begin();
     MachineBasicBlock::iterator MBBI = &MI;
+    // Skip the scene when the MI is the first instruction of a block.
+    if (MBBI == B)
+      return false;
     MBBI = prev_nodbg(MBBI, B);
----------------
davemgreen wrote:

What happens if there is a single previous dbg instruction?

https://github.com/llvm/llvm-project/pull/79951


More information about the llvm-commits mailing list