diff options
author | Tanya Lattner <tonic@nondot.org> | 2009-02-14 01:14:49 +0000 |
---|---|---|
committer | Tanya Lattner <tonic@nondot.org> | 2009-02-14 01:14:49 +0000 |
commit | 606531328717459521c87b6ac091720c1e763365 (patch) | |
tree | 8558911ad512da2c9a8cd8c7dad97b0fa15f238e | |
parent | 4aedbbf806d1bc4b7b6e8aa8aa486b64ec972230 (diff) | |
download | llvm-606531328717459521c87b6ac091720c1e763365.tar.gz |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_25@64524 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Target/X86/X86RegisterInfo.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/Target/X86/X86RegisterInfo.cpp b/lib/Target/X86/X86RegisterInfo.cpp index 73cab622b668..00fb67b66700 100644 --- a/lib/Target/X86/X86RegisterInfo.cpp +++ b/lib/Target/X86/X86RegisterInfo.cpp @@ -404,11 +404,13 @@ eliminateCallFramePseudoInstr(MachineFunction &MF, MachineBasicBlock &MBB, } } - // The EFLAGS implicit def is dead. - New->getOperand(3).setIsDead(); + 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); + // Replace the pseudo instruction with a new instruction... + MBB.insert(I, New); + } } } else if (I->getOpcode() == getCallFrameDestroyOpcode()) { // If we are performing frame pointer elimination and if the callee pops |