Commit c9dfb07f authored by Tanya Lattner's avatar Tanya Lattner
Browse files

Merge r64316 from mainline.

Don't try to set an EFLAGS operand to dead if no instruction was created.
This fixes a bug introduced by r61215.

llvm-svn: 64524
parent 8c4aa724
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -404,11 +404,13 @@ eliminateCallFramePseudoInstr(MachineFunction &MF, MachineBasicBlock &MBB,
        }
      }

      if (New) {
        // The EFLAGS implicit def is dead.
        New->getOperand(3).setIsDead();

        // Replace the pseudo instruction with a new instruction...
      if (New) MBB.insert(I, New);
        MBB.insert(I, New);
      }
    }
  } else if (I->getOpcode() == getCallFrameDestroyOpcode()) {
    // If we are performing frame pointer elimination and if the callee pops