[llvm] [AArch64] Fix incorrectly getting the destination reg of an insn (PR #101205)

Eli Friedman via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 30 11:10:42 PDT 2024


================
@@ -1956,7 +1956,7 @@ maybeMoveCFI(MachineInstr &MI, MachineBasicBlock::iterator MaybeCFI) {
       MaybeCFI->getOpcode() != TargetOpcode::CFI_INSTRUCTION ||
       !(MI.getFlag(MachineInstr::FrameSetup) ||
         MI.getFlag(MachineInstr::FrameDestroy)) ||
-      AArch64InstrInfo::getLdStBaseOp(MI).getReg() != AArch64::SP)
+      MI.getOperand(0).getReg() != AArch64::SP)
----------------
efriedma-quic wrote:

At first glance, this looks like a behavior change; AArch64InstrInfo::getLdStBaseOp returns operand 1 for an unrecognized instruction.  Am I missing something?

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


More information about the llvm-commits mailing list