[llvm] r310671 - [MachineOutliner] Add RegState::Define to LDRXpost in insertOutlinedCall
Jessica Paquette via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 10 16:11:24 PDT 2017
Author: paquette
Date: Thu Aug 10 16:11:24 2017
New Revision: 310671
URL: http://llvm.org/viewvc/llvm-project?rev=310671&view=rev
Log:
[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/
Modified:
llvm/trunk/lib/Target/AArch64/AArch64InstrInfo.cpp
Modified: llvm/trunk/lib/Target/AArch64/AArch64InstrInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AArch64/AArch64InstrInfo.cpp?rev=310671&r1=310670&r2=310671&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AArch64/AArch64InstrInfo.cpp (original)
+++ llvm/trunk/lib/Target/AArch64/AArch64InstrInfo.cpp Thu Aug 10 16:11:24 2017
@@ -4626,7 +4626,7 @@ MachineBasicBlock::iterator AArch64Instr
// 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);
More information about the llvm-commits
mailing list