diff options
author | Matthias Braun <matze@braunis.de> | 2016-03-29 03:08:18 +0000 |
---|---|---|
committer | Matthias Braun <matze@braunis.de> | 2016-03-29 03:08:18 +0000 |
commit | 82cff886910c1e4a59963760609983aaef2f7d44 (patch) | |
tree | c4866f6a4efb25c34131e940bb44314e2d8e2944 /llvm/lib/CodeGen/LiveVariables.cpp | |
parent | 3c8edde1411dfae13b7ccce362dd8a1f946c8c11 (diff) | |
download | bcm5719-llvm-82cff886910c1e4a59963760609983aaef2f7d44.tar.gz bcm5719-llvm-82cff886910c1e4a59963760609983aaef2f7d44.zip |
LiveVariables: Do not remove dead flags from vreg operands
Also add a FIXME comment on why Mips RDDSP causes bogus dead flags to be
added which LiveVariables cleans up by accident.
llvm-svn: 264695
Diffstat (limited to 'llvm/lib/CodeGen/LiveVariables.cpp')
-rw-r--r-- | llvm/lib/CodeGen/LiveVariables.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/LiveVariables.cpp b/llvm/lib/CodeGen/LiveVariables.cpp index 78ede3e748d..b153260c2b5 100644 --- a/llvm/lib/CodeGen/LiveVariables.cpp +++ b/llvm/lib/CodeGen/LiveVariables.cpp @@ -527,9 +527,14 @@ void LiveVariables::runOnInstr(MachineInstr *MI, MO.setIsKill(false); if (MO.readsReg()) UseRegs.push_back(MOReg); - } else /*MO.isDef()*/ { - if (!(TargetRegisterInfo::isPhysicalRegister(MOReg) && - MRI->isReserved(MOReg))) + } else { + assert(MO.isDef()); + // FIXME: We should not remove any dead flags. Howeve the MIPS RDDSP + // instruction needs it at the moment: RDDSP gets its implicit use + // operands added too late in the processing so InstrEmitter adds an + // incorrect dead flag because the uses are not yet visible. + if (TargetRegisterInfo::isPhysicalRegister(MOReg) && + !MRI->isReserved(MOReg)) MO.setIsDead(false); DefRegs.push_back(MOReg); } |