[llvm] VirtRegRewriter: Add super register defs for live out undef lanes (PR #112679)

Quentin Colombet via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 21 01:26:50 PDT 2024


================
@@ -532,6 +535,26 @@ bool VirtRegRewriter::subRegLiveThrough(const MachineInstr &MI,
   return false;
 }
 
+/// Check if we need to maintain liveness for undef subregister lanes that are
+/// live out of a block.
+bool VirtRegRewriter::needLiveOutUndefSubregDef(const LiveInterval &LI,
+                                                const MachineBasicBlock &MBB,
+                                                unsigned SubReg,
+                                                MCPhysReg PhysReg) const {
+  LaneBitmask UndefMask = ~TRI->getSubRegIndexLaneMask(SubReg);
----------------
qcolombet wrote:

Assert that SubReg is not 0.

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


More information about the llvm-commits mailing list