[llvm] [AArch64] Copy implicit def operands when creating LDP. (PR #164253)

Ricardo Jesus via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 20 08:34:14 PDT 2025


================
@@ -1386,6 +1386,17 @@ AArch64LoadStoreOpt::mergePairedInsns(MachineBasicBlock::iterator I,
       if (MOP.isReg() && MOP.isKill())
         DefinedInBB.addReg(MOP.getReg());
 
+  // Copy over any implicit-def operands. This is like MI.copyImplicitOps, but
+  // only copies implicit defs.
+  auto CopyImplicitOps = [&](MachineBasicBlock::iterator MI) {
+    for (const MachineOperand &MO :
+         llvm::drop_begin(MI->operands(), MI->getDesc().getNumOperands()))
----------------
rj-jesus wrote:

I believe you could do `MI->implicit_operands()` if you think that's easier to read?

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


More information about the llvm-commits mailing list