diff options
Diffstat (limited to 'contrib/llvm-project/llvm/lib/CodeGen/LiveRangeEdit.cpp')
-rw-r--r-- | contrib/llvm-project/llvm/lib/CodeGen/LiveRangeEdit.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/contrib/llvm-project/llvm/lib/CodeGen/LiveRangeEdit.cpp b/contrib/llvm-project/llvm/lib/CodeGen/LiveRangeEdit.cpp index ff49e080090c..c3477cd8ce34 100644 --- a/contrib/llvm-project/llvm/lib/CodeGen/LiveRangeEdit.cpp +++ b/contrib/llvm-project/llvm/lib/CodeGen/LiveRangeEdit.cpp @@ -352,8 +352,7 @@ void LiveRangeEdit::eliminateDeadDef(MachineInstr *MI, ToShrinkSet &ToShrink) { // unlikely to change anything. We typically don't want to shrink the // PIC base register that has lots of uses everywhere. // Always shrink COPY uses that probably come from live range splitting. - if ((MI->readsVirtualRegister(Reg) && - (MO.isDef() || TII.isCopyInstr(*MI))) || + if ((MI->readsVirtualRegister(Reg) && (MI->isCopy() || MO.isDef())) || (MO.readsReg() && (MRI.hasOneNonDBGUse(Reg) || useIsKill(LI, MO)))) ToShrink.insert(&LI); else if (MO.readsReg()) |