Skip to content

Commit b1edfa1

Browse files
authored
[SelectionDAG] Prevent converting a virtual register to an MCRegister. (#122857)
I believe the goal is that MCRegister is only for physical registers.
1 parent 692c77f commit b1edfa1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -706,6 +706,8 @@ bool SelectionDAGISel::runOnMachineFunction(MachineFunction &mf) {
706706
continue;
707707

708708
// If Reg is live-in then update debug info to track its copy in a vreg.
709+
if (!Reg.isPhysical())
710+
continue;
709711
DenseMap<MCRegister, Register>::iterator LDI = LiveInMap.find(Reg);
710712
if (LDI != LiveInMap.end()) {
711713
assert(!hasFI && "There's no handling of frame pointer updating here yet "

0 commit comments

Comments
 (0)