mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-17 00:57:54 +00:00
Fix the case where an instruction is not properly marked as using all registers that alias its inputs.
llvm-svn: 57286
This commit is contained in:
parent
08e60cee90
commit
7f99714393
@ -575,8 +575,26 @@ void RALocal::ComputeLocalLiveness(MachineBasicBlock& MBB) {
|
||||
// them for later. Also, we have to process these
|
||||
// _before_ processing the defs, since an instr
|
||||
// uses regs before it defs them.
|
||||
if (MO.isReg() && MO.getReg() && MO.isUse())
|
||||
if (MO.isReg() && MO.getReg() && MO.isUse()) {
|
||||
LastUseDef[MO.getReg()] = std::make_pair(I, i);
|
||||
|
||||
|
||||
if (TargetRegisterInfo::isVirtualRegister(MO.getReg())) continue;
|
||||
|
||||
const unsigned* subregs = TRI->getAliasSet(MO.getReg());
|
||||
if (subregs) {
|
||||
while (*subregs) {
|
||||
DenseMap<unsigned, std::pair<MachineInstr*, unsigned> >::iterator
|
||||
alias = LastUseDef.find(*subregs);
|
||||
|
||||
if (alias != LastUseDef.end() &&
|
||||
alias->second.first != I)
|
||||
LastUseDef[*subregs] = std::make_pair(I, i);
|
||||
|
||||
++subregs;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (unsigned i = 0, e = I->getNumOperands(); i != e; ++i) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user