summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/LivePhysRegs.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/CodeGen/LivePhysRegs.cpp')
-rw-r--r--llvm/lib/CodeGen/LivePhysRegs.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/LivePhysRegs.cpp b/llvm/lib/CodeGen/LivePhysRegs.cpp
index 9c637cf0ed5..b0cc62d5099 100644
--- a/llvm/lib/CodeGen/LivePhysRegs.cpp
+++ b/llvm/lib/CodeGen/LivePhysRegs.cpp
@@ -106,9 +106,13 @@ void LivePhysRegs::stepForward(const MachineInstr &MI,
// Add defs to the set.
for (auto Reg : Clobbers) {
- // Skip dead defs. They shouldn't be added to the set.
+ // Skip dead defs and registers clobbered by regmasks. They shouldn't
+ // be added to the set.
if (Reg.second->isReg() && Reg.second->isDead())
continue;
+ if (Reg.second->isRegMask() &&
+ MachineOperand::clobbersPhysReg(Reg.second->getRegMask(), Reg.first))
+ continue;
addReg(Reg.first);
}
}
OpenPOWER on IntegriCloud