[llvm] r303949 - LivePhysRegs: Follow-up to r303937
Matthias Braun via llvm-commits
llvm-commits at lists.llvm.org
Thu May 25 17:54:24 PDT 2017
Author: matze
Date: Thu May 25 19:54:24 2017
New Revision: 303949
URL: http://llvm.org/viewvc/llvm-project?rev=303949&view=rev
Log:
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.
Modified:
llvm/trunk/lib/CodeGen/LivePhysRegs.cpp
Modified: llvm/trunk/lib/CodeGen/LivePhysRegs.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LivePhysRegs.cpp?rev=303949&r1=303948&r2=303949&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/LivePhysRegs.cpp (original)
+++ llvm/trunk/lib/CodeGen/LivePhysRegs.cpp Thu May 25 19:54:24 2017
@@ -230,7 +230,7 @@ void llvm::computeLiveIns(LivePhysRegs &
// 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;
}
More information about the llvm-commits
mailing list