From 3d238de4d54eb0b16afd96a57f49f92b2f7748e0 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Mon, 2 Dec 2013 07:37:46 +0000 Subject: [PATCH] Merging r195401: ------------------------------------------------------------------------ r195401 | lhames | 2013-11-21 16:46:32 -0800 (Thu, 21 Nov 2013) | 8 lines Fix a typo where we were creating operands instead of ones. Add an assertion to make sure we catch this in the future. Fixes . ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_34@196073 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/CodeGen/MachineOperand.h | 2 ++ lib/Target/ARM/ARMBaseInstrInfo.cpp | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/include/llvm/CodeGen/MachineOperand.h b/include/llvm/CodeGen/MachineOperand.h index 57b28fecf86..40f3580bfdb 100644 --- a/include/llvm/CodeGen/MachineOperand.h +++ b/include/llvm/CodeGen/MachineOperand.h @@ -564,6 +564,8 @@ public: unsigned SubReg = 0, bool isDebug = false, bool isInternalRead = false) { + assert(!(isDead && !isDef) && "Dead flag on non-def"); + assert(!(isKill && isDef) && "Kill flag on def"); MachineOperand Op(MachineOperand::MO_Register); Op.IsDef = isDef; Op.IsImp = isImp; diff --git a/lib/Target/ARM/ARMBaseInstrInfo.cpp b/lib/Target/ARM/ARMBaseInstrInfo.cpp index b2dd9d85e52..67534c4a445 100644 --- a/lib/Target/ARM/ARMBaseInstrInfo.cpp +++ b/lib/Target/ARM/ARMBaseInstrInfo.cpp @@ -1934,7 +1934,8 @@ bool llvm::tryFoldSPUpdateIntoPushPop(MachineFunction &MF, return false; // Mark the unimportant registers as in the POP. - RegList.push_back(MachineOperand::CreateReg(CurReg, true, false, true)); + RegList.push_back(MachineOperand::CreateReg(CurReg, true, false, false, + true)); } if (RegsNeeded > 0)