Skip to content

Commit 4456624

Browse files
committed
More comments
1 parent f80bb29 commit 4456624

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

llvm/lib/CodeGen/VirtRegMap.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -557,14 +557,16 @@ bool VirtRegRewriter::subRegLiveThrough(const MachineInstr &MI,
557557
}
558558

559559
/// Compute a lanemask for undef lanes which need to be preserved out of the
560-
/// defining block for a register assignment.
560+
/// defining block for a register assignment for a subregister def. \p PhysReg
561+
/// is assigned to \p LI, which is the main range.
561562
LaneBitmask VirtRegRewriter::liveOutUndefPhiLanesForUndefSubregDef(
562563
const LiveInterval &LI, const MachineBasicBlock &MBB, unsigned SubReg,
563564
MCPhysReg PhysReg, const MachineInstr &MI) const {
564565
LaneBitmask UndefMask = ~TRI->getSubRegIndexLaneMask(SubReg);
565566
LaneBitmask LiveOutUndefLanes;
566567

567568
for (const LiveInterval::SubRange &SR : LI.subranges()) {
569+
// Figure out which lanes are undef live into a successor.
568570
LaneBitmask NeedImpDefLanes = UndefMask & SR.LaneMask;
569571
if (NeedImpDefLanes.any() && !LIS->isLiveOutOfMBB(SR, &MBB)) {
570572
for (const MachineBasicBlock *Succ : MBB.successors()) {

0 commit comments

Comments
 (0)