Skip to content

Commit b0b1659

Browse files
committed
More comments
1 parent 785a365 commit b0b1659

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
@@ -541,14 +541,16 @@ bool VirtRegRewriter::subRegLiveThrough(const MachineInstr &MI,
541541
}
542542

543543
/// Compute a lanemask for undef lanes which need to be preserved out of the
544-
/// defining block for a register assignment.
544+
/// defining block for a register assignment for a subregister def. \p PhysReg
545+
/// is assigned to \p LI, which is the main range.
545546
LaneBitmask VirtRegRewriter::liveOutUndefPhiLanesForUndefSubregDef(
546547
const LiveInterval &LI, const MachineBasicBlock &MBB, unsigned SubReg,
547548
MCPhysReg PhysReg, const MachineInstr &MI) const {
548549
LaneBitmask UndefMask = ~TRI->getSubRegIndexLaneMask(SubReg);
549550
LaneBitmask LiveOutUndefLanes;
550551

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

0 commit comments

Comments
 (0)