[llvm] [LiveIntervals] Ignore artificial regs when adding kill flags (PR #116963)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 3 08:59:00 PST 2024


================
@@ -780,7 +783,7 @@ void LiveIntervals::addKillFlags(const VirtRegMap *VRM) {
         // are actually never written by %2. After assignment the <kill>
         // flag at the read instruction is invalid.
         LaneBitmask DefinedLanesMask;
-        if (LI.hasSubRanges()) {
+        if (LI.hasSubRanges() && TRI->getNumAllocatableSubRegs(PhysReg) > 1) {
----------------
arsenm wrote:

I don't understand why this doesn't naturally fall out of the lanemasks for the register (e.g. above replace the TRI->regunits with MCRegUnitMaskIterator) 

https://github.com/llvm/llvm-project/pull/116963


More information about the llvm-commits mailing list