From: Matthias Braun Date: Tue, 24 Nov 2015 20:06:56 +0000 (+0000) Subject: LiveVariables should not clobber MachineOperand::IsDead, ::IsKill on reserved physica... X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=1bb03c5884405c428c3ab54631c0528b6cedeb54;p=oota-llvm.git LiveVariables should not clobber MachineOperand::IsDead, ::IsKill on reserved physical registers Patch by Nick Johnson Differential Revision: http://reviews.llvm.org/D14875 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254012 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/LiveVariables.cpp b/lib/CodeGen/LiveVariables.cpp index 007f4eb1ae3..06b86d82daf 100644 --- a/lib/CodeGen/LiveVariables.cpp +++ b/lib/CodeGen/LiveVariables.cpp @@ -522,11 +522,15 @@ void LiveVariables::runOnInstr(MachineInstr *MI, continue; unsigned MOReg = MO.getReg(); if (MO.isUse()) { - MO.setIsKill(false); + if (!(TargetRegisterInfo::isPhysicalRegister(MOReg) && + MRI->isReserved(MOReg))) + MO.setIsKill(false); if (MO.readsReg()) UseRegs.push_back(MOReg); } else /*MO.isDef()*/ { - MO.setIsDead(false); + if (!(TargetRegisterInfo::isPhysicalRegister(MOReg) && + MRI->isReserved(MOReg))) + MO.setIsDead(false); DefRegs.push_back(MOReg); } }