Fix a typo where we were creating <def,kill> operands instead of

<def,dead> ones.

Add an assertion to make sure we catch this in the future.

Fixes <rdar://problem/15464559>.

llvm-svn: 195401
This commit is contained in:
Lang Hames 2013-11-22 00:46:32 +00:00
parent b3e721995f
commit 1ca1123598
2 changed files with 4 additions and 1 deletions

View File

@ -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;

View File

@ -1934,7 +1934,8 @@ bool llvm::tryFoldSPUpdateIntoPushPop(MachineFunction &MF,
return false;
// Mark the unimportant registers as <def,dead> 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)