summaryrefslogtreecommitdiff
path: root/lib/CodeGen/DeadMachineInstructionElim.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CodeGen/DeadMachineInstructionElim.cpp')
-rw-r--r--lib/CodeGen/DeadMachineInstructionElim.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/DeadMachineInstructionElim.cpp b/lib/CodeGen/DeadMachineInstructionElim.cpp
index b0cb24d95f..6e01e59349 100644
--- a/lib/CodeGen/DeadMachineInstructionElim.cpp
+++ b/lib/CodeGen/DeadMachineInstructionElim.cpp
@@ -55,7 +55,7 @@ FunctionPass *llvm::createDeadMachineInstructionElimPass() {
bool DeadMachineInstructionElim::isDead(const MachineInstr *MI) const {
// Don't delete instructions with side effects.
bool SawStore = false;
- if (!MI->isSafeToMove(TII, SawStore, 0))
+ if (!MI->isSafeToMove(TII, SawStore, 0) && !MI->isPHI())
return false;
// Examine each operand.