diff options
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/CodeGen/LivePhysRegs.cpp | 6 | ||||
-rw-r--r-- | llvm/lib/Target/Hexagon/HexagonFrameLowering.cpp | 5 |
2 files changed, 5 insertions, 6 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); } } diff --git a/llvm/lib/Target/Hexagon/HexagonFrameLowering.cpp b/llvm/lib/Target/Hexagon/HexagonFrameLowering.cpp index f2f4598ba09..4b3e11ed3fd 100644 --- a/llvm/lib/Target/Hexagon/HexagonFrameLowering.cpp +++ b/llvm/lib/Target/Hexagon/HexagonFrameLowering.cpp @@ -1706,11 +1706,6 @@ bool HexagonFrameLowering::expandStoreVec2(MachineBasicBlock &B, for (auto R = B.begin(); R != It; ++R) { Clobbers.clear(); LPR.stepForward(*R, Clobbers); - // Dead defs are recorded in Clobbers, but are not automatically removed - // from the live set. - for (auto &C : Clobbers) - if (C.second->isReg() && C.second->isDead()) - LPR.removeReg(C.first); } DebugLoc DL = MI->getDebugLoc(); |