summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2017-05-26 00:54:24 +0000
committerMatthias Braun <matze@braunis.de>2017-05-26 00:54:24 +0000
commitdaea6f1e8496bb72fe6455b650f65952f2461f34 (patch)
tree110c4740ee9462e61a3d1a7559c450eec55285f8 /llvm/lib/CodeGen
parentf307d3ea4d34aa21ff9a5e0f8b6b96d85b71cee0 (diff)
downloadbcm5719-llvm-daea6f1e8496bb72fe6455b650f65952f2461f34.tar.gz
bcm5719-llvm-daea6f1e8496bb72fe6455b650f65952f2461f34.zip
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
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/LivePhysRegs.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/LivePhysRegs.cpp b/llvm/lib/CodeGen/LivePhysRegs.cpp
index 59860e3f2ff..774fa4c8c3e 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;
}
OpenPOWER on IntegriCloud