[llvm] r201296 - [RegAlloc] Fix the assertion in the last chance recoloring to match the

Quentin Colombet qcolombet at apple.com
Wed Feb 12 21:17:37 PST 2014


Author: qcolombet
Date: Wed Feb 12 23:17:37 2014
New Revision: 201296

URL: http://llvm.org/viewvc/llvm-project?rev=201296&view=rev
Log:
[RegAlloc] Fix the assertion in the last chance recoloring to match the
condition at the call site.

Modified:
    llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp

Modified: llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp?rev=201296&r1=201295&r2=201296&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp (original)
+++ llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp Wed Feb 12 23:17:37 2014
@@ -1931,7 +1931,7 @@ unsigned RAGreedy::tryLastChanceRecolori
                                            unsigned Depth) {
   DEBUG(dbgs() << "Try last chance recoloring for " << VirtReg << '\n');
   // Ranges must be Done.
-  assert(getStage(VirtReg) >= RS_Done &&
+  assert((getStage(VirtReg) >= RS_Done || !VirtReg.isSpillable()) &&
          "Last chance recoloring should really be last chance");
   // Set the max depth to LastChanceRecoloringMaxDepth.
   // We may want to reconsider that if we end up with a too large search space





More information about the llvm-commits mailing list