RegisterPressure: Improve assert message
authorMatthias Braun <matze@braunis.de>
Tue, 3 Nov 2015 01:53:36 +0000 (01:53 +0000)
committerMatthias Braun <matze@braunis.de>
Tue, 3 Nov 2015 01:53:36 +0000 (01:53 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251885 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/RegisterPressure.cpp

index 57dde2f2e2d0ef01fa7bcecb4899fafb30282877..6ff16e551be2d6c24c0910f536cf24d82ec3c14d 100644 (file)
@@ -862,7 +862,8 @@ getUpwardPressureDelta(const MachineInstr *MI, /*const*/ PressureDiff &PDiff,
     unsigned MNew = MOld;
     // Ignore DeadDefs here because they aren't captured by PressureChange.
     unsigned PNew = POld + PDiffI->getUnitInc();
-    assert((PDiffI->getUnitInc() >= 0) == (PNew >= POld) && "PSet overflow");
+    assert((PDiffI->getUnitInc() >= 0) == (PNew >= POld)
+           && "PSet overflow/underflow");
     if (PNew > MOld)
       MNew = PNew;
     // Check if current pressure has exceeded the limit.