From daea6f1e8496bb72fe6455b650f65952f2461f34 Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Fri, 26 May 2017 00:54:24 +0000 Subject: [PATCH] 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 --- llvm/lib/CodeGen/LivePhysRegs.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/lib/CodeGen/LivePhysRegs.cpp b/llvm/lib/CodeGen/LivePhysRegs.cpp index 59860e3f2ff7..774fa4c8c3eb 100644 --- a/llvm/lib/CodeGen/LivePhysRegs.cpp +++ b/llvm/lib/CodeGen/LivePhysRegs.cpp @@ -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; }