summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2016-04-29 02:44:48 +0000
committerMatthias Braun <matze@braunis.de>2016-04-29 02:44:48 +0000
commit5e4ac856d6a3e2f2e49ef3a99dfb0db5eee97848 (patch)
tree10aeabaf83a405c411141abca9fcce68c069f833 /llvm/lib/CodeGen
parent10aced824a47d3f31dc9ec027808a3ba2a7c98e1 (diff)
downloadbcm5719-llvm-5e4ac856d6a3e2f2e49ef3a99dfb0db5eee97848.tar.gz
bcm5719-llvm-5e4ac856d6a3e2f2e49ef3a99dfb0db5eee97848.zip
RegisterPressure: Cannot produce dead (subregister) defs anymore
With the DetectDeadLanes pass in place we cannot run into situations anymore where defs suddenly become dead. Also add a missing check so we do not try to add an undef flag to a physreg (found by visual inspection, no failing test). llvm-svn: 267976
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/RegisterPressure.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/RegisterPressure.cpp b/llvm/lib/CodeGen/RegisterPressure.cpp
index 58310cdb5ee..e07efd33021 100644
--- a/llvm/lib/CodeGen/RegisterPressure.cpp
+++ b/llvm/lib/CodeGen/RegisterPressure.cpp
@@ -573,9 +573,6 @@ void RegisterOperands::adjustLaneLiveness(const LiveIntervals &LIS,
LaneBitmask LaneMask = I->LaneMask & LiveAfter;
if (LaneMask == 0) {
I = Defs.erase(I);
- // Make sure the operand is properly marked as Dead.
- if (AddFlagsMI != nullptr)
- AddFlagsMI->addRegisterDead(RegUnit, MRI.getTargetRegisterInfo());
} else {
I->LaneMask = LaneMask;
++I;
@@ -595,6 +592,8 @@ void RegisterOperands::adjustLaneLiveness(const LiveIntervals &LIS,
if (AddFlagsMI != nullptr) {
for (const RegisterMaskPair &P : DeadDefs) {
unsigned RegUnit = P.RegUnit;
+ if (!TargetRegisterInfo::isVirtualRegister(RegUnit))
+ continue;
LaneBitmask LiveAfter = getLiveLanesAt(LIS, MRI, true, RegUnit,
Pos.getDeadSlot());
if (LiveAfter == 0)
OpenPOWER on IntegriCloud