LivePhysRegs: Follow-up to r303937

We may have situations in which a superregister is reserved and not
added to liveins, so we have to add the subregisters.

llvm-svn: 303949
This commit is contained in:
Matthias Braun 2017-05-26 00:54:24 +00:00
parent f307d3ea4d
commit daea6f1e84
1 changed files with 1 additions and 1 deletions

View File

@ -230,7 +230,7 @@ void llvm::computeLiveIns(LivePhysRegs &LiveRegs,
// Skip the register if we are about to add one of its super registers.
bool ContainsSuperReg = false;
for (MCSuperRegIterator SReg(Reg, &TRI); SReg.isValid(); ++SReg) {
if (LiveRegs.contains(*SReg)) {
if (LiveRegs.contains(*SReg) && !MRI.isReserved(*SReg)) {
ContainsSuperReg = true;
break;
}