From 9306f4af13e81a04b7434058d27cbbc4e0cca3cd Mon Sep 17 00:00:00 2001 From: Jessica Paquette Date: Thu, 10 Aug 2017 23:11:24 +0000 Subject: [PATCH] [MachineOutliner] Add RegState::Define to LDRXpost in insertOutlinedCall This fixes a MachineVerifier failure in machine-outliner.mir. Not explicitly adding RegState::Define to the LR argument makes it unhappy because an explicit definition is marked as a use. Build failure: http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-expensive/7496/testReport/junit/LLVM/CodeGen_AArch64/machine_outliner_mir/ git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310671 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/AArch64/AArch64InstrInfo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Target/AArch64/AArch64InstrInfo.cpp b/lib/Target/AArch64/AArch64InstrInfo.cpp index 4a68dff9d6e..e5324c601e5 100644 --- a/lib/Target/AArch64/AArch64InstrInfo.cpp +++ b/lib/Target/AArch64/AArch64InstrInfo.cpp @@ -4626,7 +4626,7 @@ MachineBasicBlock::iterator AArch64InstrInfo::insertOutlinedCall( // Restore the link register. MachineInstr *LDRXpost = BuildMI(MF, DebugLoc(), get(AArch64::LDRXpost)) .addReg(AArch64::SP, RegState::Define) - .addReg(AArch64::LR) + .addReg(AArch64::LR, RegState::Define) .addReg(AArch64::SP) .addImm(16); It = MBB.insert(It, LDRXpost); -- 2.50.1