[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
Wed Sep 13 01:15:51 PDT 2023


================
@@ -2136,6 +2136,18 @@ bool AArch64LoadStoreOpt::tryToPairLdStInst(MachineBasicBlock::iterator &MBBI) {
   if (!TII->isCandidateToMergeOrPair(MI))
     return false;
 
+  // Fetch the memoperand of the load/store that is a candidate for
+  // combination.
+  MachineMemOperand *MemOp = MI.memoperands().front();
----------------
davemgreen wrote:

I think this may need to guard against memoperands being empty. It shouldn't be common, but I believe they are not guaranteed to be present.

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


More information about the llvm-commits mailing list