From: Djordje Todorovic Date: Thu, 27 Jun 2019 14:31:52 +0000 (+0000) Subject: [LiveRangeEdit] Fix build failure caused by the rL364536 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7418f3f6fa63546f56f34d61aa068af3925dacac;p=llvm [LiveRangeEdit] Fix build failure caused by the rL364536 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364549 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/LiveRangeEdit.cpp b/lib/CodeGen/LiveRangeEdit.cpp index 7968ad32e1a..882e562ba95 100644 --- a/lib/CodeGen/LiveRangeEdit.cpp +++ b/lib/CodeGen/LiveRangeEdit.cpp @@ -231,9 +231,9 @@ bool LiveRangeEdit::foldAsLoad(LiveInterval *LI, return false; LLVM_DEBUG(dbgs() << " folded: " << *FoldMI); LIS.ReplaceMachineInstrInMaps(*UseMI, *FoldMI); - UseMI->eraseFromParent(); if (UseMI->isCall()) UseMI->getMF()->updateCallSiteInfo(UseMI, FoldMI); + UseMI->eraseFromParent(); DefMI->addRegisterDead(LI->reg, nullptr); Dead.push_back(DefMI); ++NumDCEFoldedLoads;