[llvm] Revert "[RegAlloc] Strengthen asserts in LiveRangeEdit::scanRemattable [nfc]" (PR #160897)
Philip Reames via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 26 07:55:49 PDT 2025
https://github.com/preames created https://github.com/llvm/llvm-project/pull/160897
Reverts llvm/llvm-project#160765. Failures on buildbot indicate second assertion does not in fact hold.
>From 22e10bb12cab65673e7259c63f322208761a0da6 Mon Sep 17 00:00:00 2001
From: Philip Reames <listmail at philipreames.com>
Date: Fri, 26 Sep 2025 07:55:18 -0700
Subject: [PATCH] =?UTF-8?q?Revert=20"[RegAlloc]=20Strengthen=20asserts=20i?=
=?UTF-8?q?n=20LiveRangeEdit::scanRemattable=20[nfc]=20=E2=80=A6"?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This reverts commit bba91727789bed302758dac282107a44c7b33504.
---
llvm/lib/CodeGen/LiveRangeEdit.cpp | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/llvm/lib/CodeGen/LiveRangeEdit.cpp b/llvm/lib/CodeGen/LiveRangeEdit.cpp
index 4aeacc332476d..59bc82dc267b5 100644
--- a/llvm/lib/CodeGen/LiveRangeEdit.cpp
+++ b/llvm/lib/CodeGen/LiveRangeEdit.cpp
@@ -75,11 +75,11 @@ void LiveRangeEdit::scanRemattable() {
Register Original = VRM->getOriginal(getReg());
LiveInterval &OrigLI = LIS.getInterval(Original);
VNInfo *OrigVNI = OrigLI.getVNInfoAt(VNI->def);
- assert(OrigVNI && "Corrupt interval mapping?");
- if (OrigVNI->isPHIDef())
+ if (!OrigVNI)
continue;
MachineInstr *DefMI = LIS.getInstructionFromIndex(OrigVNI->def);
- assert(DefMI && "Missing instruction for def slot");
+ if (!DefMI)
+ continue;
if (TII.isReMaterializable(*DefMI))
Remattable.insert(OrigVNI);
}
More information about the llvm-commits
mailing list