[llvm] [AArch64] New subtarget features to control ldp and stp formation, fo… (PR #66098)
David Green via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 14 02:12:11 PDT 2023
================
@@ -2159,6 +2167,30 @@ bool AArch64LoadStoreOpt::tryToPairLdStInst(MachineBasicBlock::iterator &MBBI) {
// Keeping the iterator straight is a pain, so we let the merge routine tell
// us what the next instruction is after it's done mucking about.
auto Prev = std::prev(MBBI);
+
+ // Fetch the memoperand of the load/store that is a candidate for
+ // combination.
+ MachineMemOperand *MemOp = MI.memoperands().front();
----------------
davemgreen wrote:
I think front() might assert if the array is empty. Can this use `MI.memoperands_empty() ? nullptr : MI.memoperands().front()`?
https://github.com/llvm/llvm-project/pull/66098
More information about the llvm-commits
mailing list