[verify-regalloc] Verify after allocation and before postOptimization
I've now hit several cases where a mistake in the regalloc main loop caused corrupt live intervals that didn't get caught until either the next verify or during post-optimization. The later case is rather confusing and tends to lead one down false trails, so let's catch corruption before that.
GitOrigin-RevId: 13753808f4e990089bf34ff44474e85cc3e6e775
diff --git a/lib/CodeGen/RegAllocGreedy.cpp b/lib/CodeGen/RegAllocGreedy.cpp
index a8c6c20..577e232 100644
--- a/lib/CodeGen/RegAllocGreedy.cpp
+++ b/lib/CodeGen/RegAllocGreedy.cpp
@@ -3256,6 +3256,9 @@
allocatePhysRegs();
tryHintsRecoloring();
+
+ if (VerifyEnabled)
+ MF->verify(this, "Before post optimization");
postOptimization();
reportNumberOfSplillsReloads();