[llvm] [MachineLateInstrsCleanup] Handle multiple kills for a preceding definition. (PR #119132)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Sun Dec 8 12:31:49 PST 2024
================
@@ -225,8 +231,8 @@ bool MachineLateInstrsCleanup::processBlock(MachineBasicBlock *MBB) {
MBBDefs.erase(Reg);
MBBKills.erase(Reg);
} else if (MI.findRegisterUseOperandIdx(Reg, TRI, true /*isKill*/) != -1)
- // Keep track of register kills.
- MBBKills[Reg] = &MI;
+ // Keep track of all instructions that fully or partially kills Reg.
+ MBBKills[Reg].push_back(&MI);
----------------
arsenm wrote:
You could also just do MRI.clearKillFlags any time it could matter
https://github.com/llvm/llvm-project/pull/119132
More information about the llvm-commits
mailing list