[llvm] 9412769 - Revert "[RegAlloc] Strengthen asserts in LiveRangeEdit::scanRemattable [nfc]" (#160897)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 26 07:56:04 PDT 2025
Author: Philip Reames
Date: 2025-09-26T07:55:59-07:00
New Revision: 9412769c1e03a928ba83ee24da084e26ca713dbf
URL: https://github.com/llvm/llvm-project/commit/9412769c1e03a928ba83ee24da084e26ca713dbf
DIFF: https://github.com/llvm/llvm-project/commit/9412769c1e03a928ba83ee24da084e26ca713dbf.diff
LOG: Revert "[RegAlloc] Strengthen asserts in LiveRangeEdit::scanRemattable [nfc]" (#160897)
Reverts llvm/llvm-project#160765. Failures on buildbot indicate second
assertion does not in fact hold.
Added:
Modified:
llvm/lib/CodeGen/LiveRangeEdit.cpp
Removed:
################################################################################
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