diff options
| author | Krzysztof Parzyszek <kparzysz@codeaurora.org> | 2018-04-30 19:38:47 +0000 |
|---|---|---|
| committer | Krzysztof Parzyszek <kparzysz@codeaurora.org> | 2018-04-30 19:38:47 +0000 |
| commit | 1cf329c9339d460bce6e76632f0265c5003dde42 (patch) | |
| tree | 5e9e73492f6728ebf0715958548041404f75c272 /llvm/lib/CodeGen | |
| parent | 6c0665e22174d474050e85ca367424f6e02476be (diff) | |
| download | bcm5719-llvm-1cf329c9339d460bce6e76632f0265c5003dde42.tar.gz bcm5719-llvm-1cf329c9339d460bce6e76632f0265c5003dde42.zip | |
[LivePhysRegs] Remove registers clobbered by regmasks from the live set
Dead defs were being removed from the live set (in stepForward), but
registers clobbered by regmasks weren't (more specifically, they were
actually removed by removeRegsInMask, but then they were added back in).
llvm-svn: 331219
Diffstat (limited to 'llvm/lib/CodeGen')
| -rw-r--r-- | llvm/lib/CodeGen/LivePhysRegs.cpp | 6 |
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); } } |

