[llvm] [LiveIntervals] Ignore artificial regs when adding kill flags (PR #116963)
Sander de Smalen via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 4 08:41:16 PST 2024
================
@@ -730,7 +730,16 @@ void LiveIntervals::addKillFlags(const VirtRegMap *VRM) {
// Find the regunit intervals for the assigned register. They may overlap
// the virtual register live range, cancelling any kills.
RU.clear();
- for (MCRegUnit Unit : TRI->regunits(PhysReg)) {
+ LaneBitmask ArtificialLanes = LaneBitmask::getNone();
+ for (MCRegUnitMaskIterator UI(PhysReg, TRI); UI.isValid(); ++UI) {
+ auto [Unit, Bitmask] = *UI;
+ // Record lane mask for all artificial RegUnits for this physreg.
+ for (MCRegUnitRootIterator Root(Unit, TRI); Root.isValid(); ++Root) {
+ if (TRI->isArtificial(*Root)) {
+ ArtificialLanes |= Bitmask;
+ break;
+ }
+ }
----------------
sdesmalen-arm wrote:
Perhaps you reviewed an older revision of the PR, I had moved the check to a helper function in 5e5c20cfdb653ac7da2b17b46eab9dc694d558b7
https://github.com/llvm/llvm-project/pull/116963
More information about the llvm-commits
mailing list