Skip to content

Commit f8499fb

Browse files
committed
Copy the livein set.
1 parent 35d7fff commit f8499fb

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

llvm/lib/CodeGen/BasicBlockPathCloning.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -179,10 +179,9 @@ bool ApplyCloning(MachineFunction &MF,
179179
// to that of PrevBB and CloneBB.
180180
PrevBB->ReplaceUsesOfBlockWith(OrigBB, CloneBB);
181181

182-
// CloneBB has a single predecessor. Therefore, its livein is the liveout
183-
// of the predecessor block.
184-
for (auto &LiveOut : PrevBB->liveouts())
185-
CloneBB->addLiveIn(LiveOut);
182+
// Copy the livein set.
183+
for (auto &LiveIn : OrigBB->liveins())
184+
CloneBB->addLiveIn(LiveIn);
186185

187186
PrevBB = CloneBB;
188187
}

0 commit comments

Comments
 (0)