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

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 21 16:39:22 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);
----------------
arsenm wrote:

But I think it works correctly and returns a full mask for 0? 

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


More information about the llvm-commits mailing list