diff --git a/lib/CodeGen/LiveRangeCalc.cpp b/lib/CodeGen/LiveRangeCalc.cpp index a07c3a35dc7..d804b39c597 100644 --- a/lib/CodeGen/LiveRangeCalc.cpp +++ b/lib/CodeGen/LiveRangeCalc.cpp @@ -43,11 +43,8 @@ void LiveRangeCalc::reset(const MachineFunction *mf, static void createDeadDef(SlotIndexes &Indexes, VNInfo::Allocator &Alloc, LiveRange &LR, const MachineOperand &MO) { const MachineInstr *MI = MO.getParent(); - SlotIndex DefIdx; - if (MI->isPHI()) - DefIdx = Indexes.getMBBStartIdx(MI->getParent()); - else - DefIdx = Indexes.getInstructionIndex(MI).getRegSlot(MO.isEarlyClobber()); + SlotIndex DefIdx = + Indexes.getInstructionIndex(MI).getRegSlot(MO.isEarlyClobber()); // Create the def in LR. This may find an existing def. LR.createDeadDef(DefIdx, Alloc);