Index: lib/CodeGen/ScheduleDAGInstrs.cpp =================================================================== --- lib/CodeGen/ScheduleDAGInstrs.cpp +++ lib/CodeGen/ScheduleDAGInstrs.cpp @@ -971,15 +971,16 @@ // Now process all uses. for (unsigned j = 0, n = MI->getNumOperands(); j != n; ++j) { const MachineOperand &MO = MI->getOperand(j); - if (!MO.isReg() || !MO.isUse()) + if (!MO.isReg()) continue; unsigned Reg = MO.getReg(); if (Reg == 0) continue; - if (TRI->isPhysicalRegister(Reg)) - addPhysRegDeps(SU, j); - else if (MO.readsReg()) // ignore undef operands + if (TRI->isPhysicalRegister(Reg)) { + if (MO.isUse()) + addPhysRegDeps(SU, j); + } else if (MO.readsReg()) // ignore undef operands addVRegUseDeps(SU, j); }