aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-02-11 19:50:24 +0000
committerDan Gohman <gohman@apple.com>2009-02-11 19:50:24 +0000
commitd293e0d2dcd3dc4e6030e9644846ed4d0b1bbde3 (patch)
treee0f4f651d5de13ee9ef9b3c9ef8f1e33166cf69e /lib
parent85b0edec4672f6ac6c15f757b119d04232a61861 (diff)
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/trunk@64316 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Target/X86/X86RegisterInfo.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/Target/X86/X86RegisterInfo.cpp b/lib/Target/X86/X86RegisterInfo.cpp
index 89d9f9b939..59e49eaf4f 100644
--- a/lib/Target/X86/X86RegisterInfo.cpp
+++ b/lib/Target/X86/X86RegisterInfo.cpp
@@ -412,11 +412,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