[llvm] b1edfa1 - [SelectionDAG] Prevent converting a virtual register to an MCRegister. (#122857)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 14 10:03:23 PST 2025
Author: Craig Topper
Date: 2025-01-14T10:03:19-08:00
New Revision: b1edfa1c07dc6ac42205b3397304e5b5f77617a1
URL: https://github.com/llvm/llvm-project/commit/b1edfa1c07dc6ac42205b3397304e5b5f77617a1
DIFF: https://github.com/llvm/llvm-project/commit/b1edfa1c07dc6ac42205b3397304e5b5f77617a1.diff
LOG: [SelectionDAG] Prevent converting a virtual register to an MCRegister. (#122857)
I believe the goal is that MCRegister is only for physical registers.
Added:
Modified:
llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
index d64a90bcaae7da..b416e98fe61a8b 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
@@ -706,6 +706,8 @@ bool SelectionDAGISel::runOnMachineFunction(MachineFunction &mf) {
continue;
// If Reg is live-in then update debug info to track its copy in a vreg.
+ if (!Reg.isPhysical())
+ continue;
DenseMap<MCRegister, Register>::iterator LDI = LiveInMap.find(Reg);
if (LDI != LiveInMap.end()) {
assert(!hasFI && "There's no handling of frame pointer updating here yet "
More information about the llvm-commits
mailing list