Commit 63fa617d authored by Bill Wendling's avatar Bill Wendling
Browse files

Merging r195401:

------------------------------------------------------------------------
r195401 | lhames | 2013-11-21 16:46:32 -0800 (Thu, 21 Nov 2013) | 8 lines

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: 196073
parent e9dd613c
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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;
+2 −1
Original line number Diff line number Diff line
@@ -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)